/* ============================================================
   HUMANISTES — MAIN STYLESHEET
   assets/css/main.css
   ============================================================ */

/* ============================================================
   HEADER
   ============================================================ */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--color-cream);
  border-bottom: 1px solid var(--color-parchment);
  transition: box-shadow var(--transition);
}
.site-header.scrolled {
  box-shadow: var(--shadow-sm);
}

.header-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: var(--space-sm);
  padding-block: var(--space-sm);
}

/* SITE BRANDING */
.site-branding {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-decoration: none;
}
.site-logo img {
  max-height: 60px;
  width: auto;
}
.site-title {
  font-family: var(--font-display);
  font-size: var(--size-2xl);
  font-weight: 700;
  color: var(--color-forest);
  letter-spacing: -0.03em;
  line-height: 1;
  text-decoration: none;
}
.site-title span { color: var(--color-gold); }
.site-description {
  font-family: var(--font-ui);
  font-size: var(--size-xs);
  color: var(--color-ink-muted);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-top: 4px;
}

/* PRIMARY NAVIGATION */
.primary-nav {
  display: flex;
  align-items: center;
  justify-content: center;
}
.primary-nav ul {
  list-style: none;
  padding: 0;
  display: flex;
  gap: 2px;
}
.primary-nav ul li { position: relative; }
.primary-nav ul li a {
  font-family: var(--font-ui);
  font-size: var(--size-sm);
  font-weight: 500;
  color: var(--color-ink-soft);
  padding: 0.5em 0.85em;
  border-radius: var(--radius-sm);
  transition: all var(--transition);
  white-space: nowrap;
}
.primary-nav ul li a:hover,
.primary-nav ul li.current-menu-item > a {
  color: var(--color-forest);
  background: var(--color-parchment);
}

/* Dropdown */
.primary-nav ul .sub-menu {
  position: absolute;
  top: calc(100% + 0.5rem);
  left: 0;
  min-width: 220px;
  background: var(--color-white);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-lg);
  border: 1px solid var(--color-parchment);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: all var(--transition);
  display: flex;
  flex-direction: column;
  padding: var(--space-xs);
  z-index: 200;
}
.primary-nav ul li:hover > .sub-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.primary-nav ul .sub-menu li a {
  display: block;
  padding: 0.5em 0.85em;
  border-radius: var(--radius-sm);
}

/* HEADER ACTIONS */
.header-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: var(--space-xs);
}
.header-search-toggle {
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  color: var(--color-ink-muted);
  border-radius: var(--radius-sm);
  transition: all var(--transition);
}
.header-search-toggle:hover {
  color: var(--color-forest);
  background: var(--color-parchment);
}
.header-search-toggle svg { width: 20px; height: 20px; }

/* SEARCH OVERLAY */
.search-overlay {
  position: fixed;
  inset: 0;
  background: rgba(28,28,26,0.85);
  z-index: 300;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition);
}
.search-overlay.active {
  opacity: 1;
  visibility: visible;
}
.search-overlay-inner {
  width: 100%;
  max-width: 600px;
  padding: var(--space-md);
}
.search-overlay-inner form {
  display: flex;
  align-items: center;
  border-bottom: 2px solid var(--color-gold);
  gap: var(--space-sm);
}
.search-overlay-inner input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  font-family: var(--font-display);
  font-size: var(--size-2xl);
  color: var(--color-cream);
  padding: var(--space-sm) 0;
}
.search-overlay-inner input::placeholder { color: rgba(250,247,242,0.4); }
.search-close {
  background: none;
  border: none;
  color: var(--color-cream);
  cursor: pointer;
  font-size: var(--size-lg);
}

/* MOBILE MENU TOGGLE */
.menu-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  flex-direction: column;
  gap: 5px;
}
.menu-toggle span {
  display: block;
  width: 24px;
  height: 2px;
  background: var(--color-ink);
  transition: all var(--transition);
  transform-origin: center;
}
.menu-toggle.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.menu-toggle.active span:nth-child(2) { opacity: 0; }
.menu-toggle.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* TOP BAR */
.top-bar {
  background: var(--color-forest);
  color: var(--color-cream);
  font-family: var(--font-ui);
  font-size: var(--size-xs);
  letter-spacing: 0.05em;
  padding-block: 0.4rem;
}
.top-bar-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.top-bar a { color: var(--color-sage); }
.top-bar a:hover { color: var(--color-gold-lt); }

/* ============================================================
   HERO — HOMEPAGE
   ============================================================ */
.hero {
  min-height: 85vh;
  position: relative;
  display: flex;
  align-items: center;
  overflow: hidden;
  background: var(--color-forest);
}
.hero-bg {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 70% 50%, rgba(200,150,62,0.12) 0%, transparent 60%),
    radial-gradient(ellipse at 20% 80%, rgba(123,74,109,0.15) 0%, transparent 50%);
}
.hero-pattern {
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23FAF7F2' fill-opacity='0.03'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
}
.hero-content {
  position: relative;
  z-index: 2;
  color: var(--color-cream);
  max-width: 800px;
}
.hero-label {
  font-family: var(--font-ui);
  font-size: var(--size-xs);
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--color-gold-lt);
  margin-bottom: var(--space-sm);
  display: flex;
  align-items: center;
  gap: 0.75em;
}
.hero-label::before {
  content: '';
  width: 2rem;
  height: 2px;
  background: var(--color-gold);
}
.hero h1 {
  color: var(--color-cream);
  margin-bottom: var(--space-md);
  font-size: clamp(3rem, 7vw, 6rem);
}
.hero h1 em {
  font-style: italic;
  color: var(--color-gold-lt);
}
.hero-lead {
  font-size: var(--size-xl);
  line-height: 1.7;
  color: rgba(250,247,242,0.8);
  max-width: 600px;
  margin-bottom: var(--space-lg);
}
.hero-actions { display: flex; gap: var(--space-sm); flex-wrap: wrap; }
.hero-featured-post {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 42%;
}
.hero-featured-post img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.4;
}
.hero-scroll {
  position: absolute;
  bottom: var(--space-lg);
  left: 50%;
  transform: translateX(-50%);
  color: var(--color-sage);
  font-family: var(--font-ui);
  font-size: var(--size-xs);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5em;
  animation: bounce 2s infinite;
}
.hero-scroll::after {
  content: '';
  width: 1px;
  height: 2rem;
  background: var(--color-sage);
  opacity: 0.5;
}
@keyframes bounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50% { transform: translateX(-50%) translateY(6px); }
}

/* ============================================================
   FEATURED ARTICLE (HERO ARTICLE)
   ============================================================ */
.featured-hero {
  position: relative;
  min-height: 70vh;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  border-radius: var(--radius-lg);
  margin-bottom: var(--space-xl);
}
.featured-hero-image {
  position: absolute;
  inset: 0;
}
.featured-hero-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.featured-hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(28,28,26,0.9) 0%, rgba(28,28,26,0.3) 50%, transparent 100%);
}
.featured-hero-content {
  position: relative;
  z-index: 2;
  padding: var(--space-xl);
  color: var(--color-cream);
  max-width: 700px;
}
.featured-hero-content .entry-title a {
  color: var(--color-cream);
  font-size: clamp(var(--size-2xl), 4vw, var(--size-4xl));
}
.featured-hero-content .entry-title a:hover { color: var(--color-gold-lt); }
.featured-hero-content .entry-excerpt { color: rgba(250,247,242,0.8); }

/* ============================================================
   POST CARDS
   ============================================================ */
.posts-grid {
  display: grid;
  gap: var(--space-lg);
}
.posts-grid--3 { grid-template-columns: repeat(3, 1fr); }
.posts-grid--2 { grid-template-columns: repeat(2, 1fr); }
.posts-grid--4 { grid-template-columns: repeat(4, 1fr); }

.card {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
  transition: transform var(--transition), box-shadow var(--transition);
  display: flex;
  flex-direction: column;
}
.card:hover {
  transform: translateY(-6px);
  box-shadow: var(--shadow-lg);
}

.card-image {
  position: relative;
  aspect-ratio: 16/10;
  overflow: hidden;
}
.card-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition-slow);
}
.card:hover .card-image img { transform: scale(1.05); }

.card-image-placeholder {
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, var(--color-forest) 0%, var(--color-forest-lt) 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}
.card-image-placeholder svg {
  width: 48px;
  height: 48px;
  color: rgba(250,247,242,0.3);
}

.card-category {
  position: absolute;
  top: var(--space-sm);
  left: var(--space-sm);
}

.card-body {
  padding: var(--space-md);
  flex: 1;
  display: flex;
  flex-direction: column;
}

.card-meta {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-xs);
  font-family: var(--font-ui);
  font-size: var(--size-xs);
  color: var(--color-ink-muted);
}
.card-meta-divider { width: 3px; height: 3px; border-radius: 50%; background: var(--color-ink-pale); }

.card-title {
  font-family: var(--font-display);
  font-size: var(--size-xl);
  font-weight: 700;
  line-height: 1.3;
  margin-bottom: var(--space-xs);
  color: var(--color-ink);
}
.card-title a { color: inherit; }
.card-title a:hover { color: var(--color-forest); }

.card-excerpt {
  font-size: var(--size-sm);
  color: var(--color-ink-soft);
  line-height: 1.7;
  flex: 1;
  margin-bottom: var(--space-sm);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: var(--space-sm);
  border-top: 1px solid var(--color-parchment);
  margin-top: auto;
}
.card-author {
  display: flex;
  align-items: center;
  gap: 0.5em;
  font-family: var(--font-ui);
  font-size: var(--size-xs);
  color: var(--color-ink-muted);
}
.card-author img {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
}
.card-read-more {
  font-family: var(--font-ui);
  font-size: var(--size-xs);
  font-weight: 600;
  color: var(--color-forest);
  display: flex;
  align-items: center;
  gap: 4px;
  transition: gap var(--transition);
}
.card-read-more:hover { gap: 8px; color: var(--color-gold); }
.card-read-more svg { width: 14px; height: 14px; }

/* HORIZONTAL CARD */
.card--horizontal {
  flex-direction: row;
}
.card--horizontal .card-image {
  width: 40%;
  aspect-ratio: auto;
  flex-shrink: 0;
}
.card--horizontal .card-body { padding: var(--space-md); }

/* FEATURED CARD */
.card--featured {
  grid-column: span 2;
}
.card--featured .card-title {
  font-size: var(--size-2xl);
}

/* MINIMAL CARD (list style) */
.card--minimal {
  background: none;
  box-shadow: none;
  border-radius: 0;
  border-bottom: 1px solid var(--color-parchment);
  padding-bottom: var(--space-md);
  flex-direction: row;
  align-items: center;
  gap: var(--space-md);
}
.card--minimal:hover { transform: none; box-shadow: none; }
.card--minimal .card-number {
  font-family: var(--font-display);
  font-size: var(--size-3xl);
  font-weight: 700;
  color: var(--color-parchment);
  line-height: 1;
  min-width: 3rem;
}

/* ============================================================
   SECTIONS HOMEPAGE
   ============================================================ */
.section {
  padding-block: var(--space-2xl);
}
.section--dark {
  background: var(--color-forest);
  color: var(--color-cream);
}
.section--parchment { background: var(--color-parchment); }
.section--white { background: var(--color-white); }

.section-header {
  margin-bottom: var(--space-xl);
}
.section-header--between {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--space-md);
}
.section-header h2 { margin-bottom: var(--space-xs); }
.section-header p { color: var(--color-ink-muted); max-width: 500px; }

/* PHILOSOPHY BANNER */
.philosophy-banner {
  background: var(--color-forest);
  padding: var(--space-xl) 0;
  text-align: center;
  position: relative;
  overflow: hidden;
}
.philosophy-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url("data:image/svg+xml,%3Csvg width='80' height='80' viewBox='0 0 80 80' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='40' cy='40' r='30' fill='none' stroke='%23FAF7F2' stroke-width='0.5' stroke-opacity='0.05'/%3E%3Ccircle cx='40' cy='40' r='20' fill='none' stroke='%23FAF7F2' stroke-width='0.5' stroke-opacity='0.05'/%3E%3Ccircle cx='40' cy='40' r='10' fill='none' stroke='%23FAF7F2' stroke-width='0.5' stroke-opacity='0.05'/%3E%3C/svg%3E");
  background-size: 80px 80px;
}
.philosophy-banner blockquote {
  background: none;
  border: none;
  color: var(--color-cream);
  max-width: 700px;
  margin-inline: auto;
  font-size: clamp(var(--size-xl), 3vw, var(--size-3xl));
  padding: 0;
}
.philosophy-banner blockquote::before { color: rgba(200,150,62,0.4); }
.philosophy-banner blockquote cite { color: var(--color-gold-lt); }

/* CATEGORIES GRID */
.categories-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: var(--space-sm);
}
.category-card {
  background: var(--color-white);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  text-align: center;
  border: 2px solid transparent;
  transition: all var(--transition);
  cursor: pointer;
  text-decoration: none;
  color: var(--color-ink);
}
.category-card:hover {
  border-color: var(--color-forest);
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  color: var(--color-forest);
}
.category-card-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto var(--space-sm);
  background: var(--color-parchment);
  border-radius: var(--radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.5rem;
  transition: background var(--transition);
}
.category-card:hover .category-card-icon { background: var(--color-forest); }
.category-card-icon svg { width: 28px; height: 28px; color: var(--color-forest); }
.category-card:hover .category-card-icon svg { color: var(--color-cream); }
.category-card-name {
  font-family: var(--font-display);
  font-size: var(--size-md);
  font-weight: 600;
  margin-bottom: 4px;
}
.category-card-count {
  font-family: var(--font-ui);
  font-size: var(--size-xs);
  color: var(--color-ink-muted);
}

/* NEWSLETTER */
.newsletter-section {
  background: linear-gradient(135deg, var(--color-forest) 0%, var(--color-forest-lt) 100%);
  border-radius: var(--radius-lg);
  padding: var(--space-xl);
  text-align: center;
  position: relative;
  overflow: hidden;
}
.newsletter-section::after {
  content: '"';
  position: absolute;
  right: var(--space-md);
  bottom: -2rem;
  font-family: var(--font-display);
  font-size: 15rem;
  color: rgba(250,247,242,0.04);
  line-height: 1;
}
.newsletter-section h3 { color: var(--color-cream); margin-bottom: var(--space-xs); }
.newsletter-section p { color: rgba(250,247,242,0.7); margin-bottom: var(--space-md); }
.newsletter-form {
  display: flex;
  gap: var(--space-xs);
  max-width: 460px;
  margin-inline: auto;
}
.newsletter-form input {
  flex: 1;
  padding: 0.8em 1.25em;
  border: 2px solid transparent;
  border-radius: var(--radius-full);
  font-family: var(--font-ui);
  font-size: var(--size-sm);
  background: rgba(250,247,242,0.1);
  color: var(--color-cream);
  outline: none;
  transition: all var(--transition);
}
.newsletter-form input::placeholder { color: rgba(250,247,242,0.4); }
.newsletter-form input:focus { border-color: var(--color-gold); background: rgba(250,247,242,0.15); }

/* ============================================================
   SINGLE POST
   ============================================================ */
.post-header {
  padding-block: var(--space-xl);
  max-width: 800px;
  margin-inline: auto;
  text-align: center;
}
.post-header .entry-title {
  font-size: clamp(var(--size-3xl), 5vw, var(--size-5xl));
  margin-bottom: var(--space-md);
}
.post-header-meta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
  font-family: var(--font-ui);
  font-size: var(--size-sm);
  color: var(--color-ink-muted);
  flex-wrap: wrap;
}
.post-author-avatar img {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 2px solid var(--color-gold-lt);
}
.post-reading-time {
  display: flex;
  align-items: center;
  gap: 4px;
}
.post-reading-time svg { width: 14px; height: 14px; }

.post-featured-image {
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-bottom: var(--space-xl);
  aspect-ratio: 21/9;
}
.post-featured-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.post-body {
  max-width: 720px;
  margin-inline: auto;
}
.entry-content {
  font-size: var(--size-md);
  line-height: 1.85;
}
.entry-content > * + * { margin-top: 1.5em; }
.entry-content h2 { margin-top: 2.5em; padding-top: 1.5em; border-top: 1px solid var(--color-parchment); }
.entry-content h3 { margin-top: 2em; color: var(--color-forest); }
.entry-content a { color: var(--color-forest); border-bottom: 1px dashed var(--color-gold); }
.entry-content a:hover { color: var(--color-gold); border-bottom-style: solid; }
.entry-content img { border-radius: var(--radius-md); }
.entry-content ul, .entry-content ol { margin-bottom: 1.5em; }
.entry-content li { margin-bottom: 0.4em; }

/* DROP CAP */
.entry-content.has-dropcap > p:first-child::first-letter {
  float: left;
  font-family: var(--font-display);
  font-size: 4.5em;
  line-height: 0.75;
  margin-right: 0.1em;
  margin-top: 0.1em;
  color: var(--color-forest);
  font-weight: 700;
}

/* FOOTNOTE STYLE */
.entry-content .wp-block-footnotes { font-size: var(--size-sm); color: var(--color-ink-muted); }

/* POST TAGS */
.post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-xs);
  margin-top: var(--space-lg);
  padding-top: var(--space-md);
  border-top: 1px solid var(--color-parchment);
}
.post-tags a {
  display: inline-block;
  padding: 0.3em 0.8em;
  border-radius: var(--radius-full);
  font-family: var(--font-ui);
  font-size: var(--size-xs);
  border: 1px solid var(--color-parchment);
  color: var(--color-ink-muted);
  transition: all var(--transition);
}
.post-tags a:hover { background: var(--color-forest); color: var(--color-cream); border-color: var(--color-forest); }

/* POST AUTHOR BOX */
.author-box {
  background: var(--color-parchment);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  display: flex;
  gap: var(--space-md);
  align-items: flex-start;
  margin-top: var(--space-xl);
}
/* BUG FIX — avatar réduit à un trait vertical :
   Le conteneur doit avoir des dimensions explicites + overflow:hidden.
   L'img hérite ensuite 100%/100% pour remplir le cercle. */
.author-box-avatar {
  flex-shrink: 0;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  overflow: hidden;
  border: 3px solid var(--color-gold-lt);
  background: var(--color-parchment);
}
.author-box-avatar img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border-radius: 0; /* Le radius est sur le conteneur, pas sur l'img */
  border: none;
  /* Reset des attrs width/height injectés par get_avatar() */
  max-width: 100% !important;
  max-height: 100% !important;
}
.author-box-name {
  font-family: var(--font-display);
  font-size: var(--size-xl);
  font-weight: 700;
  margin-bottom: 4px;
}
.author-box-bio { font-size: var(--size-sm); color: var(--color-ink-soft); }

/* RELATED POSTS */
.related-posts { margin-top: var(--space-3xl); }
.related-posts-title {
  text-align: center;
  margin-bottom: var(--space-xl);
}

/* POST NAVIGATION */
.post-navigation {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-sm);
  margin-top: var(--space-xl);
  padding-top: var(--space-lg);
  border-top: 1px solid var(--color-parchment);
}
.post-nav-item {
  background: var(--color-parchment);
  border-radius: var(--radius-md);
  padding: var(--space-md);
  transition: all var(--transition);
}
.post-nav-item:hover { background: var(--color-forest); color: var(--color-cream); }
.post-nav-item:hover a { color: var(--color-cream); }
.post-nav-label {
  font-family: var(--font-ui);
  font-size: var(--size-xs);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-ink-muted);
  margin-bottom: 4px;
}
.post-nav-item:hover .post-nav-label { color: rgba(250,247,242,0.6); }
.post-nav-title {
  font-family: var(--font-display);
  font-size: var(--size-md);
  font-weight: 700;
  line-height: 1.3;
}
.post-nav-item.prev { text-align: left; }
.post-nav-item.next { text-align: right; }

/* ============================================================
   SIDEBAR
   ============================================================ */
.content-sidebar-wrap {
  display: grid;
  grid-template-columns: 1fr 340px;
  gap: var(--space-xl);
  align-items: start;
}
.sidebar { position: sticky; top: calc(60px + var(--space-md)); }

.widget {
  background: var(--color-white);
  border-radius: var(--radius-lg);
  padding: var(--space-md);
  margin-bottom: var(--space-md);
  box-shadow: var(--shadow-sm);
}
.widget:last-child { margin-bottom: 0; }
.widget-title {
  font-family: var(--font-display);
  font-size: var(--size-lg);
  font-weight: 700;
  margin-bottom: var(--space-md);
  padding-bottom: var(--space-xs);
  border-bottom: 2px solid var(--color-gold);
  display: flex;
  align-items: center;
  gap: 0.5em;
}

/* SEARCH WIDGET */
.widget-search form {
  display: flex;
  border: 2px solid var(--color-parchment);
  border-radius: var(--radius-full);
  overflow: hidden;
  transition: border-color var(--transition);
}
.widget-search form:focus-within { border-color: var(--color-forest); }
.widget-search input {
  flex: 1;
  border: none;
  outline: none;
  padding: 0.6em 1em;
  font-family: var(--font-ui);
  font-size: var(--size-sm);
  background: transparent;
}
.widget-search button {
  background: var(--color-forest);
  border: none;
  color: var(--color-cream);
  padding: 0.6em 1em;
  cursor: pointer;
  transition: background var(--transition);
}
.widget-search button:hover { background: var(--color-gold); }
.widget-search button svg { width: 16px; height: 16px; }

/* RECENT POSTS WIDGET */
.widget-recent-posts ul { list-style: none; padding: 0; }
.widget-recent-posts li {
  display: flex;
  gap: var(--space-sm);
  padding: var(--space-xs) 0;
  border-bottom: 1px solid var(--color-parchment);
}
.widget-recent-posts li:last-child { border-bottom: none; }
.widget-recent-thumb {
  width: 56px;
  height: 56px;
  border-radius: var(--radius-sm);
  overflow: hidden;
  flex-shrink: 0;
}
.widget-recent-thumb img { width: 100%; height: 100%; object-fit: cover; }
.widget-recent-info a {
  font-family: var(--font-display);
  font-size: var(--size-sm);
  font-weight: 600;
  color: var(--color-ink);
  line-height: 1.3;
}
.widget-recent-info a:hover { color: var(--color-forest); }
.widget-recent-date {
  font-family: var(--font-ui);
  font-size: var(--size-xs);
  color: var(--color-ink-muted);
  margin-top: 2px;
}

/* CATEGORIES WIDGET */
.widget-categories ul { list-style: none; padding: 0; }
.widget-categories li a {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 0.4em 0;
  border-bottom: 1px solid var(--color-parchment);
  font-family: var(--font-ui);
  font-size: var(--size-sm);
  color: var(--color-ink-soft);
  transition: all var(--transition);
}
.widget-categories li a:hover { color: var(--color-forest); padding-left: 0.5em; }
.widget-categories .count {
  background: var(--color-parchment);
  border-radius: var(--radius-full);
  padding: 1px 8px;
  font-size: var(--size-xs);
}

/* ============================================================
   ARCHIVE / BLOG PAGE
   ============================================================ */
/* Ancien bandeau vert conservé pour compatibilité — non utilisé */
.archive-header {
  background: var(--color-forest);
  color: var(--color-cream);
  padding-block: var(--space-xl);
  margin-bottom: var(--space-xl);
}
.archive-title {
  color: var(--color-cream);
  margin-bottom: var(--space-xs);
}
.archive-description { color: rgba(250,247,242,0.7); max-width: 600px; }

/* Nouvel en-tête d'archive — sobre, éditorial, fond parchemin */
.archive-header-light {
  background: var(--color-parchment);
  border-bottom: 1px solid rgba(44,74,62,.10);
  padding-top: var(--space-md);
  padding-bottom: var(--space-lg);
  margin-bottom: var(--space-xl);
}
.archive-header-inner {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  margin-top: var(--space-sm);
}
.archive-header-icon {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-md);
  background: var(--color-white);
  border: 1px solid rgba(44,74,62,.12);
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: var(--shadow-sm);
}
.archive-header-icon svg { width: 32px; height: 32px; color: var(--color-forest); }
.archive-header-icon--avatar img {
  width: 64px; height: 64px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--color-gold-lt);
}
.archive-header-text { flex: 1; }
.archive-title-light {
  font-family: var(--font-display);
  font-size: clamp(var(--size-2xl), 4vw, var(--size-4xl));
  font-weight: 700;
  color: var(--color-ink);
  margin: 0.1em 0 0;
  line-height: 1.15;
  letter-spacing: -0.02em;
}
.archive-description-light {
  color: var(--color-ink-muted);
  max-width: 600px;
  font-size: var(--size-md);
  margin-top: 0.4em;
  margin-bottom: 0;
}

.blog-filters {
  display: flex;
  gap: var(--space-xs);
  flex-wrap: wrap;
  margin-bottom: var(--space-lg);
}
.blog-filter {
  padding: 0.4em 1em;
  border-radius: var(--radius-full);
  border: 2px solid var(--color-parchment);
  font-family: var(--font-ui);
  font-size: var(--size-xs);
  font-weight: 600;
  color: var(--color-ink-muted);
  cursor: pointer;
  transition: all var(--transition);
  text-decoration: none;
}
.blog-filter:hover,
.blog-filter.active {
  border-color: var(--color-forest);
  background: var(--color-forest);
  color: var(--color-cream);
}

/* PAGINATION */
.pagination {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: var(--space-xs);
  margin-top: var(--space-xl);
  padding-top: var(--space-xl);
  border-top: 1px solid var(--color-parchment);
}
.page-numbers {
  font-family: var(--font-ui);
  font-size: var(--size-sm);
  font-weight: 600;
  width: 2.5em;
  height: 2.5em;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  color: var(--color-ink-muted);
  transition: all var(--transition);
}
.page-numbers:hover,
.page-numbers.current {
  background: var(--color-forest);
  color: var(--color-cream);
}
.page-numbers.prev, .page-numbers.next { width: auto; padding: 0 1em; }

/* ============================================================
   COMMENTS
   ============================================================ */
.comments-section { margin-top: var(--space-xl); padding-top: var(--space-xl); border-top: 1px solid var(--color-parchment); }
.comments-title { margin-bottom: var(--space-lg); }

.comment-list { list-style: none; padding: 0; }
.comment {
  padding: var(--space-md);
  background: var(--color-white);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-sm);
  box-shadow: var(--shadow-sm);
}
.comment .children { padding-left: var(--space-lg); margin-top: var(--space-sm); }
.comment-author-avatar img { width: 44px; height: 44px; border-radius: 50%; }
.comment-header {
  display: flex;
  align-items: center;
  gap: var(--space-sm);
  margin-bottom: var(--space-sm);
}
.comment-meta { font-family: var(--font-ui); font-size: var(--size-xs); color: var(--color-ink-muted); }
.comment-author-name { font-weight: 600; color: var(--color-ink); font-size: var(--size-sm); }
.comment-body { font-size: var(--size-sm); }

.comment-respond {
  background: var(--color-parchment);
  border-radius: var(--radius-lg);
  padding: var(--space-lg);
  margin-top: var(--space-lg);
}
.comment-respond h3 { margin-bottom: var(--space-md); }
.comment-form { display: grid; gap: var(--space-sm); }
.comment-form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: var(--space-sm); }
.comment-form input,
.comment-form textarea {
  width: 100%;
  padding: 0.8em 1em;
  border: 2px solid transparent;
  border-radius: var(--radius-md);
  background: var(--color-white);
  font-family: var(--font-body);
  font-size: var(--size-sm);
  outline: none;
  transition: border-color var(--transition);
}
.comment-form input:focus,
.comment-form textarea:focus { border-color: var(--color-forest); }
.comment-form textarea { min-height: 140px; resize: vertical; }
.comment-form label {
  font-family: var(--font-ui);
  font-size: var(--size-xs);
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--color-ink-muted);
  display: block;
  margin-bottom: 4px;
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
  background: var(--color-ink);
  color: var(--color-cream);
  padding-top: var(--space-3xl);
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: var(--space-xl);
  padding-bottom: var(--space-xl);
  border-bottom: 1px solid rgba(250,247,242,0.1);
}
.footer-brand .site-title { color: var(--color-cream); margin-bottom: var(--space-sm); font-size: var(--size-2xl); }
.footer-brand .site-title span { color: var(--color-gold); }
.footer-brand p { color: rgba(250,247,242,0.6); font-size: var(--size-sm); margin-bottom: var(--space-md); }
.footer-social {
  display: flex;
  gap: var(--space-xs);
}
.footer-social a {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(250,247,242,0.15);
  display: flex;
  align-items: center;
  justify-content: center;
  color: rgba(250,247,242,0.6);
  transition: all var(--transition);
}
.footer-social a:hover { background: var(--color-gold); border-color: var(--color-gold); color: var(--color-ink); }
.footer-social a svg { width: 16px; height: 16px; }

.footer-col h4 {
  font-family: var(--font-ui);
  font-size: var(--size-xs);
  font-weight: 700;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--color-gold);
  margin-bottom: var(--space-md);
}
.footer-col ul { list-style: none; padding: 0; }
.footer-col ul li { margin-bottom: 0.6em; }
.footer-col ul li a {
  color: rgba(250,247,242,0.6);
  font-size: var(--size-sm);
  transition: color var(--transition);
}
.footer-col ul li a:hover { color: var(--color-cream); }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-block: var(--space-md);
  font-family: var(--font-ui);
  font-size: var(--size-xs);
  color: rgba(250,247,242,0.4);
}
.footer-bottom a { color: rgba(250,247,242,0.6); }
.footer-bottom a:hover { color: var(--color-gold); }
.footer-bottom-links { display: flex; gap: var(--space-sm); }

/* ============================================================
   BREADCRUMBS
   ============================================================ */
.breadcrumbs {
  font-family: var(--font-ui);
  font-size: var(--size-xs);
  color: var(--color-ink-muted);
  display: flex;
  flex-wrap: wrap;
  gap: 0.4em;
  align-items: center;
  margin-bottom: var(--space-sm);
}
.breadcrumbs a { color: var(--color-forest); }
.breadcrumbs a:hover { color: var(--color-gold); }
.breadcrumbs .sep { color: var(--color-ink-pale); }

/* ============================================================
   PAGE TEMPLATES
   ============================================================ */

/* ABOUT PAGE */
.about-hero {
  background: var(--color-forest);
  color: var(--color-cream);
  padding-block: var(--space-3xl);
  text-align: center;
}
.about-hero h1 { color: var(--color-cream); }

.timeline {
  position: relative;
  padding-left: var(--space-xl);
}
.timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 2px;
  background: linear-gradient(to bottom, var(--color-gold), var(--color-forest));
}
.timeline-item {
  position: relative;
  margin-bottom: var(--space-xl);
}
.timeline-item::before {
  content: '';
  position: absolute;
  left: calc(var(--space-xl) * -1 - 5px);
  top: 0.4em;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--color-gold);
  border: 2px solid var(--color-cream);
  box-shadow: 0 0 0 3px var(--color-gold);
}
.timeline-date {
  font-family: var(--font-ui);
  font-size: var(--size-xs);
  font-weight: 700;
  letter-spacing: 0.1em;
  color: var(--color-gold);
  text-transform: uppercase;
  margin-bottom: 0.25em;
}
.timeline-title {
  font-family: var(--font-display);
  font-size: var(--size-xl);
  margin-bottom: 0.4em;
}

/* 404 */
.error-404 {
  min-height: 60vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.error-404-number {
  font-family: var(--font-display);
  font-size: 12rem;
  font-weight: 700;
  line-height: 1;
  background: linear-gradient(to bottom right, var(--color-forest), var(--color-gold));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* ============================================================
   BACK TO TOP
   ============================================================ */
.back-to-top {
  position: fixed;
  bottom: var(--space-lg);
  right: var(--space-lg);
  width: 44px;
  height: 44px;
  background: var(--color-forest);
  color: var(--color-cream);
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-md);
  opacity: 0;
  visibility: hidden;
  transition: all var(--transition);
  z-index: 90;
  border: none;
  cursor: pointer;
}
.back-to-top.visible { opacity: 1; visibility: visible; }
.back-to-top:hover { background: var(--color-gold); color: var(--color-ink); transform: translateY(-3px); }
.back-to-top svg { width: 20px; height: 20px; }

/* ============================================================
   ACCESSIBILITY
   ============================================================ */
.skip-link {
  position: absolute;
  top: -40px;
  left: var(--space-sm);
  background: var(--color-forest);
  color: var(--color-cream);
  padding: 0.5em 1em;
  border-radius: var(--radius-sm);
  font-family: var(--font-ui);
  font-size: var(--size-sm);
  z-index: 999;
  transition: top var(--transition);
}
.skip-link:focus { top: var(--space-sm); }
:focus-visible { outline: 3px solid var(--color-gold); outline-offset: 3px; }

/* ============================================================
   PROGRESS BAR (reading progress)
   ============================================================ */
.reading-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 3px;
  background: linear-gradient(to right, var(--color-gold), var(--color-forest));
  z-index: 200;
  transition: width 0.1s linear;
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1200px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: var(--space-lg); }
  .posts-grid--4 { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 1024px) {
  .content-sidebar-wrap { grid-template-columns: 1fr; }
  .sidebar { position: static; }
  .posts-grid--3 { grid-template-columns: repeat(2, 1fr); }
  .card--featured { grid-column: span 1; }
  .hero-featured-post { display: none; }
  .header-inner { grid-template-columns: 1fr auto; }
  .primary-nav { display: none; }
  .menu-toggle { display: flex; }
}

@media (max-width: 768px) {
  :root {
    --space-xl: 3rem;
    --space-2xl: 4.5rem;
    --space-3xl: 6rem;
  }
  .posts-grid--3,
  .posts-grid--2 { grid-template-columns: 1fr; }
  .card--horizontal { flex-direction: column; }
  .card--horizontal .card-image { width: 100%; aspect-ratio: 16/10; }
  .post-navigation { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { flex-direction: column; gap: var(--space-xs); text-align: center; }
  .comment-form-grid { grid-template-columns: 1fr; }
  .newsletter-form { flex-direction: column; }
  .hero h1 { font-size: clamp(2.5rem, 10vw, 4rem); }
}

@media (max-width: 480px) {
  .header-inner { grid-template-columns: 1fr auto; }
  .post-header { padding-block: var(--space-lg); }
}

/* ============================================================
   MOBILE NAVIGATION
   ============================================================ */
.mobile-nav {
  position: fixed;
  inset: 0;
  background: var(--color-cream);
  z-index: 99;
  transform: translateX(-100%);
  transition: transform var(--transition-slow);
  overflow-y: auto;
  padding: var(--space-xl) var(--space-md);
  display: flex;
  flex-direction: column;
}
.mobile-nav.active { transform: translateX(0); }
.mobile-nav ul { list-style: none; padding: 0; margin-top: var(--space-xl); }
.mobile-nav ul li { border-bottom: 1px solid var(--color-parchment); }
.mobile-nav ul li a {
  display: block;
  padding: var(--space-sm) 0;
  font-family: var(--font-display);
  font-size: var(--size-xl);
  color: var(--color-ink);
  font-weight: 700;
}
.mobile-nav ul li a:hover { color: var(--color-forest); }
.mobile-nav-close {
  background: none;
  border: none;
  position: absolute;
  top: var(--space-md);
  right: var(--space-md);
  cursor: pointer;
  font-size: var(--size-xl);
  color: var(--color-ink-muted);
}

/* ============================================================
   MAILPOET OVERRIDES
   Force MailPoet forms to adopt the theme's newsletter aesthetic
   ============================================================ */
.newsletter-section .mailpoet-form-wrapper,
.newsletter-section .mailpoet_form,
.newsletter-section [class*="mailpoet"] {
    max-width: 500px;
    margin-inline: auto;
}

/* Champ email MailPoet */
.newsletter-section .mailpoet_text,
.newsletter-section .mailpoet_text_field,
.newsletter-section input[type="email"].mailpoet_text,
.newsletter-section input[type="text"].mailpoet_text {
    flex: 1;
    padding: 0.8em 1.25em !important;
    border: 2px solid transparent !important;
    border-radius: var(--radius-full) !important;
    font-family: var(--font-ui) !important;
    font-size: var(--size-sm) !important;
    background: rgba(250,247,242,0.1) !important;
    color: var(--color-cream) !important;
    outline: none !important;
    transition: all var(--transition) !important;
    width: auto !important;
    min-width: 0;
}
.newsletter-section .mailpoet_text::placeholder,
.newsletter-section input[type="email"].mailpoet_text::placeholder {
    color: rgba(250,247,242,0.45) !important;
}
.newsletter-section .mailpoet_text:focus,
.newsletter-section input[type="email"].mailpoet_text:focus {
    border-color: var(--color-gold) !important;
    background: rgba(250,247,242,0.15) !important;
}

/* Bouton submit MailPoet */
.newsletter-section .mailpoet_submit,
.newsletter-section input[type="submit"].mailpoet_submit,
.newsletter-section button[type="submit"] {
    padding: 0.75em 1.75em !important;
    font-family: var(--font-ui) !important;
    font-size: var(--size-sm) !important;
    font-weight: 600 !important;
    letter-spacing: 0.04em !important;
    background: var(--color-gold) !important;
    color: var(--color-ink) !important;
    border: none !important;
    border-radius: var(--radius-full) !important;
    cursor: pointer !important;
    transition: all var(--transition) !important;
    white-space: nowrap;
}
.newsletter-section .mailpoet_submit:hover,
.newsletter-section input[type="submit"].mailpoet_submit:hover {
    background: var(--color-gold-lt) !important;
    transform: translateY(-2px) !important;
}

/* Layout inline (email + bouton côte à côte) */
.newsletter-section .mailpoet_form_segments,
.newsletter-section .mailpoet_paragraph {
    display: flex !important;
    align-items: center !important;
    gap: var(--space-xs) !important;
    margin: 0 !important;
    flex-wrap: wrap;
}

/* Labels MailPoet masqués (inline context) */
.newsletter-section .mailpoet_form label:not(.mailpoet_checkbox_label) {
    display: none !important;
}

/* Message de succès MailPoet */
.newsletter-section .mailpoet_validate_success,
.newsletter-section .mailpoet_message {
    color: var(--color-gold-lt) !important;
    font-family: var(--font-display) !important;
    font-size: var(--size-lg) !important;
    font-style: italic !important;
    text-align: center;
    padding: var(--space-sm) 0;
}

/* Erreurs MailPoet */
.newsletter-section .mailpoet_error,
.newsletter-section .parsley-errors-list {
    color: #F87171 !important;
    font-family: var(--font-ui) !important;
    font-size: var(--size-xs) !important;
    margin-top: 4px !important;
    list-style: none !important;
    padding: 0 !important;
}

/* ============================================================
   PRINT
   ============================================================ */
@media print {
  .site-header, .site-footer, .sidebar, .related-posts,
  .comments-section, .back-to-top, .reading-progress { display: none !important; }
  body { background: white; color: black; }
  .entry-content { max-width: 100%; }
}

/* ============================================================
   GUTENBERG EDITOR STYLES
   ============================================================ */
.wp-block-image { margin-block: var(--space-lg); }
.wp-block-image img { border-radius: var(--radius-md); }
.wp-block-pullquote {
  border: none;
  padding: var(--space-lg);
  text-align: center;
  background: var(--color-parchment);
  border-radius: var(--radius-lg);
  margin-block: var(--space-xl);
}
.wp-block-pullquote blockquote {
  background: none;
  border: none;
  font-size: var(--size-2xl);
}
.wp-block-pullquote blockquote::before { display: none; }
.wp-block-separator { border-top: 2px solid var(--color-gold); opacity: 0.5; }
.wp-block-table { width: 100%; border-collapse: collapse; }
.wp-block-table th, .wp-block-table td {
  padding: 0.75em 1em;
  border: 1px solid var(--color-parchment);
  font-family: var(--font-ui);
  font-size: var(--size-sm);
}
.wp-block-table th { background: var(--color-forest); color: var(--color-cream); font-weight: 600; }
.wp-block-table tr:nth-child(even) td { background: var(--color-parchment); }

/* ============================================================
   BUG FIX #6 — "Content is protected" plugin output
   Masque les conteneurs connus du plugin de protection
   ============================================================ */

/* Conteneur générique injecté par les plugins de protection */
.wp-content-copy-protect,
.content-copy-protect,
#content-copy-protect,
.rh-protect-content,
.dmca-badge { display: none !important; }

/* Fallback : tout élément dont le contenu visible est ce texte */
body > div:empty,
.site-footer + *:not(script):not(style) { display: none !important; }

/* ============================================================
   BUG FIX — archive-header responsive
   ============================================================ */
@media (max-width: 600px) {
  .archive-header-inner { flex-direction: column; align-items: flex-start; }
  .archive-header-icon { width: 48px; height: 48px; }
  .archive-header-icon svg { width: 24px; height: 24px; }
}
