/* Bascuñana.com : charte « marbre et lave », socle commun à toutes les pages.
   Les gabarits Divi (Theme Builder) viendront par-dessus ; ce fichier ne pose que
   les jetons, la typographie de lecture et la nuit « insomnie ». */

:root {
  --papier: #F3EFE6;
  --marbre: #FBF9F4;
  --velin: #EAE4D8;
  --filet: #D9D1C1;
  --encre: #1F1C19;
  --texte: #35302B;
  --doux: #6A6158;
  --lave: #A8321E;
  --bistre: #1B1815;

  --eprouver: #6B3A5B;
  --penser: #2E4756;
  --combattre: #A8321E;
  --batir: #7A5A22;
  --registre: var(--lave);

  --titre: 'Cormorant Garamond', 'Cormorant', Garamond, 'Times New Roman', serif;
  --lecture: 'Literata', Georgia, 'Times New Roman', serif;
  --mono: 'IBM Plex Mono', ui-monospace, Menlo, Consolas, monospace;

  --mesure: 42rem;
}

/* La nuit « insomnie » : par choix explicite (classe sur <html>) ou, à défaut, selon le système. */
html.insomnie {
  --papier: #1B1815; --marbre: #24201C; --velin: #2C2722; --filet: #3A332C;
  --encre: #F2ECE0; --texte: #E8E1D3; --doux: #A89E90; --lave: #F07255;
  --eprouver: #D9A6C8; --penser: #9DBFD0; --combattre: #F07255; --batir: #D2A961;
}
@media (prefers-color-scheme: dark) {
  html:not(.jour) {
    --papier: #1B1815; --marbre: #24201C; --velin: #2C2722; --filet: #3A332C;
    --encre: #F2ECE0; --texte: #E8E1D3; --doux: #A89E90; --lave: #F07255;
    --eprouver: #D9A6C8; --penser: #9DBFD0; --combattre: #F07255; --batir: #D2A961;
  }
}

body.registre-eprouver { --registre: var(--eprouver); }
body.registre-penser { --registre: var(--penser); }
body.registre-combattre { --registre: var(--combattre); }
body.registre-batir { --registre: var(--batir); }

/* Fond, encre, polices : priorité sur les réglages par défaut du thème. */
html body,
html body #page-container,
html body #main-content,
html body #main-header,
html body .et_pb_section:not([style*="background"]) {
  background-color: var(--papier);
}
html body {
  color: var(--texte);
  font-family: var(--lecture);
  font-size: 18px;
  line-height: 1.7;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  font-kerning: normal;
  hanging-punctuation: first;
}
html body h1, html body h2, html body h3, html body h4, html body h5, html body h6,
html body .entry-title, html body .et_pb_post .entry-title {
  font-family: var(--titre);
  color: var(--encre);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: 0.005em;
}
html body a { color: var(--lave); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
html body a:hover { color: var(--encre); }
html body code, html body kbd, html body pre, html body .mono { font-family: var(--mono); }
::selection { background: var(--lave); color: var(--marbre); }

/* L'article seul : colonne de lecture, sans barre latérale. */
body.single-post #sidebar { display: none; }
body.single-post #main-content .container:before { display: none; }
body.single-post #left-area {
  float: none; width: 100%; max-width: var(--mesure);
  margin: 0 auto; padding: 0 0 4rem;
}
body.single-post .et_post_meta_wrapper { max-width: var(--mesure); margin: 0 auto; }
body.single-post .et_post_meta_wrapper .entry-title,
body.single-post h1.entry-title {
  font-size: clamp(2.2rem, 1.4rem + 3vw, 3.4rem);
  margin: 3.5rem 0 0.6rem;
  padding: 0;
}
body.single-post .post-meta {
  font-family: var(--mono); font-size: 0.78rem; letter-spacing: 0.04em;
  text-transform: uppercase; color: var(--doux);
  border-top: 2px solid var(--registre); padding-top: 0.7rem; margin-bottom: 2rem;
}
body.single-post .post-meta a { color: var(--registre); text-decoration: none; }

body.single-post .entry-content { font-size: 1.07rem; }
body.single-post .entry-content p { margin: 0 0 1.15em; padding: 0; text-align: left; hyphens: auto; -webkit-hyphens: auto; }
body.single-post .entry-content h2 { font-size: 1.9rem; margin: 2.4rem 0 0.9rem; padding: 0; }
body.single-post .entry-content h3 { font-size: 1.45rem; margin: 2rem 0 0.7rem; padding: 0; }

/* Le chapô : premier paragraphe en romain un peu plus grand. */
body.single-post .entry-content p.chapo {
  font-size: 1.22rem; line-height: 1.55; color: var(--encre);
}

/* Citations : filet du registre, italique. */
body.single-post .entry-content blockquote {
  border-left: 3px solid var(--registre);
  margin: 1.8rem 0; padding: 0.2rem 0 0.2rem 1.3rem;
  font-style: italic; color: var(--encre); background: none;
}
body.single-post .entry-content blockquote p:last-child { margin-bottom: 0; }

/* Le mot de la fin, isolé : la sentence qui ferme. */
body.single-post .entry-content p.sentence {
  font-family: var(--titre); font-size: 1.6rem; line-height: 1.25;
  color: var(--registre); margin: 2.2rem 0 2.6rem; text-align: left;
}

/* Séparateur sobre. */
body.single-post .entry-content hr,
body.single-post .entry-content .wp-block-separator {
  border: 0; border-top: 1px solid var(--filet); width: 5rem; margin: 2.6rem 0; background: none;
}

/* Le post-scriptum : la voix d'aujourd'hui sur un texte d'hier. */
body.single-post .entry-content p.post-scriptum {
  font-size: 0.98rem; color: var(--doux);
  border-left: 2px solid var(--filet); padding-left: 1.1rem;
}
body.single-post .entry-content p.post-scriptum em:first-child {
  font-style: normal; font-family: var(--mono); font-size: 0.76rem;
  letter-spacing: 0.05em; text-transform: uppercase; color: var(--registre);
  display: block; margin-bottom: 0.3rem;
}

/* La provenance : première publication, relecture, lien vers l'original. */
body.single-post .entry-content .provenance,
body.single-post .entry-content p.provenance {
  font-family: var(--mono); font-size: 0.78rem; line-height: 1.6;
  color: var(--doux); border-top: 1px solid var(--filet);
  padding-top: 1rem; margin-top: 3rem;
}
body.single-post .entry-content .provenance a { color: var(--doux); }

/* Le mot-symbole : la tilde du ñ en lave. */
.tilde-lave { color: var(--lave); }

@media (max-width: 980px) {
  body.single-post #left-area { padding: 0 16px 3rem; }
  body.single-post .et_post_meta_wrapper { padding: 0 16px; }
}
