/* Marquise des Mûres : DA « Schiste et garrigue » */
:root {
  --calcaire: #F4EFE6;
  --calcaire-alt: #E9E1D3;
  --schiste: #2E3138;
  --schiste-doux: #5A5E66;
  --mure: #3B1F3A;
  --grenat: #7A1F2B;
  --olive: #7C7A4A;
  --olive-fonce: #5E5C33;
  --ocre: #C08A3E;
  --filet: rgba(46, 49, 56, 0.22);
  --f-titre: var(--af-fraunces, Georgia, serif);
  --f-texte: var(--af-newsreader, Georgia, serif);
  --f-mono: var(--af-plex-mono, ui-monospace, monospace);
  --wrap: 72rem;
  --lecture: 44rem;
  --gutter: 1.25rem;
}

/* Reset et anti-distorsion */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-padding-top: 5.5rem; }
body { margin: 0; background: var(--calcaire); color: var(--schiste); font-family: var(--f-texte); font-size: 1.1875rem; line-height: 1.65; text-rendering: optimizeLegibility; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--grenat); text-decoration-thickness: 1px; text-underline-offset: 0.18em; }
a:hover { color: var(--mure); }
:focus-visible { outline: 3px solid var(--ocre); outline-offset: 3px; border-radius: 2px; }
.skip-link { position: absolute; left: -999px; top: 0; background: var(--mure); color: var(--calcaire); padding: 0.6rem 1rem; z-index: 100; }
.skip-link:focus { left: 0.5rem; top: 0.5rem; }
.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }

h1, h2, h3, h4 { font-family: var(--f-titre); color: var(--mure); line-height: 1.15; font-weight: 600; text-wrap: balance; }
h1 { font-size: clamp(2.1rem, 5.2vw, 3.5rem); font-weight: 700; letter-spacing: -0.01em; margin: 0.4rem 0 1rem; }
h2 { font-size: clamp(1.55rem, 3.2vw, 2.1rem); margin: 2.6rem 0 0.8rem; }
h3 { font-size: clamp(1.2rem, 2.2vw, 1.45rem); margin: 1.8rem 0 0.5rem; }

/* Kicker en petites capitales */
.kicker { font-family: var(--f-titre); font-variant-caps: all-small-caps; letter-spacing: 0.09em; font-size: 1.05rem; font-weight: 600; color: var(--grenat); margin: 0; }

/* Wrappers d'images (aspect-ratio fixe, jamais object-fit seul sur img) */
.img-hero { aspect-ratio: 16 / 9; overflow: hidden; background: var(--calcaire-alt); }
.img-card { aspect-ratio: 3 / 2; overflow: hidden; background: var(--calcaire-alt); }
.img-body { aspect-ratio: 3 / 2; overflow: hidden; background: var(--calcaire-alt); }
.img-portrait { aspect-ratio: 1 / 1; overflow: hidden; border-radius: 50%; background: var(--calcaire-alt); }
.img-hero img, .img-card img, .img-body img, .img-portrait img { width: 100%; height: 100%; object-fit: cover; object-position: center top; }
.img-ph { width: 100%; height: 100%; background: linear-gradient(160deg, var(--calcaire-alt), #d8cfbd 55%, #c9bfa9); }

/* Hero bord à bord, titre dessous */
.hero-bandeau { margin: 0; }
.hero-bandeau .img-hero { max-height: min(75vh, 44vw); width: 100%; }
.hero-bandeau figcaption { max-width: var(--wrap); margin-inline: auto; padding: 0.5rem var(--gutter) 0; font-size: 0.9rem; color: var(--schiste-doux); font-style: italic; }

/* Strates de schiste */
.strates { display: block; width: 100%; height: 2.2rem; margin: 0; }
.strates .s1 { fill: var(--calcaire-alt); }
.strates .s2 { fill: #d9d0bf; }
.strates .s3 { fill: #c5baa4; }
.strates--sombre .s1 { fill: #a79f8f; }
.strates--sombre .s2 { fill: #6b6d70; }
.strates--sombre .s3 { fill: var(--schiste); }
.strates--flip { transform: scaleY(-1); }

/* En-tête */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(244, 239, 230, 0.96); border-bottom: 1px solid var(--filet); backdrop-filter: blur(6px); }
.site-header.scrolled { box-shadow: 0 1px 0 var(--filet), 0 6px 18px -12px rgba(46, 49, 56, 0.35); }
.header-inner { max-width: var(--wrap); margin-inline: auto; padding: 0.55rem var(--gutter); display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.brand { display: flex; align-items: center; gap: 0.7rem; text-decoration: none; color: var(--mure); }
.brand img { width: 40px; height: 40px; }
.brand-text { display: flex; flex-direction: column; line-height: 1.1; }
.brand-name { font-family: var(--f-titre); font-weight: 700; font-size: 1.3rem; }
.brand-tag { font-style: italic; font-size: 0.88rem; color: var(--schiste-doux); }
.main-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 0.15rem; }
.main-nav a { display: block; padding: 0.5rem 0.75rem; text-decoration: none; color: var(--schiste); font-family: var(--f-titre); font-weight: 500; font-size: 1rem; border-bottom: 2px solid transparent; }
.main-nav a:hover { color: var(--grenat); border-color: var(--olive); }
.main-nav a[aria-current='page'] { color: var(--mure); border-color: var(--grenat); }
.nav-toggle { display: none; background: none; border: 1px solid var(--filet); border-radius: 4px; width: 44px; height: 44px; padding: 0; cursor: pointer; flex-direction: column; justify-content: center; align-items: center; gap: 5px; }
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--mure); transition: transform 0.2s, opacity 0.2s; }
.nav-open .nav-toggle span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Fil d'Ariane */
.breadcrumbs ol { list-style: none; margin: 1.2rem 0 0.4rem; padding: 0; display: flex; flex-wrap: wrap; gap: 0.2rem 0.5rem; font-size: 0.92rem; color: var(--schiste-doux); }
.breadcrumbs li + li::before { content: '/'; margin-right: 0.5rem; color: var(--olive); }
.breadcrumbs a { color: var(--schiste-doux); }

/* Conteneurs d'article (classes de structure) */
.article, .article--blog, .article--page { display: block; }
.fiche-etapes { min-width: 0; }

/* Titres de page */
.article-head, .listing-head, .home-head { padding-bottom: 1.6rem; }
.home-head { padding-top: 2rem; }
.article-head > *, .home-head > *, .listing-head > * { max-width: 52rem; }
.article-meta { font-size: 0.95rem; color: var(--schiste-doux); margin: 0 0 1rem; }
.chapeau { font-size: 1.3rem; line-height: 1.55; color: var(--schiste); margin: 0.4rem 0 0; max-width: 46rem; }

/* Grille article : colonne latérale 15rem + texte */
.article-grid { padding-top: 2.2rem; padding-bottom: 3rem; }
.article-grid.has-toc { display: grid; grid-template-columns: 15rem minmax(0, 1fr); gap: 3rem; align-items: start; }
.toc { position: sticky; top: 5.5rem; font-size: 0.97rem; border-left: 2px solid var(--olive); padding-left: 1rem; }
.toc-title { font-family: var(--f-titre); font-weight: 600; color: var(--mure); margin: 0 0 0.6rem; }
.toc ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.45rem; }
.toc a { color: var(--schiste); text-decoration: none; }
.toc a:hover { color: var(--grenat); text-decoration: underline; }
.article-main { min-width: 0; max-width: var(--lecture); }
.article-grid:not(.has-toc) .article-main { margin-inline: auto; }

/* Corps de texte */
.article-body > :first-child { margin-top: 0; }
.article-body p { margin: 0 0 1.1rem; }
.article-body > p:first-of-type::first-letter { font-family: var(--f-titre); font-weight: 800; font-size: 4.3rem; line-height: 0.82; float: left; padding: 0.35rem 0.6rem 0 0; color: var(--mure); }
.article-body ul, .article-body ol { padding-left: 1.4rem; margin: 0 0 1.2rem; }
.article-body li { margin-bottom: 0.4rem; }
.article-body ul li::marker { color: var(--olive); }
.article-body blockquote { margin: 1.8rem 0; padding: 0.2rem 0 0.2rem 1.4rem; border-left: 3px solid var(--ocre); font-family: var(--f-titre); font-style: italic; font-size: 1.35rem; line-height: 1.4; color: var(--mure); }
.article-body blockquote p { margin: 0; }
.article-body figure { margin: 2rem 0; }
.article-body figure figcaption { font-size: 0.9rem; color: var(--schiste-doux); font-style: italic; padding-top: 0.4rem; }
.article-body hr { border: 0; height: 1px; background: var(--filet); margin: 2.4rem 0; }

/* Tableaux responsives */
.article-body table { width: 100%; border-collapse: collapse; margin: 1.6rem 0; font-size: 0.98rem; font-family: var(--f-mono); display: block; overflow-x: auto; }
.article-body th, .article-body td { text-align: left; padding: 0.55rem 0.8rem; border-bottom: 1px solid var(--filet); vertical-align: top; }
.article-body th { background: var(--calcaire-alt); color: var(--mure); font-weight: 600; white-space: nowrap; }

/* Fiche recette « étiquette » */
.fiche { margin: 0 0 2.4rem; }
.fiche-cadre { border: 1px solid var(--schiste); outline: 1px solid var(--schiste); outline-offset: 4px; padding: 1.4rem 1.5rem 1.6rem; background: #f8f4ec; margin: 5px; }
.fiche-tete { border-bottom: 1px solid var(--filet); padding-bottom: 0.8rem; }
.fiche-label { font-family: var(--f-titre); font-variant-caps: all-small-caps; letter-spacing: 0.1em; color: var(--grenat); margin: 0; font-size: 1.05rem; font-weight: 600; }
.fiche-tete h2 { margin: 0.2rem 0 0; font-size: clamp(1.4rem, 3vw, 1.85rem); }
.fiche-chiffres { display: grid; grid-template-columns: repeat(auto-fit, minmax(7.2rem, 1fr)); gap: 0; margin: 0; border-bottom: 1px solid var(--filet); }
.fiche-chiffres > div { padding: 0.8rem 0.9rem 0.8rem 0; }
.fiche-chiffres dt { font-size: 0.82rem; color: var(--schiste-doux); font-family: var(--f-texte); font-style: italic; }
.fiche-chiffres dd { margin: 0.1rem 0 0; font-family: var(--f-mono); font-weight: 600; font-size: 1.02rem; color: var(--mure); }
.fiche-corps { display: grid; gap: 1.8rem; padding-top: 1.2rem; }
.fiche h3 { margin: 0 0 0.6rem; font-size: 1.2rem; }
.fiche-ingredients ul { list-style: none; margin: 0; padding: 0; font-family: var(--f-mono); font-size: 0.93rem; line-height: 1.5; }
.fiche-ingredients li { padding: 0.4rem 0; border-bottom: 1px dotted var(--filet); }
.etapes { list-style: none; counter-reset: etape; margin: 0; padding: 0; display: grid; gap: 1.1rem; }
.etapes li { counter-increment: etape; display: grid; grid-template-columns: 3.1rem minmax(0, 1fr); gap: 0.4rem; align-items: start; }
.etapes li::before { content: counter(etape); font-family: var(--f-titre); font-weight: 700; font-size: 2.9rem; line-height: 0.95; color: var(--olive); text-align: center; }

/* FAQ accordéon */
.faq { margin-top: 3rem; }
.faq-item { border-top: 1px solid var(--filet); }
.faq-item:last-child { border-bottom: 1px solid var(--filet); }
.faq-item h3 { margin: 0; font-size: 1.1rem; }
.faq-item button { width: 100%; text-align: left; background: none; border: 0; padding: 1rem 0; font: inherit; font-family: var(--f-titre); font-weight: 600; color: var(--mure); cursor: pointer; display: flex; justify-content: space-between; gap: 1rem; align-items: center; }
.faq-plus { position: relative; width: 16px; height: 16px; flex: none; }
.faq-plus::before, .faq-plus::after { content: ''; position: absolute; background: var(--grenat); left: 0; right: 0; top: 7px; height: 2px; transition: transform 0.2s; }
.faq-plus::after { transform: rotate(90deg); }
.faq-item.open .faq-plus::after { transform: rotate(0); }
.faq-answer { padding: 0 0 1rem; }
.faq-answer p { margin: 0; }

/* Sources et liens associés */
.sources, .related { margin-top: 2.6rem; font-size: 1rem; }
.sources h2, .related h2 { font-size: 1.35rem; margin-top: 0; }
.sources ul, .related ul { padding-left: 1.2rem; margin: 0 0 0.8rem; }
.verifie { font-family: var(--f-mono); font-size: 0.85rem; color: var(--schiste-doux); }

/* Cartes */
.card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); gap: 2rem 1.6rem; }
.card[hidden] { display: none; }
.card-link { display: block; text-decoration: none; color: inherit; height: 100%; }
.card .img-card img { transition: transform 0.35s ease; }
.card-link:hover .img-card img { transform: scale(1.03); }
.card-body { padding: 0.9rem 0 0; }
.card-title { font-size: 1.28rem; margin: 0.15rem 0 0.4rem; color: var(--mure); }
.card-link:hover .card-title { color: var(--grenat); text-decoration: underline; text-decoration-thickness: 1px; }
.card-summary { margin: 0 0 0.5rem; font-size: 1rem; line-height: 1.5; color: var(--schiste); display: -webkit-box; -webkit-line-clamp: 3; line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.card-date { font-family: var(--f-mono); font-size: 0.8rem; color: var(--schiste-doux); }

/* Filtre du blog */
.category-filter { display: flex; flex-wrap: wrap; gap: 0.5rem; margin: 1.4rem 0 0.6rem; }
.chip { font: inherit; font-family: var(--f-titre); font-size: 0.98rem; font-weight: 500; padding: 0.45rem 1rem; border: 1px solid var(--schiste); background: transparent; color: var(--schiste); border-radius: 2px; cursor: pointer; }
.chip:hover { background: var(--calcaire-alt); }
.chip.is-active { background: var(--mure); border-color: var(--mure); color: var(--calcaire); }
.filter-status { font-family: var(--f-mono); font-size: 0.85rem; color: var(--schiste-doux); margin: 0.4rem 0 0; min-height: 1.4em; }
.filter-empty { font-style: italic; color: var(--schiste-doux); }
.listing { padding-top: 2rem; padding-bottom: 3.5rem; }
.listing > h2 { margin-top: 0; }

/* Accueil : rubriques */
.rubriques { padding-top: 2rem; }
.rubriques h2 { margin-top: 0; }
.rubriques-liste { list-style: none; padding: 0; margin: 1rem 0 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr)); gap: 0.8rem; }
.rubriques-liste a { display: block; padding: 1rem 1.1rem; border: 1px solid var(--schiste); text-decoration: none; font-family: var(--f-titre); font-weight: 600; font-size: 1.2rem; color: var(--mure); background: #f8f4ec; }
.rubriques-liste a:hover { background: var(--mure); color: var(--calcaire); }

/* Boutons */
.more { margin: 2rem 0 0; display: flex; gap: 0.8rem; flex-wrap: wrap; }
.btn { display: inline-block; padding: 0.7rem 1.4rem; background: var(--mure); color: var(--calcaire); text-decoration: none; font-family: var(--f-titre); font-weight: 600; border: 1px solid var(--mure); border-radius: 2px; }
.btn:hover { background: var(--grenat); border-color: var(--grenat); color: var(--calcaire); }
.btn--sec { background: transparent; color: var(--mure); }
.btn--sec:hover { color: var(--calcaire); }

/* Pied de page : schiste */
.site-footer { color: #e6e0d4; margin-top: 2rem; }
.footer-body { background: var(--schiste); padding: 1.5rem 0 2rem; }
.footer-body > * { max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gutter); }
.footer-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 2.4rem; }
.footer-name { font-family: var(--f-titre); font-weight: 700; font-size: 1.5rem; margin: 0; color: var(--calcaire); }
.footer-tag { font-style: italic; margin: 0 0 1rem; color: #b9b3a6; }
.footer-nonaff { font-size: 0.95rem; line-height: 1.55; max-width: 30rem; margin: 0; }
.footer-title { font-family: var(--f-titre); font-weight: 600; color: var(--ocre); margin: 0 0 0.6rem; }
.site-footer ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.3rem; }
.site-footer a { color: #e6e0d4; text-decoration-color: rgba(230, 224, 212, 0.4); }
.site-footer a:hover { color: #fff; }
.footer-copy { margin: 2rem auto 0; padding-top: 1rem; border-top: 1px solid rgba(230, 224, 212, 0.2); font-size: 0.88rem; color: #b9b3a6; }

/* Apparition à la lecture : un seul mouvement discret */
.reveal { opacity: 1; }

@media (max-width: 960px) {
  .article-grid.has-toc { grid-template-columns: minmax(0, 1fr); gap: 1.4rem; }
  .toc { position: static; }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 860px) {
  .nav-toggle { display: flex; }
  .main-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; background: var(--calcaire); border-bottom: 1px solid var(--filet); padding: 0.5rem var(--gutter) 1rem; }
  .nav-open .main-nav { display: block; }
  .main-nav ul { flex-direction: column; }
  .main-nav a { padding: 0.8rem 0.2rem; border-bottom: 1px solid var(--filet); }
  .hero-bandeau .img-hero { max-height: none; }
}
@media (max-width: 560px) {
  body { font-size: 1.125rem; }
  .brand-tag { display: none; }
  .footer-grid { grid-template-columns: 1fr; }
  .fiche-cadre { padding: 1.1rem 1rem 1.3rem; }
  .article-body > p:first-of-type::first-letter { font-size: 3.6rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; scroll-behavior: auto !important; }
}
@media print {
  .site-header, .site-footer, .toc, .strates, .category-filter { display: none; }
}

/* Formulaire de contact */
.contact-form { display: grid; gap: 1.2rem; max-width: 36rem; margin: 1.6rem 0 2rem; }
.form-group { display: grid; gap: 0.35rem; }
.contact-form label { font-family: var(--f-titre); font-weight: 600; color: var(--mure); }
.contact-form input[type="text"], .contact-form input[type="email"], .contact-form select, .contact-form textarea { width: 100%; box-sizing: border-box; padding: 0.7rem 0.85rem; border: 1px solid var(--schiste); border-radius: 2px; font: inherit; background: #fbf8f2; color: var(--schiste); }
.contact-form input:focus, .contact-form select:focus, .contact-form textarea:focus { outline: 2px solid var(--ocre); outline-offset: 1px; }
.contact-form textarea { resize: vertical; }
.contact-form .btn { justify-self: start; cursor: pointer; }
.contact-form .btn:disabled { opacity: 0.6; cursor: wait; }
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
#contact-status { margin: 0; min-height: 1.5em; font-family: var(--f-mono); font-size: 0.92rem; }
.status-ok { color: var(--olive-fonce, #4f5a2c); }
.status-ko { color: var(--grenat); }

/* Encadré « Pourquoi ce nom » et plan du site */
.nom-encadre { border: 1px solid var(--schiste); outline: 1px solid var(--schiste); outline-offset: 4px; margin: 6px; padding: 1.6rem 1.7rem; background: #f8f4ec; }
.nom-encadre h2 { margin-top: 0; }
.nom-encadre p { margin: 0 0 0.9rem; }
.nom-encadre p:last-child { margin-bottom: 0; }
.plan h2 { margin-top: 2rem; }
.plan ul { padding-left: 1.3rem; }
.plan li { margin-bottom: 0.35rem; }
.pillar-articles { margin: 3rem 0 2rem; }
.pillar-articles h2 { margin-top: 0; }
.nom-section { padding-top: 2rem; }
