/*
 * Gabarit des articles (pages SEO « Autour de la légende ») — inc/page-article.php.
 * Réunit les styles des 4 pages d'origine (amour impossible, peinture, Wagner, lieux), passées en base
 * le 7 nov. 2026. Un article écrit dans l'admin peut employer tous ces blocs.
 */
:root {
  --paper:#f3ede3; --paper-2:#e9e1d3; --ink:#241c18; --ink-soft:#5a4e45;
  --line:#d3c6b4; --rose:#9a6b68; --rose-deep:#7a4542; --gold:#c4a35a;
  --serif:"Cormorant Garamond", Georgia, serif;
  --sans:"Source Sans 3", "Helvetica Neue", Arial, sans-serif;
  --ease:cubic-bezier(.2,.7,.3,1);
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--sans); font-size: 17px; line-height: 1.6; overflow-x: hidden; }
body::before {
  content: ""; position: fixed; inset: 0; z-index: 60; pointer-events: none; opacity: .045; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}
a { color: inherit; text-decoration: none; }
h1, h2, h3 { font-family: var(--serif); line-height: 1.15; margin: 0; font-weight: 600; }
p { margin: 0; }
img { display: block; max-width: 100%; height: auto; }

/* Colonne de lecture unique, 720px — même mesure que La légende. */
.page-article { max-width: 768px; margin: 0 auto; padding: 0 24px 96px; }

.ariane { font-size: 13px; color: var(--ink-soft); padding: 36px 0 0; }
.ariane ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.ariane li + li::before { content: "›"; color: var(--line); margin-right: 8px; }
.ariane a { color: var(--ink-soft); border-bottom: 1px solid transparent; }
.ariane a:hover { color: var(--ink); border-bottom-color: var(--line); }
.ariane [aria-current] { color: var(--ink); }

.page-article > header { padding-top: 28px; }
h1 { font-size: 40px; }
.rule { display: block; width: 56px; height: 1px; background: var(--gold); margin: 18px 0 24px; }
.chapo { font-family: var(--serif); font-style: italic; font-weight: 500; font-size: 23px; line-height: 1.24; color: var(--ink-soft); }
.chapo p + p { margin-top: .8em; }

.prose { font-family: var(--serif); font-weight: 500; font-size: 21px; line-height: 1.48; }
.prose p + p, .prose p + blockquote, .prose blockquote + p, .prose figure + p, .prose blockquote + blockquote { margin-top: 1.1em; }
.prose h2 { font-size: 32px; margin: 2em 0 .8em; }
.prose h2::before { content: ""; display: block; width: 48px; height: 1px; background: var(--line); margin-bottom: 20px; }
.prose h3 { font-size: 25px; margin: 1.6em 0 .6em; color: var(--rose-deep); }
.prose h3 .n { font-family: var(--sans); font-size: 13px; font-weight: 600; display: inline-grid; place-items: center; width: 24px; height: 24px; margin-right: 10px; border-radius: 50%; background: var(--rose-deep); color: var(--paper); vertical-align: 4px; }
.prose h2, .prose h3 { scroll-margin-top: 90px; }
.prose strong { font-weight: 600; }
.prose em { font-style: italic; }
.prose a:not(.btn) { border-bottom: 1px solid var(--line); transition: border-color .25s var(--ease); }
.prose a:not(.btn):hover { border-color: var(--rose-deep); }
.prose blockquote p + p { margin-top: .8em; }
.prose blockquote { margin: 1.1em 0 0; padding-left: 20px; border-left: 1px solid var(--gold); font-style: italic; }
.prose blockquote cite a { border-bottom: 1px solid var(--line); }
.prose blockquote cite a:hover { border-color: var(--rose-deep); }
.prose blockquote.catherine { font-style: normal; }
.prose blockquote cite { display: block; margin-top: .5em; font-family: var(--sans); font-style: normal; font-size: 14px; line-height: 1.5; color: var(--ink-soft); }
.prose blockquote cite em { font-style: italic; }
/* L'inscription de la pierre : capitales gravées. */
.prose .inscription { font-style: normal; }
.prose .inscription .latin { font-family: var(--serif); font-weight: 600; letter-spacing: .14em; font-size: 19px; }

/* L'histoire, en trois temps (amour impossible) : encadré comme le résumé de La légende, mais découpé. */
.temps { background: var(--paper-2); border: 1px solid var(--line); padding: 8px 26px 26px; border-radius: 2px; }
.temps h3 { margin: 20px 0 4px; font-size: 22px; color: var(--rose-deep); }
.temps h3 span { color: var(--gold); margin-right: 8px; font-weight: 500; }
/* Paragraphe qui suit un encadré (remplace l'ancien style="margin-top:1.1em" écrit dans la page). */
.prose .temps + p { margin-top: 1.1em; }

/* Encart « Catherine Rouaud en parle » (16 nov. 2026) : un texte de Catherine, après la partie qui en parle.
   Rendu par encart_html() (inc/page-article.php) ; même balisage dans l'éditeur de l'admin. */
.prose .encart-cath { display: grid; grid-template-columns: 170px minmax(0, 1fr); gap: 26px; align-items: start; margin: 2.2em 0; padding: 26px; background: var(--paper-2); border-radius: 2px; }
.prose .encart-cath a.encart-img { display: block; border: 0; }
.prose .encart-img img { width: 100%; aspect-ratio: 3 / 4; object-fit: cover; }
.prose .encart-corps { min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 10px; }
.prose .encart-sur { margin: 0; font-family: var(--sans); font-size: 12px; font-weight: 600; line-height: 1.2; letter-spacing: .14em; text-transform: uppercase; color: var(--rose-deep); }
.prose .encart-cit { margin: 0; padding: 0; border: 0; font-style: italic; font-size: 22px; line-height: 1.32; color: var(--ink); }
.prose .encart-titre { margin: 0; font-weight: 600; font-size: 22px; line-height: 1.2; }
.prose .encart-cath .encart-titre a { border: 0; color: var(--night); }
.prose .encart-cath .encart-titre a:hover { color: var(--rose-deep); }
.prose .encart-cath .btn { margin-top: 6px; }
@media (max-width: 600px) {
  .prose .encart-cath { grid-template-columns: 1fr; gap: 14px; padding: 20px; }
  .prose .encart-img img { aspect-ratio: 16 / 9; }
  .prose .encart-cit { font-size: 20px; }
}

.signature { margin-top: .8em !important; font-family: var(--sans); font-size: 14px; letter-spacing: .04em; color: var(--ink-soft); }
.renvoi { margin-top: .8em !important; font-family: var(--sans); font-size: 15px; line-height: 1.2; color: var(--rose-deep); }
.renvoi span { color: var(--gold); }

.tableau { margin: 1.6em 0 1.4em; }
.tableau img { width: 100%; border: 1px solid var(--line); border-radius: 2px; }
.tableau figcaption { margin-top: 8px; font-family: var(--sans); font-size: 13px; line-height: 1.5; color: var(--ink-soft); }
.tableau figcaption em { font-style: italic; }
/* Formats hauts et petits fichiers : centrés et limités (étroit 440 px, petit 340 px). */
.tableau.etroit { max-width: 440px; margin-left: auto; margin-right: auto; }
.tableau.etroit figcaption { text-align: center; }
.tableau.petit { max-width: 340px; margin-left: auto; margin-right: auto; }
.tableau.petit figcaption { text-align: center; }
.ouverture { margin-top: 32px; }
/* Extraits de partition (Wagner) : fond blanc, sans cadre sombre. */
.tableau.partition img { background: #fff; padding: 10px; }
/* Enregistrements de référence (Wagner). */
.ecoute { margin: 1em 0 0; padding-left: 1.1em; }
.ecoute li + li { margin-top: .5em; }

/* La carte des lieux (inc/carte-lieux.html, repère <div data-bloc="carte-lieux"></div> dans le contenu) : SVG en ligne, chaque point est un lien d'ancre (pas de JavaScript). */
.carte { margin: 1.6em auto 0; max-width: 560px; }
.carte-svg { display: block; width: 100%; height: auto; border: 1px solid var(--line); border-radius: 2px; background: #e4e3dd; }
.carte-svg .mer { fill: #e4e3dd; }
.carte-svg .terre { fill: var(--paper); stroke: var(--ink-soft); stroke-width: 1.2; stroke-linejoin: round; }
.carte-svg .route { fill: none; stroke: var(--gold); stroke-width: 1.6; stroke-dasharray: 5 5; }
.carte-svg .pays { font-family: var(--serif); font-weight: 600; font-size: 16px; letter-spacing: .18em; fill: var(--ink-soft); text-anchor: middle; }
.carte-svg .petit { font-size: 13px; }
.carte-svg .merl { font-family: var(--serif); font-style: italic; font-weight: 500; font-size: 19px; fill: var(--night); text-anchor: middle; opacity: .85; }
.carte-svg .merl.petit { font-size: 16px; }
.carte-svg .point circle { fill: var(--rose-deep); stroke: var(--paper); stroke-width: 2; transition: fill .2s var(--ease); }
.carte-svg .num { font-family: var(--sans); font-weight: 700; font-size: 11px; fill: #fff; text-anchor: middle; dominant-baseline: central; }
.carte-svg .lab { font-family: var(--sans); font-weight: 600; font-size: 14px; fill: var(--ink); paint-order: stroke; stroke: var(--paper); stroke-width: 4px; stroke-linejoin: round; }
.carte-svg a:hover circle, .carte-svg a:focus circle { fill: var(--night); }
.carte figcaption { margin-top: 8px; font-family: var(--sans); font-size: 13px; line-height: 1.5; color: var(--ink-soft); text-align: center; }
.liste-lieux { margin: 1.2em 0 0; padding: 0; list-style: none; font-family: var(--sans); font-size: 15px; line-height: 1.5; columns: 2; column-gap: 28px; }
.liste-lieux li { break-inside: avoid; padding: 4px 0; display: flex; gap: 10px; }
.liste-lieux .n { flex: none; display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--rose-deep); color: var(--paper); font-size: 12px; font-weight: 600; }
.liste-lieux a { border-bottom: 1px solid transparent !important; }
.liste-lieux a:hover { border-bottom-color: var(--line) !important; }

/* FAQ en tiroirs : <details>, sans JavaScript (même dessin que La légende). */
.faq details { border-top: 1px solid var(--line); }
.faq details:last-of-type { border-bottom: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 18px 0; font-family: var(--serif); font-weight: 600; font-size: 23px; line-height: 1.3; transition: color .25s var(--ease); }
.faq summary::-webkit-details-marker { display: none; }
.faq summary:hover { color: var(--rose-deep); }
.faq summary::after { content: "+"; flex: none; width: 30px; height: 30px; display: grid; place-items: center; border: 1px solid var(--gold); border-radius: 50%; font-family: var(--sans); font-size: 18px; font-weight: 400; color: var(--rose-deep); transition: transform .25s var(--ease); }
.faq details[open] summary::after { transform: rotate(45deg); }
.faq .reponse { padding: 0 0 22px; }

.fin { margin-top: 64px; padding-top: 40px; border-top: 1px solid var(--line); text-align: center; }
.fin h2 { font-size: 34px; }
.fin p { margin: 14px auto 0; max-width: 560px; font-family: var(--serif); font-weight: 500; font-style: italic; font-size: 22px; line-height: 1.28; color: var(--ink-soft); }
.boutons { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; margin-top: 28px; }
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: var(--sans); font-size: 15px; font-weight: 600; letter-spacing: .02em;
  padding: 14px 26px; border: 1px solid var(--night); border-radius: 2px;
  transition: background .25s var(--ease), color .25s var(--ease);
}
.btn:hover, .btn.plein { background: var(--night); color: var(--paper); }
.btn.plein:hover { background: var(--rose-deep); border-color: var(--rose-deep); }
.fin .retour { margin-top: 22px; font-family: var(--sans); font-style: normal; font-size: 15px; }
.fin .retour a { border-bottom: 1px solid var(--line); }
.fin .retour a:hover { border-color: var(--rose-deep); }

@media (max-width: 520px) {
  .liste-lieux { columns: 1; }
  /* La carte rétrécit de moitié : on grossit points et noms pour qu'ils restent lisibles. */
  .carte-svg .point circle { r: 14px; }
  .carte-svg .num { font-size: 15px; }
  .carte-svg .lab { font-size: 21px; stroke-width: 5px; }
  .carte-svg .pays { font-size: 20px; }
  .carte-svg .merl { font-size: 24px; }
  .carte-svg .merl.petit, .carte-svg .pays.petit { font-size: 18px; }
}
@media (min-width: 900px) {
  .page-article { padding-bottom: 120px; }
  .page-article > header { padding-top: 48px; }
  h1 { font-size: 52px; }
}

/* Tableau dans le corps d'un article (archétype jungien, 15 nov. 2026) */
.prose .tableau-wrap { overflow-x: auto; margin: 1.4em 0; }
.prose table { width: 100%; border-collapse: collapse; font-family: var(--sans); font-size: 15px; line-height: 1.4; }
.prose th, .prose td { text-align: left; vertical-align: top; padding: 10px 12px; border-bottom: 1px solid var(--line); }
.prose th { font-weight: 600; color: var(--rose-deep); border-bottom: 1px solid var(--gold); }

/* Schéma « le chemin » des cinq figures (article archétype jungien, choix de Simon le 15 nov. 2026).
   À ajouter à page-article.css à la mise en ligne. Noms et définitions en vrai texte, vignettes fresque en /img/archetype/. */
.prose .chemin-figures { margin: 1.8em 0 1.6em; padding: 26px 0 22px; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.chemin-figures ol { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr 1fr 2fr 1fr; gap: 16px; position: relative; align-items: start; }
.chemin-figures ol::before { content: ""; position: absolute; left: 6%; right: 6%; top: 14px; border-top: 1px dashed var(--gold); }
.chemin-figures li { position: relative; display: grid; gap: 10px; margin: 0; }
.chemin-figures li.duo { grid-template-columns: 1fr 1fr; gap: 10px 12px; }
.chemin-figures li.duo .etape { grid-column: 1 / -1; }
.chemin-figures .etape { justify-self: center; width: 30px; height: 30px; display: grid; place-items: center; position: relative; z-index: 1;
  font-family: var(--serif); font-weight: 600; font-size: 16px; line-height: 1; color: var(--rose-deep); background: var(--paper);
  border: 1px solid var(--gold); border-radius: 50%; }
.chemin-figures .fig { text-align: center; }
.chemin-figures img { position: relative; width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 50%; border: 1.5px solid var(--gold);
  padding: 3px; background: var(--paper); display: block; }
.chemin-figures .nom { display: block; position: relative; margin-top: 10px; font-family: var(--serif); font-weight: 600; font-size: 22px; line-height: 1.1; color: var(--night); }
.chemin-figures .def { display: block; position: relative; margin-top: 3px; font-family: var(--serif); font-style: italic; font-weight: 500; font-size: 17px; line-height: 1.25; color: var(--ink-soft); }
@media (max-width: 640px) {
  .chemin-figures ol { grid-template-columns: 1fr; gap: 26px; }
  .chemin-figures ol::before { left: 50%; right: auto; top: 0; bottom: 0; border-top: 0; border-left: 1px dashed var(--gold); }
  .chemin-figures li > .fig { width: 55%; margin: 0 auto; }
  .chemin-figures .nom, .chemin-figures .def { background: var(--paper); }
}

/* Info-bulles du lexique (23 nov. 2026) : posées par lexique-bulles.js, une par terme et par page.
   Même dessin que sur les textes (article.php). */
.page-article .lexique { text-decoration: underline dotted var(--rose); text-decoration-thickness: 1.5px; text-underline-offset: 4px; cursor: help; }
.page-article .lexique:hover { text-decoration-color: var(--rose-deep); text-decoration-style: solid; }
.page-article .lexique:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.bulle { position: absolute; z-index: 80; max-width: 300px; background: var(--night); color: var(--paper); font-family: var(--sans);
  font-size: 15px; line-height: 1.5; font-style: normal; padding: 14px 16px; opacity: 0; visibility: hidden; transition: opacity .16s ease; pointer-events: none; }
.bulle.is-open { opacity: 1; visibility: visible; pointer-events: auto; }
.bulle .bulle-lien { display: inline-block; margin-top: 10px; font-size: 13px; color: var(--gold); text-decoration: underline; text-underline-offset: 3px; }
.bulle .bulle-terme { display: block; font-size: 11px; letter-spacing: .16em; text-transform: uppercase; color: var(--gold); margin-bottom: 8px; }
.page-article .sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; border: 0; }
