/* Blog : styles propres, à charger après style.css.
   Typographie et palette du site ; couleurs de rubrique inspirées
   de la photographie culinaire éditoriale (fonds pleins, saturés). */

:root {
  --rub-femme: #C9B6D9;      /* lavande */
  --rub-femme-ink: #4E3566;
  --rub-procto: #A9CBDD;     /* bleu piscine */
  --rub-procto-ink: #23495E;
  --rub-meta: #F1B48B;       /* abricot */
  --rub-meta-ink: #6B3418;
  --measure: 68ch;
}

/* Bandeau prototype (à retirer avant publication) */
.proto-banner {
  background: var(--accent);
  color: var(--text-cream);
  text-align: center;
  font-size: 0.78rem;
  letter-spacing: 0.06em;
  padding: 8px 16px;
}

/* ---------- Pastilles de rubrique ---------- */
.tag {
  display: inline-block;
  font-family: 'Tenor Sans', 'Jost', sans-serif;
  font-size: 0.66rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  padding: 6px 12px;
  border-radius: 20px;
  text-decoration: none;
}
.tag-femme { background: var(--rub-femme); color: var(--rub-femme-ink); }
.tag-procto { background: var(--rub-procto); color: var(--rub-procto-ink); }
.tag-meta { background: var(--rub-meta); color: var(--rub-meta-ink); }
.tag-rubrique { background: transparent; border: 1px solid currentColor; color: var(--accent); }

/* ---------- Index du blog ---------- */
.blog-hero {
  padding: 90px 40px 50px;
  max-width: 1180px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 60px;
  align-items: end;
}
.blog-hero .eyebrow { color: var(--accent); display: block; margin-bottom: 22px; }
.blog-hero h1 { font-size: var(--text-h1); line-height: var(--lh-heading); }
.blog-hero h1 em { color: var(--accent); }
.blog-hero p { font-size: var(--text-body-lg); line-height: 1.7; max-width: 46ch; }

.blog-filters {
  max-width: 1180px;
  margin: 0 auto;
  padding: 0 40px 36px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  border-bottom: 1px solid var(--beige);
}
.blog-filters button {
  font-family: 'Jost', sans-serif;
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  background: none;
  border: 1px solid var(--beige);
  color: var(--text-dark);
  padding: 9px 18px;
  border-radius: 24px;
  cursor: pointer;
}
.blog-filters button[aria-pressed="true"] {
  background: var(--dark);
  border-color: var(--dark);
  color: var(--text-cream);
}

.blog-list { max-width: 1180px; margin: 0 auto; padding: 56px 40px 90px; }

/* Article à la une */
.featured {
  display: grid;
  grid-template-columns: 1.15fr 1fr;
  gap: 0;
  text-decoration: none;
  color: inherit;
  background: #fff;
  margin-bottom: 64px;
}
.featured .cover { min-height: 460px; }
.featured-body { padding: 56px 52px; display: flex; flex-direction: column; gap: 20px; justify-content: center; }
.featured-body h2 { font-size: clamp(2rem, 3vw, 2.9rem); line-height: 1.1; }
.featured-body p { line-height: 1.7; font-size: 1.05rem; }
.meta-line { font-size: 0.78rem; letter-spacing: 0.06em; color: var(--text-muted); }

/* Couvertures : photo, ou aplat de couleur en attendant la photo */
.cover { position: relative; overflow: hidden; background: var(--beige); }
.cover img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 0.6s ease; }
a:hover .cover img { transform: scale(1.03); }
.cover-femme { background: var(--rub-femme); }
.cover-procto { background: var(--rub-procto); }
.cover-meta { background: var(--rub-meta); }
.cover-note {
  position: absolute; left: 16px; bottom: 14px; right: 16px;
  font-size: 0.72rem; line-height: 1.4; color: rgba(0,0,0,0.55); font-style: italic;
}
.cover svg { position: absolute; inset: 0; margin: auto; width: 46%; height: auto; }

.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 40px 32px;
}
.card { text-decoration: none; color: inherit; display: flex; flex-direction: column; gap: 14px; }
.card .cover { aspect-ratio: 4 / 5; }
.card h3 { font-size: 1.7rem; line-height: 1.15; }
.card p { font-size: 0.98rem; line-height: 1.6; }
.card.soon { opacity: 0.75; }
.soon-label { font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-muted); }

/* Rubriques */
.rubriques { background: var(--beige); padding: 80px 40px; }
.rubriques-inner { max-width: 1180px; margin: 0 auto; }
.rubriques .eyebrow { color: var(--accent); display: block; margin-bottom: 16px; }
.rubriques h2 { font-size: var(--text-h2); line-height: var(--lh-heading); margin-bottom: 44px; }
.rubriques-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; }
.rubriques-grid div { border-top: 1px solid var(--dark); padding-top: 18px; }
.rubriques-grid h3 { font-size: 1.5rem; font-style: italic; margin-bottom: 10px; }
.rubriques-grid p { font-size: 0.95rem; line-height: 1.6; }

/* ---------- Newsletter ---------- */
.newsletter {
  background: var(--accent);
  color: var(--text-cream);
  padding: 80px 40px;
}
.newsletter-inner {
  max-width: 1080px; margin: 0 auto;
  display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center;
}
.newsletter .eyebrow { color: var(--accent-soft); display: block; margin-bottom: 16px; }
.newsletter h2 { font-size: clamp(2rem, 3vw, 2.8rem); line-height: 1.1; margin-bottom: 18px; }
.newsletter p { line-height: 1.7; color: var(--beige); }
.newsletter .gift {
  margin-top: 22px; padding: 16px 18px; border: 1px solid rgba(250,247,243,0.35);
  font-size: 0.92rem; line-height: 1.55;
}
.newsletter .gift strong { font-weight: 500; color: var(--text-cream); }
.nl-form { display: flex; flex-direction: column; gap: 14px; }
.nl-form label { font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--accent-soft); }
.nl-form input[type="email"], .nl-form select {
  font-family: 'Jost', sans-serif; font-size: 1rem; font-weight: 300;
  padding: 14px 16px; border: 1px solid rgba(250,247,243,0.5); background: transparent;
  color: var(--text-cream); border-radius: 2px; width: 100%;
}
.nl-form select option { color: var(--text-dark); }
.nl-form input::placeholder { color: rgba(250,247,243,0.6); }
.nl-form .nl-consent { display: flex; gap: 10px; font-size: 0.82rem; line-height: 1.5; color: var(--beige); text-transform: none; letter-spacing: 0; }
.nl-consent input { margin-top: 4px; accent-color: var(--cream); }
.nl-form .btn { align-self: flex-start; background: var(--cream); color: var(--accent); border: none; cursor: pointer; }
.nl-small { font-size: 0.78rem; color: var(--accent-soft); }
.nl-thanks { display: none; font-family: 'Cormorant Garamond', Georgia, serif; font-size: 1.6rem; font-style: italic; }

/* ---------- Page article ---------- */
.article-hero {
  display: grid;
  grid-template-columns: 1fr 1fr;
  min-height: 560px;
  background: var(--cream);
}
.article-hero-text {
  padding: 70px 56px 60px 40px;
  display: flex; flex-direction: column; justify-content: center; gap: 22px;
  max-width: 640px; justify-self: end; width: 100%;
}
.article-hero-text .tags { display: flex; gap: 8px; flex-wrap: wrap; }
.article-hero-text h1 { font-size: clamp(2.4rem, 4vw, 3.7rem); line-height: 1.08; }
.article-hero-text .chapo {
  font-family: 'Cormorant Garamond', Georgia, serif; font-style: italic;
  font-size: 1.4rem; line-height: 1.4;
}
.byline { display: flex; align-items: center; gap: 14px; font-size: 0.85rem; line-height: 1.4; }
.byline img { width: 48px; height: 48px; border-radius: 50%; object-fit: cover; }
.byline strong { font-weight: 500; display: block; }
.byline span { color: var(--text-muted); }
.article-hero .cover { min-height: 100%; }

.article-wrap {
  max-width: 1180px; margin: 0 auto; padding: 70px 40px 40px;
  display: grid; grid-template-columns: 220px minmax(0, var(--measure)); gap: 70px;
  justify-content: center;
}
.toc { position: sticky; top: 110px; align-self: start; font-size: 0.85rem; }
.toc h4 { font-size: 0.68rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--text-muted); margin-bottom: 14px; font-weight: 400; }
.toc ol { list-style: none; display: flex; flex-direction: column; gap: 12px; counter-reset: toc; }
.toc li { counter-increment: toc; display: flex; gap: 10px; line-height: 1.35; }
.toc li::before { content: counter(toc, decimal-leading-zero); color: var(--accent); font-size: 0.75rem; padding-top: 2px; }
.toc a { text-decoration: none; }
.toc a:hover { color: var(--accent); }

.article-body { font-size: 1.1rem; line-height: 1.8; }
.article-body > * + * { margin-top: 1.1em; }
.article-body h2 {
  font-size: clamp(1.9rem, 2.6vw, 2.4rem); line-height: 1.15;
  margin-top: 2.2em; scroll-margin-top: 110px;
}
.article-body h2 + p { margin-top: 0.7em; }
.article-body strong { font-weight: 500; }
.article-body a { color: var(--accent); }
.article-body .lead { font-size: 1.2rem; }

.en-bref {
  background: #fff; border-left: 3px solid var(--accent);
  padding: 26px 30px; margin-bottom: 2em;
}
.en-bref h3, .box h3 {
  font-family: 'Tenor Sans', 'Jost', sans-serif; font-size: 0.7rem; letter-spacing: 0.22em;
  text-transform: uppercase; color: var(--accent); margin-bottom: 14px; font-weight: 400;
}
.en-bref ul { padding-left: 1.1em; display: flex; flex-direction: column; gap: 8px; font-size: 1.02rem; line-height: 1.6; }

.box { padding: 28px 30px; margin: 2em 0; }
.box-etude { background: var(--rub-femme); color: var(--rub-femme-ink); }
.box-etude h3 { color: var(--rub-femme-ink); }
.box-etude .chiffre {
  font-family: 'Cormorant Garamond', Georgia, serif; font-size: clamp(3rem, 6vw, 4.4rem);
  line-height: 1; display: block; margin-bottom: 8px;
}
.box-etude p { font-size: 1.05rem; line-height: 1.6; }
.box-etude .src { font-size: 0.82rem; margin-top: 12px; opacity: 0.85; }
.box-medecin { background: #fff; border: 1px solid var(--beige); }
.box-medecin ul { padding-left: 1.1em; display: flex; flex-direction: column; gap: 8px; font-size: 1rem; line-height: 1.6; }

figure.schema { margin: 2.2em 0; }
figure.schema svg { width: 100%; height: auto; display: block; background: #fff; }
figure.schema figcaption { font-size: 0.85rem; color: var(--text-muted); margin-top: 10px; line-height: 1.5; }

.article-cta {
  margin-top: 3em; padding: 40px; background: var(--dark); color: var(--text-cream); text-align: left;
}
.article-cta h2 { margin-top: 0; color: var(--text-cream); }
.article-cta p { color: var(--beige); }
.article-cta .btn { margin-top: 18px; }

details.sources { margin-top: 2.6em; border-top: 1px solid var(--beige); padding-top: 18px; font-size: 0.9rem; line-height: 1.6; }
details.sources summary { cursor: pointer; font-size: 0.72rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--text-muted); }
details.sources ol { margin-top: 14px; padding-left: 1.2em; display: flex; flex-direction: column; gap: 8px; }

.author-box {
  margin-top: 2.6em; display: flex; gap: 22px; align-items: flex-start;
  padding: 26px; background: var(--card);
}
.author-box img { width: 84px; height: 84px; border-radius: 50%; object-fit: cover; flex-shrink: 0; }
.author-box p { font-size: 0.95rem; line-height: 1.6; }
.author-box strong { font-family: 'Cormorant Garamond', Georgia, serif; font-size: 1.35rem; font-weight: 400; display: block; margin-bottom: 4px; }

.related { max-width: 1180px; margin: 0 auto; padding: 40px 40px 90px; }
.related > h2 { font-size: var(--text-h3); margin-bottom: 30px; }

.progress { position: fixed; top: 0; left: 0; height: 3px; background: var(--accent); width: 0; z-index: 200; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .blog-hero { grid-template-columns: 1fr; gap: 24px; padding: 60px 16px 36px; }
  .blog-filters, .blog-list, .related { padding-left: 16px; padding-right: 16px; }
  .featured { grid-template-columns: 1fr; }
  .featured .cover { min-height: 300px; }
  .featured-body { padding: 32px 24px; }
  .cards { grid-template-columns: 1fr; gap: 44px; }
  .card .cover { aspect-ratio: 4 / 3; }
  .rubriques { padding: 60px 16px; }
  .rubriques-grid { grid-template-columns: 1fr 1fr; }
  .newsletter { padding: 60px 16px; }
  .newsletter-inner { grid-template-columns: 1fr; gap: 32px; }
  .article-hero { grid-template-columns: 1fr; }
  .article-hero .cover { min-height: 300px; order: -1; }
  .article-hero-text { padding: 36px 16px; max-width: none; }
  .article-wrap { grid-template-columns: 1fr; padding: 32px 16px; gap: 0; }
  .toc { display: none; }
  .article-body { font-size: 1.05rem; }
  .article-cta { padding: 28px 22px; }
  .box, .en-bref { padding: 22px 20px; }
}
@media (max-width: 560px) {
  .rubriques-grid { grid-template-columns: 1fr; }
  .author-box { flex-direction: column; }
}

.article-body .credit { font-size: 0.8rem; color: var(--text-muted); margin-top: 1.4em; }
details.sources .lecture { margin-top: 14px; font-style: italic; color: var(--text-muted); }
