/* =============================================
   LES BERGERS BELGES & VOUS — main.css
   Palette : #5A5AF3 (indigo) · #434175 (indigo foncé) · #FFA76E (orange) · #2A2A2A (texte)
   Typo : Fraunces (titres) + Nunito Sans (corps)
   Layout : CSS Grid + Flexbox pur
   ============================================= */

/* ---------- RESET & BASE ---------- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --primary:    #5A5AF3;
  --primary-dk: #434175;
  --accent:     #FFA76E;
  --accent-lt:  #FFF0E6;
  --text:       #2A2A2A;
  --text-muted: #6B6B8A;
  --bg:         #FAFAF8;
  --bg-alt:     #F3F3FB;
  --border:     #E2E2F0;
  --white:      #FFFFFF;
  --radius:     12px;
  --radius-sm:  6px;
  --shadow-sm:  0 2px 8px rgba(90,90,243,.08);
  --shadow-md:  0 6px 24px rgba(90,90,243,.13);
  --shadow-lg:  0 16px 48px rgba(67,65,117,.18);
  --max-w:      1280px;
  --content-w:  780px;
}

html { font-size: 16px; scroll-behavior: smooth; }

body {
  font-family: 'Nunito Sans', 'Helvetica Neue', Arial, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3, h4, h5 {
  font-family: 'Fraunces', Georgia, serif;
  line-height: 1.2;
  color: var(--primary-dk);
}

/* ---------- UTILS ---------- */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
}
.container--narrow {
  max-width: var(--content-w);
  margin: 0 auto;
  padding: 0 24px;
}
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); }

/* ---------- NAV ---------- */
.site-header {
  background: var(--white);
  border-bottom: 2px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-sm);
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 12px 24px;
  max-width: var(--max-w);
  margin: 0 auto;
}
.site-header__logo { display: flex; align-items: center; flex-shrink: 0; }
.site-header__logo a { display: flex; align-items: center; }
.site-header__logo img { height: 72px; width: auto; }

/* Main menu */
.main-nav { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.main-nav__item { list-style: none; }
.main-nav__link {
  display: inline-block;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  font-family: 'Nunito Sans', sans-serif;
  font-size: .9rem;
  font-weight: 700;
  color: var(--primary-dk);
  transition: background .18s, color .18s;
  white-space: nowrap;
}
.main-nav__link:hover { background: var(--bg-alt); color: var(--primary); text-decoration: none; }
.main-nav__link.active { background: var(--primary); color: var(--white); }

/* Mobile menu toggle */
.nav-toggle {
  display: none;
  background: none;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  cursor: pointer;
  flex-direction: column;
  gap: 5px;
}
.nav-toggle span { display: block; width: 22px; height: 2px; background: var(--primary-dk); border-radius: 2px; transition: all .2s; }

@media (max-width: 768px) {
  .nav-toggle { display: flex; }
  .main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    background: var(--white);
    border-top: 2px solid var(--border);
    flex-direction: column;
    align-items: flex-start;
    padding: 16px 24px 24px;
    gap: 4px;
    box-shadow: var(--shadow-md);
  }
  .main-nav.open { display: flex; }
  .main-nav__link { font-size: 1rem; padding: 10px 12px; width: 100%; }
  .site-header__inner { position: relative; }
  .site-header__logo img { height: 52px; }
}

/* ---------- FOOTER ---------- */
.site-footer {
  background: var(--primary-dk);
  color: rgba(255,255,255,.8);
  padding: 48px 0 28px;
  margin-top: 80px;
}
.site-footer__inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 32px;
  align-items: start;
}
.site-footer__brand img { height: 54px; width: auto; filter: brightness(0) invert(1); opacity: .9; margin-bottom: 12px; }
.site-footer__brand p { font-size: .9rem; line-height: 1.6; max-width: 340px; }
.site-footer__legal { text-align: right; font-size: .83rem; }
.site-footer__legal a { color: rgba(255,255,255,.7); }
.site-footer__legal a:hover { color: var(--accent); }
.site-footer__copy {
  max-width: var(--max-w);
  margin: 28px auto 0;
  padding: 20px 24px 0;
  border-top: 1px solid rgba(255,255,255,.15);
  font-size: .8rem;
  text-align: center;
  color: rgba(255,255,255,.5);
}

@media (max-width: 600px) {
  .site-footer__inner { grid-template-columns: 1fr; }
  .site-footer__legal { text-align: left; }
}

/* ---------- INDEX — ARCHÉTYPE C (Typographie héroïque) ---------- */
.hero-typo {
  padding: 64px 0 0;
  overflow: hidden;
  background: var(--bg);
}
.hero-typo__inner {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 48px;
  align-items: start;
}
.hero-typo__text { min-width: 0; }
.hero-typo__kicker {
  display: inline-block;
  background: var(--accent);
  color: var(--white);
  font-family: 'Nunito Sans', sans-serif;
  font-weight: 800;
  font-size: .78rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  padding: 5px 14px;
  border-radius: 40px;
  margin-bottom: 20px;
}
.hero-typo__h1 {
  font-family: 'Fraunces', Georgia, serif;
  font-size: clamp(52px, 7vw, 88px);
  font-weight: 900;
  line-height: 1.05;
  color: var(--primary-dk);
  text-align: left;
  margin-bottom: 20px;
  letter-spacing: -.02em;
}
.hero-typo__h1 em { color: var(--primary); font-style: italic; }
.hero-typo__baseline {
  font-size: 1.18rem;
  color: var(--text-muted);
  max-width: 560px;
  margin-bottom: 32px;
  line-height: 1.6;
}
.hero-typo__content {
  font-size: 1.06rem;
  color: var(--text);
  max-width: 640px;
  line-height: 1.8;
}
.hero-typo__content p { margin-bottom: 1em; }
.hero-typo__thumb {
  position: relative;
  top: 0;
}
.hero-typo__thumb-img {
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
}
.hero-typo__thumb-badge {
  position: absolute;
  bottom: -16px; left: -16px;
  background: var(--accent);
  color: var(--white);
  font-family: 'Fraunces', serif;
  font-weight: 700;
  font-size: 1.2rem;
  border-radius: 50%;
  width: 80px; height: 80px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  line-height: 1.2;
  box-shadow: var(--shadow-md);
}
.hero-typo__thumb-badge span { font-size: .62rem; letter-spacing: .08em; text-transform: uppercase; }

/* Showcase section */
.showcase-section {
  padding: 72px 0 64px;
}
.showcase-section__header {
  display: flex;
  align-items: baseline;
  gap: 16px;
  margin-bottom: 40px;
}
.showcase-section__title {
  font-family: 'Fraunces', serif;
  font-size: 2rem;
  color: var(--primary-dk);
}
.showcase-section__rule {
  flex: 1;
  height: 2px;
  background: var(--border);
  border-radius: 2px;
}
.showcase-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
}

@media (max-width: 1024px) {
  .hero-typo__inner { grid-template-columns: 1fr 240px; }
  .hero-typo__h1 { font-size: clamp(44px, 6vw, 72px); }
  .showcase-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 720px) {
  .hero-typo__inner { grid-template-columns: 1fr; }
  .hero-typo__thumb { display: none; }
  .hero-typo__h1 { font-size: clamp(38px, 10vw, 58px); }
  .showcase-grid { grid-template-columns: 1fr; }
}

/* ---------- POST LOOP — CARTE VERTICALE ÉDITORIALE ---------- */
.post-card {
  background: var(--white);
  border-radius: var(--radius);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  transition: box-shadow .22s, transform .22s;
}
.post-card:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); }
.post-card__img-wrap { position: relative; overflow: hidden; }
.post-card__img-wrap img { width: 100%; aspect-ratio: 16/9; object-fit: cover; transition: transform .4s; }
.post-card:hover .post-card__img-wrap img { transform: scale(1.04); }
.post-card__cat {
  position: absolute;
  top: 12px; left: 12px;
  background: var(--primary);
  color: var(--white);
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 40px;
}
.post-card__cat a { color: inherit; }
.post-card__cat a:hover { text-decoration: none; opacity: .85; }
.post-card__body { padding: 20px 20px 24px; display: flex; flex-direction: column; flex: 1; }
.post-card__meta { font-size: .78rem; color: var(--text-muted); margin-bottom: 8px; }
.post-card__title {
  font-family: 'Fraunces', serif;
  font-size: 1.18rem;
  font-weight: 700;
  color: var(--primary-dk);
  margin-bottom: 10px;
  line-height: 1.35;
}
.post-card__title a { color: inherit; }
.post-card__title a:hover { color: var(--primary); text-decoration: none; }
.post-card__excerpt { font-size: .88rem; color: var(--text-muted); line-height: 1.65; flex: 1; margin-bottom: 16px; }
.post-card__read {
  align-self: flex-start;
  display: inline-block;
  font-size: .82rem;
  font-weight: 800;
  color: var(--primary);
  border-bottom: 2px solid var(--accent);
  padding-bottom: 1px;
  transition: color .15s;
}
.post-card__read:hover { color: var(--accent); text-decoration: none; }

/* ---------- POST-LIST ---------- */
.page-header {
  background: linear-gradient(135deg, var(--primary-dk) 0%, var(--primary) 100%);
  color: var(--white);
  padding: 56px 0 48px;
}
.page-header__inner { max-width: var(--max-w); margin: 0 auto; padding: 0 24px; }
.page-header__breadcrumb { font-size: .82rem; color: rgba(255,255,255,.65); margin-bottom: 16px; }
.page-header__breadcrumb a { color: rgba(255,255,255,.75); }
.page-header__h1 { font-family: 'Fraunces', serif; font-size: clamp(28px, 4vw, 48px); font-weight: 900; color: var(--white); text-align: left; }
.page-header__desc { font-size: 1rem; color: rgba(255,255,255,.75); margin-top: 12px; max-width: 560px; }

.post-list-section { padding: 56px 0 80px; }
.post-list-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  margin-bottom: 48px;
}
.pagination { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; }
.pagination .page a,
.pagination .page span {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px;
  border-radius: var(--radius-sm);
  border: 2px solid var(--border);
  font-size: .88rem; font-weight: 700;
  color: var(--primary-dk);
  transition: all .15s;
}
.pagination .page a:hover { background: var(--bg-alt); text-decoration: none; }
.pagination .page.active span,
.pagination .page.active a { background: var(--primary); border-color: var(--primary); color: var(--white); }

@media (max-width: 1024px) { .post-list-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .post-list-grid { grid-template-columns: 1fr; } }

/* ---------- POST.HTML — Article layout ---------- */
.article-header {
  background: var(--bg-alt);
  border-bottom: 2px solid var(--border);
  padding: 40px 0 36px;
}
.article-header__inner { max-width: var(--max-w); margin: 0 auto; padding: 0 24px; }
.article-header__breadcrumb { font-size: .8rem; color: var(--text-muted); margin-bottom: 10px; }
.article-header__breadcrumb a { color: var(--text-muted); }
.article-header__breadcrumb a:hover { color: var(--primary); }
.article-header__kicker {
  display: inline-block;
  background: var(--primary);
  color: var(--white);
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  padding: 4px 12px;
  border-radius: 40px;
  margin-bottom: 14px;
}
.article-header__h1 {
  font-family: 'Fraunces', serif;
  font-size: clamp(26px, 4vw, 46px);
  font-weight: 900;
  color: var(--primary-dk);
  text-align: left;
  line-height: 1.15;
  max-width: 800px;
  margin-bottom: 16px;
}
.article-header__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 16px;
  align-items: center;
  font-size: .85rem;
  color: var(--text-muted);
}
.article-header__meta span::before { content: '·'; margin-right: 8px; }
.article-header__meta span:first-child::before { content: none; }

/* Article body with TOC sidebar */
.article-body {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 48px 24px 64px;
  display: grid;
  grid-template-columns: 1fr 260px;
  gap: 56px;
  align-items: start;
}
.article-body__main { min-width: 0; }
.article-body__featured {
  width: 100%;
  aspect-ratio: 16/7;
  object-fit: cover;
  border-radius: var(--radius);
  margin-bottom: 40px;
  box-shadow: var(--shadow-md);
}
.article-body__content { font-size: 1.06rem; line-height: 1.85; color: var(--text); }
.article-body__content h2 { font-family: 'Fraunces', serif; font-size: 1.65rem; margin: 2.2em 0 .8em; color: var(--primary-dk); }
.article-body__content h3 { font-family: 'Fraunces', serif; font-size: 1.3rem; margin: 1.8em 0 .7em; color: var(--primary-dk); }
.article-body__content p { margin-bottom: 1.2em; }
.article-body__content ul, .article-body__content ol { padding-left: 1.5em; margin-bottom: 1.2em; }
.article-body__content li { margin-bottom: .4em; }
.article-body__content blockquote {
  border-left: 4px solid var(--accent);
  background: var(--accent-lt);
  padding: 16px 20px;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  margin: 1.5em 0;
  font-style: italic;
  color: var(--primary-dk);
}
.article-body__content a { color: var(--primary); border-bottom: 1px solid var(--accent); }
.article-body__content a:hover { color: var(--accent); text-decoration: none; }
.article-body__content img { border-radius: var(--radius-sm); margin: 1.5em 0; }

/* TOC Sidebar */
.article-toc {
  position: sticky;
  top: 100px;
  align-self: start;
}
.article-toc__card {
  background: var(--white);
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 20px 20px 24px;
  box-shadow: var(--shadow-sm);
}
.article-toc__title {
  font-family: 'Fraunces', serif;
  font-size: 1rem;
  font-weight: 700;
  color: var(--primary);
  margin-bottom: 14px;
  padding-bottom: 10px;
  border-bottom: 2px solid var(--accent);
  display: flex;
  align-items: center;
  gap: 8px;
}
.article-toc__title::before { content: '☰'; font-size: .9rem; }
.article-toc__inner { font-size: .85rem; line-height: 1.6; }
.article-toc__inner a { color: var(--primary-dk); }
.article-toc__inner a:hover { color: var(--primary); }
.article-toc__inner ul { list-style: none; padding: 0; }
.article-toc__inner li { padding: 3px 0; border-bottom: 1px solid var(--border); }
.article-toc__inner li:last-child { border-bottom: none; }

/* Signature block */
.article-signature {
  margin-top: 56px;
  padding: 28px 28px 24px;
  background: var(--bg-alt);
  border-radius: var(--radius);
  border-left: 4px solid var(--accent);
  box-shadow: var(--shadow-sm);
}
.article-signature__label {
  font-size: .75rem;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
}
.article-signature__inner { font-size: .95rem; color: var(--text); line-height: 1.7; }

/* Related posts */
.related-posts {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 24px 80px;
}
.related-posts__title {
  font-family: 'Fraunces', serif;
  font-size: 1.6rem;
  color: var(--primary-dk);
  margin-bottom: 28px;
  padding-bottom: 12px;
  border-bottom: 2px solid var(--border);
}
.related-posts__grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

@media (max-width: 1024px) {
  .article-body { grid-template-columns: 1fr; }
  .article-toc { position: static; }
  .related-posts__grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 600px) { .related-posts__grid { grid-template-columns: 1fr; } }

/* ---------- PAGE.HTML & PAGE-AUTHOR.HTML ---------- */
.static-page { max-width: var(--content-w); margin: 0 auto; padding: 48px 24px 80px; }
.static-page__content { font-size: 1.04rem; line-height: 1.85; color: var(--text); }
.static-page__content h2 { font-family: 'Fraunces', serif; font-size: 1.5rem; margin: 2em 0 .8em; color: var(--primary-dk); }
.static-page__content h3 { font-size: 1.15rem; margin: 1.5em 0 .6em; color: var(--primary-dk); }
.static-page__content p { margin-bottom: 1.1em; }
.static-page__content ul, .static-page__content ol { padding-left: 1.4em; margin-bottom: 1em; }
.static-page__content a { color: var(--primary); }

/* Author page specific */
.author-header {
  background: linear-gradient(135deg, var(--bg-alt) 0%, var(--white) 100%);
  border-bottom: 2px solid var(--border);
  padding: 48px 0 40px;
}
.author-header__inner { max-width: var(--max-w); margin: 0 auto; padding: 0 24px; }
.author-header__breadcrumb { font-size: .8rem; color: var(--text-muted); margin-bottom: 12px; }
.author-header__breadcrumb a { color: var(--text-muted); }
.author-header__profile {
  display: flex;
  align-items: flex-start;
  gap: 28px;
  margin-top: 8px;
}
.author-header__img { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; border: 4px solid var(--primary); flex-shrink: 0; }
.author-header__name { font-family: 'Fraunces', serif; font-size: clamp(24px, 3.5vw, 38px); color: var(--primary-dk); text-align: left; }
.author-header__kicker { font-size: .78rem; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); margin-bottom: 6px; }

@media (max-width: 600px) {
  .author-header__profile { flex-direction: column; }
  .author-header__img { width: 72px; height: 72px; }
}

/* ---------- BREADCRUMB GLOBAL ---------- */
.breadcrumb { font-size: .8rem; color: var(--text-muted); }
.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb ol { list-style: none; display: flex; flex-wrap: wrap; gap: 4px; padding: 0; margin: 0; }
.breadcrumb ol li + li::before { content: '›'; margin-right: 4px; color: var(--border); }

.page-header__breadcrumb ol,
.article-header__breadcrumb ol,
.author-header__breadcrumb ol {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  padding: 0;
  margin: 0;
}
.page-header__breadcrumb li,
.article-header__breadcrumb li,
.author-header__breadcrumb li {
  display: flex;
  align-items: center;
  gap: 4px;
}
.page-header__breadcrumb li + li::before,
.article-header__breadcrumb li + li::before,
.author-header__breadcrumb li + li::before {
  content: '›';
  margin-right: 4px;
}

/* ---------- JSON-LD helper (invisible) ---------- */
script[type="application/ld+json"] { display: none; }
