/*
Theme Name: une-association Blog
Theme URI: https://une-association.org
Author: une-association.org
Author URI: https://une-association.org
Description: Thème blog officiel une-association.org — aligné sur le design system du site principal.
Version: 1.0.0
License: GNU General Public License v2 or later
License URI: http://www.gnu.org/licenses/gpl-2.0.html
Text Domain: une-association
Tags: blog, custom-colors, custom-menu, featured-images, threaded-comments, translation-ready
*/

/* ══════════════════════════════════════════
   DESIGN SYSTEM — variables identiques au site principal
══════════════════════════════════════════ */
:root {
  --bg: #f4f6f0;
  --bg-top: #fafcf7;
  --card: #ffffff;
  --card-soft: #eaf2e3;
  --text: #161d15;
  --muted: #5a6b57;
  --line: #d8e4ce;
  --green: #3d6b2a;
  --green-mid: #4f8736;
  --green-dark: #2d5120;
  --gold: #b07d1e;
  --gold-light: #fdf4e1;
  --accent: #e5f0dc;
  --shadow: 0 10px 28px rgba(20, 30, 18, .09);
  --serif: 'DM Serif Display', Georgia, serif;
  --sans: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --radius: 16px;
  --container: 1100px;
}

body.dark {
  --bg: #0d1410;
  --bg-top: #111a14;
  --card: #151e17;
  --card-soft: #192217;
  --text: #e8f0e4;
  --muted: #8fa88a;
  --line: #263323;
  --green: #72ad58;
  --green-mid: #86bf6b;
  --green-dark: #5e9446;
  --gold: #d4a44e;
  --gold-light: #221a0a;
  --accent: #182115;
  --shadow: 0 14px 34px rgba(0, 0, 0, .32);
}

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

body {
  margin: 0;
  font-family: var(--sans);
  background: radial-gradient(circle at top, var(--bg-top) 0%, var(--bg) 70%);
  background-attachment: fixed;
  color: var(--text);
  transition: background-color .25s, color .25s;
  -webkit-font-smoothing: antialiased;
  font-size: 16px;
  line-height: 1.6;
}

a {
  text-decoration: none;
  color: var(--green);
  transition: color .15s;
}
a:hover { color: var(--green-dark); }

img { max-width: 100%; height: auto; display: block; }

/* ══════════════════════════════════════════
   LAYOUT
══════════════════════════════════════════ */
.site {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.site-content {
  flex: 1;
}

.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}

.content-area {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ══════════════════════════════════════════
   HEADER
══════════════════════════════════════════ */
.site-header {
  border-bottom: 1px solid var(--line);
  background: var(--bg-top);
  position: sticky;
  top: 0;
  z-index: 100;
  backdrop-filter: blur(10px);
}

.site-header-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px 24px;
  max-width: var(--container);
  margin: 0 auto;
}

.site-branding {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  color: var(--text);
}

.site-logo-mark {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: linear-gradient(140deg, var(--green), var(--green-mid));
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  box-shadow: 0 4px 12px rgba(61, 107, 42, .3);
  flex-shrink: 0;
}

/* Logo personnalisé */
.custom-logo-link {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.custom-logo {
  height: 40px;
  width: auto;
  max-width: 220px;
  display: block;
}

.site-logo-img {
  height: 34px;
  width: auto;
}

.site-name {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -.02em;
  color: var(--text);
}

.site-tagline {
  font-size: 11px;
  color: var(--muted);
  font-weight: 300;
  margin-top: 1px;
}

/* ── Nav principale ── */
.main-navigation {
  display: flex;
  gap: 4px;
  align-items: center;
}

.main-navigation ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  gap: 4px;
  align-items: center;
}

.main-navigation ul li a {
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  padding: 7px 13px;
  border-radius: 999px;
  transition: background .15s, color .15s;
  display: block;
  text-decoration: none;
}

.main-navigation ul li a:hover {
  background: var(--card);
  color: var(--text);
}

.main-navigation ul li.current-menu-item a {
  background: var(--accent);
  color: var(--green);
}

.nav-cta a {
  background: var(--green) !important;
  color: #fff !important;
  font-weight: 600 !important;
}

.nav-cta a:hover {
  background: var(--green-dark) !important;
}

/* ── Blog badge dans le header ── */
.header-blog-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  font-weight: 600;
  color: var(--green);
  background: var(--accent);
  padding: 4px 12px;
  border-radius: 999px;
  letter-spacing: .05em;
  text-transform: uppercase;
}

/* ── Theme toggle ── */
.theme-toggle {
  height: 34px;
  padding: 0 11px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--card);
  color: var(--muted);
  cursor: pointer;
  font-size: 12px;
  font-weight: 600;
  font-family: var(--sans);
  transition: color .15s, border-color .15s;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.theme-toggle:hover { color: var(--text); border-color: var(--green-mid); }

/* Mobile menu toggle */
.menu-toggle {
  display: none;
  background: none;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px;
  cursor: pointer;
  color: var(--text);
}

/* ══════════════════════════════════════════
   HERO BLOG (page d'accueil du blog)
══════════════════════════════════════════ */
.blog-hero {
  padding: 56px 0 48px;
  text-align: center;
  border-bottom: 1px solid var(--line);
  margin-bottom: 48px;
}

.blog-hero-eyebrow {
  display: inline-block;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--green);
  background: var(--accent);
  padding: 5px 14px;
  border-radius: 999px;
  margin-bottom: 16px;
}

.blog-hero h1 {
  font-family: var(--serif);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 400;
  letter-spacing: -.03em;
  margin: 0 0 12px;
  line-height: 1.1;
  color: var(--text);
}

.blog-hero h1 em {
  font-style: italic;
  color: var(--green);
}

.blog-hero-sub {
  font-size: 1rem;
  font-weight: 300;
  color: var(--muted);
  max-width: 520px;
  margin: 0 auto;
  line-height: 1.7;
}

/* ══════════════════════════════════════════
   LISTE D'ARTICLES (home, archive, search)
══════════════════════════════════════════ */
.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
  margin-bottom: 48px;
}

.post-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: border-color .15s, box-shadow .15s, transform .15s;
}

.post-card:hover {
  border-color: var(--green-mid);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.post-card-thumbnail {
  aspect-ratio: 16/9;
  overflow: hidden;
  background: var(--card-soft);
}

.post-card-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .3s ease;
}

.post-card:hover .post-card-thumbnail img {
  transform: scale(1.03);
}

/* Placeholder si pas d'image */
.post-card-thumbnail-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--card-soft), var(--accent));
  font-size: 32px;
  opacity: .5;
}

.post-card-body {
  padding: 20px;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.post-card-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  font-weight: 500;
  color: var(--muted);
  flex-wrap: wrap;
}

.post-card-category {
  background: var(--accent);
  color: var(--green);
  padding: 2px 9px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .05em;
  text-decoration: none;
}

.post-card-category:hover {
  background: var(--green);
  color: #fff;
}

.post-card-title {
  font-family: var(--serif);
  font-size: 1.15rem;
  font-weight: 400;
  line-height: 1.25;
  letter-spacing: -.02em;
  color: var(--text);
  margin: 0;
}

.post-card-title a {
  color: inherit;
  text-decoration: none;
}

.post-card-title a:hover {
  color: var(--green);
}

.post-card-excerpt {
  font-size: 13px;
  font-weight: 300;
  color: var(--muted);
  line-height: 1.65;
  flex: 1;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.post-card-footer {
  padding: 12px 20px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.post-read-more {
  font-size: 12px;
  font-weight: 600;
  color: var(--green);
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: gap .15s;
  text-decoration: none;
}

.post-card:hover .post-read-more { gap: 8px; }

.post-read-time {
  font-size: 11px;
  color: var(--muted);
  font-weight: 300;
}

/* Article featured (premier de la liste) */
.post-card-featured {
  grid-column: 1 / -1;
  flex-direction: row;
}

.post-card-featured .post-card-thumbnail {
  width: 45%;
  aspect-ratio: auto;
  flex-shrink: 0;
}

.post-card-featured .post-card-title {
  font-size: 1.5rem;
}

/* ══════════════════════════════════════════
   ARTICLE SINGLE
══════════════════════════════════════════ */
.single-post-header {
  padding: 48px 0 32px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 40px;
}

.single-post-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
  flex-wrap: wrap;
}

.single-category-tag {
  background: var(--accent);
  color: var(--green);
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .06em;
  text-decoration: none;
}

.single-category-tag:hover {
  background: var(--green);
  color: #fff;
}

.single-post-date,
.single-post-readtime {
  font-size: 12px;
  color: var(--muted);
  font-weight: 400;
}

.single-post-title {
  font-family: var(--serif);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 400;
  letter-spacing: -.03em;
  line-height: 1.1;
  margin: 0 0 16px;
  color: var(--text);
}

.single-post-subtitle {
  font-size: 1.05rem;
  font-weight: 300;
  color: var(--muted);
  line-height: 1.65;
  max-width: 600px;
  margin: 0;
}

.single-post-thumbnail {
  margin: 32px 0;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--line);
}

.single-post-thumbnail img {
  width: 100%;
  height: auto;
  max-height: 480px;
  object-fit: cover;
}

/* ── Contenu de l'article ── */
.entry-content {
  font-size: 1rem;
  font-weight: 300;
  line-height: 1.8;
  color: var(--text);
}

.entry-content p {
  margin: 0 0 1.4em;
}

.entry-content h2 {
  font-family: var(--serif);
  font-size: 1.6rem;
  font-weight: 400;
  letter-spacing: -.02em;
  margin: 2em 0 .6em;
  line-height: 1.2;
  color: var(--text);
}

.entry-content h3 {
  font-family: var(--serif);
  font-size: 1.2rem;
  font-weight: 400;
  margin: 1.6em 0 .5em;
  color: var(--text);
}

.entry-content h4 {
  font-size: .9rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--green);
  margin: 1.4em 0 .4em;
}

.entry-content a {
  color: var(--green);
  text-decoration: underline;
  text-decoration-color: var(--line);
  text-underline-offset: 3px;
  transition: text-decoration-color .15s;
}

.entry-content a:hover {
  text-decoration-color: var(--green);
}

.entry-content strong {
  font-weight: 600;
  color: var(--text);
}

.entry-content em {
  font-style: italic;
  color: inherit;
}

.entry-content ul,
.entry-content ol {
  padding-left: 1.4em;
  margin: 0 0 1.4em;
}

.entry-content li {
  margin-bottom: .4em;
  color: var(--text);
}

/* Blockquote */
.entry-content blockquote {
  margin: 1.8em 0;
  padding: 20px 24px;
  background: var(--card-soft);
  border-left: 3px solid var(--green);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-family: var(--serif);
  font-size: 1.1rem;
  font-style: italic;
  color: var(--text);
  line-height: 1.5;
}

.entry-content blockquote p {
  margin: 0;
}

/* Code */
.entry-content code {
  background: var(--card-soft);
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 2px 6px;
  font-size: .85em;
  font-family: 'Fira Code', 'Courier New', monospace;
  color: var(--green-dark);
}

.entry-content pre {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  overflow-x: auto;
  margin: 1.4em 0;
}

.entry-content pre code {
  background: none;
  border: none;
  padding: 0;
  font-size: .875rem;
}

/* Images dans le contenu */
.entry-content figure {
  margin: 1.8em 0;
}

.entry-content figure img {
  border-radius: var(--radius);
  border: 1px solid var(--line);
}

.entry-content figcaption {
  text-align: center;
  font-size: 12px;
  color: var(--muted);
  margin-top: 8px;
  font-style: italic;
}

/* Table */
.entry-content table {
  width: 100%;
  border-collapse: collapse;
  margin: 1.4em 0;
  font-size: .9rem;
}

.entry-content th {
  background: var(--card-soft);
  padding: 10px 14px;
  text-align: left;
  font-weight: 600;
  font-size: .8rem;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
}

.entry-content td {
  padding: 10px 14px;
  border-bottom: 1px solid var(--line);
  color: var(--text);
  font-weight: 300;
}

.entry-content tr:last-child td { border-bottom: none; }

/* Callout box — classe wp custom */
.callout {
  background: var(--gold-light);
  border: 1px solid rgba(176, 125, 30, .2);
  border-radius: var(--radius);
  padding: 16px 20px;
  margin: 1.4em 0;
  font-size: .9rem;
  color: var(--text);
}

.callout-green {
  background: var(--accent);
  border-color: var(--line);
}

/* ── Author bio ── */
.post-author {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 20px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin: 40px 0;
}

.post-author-avatar {
  width: 52px;
  height: 52px;
  border-radius: 50%;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--card-soft);
}

.post-author-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.post-author-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 3px;
}

.post-author-bio {
  font-size: 13px;
  font-weight: 300;
  color: var(--muted);
  line-height: 1.55;
}

/* ── Navigation inter-articles ── */
.post-navigation {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin: 40px 0;
}

.nav-previous,
.nav-next {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  transition: border-color .15s, box-shadow .15s;
}

.nav-previous:hover,
.nav-next:hover {
  border-color: var(--green-mid);
  box-shadow: var(--shadow);
}

.nav-next { text-align: right; }

.nav-direction {
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: 5px;
}

.nav-post-title {
  font-family: var(--serif);
  font-size: .95rem;
  color: var(--text);
  line-height: 1.3;
}

.nav-previous a,
.nav-next a {
  text-decoration: none;
  color: inherit;
}

/* ══════════════════════════════════════════
   SIDEBAR
══════════════════════════════════════════ */
.blog-layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 32px;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
  align-items: start;
}

/* Fix CSS Grid — sans min-width:0 le contenu déborde */
.blog-layout > * {
  min-width: 0;
}

.sidebar {
  position: sticky;
  top: 80px;
}

.widget {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 16px;
}

.widget-title {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--muted);
  margin: 0 0 14px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

/* Widget CTA retour au site */
.widget-site-cta {
  background: linear-gradient(135deg, var(--green), var(--green-mid));
  border: none;
  color: #fff;
  text-align: center;
}

.widget-site-cta .widget-title {
  color: rgba(255,255,255,.7);
  border-bottom-color: rgba(255,255,255,.2);
}

.widget-site-cta p {
  font-size: 13px;
  font-weight: 300;
  line-height: 1.6;
  margin: 0 0 14px;
  opacity: .9;
}

.widget-site-cta .btn {
  background: #fff;
  color: var(--green-dark);
  font-weight: 600;
  font-size: 13px;
  padding: 9px 18px;
  border-radius: 999px;
  display: inline-block;
  transition: opacity .15s;
}

.widget-site-cta .btn:hover { opacity: .9; }

/* Catégories dans sidebar */
.widget ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.widget ul li {
  padding: 6px 0;
  border-bottom: 1px solid var(--line);
  font-size: 13px;
  font-weight: 300;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.widget ul li:last-child { border-bottom: none; }

.widget ul li a {
  color: var(--text);
  text-decoration: none;
  transition: color .15s;
}

.widget ul li a:hover { color: var(--green); }

.widget .cat-count {
  background: var(--card-soft);
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  padding: 2px 8px;
  border-radius: 999px;
}

/* Search dans sidebar */
.widget .search-form {
  display: flex;
  gap: 8px;
}

.widget .search-field {
  flex: 1;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--bg);
  color: var(--text);
  padding: 0 14px;
  font-size: 13px;
  font-family: var(--sans);
  outline: none;
  transition: border-color .15s;
}

.widget .search-field:focus { border-color: var(--green); }

.widget .search-submit {
  height: 38px;
  padding: 0 14px;
  background: var(--green);
  color: #fff;
  border: none;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  font-family: var(--sans);
  cursor: pointer;
  transition: background .15s;
}

.widget .search-submit:hover { background: var(--green-dark); }

/* ══════════════════════════════════════════
   COMMENTS
══════════════════════════════════════════ */
.comments-area {
  margin: 48px 0;
}

.comments-title {
  font-family: var(--serif);
  font-size: 1.4rem;
  font-weight: 400;
  margin: 0 0 24px;
}

.comment-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.comment-body {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 12px;
}

.comment-author {
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 6px;
}

.comment-metadata {
  font-size: 11px;
  color: var(--muted);
  margin-bottom: 10px;
}

.comment-content {
  font-size: 14px;
  font-weight: 300;
  color: var(--text);
  line-height: 1.7;
}

/* Formulaire commentaire */
.comment-respond {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  margin-top: 32px;
}

.comment-reply-title {
  font-family: var(--serif);
  font-size: 1.2rem;
  font-weight: 400;
  margin: 0 0 18px;
}

.comment-form label {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .06em;
  display: block;
  margin-bottom: 5px;
}

.comment-form input[type="text"],
.comment-form input[type="email"],
.comment-form input[type="url"],
.comment-form textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--bg);
  color: var(--text);
  padding: 10px 14px;
  font-size: 14px;
  font-family: var(--sans);
  font-weight: 300;
  outline: none;
  transition: border-color .15s;
  margin-bottom: 14px;
}

.comment-form input:focus,
.comment-form textarea:focus {
  border-color: var(--green);
}

.comment-form textarea {
  min-height: 120px;
  resize: vertical;
}

.comment-form-comment { margin-bottom: 14px; }

.form-submit .submit {
  background: var(--green);
  color: #fff;
  border: none;
  border-radius: 999px;
  padding: 10px 24px;
  font-size: 14px;
  font-weight: 600;
  font-family: var(--sans);
  cursor: pointer;
  transition: background .15s;
}

.form-submit .submit:hover { background: var(--green-dark); }

/* ══════════════════════════════════════════
   PAGINATION
══════════════════════════════════════════ */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  margin: 48px 0;
}

.page-numbers {
  width: 38px;
  height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: var(--card);
  font-size: 13px;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
  transition: all .15s;
}

.page-numbers:hover,
.page-numbers.current {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
}

.page-numbers.dots {
  border: none;
  background: none;
  color: var(--muted);
}

/* ══════════════════════════════════════════
   ARCHIVES / CATEGORIES
══════════════════════════════════════════ */
.archive-header {
  padding: 40px 0 32px;
  border-bottom: 1px solid var(--line);
  margin-bottom: 40px;
  text-align: center;
}

.archive-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: 8px;
}

.archive-title {
  font-family: var(--serif);
  font-size: clamp(1.6rem, 3vw, 2.4rem);
  font-weight: 400;
  letter-spacing: -.03em;
  margin: 0 0 8px;
  color: var(--text);
}

.archive-description {
  font-size: .95rem;
  font-weight: 300;
  color: var(--muted);
  max-width: 480px;
  margin: 0 auto;
  line-height: 1.65;
}

/* ══════════════════════════════════════════
   PAGE 404
══════════════════════════════════════════ */
.not-found {
  text-align: center;
  padding: 80px 24px;
}

.not-found-number {
  font-family: var(--serif);
  font-size: 8rem;
  color: var(--green);
  opacity: .15;
  line-height: 1;
  margin: 0;
}

.not-found-title {
  font-family: var(--serif);
  font-size: 1.8rem;
  font-weight: 400;
  margin: 0 0 12px;
}

.not-found-text {
  font-size: .95rem;
  font-weight: 300;
  color: var(--muted);
  margin: 0 0 24px;
}

.btn-primary {
  display: inline-block;
  background: var(--green);
  color: #fff;
  padding: 12px 24px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  transition: background .15s;
}

.btn-primary:hover { background: var(--green-dark); }

/* ══════════════════════════════════════════
   FOOTER
══════════════════════════════════════════ */
.site-footer {
  margin-top: 72px;
  border-top: 1px solid var(--line);
  padding: 40px 0 20px;
}

.site-footer-grid {
  max-width: 980px;
  margin: 0 auto;
  padding: 0 24px;
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr 1fr;
  gap: 28px;
}

.footer-col { min-width: 0; }

.footer-col-title {
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 10px;
  color: var(--text);
}

.footer-links a,
.footer-text {
  color: var(--muted);
  font-size: 13px;
  font-weight: 300;
  line-height: 2;
}

.footer-links a { display: block; text-decoration: none; }
.footer-links a:hover { color: var(--text); }

.footer-pill {
  display: inline-block;
  padding: 4px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  margin-right: 4px;
  margin-top: 6px;
  font-size: 11px;
  font-weight: 600;
  color: var(--muted);
}

.site-footer-bottom {
  max-width: 980px;
  margin: 22px auto 0;
  padding: 16px 24px 0;
  border-top: 1px solid var(--line);
  font-size: 12px;
  color: var(--muted);
  font-weight: 300;
  line-height: 1.7;
}

/* ══════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════ */
@media (max-width: 900px) {
  .blog-layout {
    grid-template-columns: 1fr;
  }

  /* Fix CSS Grid — sans min-width:0 le contenu déborde */
.blog-layout > * {
  min-width: 0;
}

.sidebar {
    position: static;
  }

  .post-card-featured {
    flex-direction: column;
  }

  .post-card-featured .post-card-thumbnail {
    width: 100%;
    aspect-ratio: 16/9;
  }

  .site-footer-grid {
    grid-template-columns: 1fr 1fr;
    gap: 22px;
  }
}

@media (max-width: 600px) {
  .site-header-inner { padding: 12px 18px; }

  .main-navigation { display: none; }
  .main-navigation.toggled { display: flex; }
  .menu-toggle { display: flex; }

  .posts-grid { grid-template-columns: 1fr; }

  .post-navigation { grid-template-columns: 1fr; }

  .site-footer-grid { grid-template-columns: 1fr; padding: 0 18px; }
  .site-footer-bottom { padding: 16px 18px 0; }

  .blog-hero { padding: 36px 0 28px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

/* ══════════════════════════════════════════
   SOURCES BLOCK
══════════════════════════════════════════ */
.sources-block {
  border-top: 1px solid var(--line);
  margin-top: 40px;
  padding-top: 20px;
  font-size: 12px;
  color: var(--muted);
  font-weight: 300;
  line-height: 1.8;
}
.sources-block a {
  color: var(--muted);
  text-decoration: underline;
  text-decoration-color: var(--line);
}

/* ══════════════════════════════════════════
   LOGO DUAL — clair / sombre
══════════════════════════════════════════ */

/* Par défaut le logo sombre est caché */
.custom-logo-dark-link {
  display: none !important;
}

/* Mode clair : logo normal visible, logo dark masqué */
body:not(.dark) .custom-logo-link:not(.custom-logo-dark-link) {
  display: flex;
}
body:not(.dark) .custom-logo-dark-link {
  display: none !important;
}

/* Mode sombre : logo normal masqué, logo dark visible */
body.dark .custom-logo-link:not(.custom-logo-dark-link) {
  display: none !important;
}
body.dark .custom-logo-dark-link {
  display: flex !important;
}
