/* Carnet du rucher : DA « Tuffeau et ardoise ». Polices : Young Serif (titres) et Instrument Sans (texte), via la Fonts API d'Astro. */
:root {
  --tuffeau: #E9E6DC;
  --ardoise: #2E3640;
  --miel: #B4741C;          /* accent : jamais en texte courant (3,08:1), anneaux et filets seulement */
  --miel-fonce: #7D4C0B;    /* texte et liens accentués (5,78:1 sur tuffeau) */
  --miel-clair: #E3A94F;    /* sur ardoise (5,85:1) */
  --lierre: #5B7637;        /* accent 2 : jamais en texte courant (4,11:1) */
  --lierre-fonce: #3F5A22;  /* texte accentué 2 */
  --chaux: #F7F6F1;
  --encre-douce: #4A535D;   /* métadonnées */
  --lierre-pale: #CBD5B5;
  --miel-pale: #E6CFA0;
  --trait: rgba(46, 54, 64, 0.22);
  --titre: var(--ea-titre), Georgia, serif;
  --texte: var(--ea-texte), Arial, sans-serif;
  --measure-article: 820px;
  --wrap: 1180px;
  --gutter: 1.25rem;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body { margin: 0; background: var(--tuffeau); color: var(--ardoise); font-family: var(--texte); font-size: 1.0625rem; line-height: 1.65; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--miel-fonce); text-underline-offset: 0.18em; text-decoration-thickness: 0.08em; }
a:hover { color: var(--ardoise); }
:focus-visible { outline: 3px solid var(--miel-fonce); outline-offset: 3px; border-radius: 2px; }
.site-header :focus-visible, .site-footer :focus-visible { outline-color: var(--miel-clair); }
h1, h2, h3, h4 { font-family: var(--titre); font-weight: 400; line-height: 1.2; margin: 0 0 0.6em; text-wrap: balance; }
h1 { font-size: clamp(2rem, 1.2rem + 3vw, 3.25rem); }
h2 { font-size: clamp(1.5rem, 1.1rem + 1.4vw, 2.1rem); margin-top: 2.2em; }
h3 { font-size: 1.25rem; }
p, ul, ol, dl { margin: 0 0 1.1em; }
.skip-link { position: absolute; left: -999px; top: 0; background: var(--ardoise); color: var(--tuffeau); padding: 0.6rem 1rem; z-index: 100; }
.skip-link:focus { left: 0; }
.wrap { width: 100%; max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }

/* Header : bandeau ardoise */
.site-header { background: var(--ardoise); color: var(--tuffeau); position: relative; z-index: 20; }
.header-inner { max-width: var(--wrap); margin-inline: auto; padding: 0.7rem var(--gutter); display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.brand { display: flex; align-items: center; gap: 0.7rem; color: var(--tuffeau); text-decoration: none; }
.brand-name { font-family: var(--titre); font-size: 1.45rem; line-height: 1; }
.main-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 0.2rem; align-items: center; }
.main-nav a, .sub-toggle { color: var(--tuffeau); text-decoration: none; font: inherit; font-size: 0.98rem; font-weight: 500; padding: 0.55rem 0.8rem; background: none; border: 0; cursor: pointer; border-radius: 4px; display: inline-flex; align-items: center; gap: 0.4rem; }
.main-nav a:hover, .sub-toggle:hover { color: var(--miel-clair); }
.main-nav a[aria-current], .sub-toggle[data-active] { box-shadow: inset 0 -3px 0 var(--miel-clair); border-radius: 4px 4px 0 0; }
.sub-toggle::after { content: ''; width: 0.5rem; height: 0.5rem; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(45deg) translateY(-2px); }
.has-sub { position: relative; }
.sub-menu { position: absolute; top: 100%; left: 0; min-width: 18rem; background: var(--chaux); border: 1px solid var(--ardoise); border-top: 4px solid var(--miel); border-radius: 0 0 6px 6px; padding: 0.4rem !important; display: none !important; flex-direction: column; align-items: stretch !important; gap: 0 !important; }
.has-sub.is-open > .sub-menu, .has-sub:hover > .sub-menu { display: flex !important; }
.sub-menu a { color: var(--ardoise); width: 100%; border-radius: 4px; box-shadow: none !important; }
.sub-menu a:hover { background: var(--tuffeau); color: var(--ardoise); }
.sub-menu a[aria-current] { font-weight: 700; }
.nav-toggle { display: none; background: none; border: 1.5px solid var(--tuffeau); border-radius: 6px; width: 2.8rem; height: 2.8rem; padding: 0; cursor: pointer; flex-direction: column; justify-content: center; align-items: center; gap: 5px; }
.nav-toggle span { display: block; width: 1.3rem; height: 2px; background: var(--tuffeau); }

/* Images : reset + wrappers à ratio fixe */
.img-hero { aspect-ratio: 16 / 9; overflow: hidden; margin: 0; position: relative; }
.img-card { aspect-ratio: 3 / 2; overflow: hidden; background: var(--miel-pale); }
.img-body { aspect-ratio: 3 / 2; overflow: hidden; margin: 1.6rem 0; background: var(--miel-pale); }
.img-portrait { aspect-ratio: 1 / 1; overflow: hidden; border-radius: 50%; }
.img-hero img, .img-card img, .img-body img, .img-portrait img { width: 100%; height: 100%; object-fit: cover; object-position: center top; }
.hero-band { width: 100%; max-height: min(75vh, 44vw); }
.hero-home img { object-position: center 20%; }
.img-hero figcaption { position: absolute; right: 0; bottom: 0; background: var(--ardoise); color: var(--tuffeau); font-size: 0.8rem; padding: 0.3rem 0.8rem; }
.img-ph { width: 100%; height: 100%; background: repeating-linear-gradient(135deg, var(--miel-pale), var(--miel-pale) 10px, var(--tuffeau) 10px, var(--tuffeau) 20px); }
.img-body figcaption { aspect-ratio: auto; }
figure.img-body { display: block; aspect-ratio: auto; background: none; }
figure.img-body img { aspect-ratio: 3 / 2; height: auto; }
figure.img-body figcaption { font-size: 0.88rem; color: var(--encre-douce); padding-top: 0.5rem; border-top: 3px solid var(--miel); margin-top: 0.4rem; display: inline-block; }

/* En-têtes de page */
.page-head { padding-top: 1.6rem; padding-bottom: 0.6rem; }
.page-head h1 { max-width: 22ch; margin-bottom: 0.4em; }
.home-head h1 { max-width: 26ch; }
.chapeau { font-size: 1.22rem; line-height: 1.55; max-width: 60ch; color: var(--ardoise); }
.page-meta { display: flex; flex-wrap: wrap; gap: 0.4rem 1.3rem; align-items: center; font-size: 0.9rem; color: var(--encre-douce); }
.meta-cat { text-decoration: none; color: var(--ardoise); }
.pillar-head { display: grid; grid-template-columns: auto 1fr; gap: 1.2rem; align-items: start; }
.pillar-head > .dot { margin-top: 2.1rem; }
.breadcrumbs ol { list-style: none; padding: 0; margin: 0 0 1rem; display: flex; flex-wrap: wrap; gap: 0.3rem; font-size: 0.88rem; color: var(--encre-douce); }
.breadcrumbs li + li::before { content: '/'; margin-right: 0.3rem; color: var(--encre-douce); }
.breadcrumbs a { color: var(--encre-douce); }

/* Pastille de catégorie (signature) */
.dot { flex: none; display: inline-block; vertical-align: middle; }
.cat-pill { display: inline-flex; align-items: center; gap: 0.45rem; font-size: 0.86rem; font-weight: 600; line-height: 1.2; }
.cat-name { color: var(--ardoise); }
.dots-demo { list-style: none; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); gap: 0.9rem 1.5rem; }
.dots-demo .cat-pill { font-size: 1rem; }

/* Mise en page article */
.article-grid { display: grid; grid-template-columns: 15rem minmax(0, 1fr); gap: 2.5rem; padding-top: 1rem; padding-bottom: 3rem; }
.article-grid-solo { grid-template-columns: minmax(0, 1fr); }
.toc { position: sticky; top: 1rem; align-self: start; font-size: 0.93rem; }
.toc:empty { display: none; }
.toc-title { font-family: var(--titre); font-size: 1.05rem; margin-bottom: 0.5rem; }
.toc ol { padding-left: 1.2rem; margin: 0; }
.toc li { margin-bottom: 0.4rem; }
.article-body { max-width: var(--measure-article); min-width: 0; }
.article-body > h2:first-child { margin-top: 0; }
.article-body ul, .article-body ol { padding-left: 1.4rem; }
.article-body li { margin-bottom: 0.35em; }
.article-body li::marker { color: var(--miel); }
.article-body blockquote { margin: 1.4rem 0; padding: 0.2rem 1.2rem; border-left: 5px solid var(--lierre); background: var(--chaux); }
.table-wrap, .article-body table { display: block; overflow-x: auto; max-width: 100%; }
.article-body table, .table-wrap table { border-collapse: collapse; width: 100%; margin: 1.5rem 0; font-size: 0.97rem; }
.table-wrap table { display: table; min-width: 32rem; }
.article-body th, .article-body td, .table-wrap th, .table-wrap td { text-align: left; padding: 0.65rem 0.9rem; border-bottom: 1px solid var(--trait); vertical-align: top; }
.article-body thead th, .table-wrap thead th { background: var(--ardoise); color: var(--tuffeau); font-weight: 600; border-bottom: 0; }
.article-body tbody tr:nth-child(even), .table-wrap tbody tr:nth-child(even) { background: var(--chaux); }
.article-body tbody th, .article-body td:first-child, .table-wrap td:first-child { font-weight: 600; }

/* Encadrés */
.box { margin: 1.8rem 0; padding: 1.1rem 1.3rem 0.4rem; background: var(--chaux); border-left: 6px solid var(--miel); border-radius: 0 6px 6px 0; }
.box-title { font-family: var(--titre); font-size: 1.15rem; margin: 0 0 0.5rem; line-height: 1.25; }
.box ul { padding-left: 1.2rem; }
.box-retenir { border-left-color: var(--miel); }
.box-regle { background: var(--ardoise); color: var(--tuffeau); border-left: 0; border-radius: 6px; padding: 1.2rem 1.4rem 0.6rem; }
.box-regle a { color: var(--miel-clair); }
.box-regle a:hover { color: #fff; }
.box-sources { background: transparent; border-left: 0; border-top: 3px solid var(--ardoise); border-radius: 0; padding-left: 0; font-size: 0.93rem; color: var(--encre-douce); }
.box-sources .box-title { color: var(--ardoise); }
.box-mot { border-left-color: var(--ardoise); background: var(--miel-pale); }
.box-mot .mot { font-family: var(--titre); font-size: 1.9rem; line-height: 1.1; margin-bottom: 0.3rem; }
.box-mot dfn { font-style: normal; }
.box-adulte { border-left: 0; background: var(--lierre-pale); border-radius: 6px; border: 2px solid var(--ardoise); }
.box-adulte ol { padding-left: 1.4rem; }
.box-adulte li::marker { font-weight: 700; color: var(--ardoise); }

/* Variante pages enfants : texte un peu plus grand, DA inchangée */
.is-enfants .article-body { font-size: 1.25rem; line-height: 1.75; }
.is-enfants .article-body h2 { font-size: clamp(1.7rem, 1.2rem + 1.6vw, 2.3rem); }
.is-enfants .box { font-size: 1.2rem; padding: 1.3rem 1.5rem 0.6rem; }
.is-enfants .box-title { font-size: 1.35rem; }

/* Roue des mois */
.home-section { padding-block: 1rem 1.5rem; }
.home-section h2 { margin-top: 1.6rem; }
.section-lead { max-width: 60ch; }
.month-wheel { margin: 1rem 0 0; display: grid; grid-template-columns: minmax(0, 27rem) minmax(0, 1fr); gap: 2rem; align-items: center; }
.month-wheel svg { width: 100%; height: auto; }
.month-wheel svg a { cursor: pointer; }
.month-wheel svg a:hover path { fill: var(--miel); }
.wheel-label, .wheel-center { font-family: var(--texte); font-weight: 600; }
.month-list { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.2rem 1.5rem; }
.month-list li { display: flex; flex-direction: column; padding: 0.5rem 0 0.5rem 0.9rem; border-left: 5px solid var(--ardoise); font-size: 0.95rem; line-height: 1.4; }
.month-list li[data-season="printemps"] { border-left-color: var(--lierre); }
.month-list li[data-season="ete"] { border-left-color: var(--miel); }
.month-list li[data-season="automne"] { border-left-color: var(--encre-douce); }
.month-list li[data-season="hiver"] { border-left-color: var(--ardoise); }
.month-list a { font-weight: 700; }
.month-list span { color: var(--encre-douce); }

/* Rubriques de l'accueil */
.pillar-list { list-style: none; padding: 0; margin: 1rem 0 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); gap: 1rem; }
.pillar-tile { display: flex; gap: 0.9rem; align-items: flex-start; padding: 1rem 1.1rem; background: var(--chaux); border: 1.5px solid var(--ardoise); border-radius: 6px; text-decoration: none; color: var(--ardoise); height: 100%; }
.pillar-tile:hover { background: var(--ardoise); color: var(--tuffeau); }
.pillar-tile:hover .pillar-tile-text span { color: var(--tuffeau); }
.pillar-tile-text { display: flex; flex-direction: column; gap: 0.25rem; font-size: 0.93rem; line-height: 1.4; }
.pillar-tile-text strong { font-family: var(--titre); font-weight: 400; font-size: 1.15rem; }
.pillar-tile-text span { color: var(--encre-douce); }
.more { margin-top: 1.2rem; font-weight: 600; }

/* Cartes */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(18rem, 1fr)); gap: 1.6rem; margin-top: 1.2rem; }
.card-grid--2 { grid-template-columns: repeat(auto-fill, minmax(20rem, 1fr)); }
.card[hidden] { display: none; }
.card { background: var(--chaux); border: 1px solid var(--trait); border-radius: 6px; overflow: hidden; border-bottom: 4px solid var(--ardoise); }
.card[data-cat="debuter"] { border-bottom-color: var(--ardoise); }
.card-link { display: flex; flex-direction: column; height: 100%; text-decoration: none; color: inherit; }
.card-link:hover .card-title { text-decoration: underline; text-decoration-color: var(--miel); text-decoration-thickness: 3px; }
.card-body { padding: 0.9rem 1.1rem 1.2rem; }
.card-meta { display: flex; flex-direction: column; align-items: flex-start; gap: 0.3rem; margin: 0 0 0.6rem; font-size: 0.84rem; color: var(--encre-douce); }
.card-title { font-size: 1.22rem; margin-bottom: 0.4rem; }
.card-summary { font-size: 0.95rem; color: var(--ardoise); margin: 0; }

/* Filtre du blog */
.category-filter { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 1.2rem 0 0.4rem; }
.chip { display: inline-flex; align-items: center; gap: 0.45rem; padding: 0.4rem 0.95rem 0.4rem 0.6rem; border: 1.5px solid var(--ardoise); border-radius: 999px; text-decoration: none; color: var(--ardoise); font-size: 0.92rem; font-weight: 500; background: var(--chaux); }
.chip:first-child { padding-left: 0.95rem; }
.chip:hover { background: var(--miel-pale); }
.chip.is-active { background: var(--ardoise); color: var(--tuffeau); }
.filter-status { font-size: 0.9rem; color: var(--encre-douce); min-height: 1.4em; margin: 0.2rem 0 0; }
.filter-empty { padding: 1rem 0; }
.listing { padding-bottom: 3rem; }

/* FAQ */
.faq { margin-top: 2.5rem; }
.faq-item { border-top: 1px solid var(--trait); }
.faq-item:last-child { border-bottom: 1px solid var(--trait); }
.faq-item h3 { margin: 0; font-family: var(--texte); font-size: 1.05rem; font-weight: 600; }
.faq-item button { width: 100%; text-align: left; background: none; border: 0; padding: 0.95rem 2rem 0.95rem 0; font: inherit; color: var(--ardoise); cursor: pointer; position: relative; }
.faq-item button::after { content: '+'; position: absolute; right: 0.3rem; top: 0.8rem; font-size: 1.5rem; line-height: 1; color: var(--miel-fonce); }
.faq-item.open button::after { content: '\2212'; }
.faq-answer { padding-bottom: 0.4rem; }

/* Pour aller plus loin */
.related { margin-top: 2.5rem; }
.related ul { padding-left: 1.2rem; }

/* Glossaire */
.glossary-index ul { list-style: none; padding: 0; margin: 0 0 1.5rem; display: flex; flex-wrap: wrap; gap: 0.35rem; }
.glossary-index li a, .glossary-index li span { display: inline-flex; width: 2.3rem; height: 2.3rem; align-items: center; justify-content: center; border-radius: 50%; font-weight: 600; text-decoration: none; }
.glossary-index li a { border: 1.5px solid var(--ardoise); background: var(--chaux); color: var(--ardoise); }
.glossary-index li a:hover { background: var(--ardoise); color: var(--tuffeau); }
.glossary-index li span { color: var(--encre-douce); opacity: 0.55; }
.glossary-group h2 { border-bottom: 3px solid var(--miel); display: inline-block; padding-right: 1.2rem; margin: 1.6rem 0 0.8rem; scroll-margin-top: 1rem; }
.glossary dl { margin: 0; }
.glossary-entry { padding: 0.7rem 0; border-top: 1px solid var(--trait); }
.glossary-entry dt { font-family: var(--titre); font-size: 1.2rem; }
.glossary-entry dd { margin: 0.2rem 0 0; }

/* Formulaire */
.contact-form { display: grid; gap: 1rem; max-width: 36rem; margin-top: 1.5rem; }
.contact-form label { display: grid; gap: 0.3rem; font-weight: 600; font-size: 0.95rem; }
.contact-form .req { font-weight: 400; color: var(--encre-douce); }
.contact-form input, .contact-form select, .contact-form textarea { font: inherit; padding: 0.65rem 0.8rem; border: 1.5px solid var(--ardoise); border-radius: 4px; background: var(--chaux); color: var(--ardoise); width: 100%; }
.hp-field { position: absolute; left: -9999px; }
.form-note { font-size: 0.9rem; color: var(--encre-douce); margin: 0; }
.btn { font: inherit; font-weight: 600; background: var(--miel-clair); color: var(--ardoise); border: 2px solid var(--ardoise); border-radius: 6px; padding: 0.7rem 1.4rem; cursor: pointer; justify-self: start; }
.btn:hover { background: var(--ardoise); color: var(--tuffeau); }
.form-status { min-height: 1.4em; margin: 0; font-weight: 600; }
.form-status.is-error { color: #8A2318; }

/* Pied de page */
.site-footer { background: var(--ardoise); color: var(--tuffeau); margin-top: 3rem; }
.footer-body { max-width: var(--wrap); margin-inline: auto; padding: 2.5rem var(--gutter) 1.5rem; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1.2fr 1fr 1fr; gap: 2rem; }
.footer-name { font-family: var(--titre); font-size: 1.5rem; margin: 0 0 0.5rem; }
.footer-note { font-size: 0.93rem; max-width: 34ch; }
.footer-title { font-family: var(--titre); font-size: 1.1rem; margin: 0 0 0.6rem; }
.site-footer ul { list-style: none; padding: 0; margin: 0; font-size: 0.95rem; }
.site-footer li { margin-bottom: 0.45rem; }
.site-footer a { color: var(--miel-clair); }
.site-footer a:hover { color: #fff; }
.footer-cats a { display: inline-flex; align-items: center; gap: 0.6rem; }
.footer-cats .dot { background: var(--tuffeau); border-radius: 50%; padding: 1px; box-sizing: content-box; }
.footer-legal { margin: 2rem 0 0; padding-top: 1rem; border-top: 1px solid rgba(233, 230, 220, 0.3); font-size: 0.88rem; }

/* Mobile */
@media (max-width: 900px) {
  .nav-toggle { display: flex; }
  .main-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--ardoise); border-top: 1px solid rgba(233, 230, 220, 0.3); padding: 0.5rem var(--gutter) 1.2rem; max-height: calc(100vh - 4rem); overflow-y: auto; }
  body.nav-open .main-nav { display: block; }
  .main-nav ul { flex-direction: column; align-items: stretch; gap: 0; }
  .main-nav a, .sub-toggle { width: 100%; padding: 0.85rem 0.2rem; font-size: 1.05rem; border-radius: 0; box-shadow: none !important; }
  .sub-toggle { pointer-events: none; font-family: var(--titre); font-weight: 400; color: var(--miel-clair); padding-bottom: 0.3rem; border-top: 1px solid rgba(233, 230, 220, 0.2); }
  .sub-toggle::after { display: none; }
  .sub-menu, .has-sub:hover > .sub-menu { position: static; display: flex !important; background: transparent; border: 0; padding: 0 0 0.5rem 0.9rem !important; min-width: 0; }
  .sub-menu a { color: var(--tuffeau); }
  .sub-menu a:hover { background: transparent; color: var(--miel-clair); }
  .main-nav a[aria-current] { color: var(--miel-clair); }
  .article-grid { grid-template-columns: minmax(0, 1fr); gap: 1rem; }
  .toc { position: static; }
  .month-wheel { grid-template-columns: minmax(0, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 560px) {
  body { font-size: 1.02rem; }
  .brand-name { font-size: 1.2rem; }
  .month-list { grid-template-columns: minmax(0, 1fr); }
  .footer-grid { grid-template-columns: minmax(0, 1fr); }
  .pillar-head { grid-template-columns: minmax(0, 1fr); }
  .pillar-head > .dot { margin-top: 0; width: 44px; height: 44px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; animation: none !important; }
}

/* Images insérées dans le corps des articles (Markdown) : ratio 3:2 forcé, portrait carré pour les entretiens */
.article-body p > img, .article-body > img { width: 100%; aspect-ratio: 3 / 2; height: auto; object-fit: cover; object-position: center top; margin: 1.6rem 0; }
.article-body p > img[src*="body1-interview"] { aspect-ratio: 1 / 1; max-width: 26rem; }

/* Classes structurelles (hook orphan CSS, 2026-11-20) */
.footer-brand { min-width: 0; }
.sources-date { margin: 0.6rem 0 0; font-size: 0.9rem; color: var(--encre-douce); }
.article-body .journalist-question { margin: 1.6rem 0 0.6rem; padding: 0.4rem 1.1rem; border-left: 5px solid var(--miel); background: var(--chaux); font-family: var(--titre); font-size: 1.12rem; }
.article-body .journalist-question p { margin: 0.3rem 0; }
.article-body .expert-answer { margin: 0 0 1.6rem; padding-left: 1.1rem; border-left: 1px solid var(--trait); }
blockquote.journalist-question { font-size: 1.08rem !important; font-style: normal !important; line-height: 1.5 !important; }
blockquote.expert-answer { font-size: 1rem !important; font-style: normal !important; line-height: 1.7 !important; }
.listing-head { padding-bottom: 1rem; }
.pillar-body { min-width: 0; }
.pillar-articles { margin-top: 2.5rem; }
