/* ==========================================================
   WeddingPart — BLOG / Journal
   ----------------------------------------------------------
   Templates : page-blog.php, archive.php, search.php, single.php,
   index.php + partial card-post.php.
   Chargé conditionnellement (cf. inc/assets.php → handle wpt-blog).
   100% design tokens (base.css). Aucun émoji, SVG only.
   ========================================================== */

/* ---------- Layout & en-têtes ---------- */
.container--narrow { max-width: var(--container-narrow); }

.blog-section { padding-block: clamp(var(--space-12), 6vw, var(--space-24)); }

.blog-header {
  text-align: center;
  max-width: 720px;
  margin: 0 auto clamp(var(--space-8), 4vw, var(--space-16));
}
.blog-header__eyebrow { margin-bottom: var(--space-3); }
.blog-header h1,
.blog-header__title {
  margin: 0 0 var(--space-3);
  font-size: clamp(1.9rem, 4vw, 2.9rem);
  line-height: 1.1;
}
.blog-header h1 em,
.blog-header__title em { font-style: italic; color: var(--wp-brand); }
.blog-header__lead {
  margin: 0 auto;
  max-width: 600px;
  color: var(--wp-soft);
  font-size: 1.05rem;
  line-height: 1.6;
}
.blog-header__count {
  display: inline-block;
  margin-top: var(--space-4);
  font-size: .85rem;
  font-weight: 600;
  color: var(--wp-muted);
}

/* Fil d'ariane : désormais barre globale unifiée dans header.css
   (rendue dans header.php). Styles déplacés là-bas. */

/* ---------- Grille d'articles ---------- */
.post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: clamp(var(--space-6), 3vw, var(--space-10));
  align-items: stretch;
}

/* ---------- Carte article ---------- */
.post-card {
  display: flex;
  flex-direction: column;
  background: var(--wp-surface);
  border: 1px solid var(--wp-line);
  border-radius: var(--radius-lg);
  overflow: hidden;
  box-shadow: var(--shadow-xs);
  transition: transform var(--duration-lg) var(--ease), box-shadow var(--duration-lg) var(--ease), border-color var(--duration) var(--ease);
}
.post-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-md);
  border-color: var(--wp-brand-border);
}

.post-card__media {
  position: relative;
  display: block;
  aspect-ratio: 16 / 10;
  overflow: hidden;
  background: var(--wp-surface-2);
}
.post-card__img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--duration-lg) var(--ease);
}
.post-card:hover .post-card__img { transform: scale(1.05); }

.post-card__placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--wp-brand-soft), var(--wp-gold-light));
  color: var(--wp-brand);
}
.post-card__placeholder svg { width: 48px; height: 48px; opacity: .55; }

.post-card__cat {
  position: absolute;
  top: var(--space-3);
  left: var(--space-3);
  z-index: 1;
  padding: 5px 12px;
  border-radius: var(--radius-full);
  background: rgba(255,255,255,.92);
  color: var(--wp-brand);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .02em;
  text-transform: uppercase;
  box-shadow: var(--shadow-xs);
  backdrop-filter: blur(4px);
}

.post-card__body {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: var(--space-6) var(--space-6) var(--space-2);
}
.post-card__title {
  margin: 0 0 var(--space-3);
  font-size: 1.22rem;
  line-height: 1.3;
}
.post-card__title a { color: var(--wp-ink); text-decoration: none; transition: color var(--duration) var(--ease); }
.post-card__title a:hover { color: var(--wp-brand); }
.post-card__excerpt {
  margin: 0 0 var(--space-4);
  color: var(--wp-soft);
  font-size: .94rem;
  line-height: 1.6;
}

/* Méta (date · temps de lecture) */
.post-meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: auto;
  color: var(--wp-muted);
  font-size: .82rem;
}
.post-meta__dot { width: 3px; height: 3px; border-radius: 50%; background: currentColor; opacity: .6; }

.post-card__link {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  margin: 0 var(--space-6) var(--space-6);
  color: var(--wp-brand);
  font-size: .9rem;
  font-weight: 600;
  text-decoration: none;
}
.post-card__link svg { transition: transform var(--duration) var(--ease); }
.post-card:hover .post-card__link svg { transform: translateX(3px); }

/* Carte « à la une » (premier article du blog) */
.post-card--featured { grid-column: 1 / -1; }
@media (min-width: 880px) {
  .post-card--featured {
    flex-direction: row;
    align-items: stretch;
  }
  .post-card--featured .post-card__media {
    aspect-ratio: auto;
    flex: 0 0 52%;
    min-height: 340px;
  }
  .post-card--featured .post-card__body {
    justify-content: center;
    padding: clamp(var(--space-8), 4vw, var(--space-16));
  }
  .post-card--featured .post-card__title { font-size: clamp(1.5rem, 2.6vw, 2.1rem); }
  .post-card--featured .post-card__excerpt { font-size: 1.02rem; }
  .post-card--featured .post-card__link { margin-inline: clamp(var(--space-8), 4vw, var(--space-16)); }
}

/* ---------- Pagination (the_posts_pagination + paginate_links) ---------- */
.navigation.pagination,
.blog-pagination { margin-top: clamp(var(--space-10), 5vw, var(--space-16)); }
.navigation.pagination .nav-links,
.blog-pagination .nav-links {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: var(--space-2);
}
.navigation.pagination .page-numbers,
.blog-pagination .page-numbers {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 42px;
  height: 42px;
  padding: 0 var(--space-3);
  border: 1px solid var(--wp-line-strong);
  border-radius: var(--radius-sm);
  background: var(--wp-surface);
  color: var(--wp-soft);
  font-weight: 600;
  text-decoration: none;
  transition: all var(--duration) var(--ease);
}
.navigation.pagination a.page-numbers:hover,
.blog-pagination a.page-numbers:hover {
  border-color: var(--wp-brand);
  color: var(--wp-brand);
  transform: translateY(-1px);
}
.navigation.pagination .page-numbers.current,
.blog-pagination .page-numbers.current {
  background: var(--wp-brand);
  border-color: var(--wp-brand);
  color: #fff;
}
.navigation.pagination .page-numbers.dots,
.blog-pagination .page-numbers.dots { border-color: transparent; background: transparent; }

/* ==========================================================
   SINGLE — article
   ========================================================== */
.single-hero { padding-top: clamp(var(--space-8), 3.5vw, var(--space-12)); }
.single-hero__cat {
  display: inline-block;
  margin-bottom: var(--space-4);
  padding: 6px 16px;
  border-radius: var(--radius-full);
  background: var(--wp-brand-soft);
  border: 1px solid var(--wp-brand-border);
  color: var(--wp-brand);
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .03em;
  text-transform: uppercase;
  text-decoration: none;
}
.single-hero__cat:hover { background: var(--wp-brand); color: #fff; }
.single-hero__title {
  margin: 0 0 var(--space-5);
  font-size: clamp(2rem, 5vw, 3.2rem);
  line-height: 1.08;
}
.single-hero__meta {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: var(--space-3);
  color: var(--wp-soft);
  font-size: .9rem;
}
.single-hero__avatar {
  width: 42px; height: 42px;
  border-radius: 50%;
  object-fit: cover;
  display: block;
  flex: 0 0 auto;
  background: var(--wp-surface-2);
}
.single-hero__author { font-weight: 600; color: var(--wp-ink); }
.single-hero .post-meta { color: var(--wp-muted); margin-left: auto; }
.single-hero__meta .post-meta > .post-meta__dot:first-child { display: none; }
@media (max-width: 540px) { .single-hero .post-meta { margin-left: 0; } }

.single-hero__figure {
  margin: clamp(var(--space-8), 4vw, var(--space-12)) 0 0;
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
}
.single-hero__figure img { display: block; width: 100%; height: auto; }

/* ---------- Corps de l'article (Gutenberg) ---------- */
.prose {
  padding-top: clamp(var(--space-8), 4vw, var(--space-12));
  color: var(--wp-soft);
  font-size: 1.075rem;
  line-height: 1.8;
}
.prose > * { margin-block: 0 var(--space-6); }
.prose h2 {
  margin-block: var(--space-12) var(--space-4);
  font-size: clamp(1.5rem, 3vw, 2rem);
  line-height: 1.2;
  color: var(--wp-ink);
}
.prose h3 {
  margin-block: var(--space-8) var(--space-3);
  font-size: 1.4rem;
  line-height: 1.25;
  color: var(--wp-ink);
}
.prose h4 { margin-block: var(--space-6) var(--space-3); font-size: 1.15rem; color: var(--wp-ink); }
.prose p { margin: 0 0 var(--space-6); }
.prose a { color: var(--wp-brand); text-decoration: underline; text-underline-offset: 2px; }
.prose a:hover { color: var(--wp-brand-dark); }
.prose strong { color: var(--wp-ink); font-weight: 700; }
.prose ul, .prose ol { margin: 0 0 var(--space-6); padding-left: 1.4em; }
.prose li { margin-bottom: var(--space-2); }
.prose ul li::marker { color: var(--wp-brand); }
.prose ol li::marker { color: var(--wp-brand); font-weight: 700; }
.prose img,
.prose .wp-block-image img { border-radius: var(--radius-md); height: auto; }
.prose figure { margin: 0 0 var(--space-8); }
.prose figcaption { margin-top: var(--space-2); text-align: center; font-size: .85rem; color: var(--wp-muted); }
.prose blockquote {
  margin: var(--space-8) 0;
  padding: var(--space-2) 0 var(--space-2) var(--space-6);
  border-left: 3px solid var(--wp-brand);
  font-style: italic;
  font-size: 1.2rem;
  color: var(--wp-ink);
}
.prose blockquote cite { display: block; margin-top: var(--space-2); font-size: .9rem; font-style: normal; color: var(--wp-muted); }
.prose hr {
  margin: clamp(var(--space-10), 5vw, var(--space-16)) auto;
  border: 0;
  height: 1px;
  width: 120px;
  background: var(--wp-line-strong);
}
.prose code {
  padding: .15em .4em;
  border-radius: var(--radius-xs);
  background: var(--wp-surface-3);
  font-size: .9em;
}
.prose pre {
  margin: 0 0 var(--space-6);
  padding: var(--space-5);
  border-radius: var(--radius-md);
  background: var(--wp-ink);
  color: #f5eeec;
  overflow-x: auto;
}
.prose pre code { background: transparent; padding: 0; }
.prose table { width: 100%; border-collapse: collapse; margin: 0 0 var(--space-6); font-size: .95rem; }
.prose th, .prose td { padding: var(--space-3); border: 1px solid var(--wp-line); text-align: left; }
.prose th { background: var(--wp-surface-3); color: var(--wp-ink); font-weight: 700; }

/* ---------- Tags ---------- */
.single-tags {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2);
  margin-top: clamp(var(--space-8), 4vw, var(--space-12));
  padding-top: var(--space-8);
  border-top: 1px solid var(--wp-line);
}
.single-tags__label { font-size: .85rem; font-weight: 700; color: var(--wp-ink); align-self: center; margin-right: var(--space-2); }
.single-tag {
  padding: 6px 14px;
  border-radius: var(--radius-full);
  background: var(--wp-surface-3);
  color: var(--wp-soft);
  font-size: .82rem;
  font-weight: 600;
  text-decoration: none;
  transition: all var(--duration) var(--ease);
}
.single-tag:hover { background: var(--wp-brand-soft); color: var(--wp-brand); }

/* ---------- CTA de fin d'article ---------- */
.single-cta {
  margin-top: clamp(var(--space-10), 5vw, var(--space-16));
  text-align: center;
  background: linear-gradient(135deg, var(--wp-brand-soft), var(--wp-gold-light));
  border: 1px solid var(--wp-gold-border);
  border-radius: var(--radius-xl);
  padding: clamp(var(--space-8), 5vw, var(--space-12));
}
.single-cta h2 { margin: 0 0 var(--space-2); font-size: clamp(1.4rem, 3vw, 1.9rem); }
.single-cta p { margin: 0 auto var(--space-6); max-width: 520px; color: var(--wp-soft); }
.single-cta__actions { display: flex; flex-wrap: wrap; gap: var(--space-3); justify-content: center; }

/* ---------- Navigation prev/next (cartes riches : bulle + label noir + titre rose) ---------- */
.post-nav {
  margin-top: clamp(var(--space-10), 5vw, var(--space-16));
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--space-4);
}
.post-nav__card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border: 1px solid var(--wp-line);
  border-radius: var(--radius-lg);
  background: var(--wp-surface);
  text-decoration: none;
  transition: border-color var(--duration) var(--ease), box-shadow var(--duration) var(--ease), transform var(--duration) var(--ease);
}
.post-nav__card--prev { grid-column: 1 / 2; }
.post-nav__card--next { grid-column: 2 / 3; text-align: right; }
.post-nav__card:hover {
  border-color: var(--wp-brand-border);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
}
.post-nav__thumb {
  flex-shrink: 0;
  width: 58px; height: 58px;
  border-radius: 50%;
  overflow: hidden;
  background: var(--wp-brand-soft);
}
.post-nav__img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: 50%; }
.post-nav__img--ph { display: flex; align-items: center; justify-content: center; color: var(--wp-brand); }
.post-nav__img--ph svg { width: 24px; height: 24px; }
.post-nav__body { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.post-nav__card--next .post-nav__body { align-items: flex-end; }
.post-nav__dir {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: .74rem; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  color: var(--wp-ink);
}
.post-nav__chev { width: 14px; height: 14px; flex-shrink: 0; }
.post-nav__title {
  font-family: var(--font-serif);
  font-weight: 700; font-size: 1rem; line-height: 1.3;
  color: var(--wp-brand);
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.post-nav__card:hover .post-nav__title { text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 2px; }
@media (max-width: 640px) {
  .post-nav { grid-template-columns: 1fr; }
  .post-nav__card--prev,
  .post-nav__card--next { grid-column: auto; }
}

/* ---------- Articles liés ---------- */
.related__head { text-align: center; margin-bottom: clamp(var(--space-6), 3vw, var(--space-10)); }
.related__head h2 { margin: 0; font-size: clamp(1.5rem, 3vw, 2rem); }

/* ==========================================================
   ÉTAT VIDE / RECHERCHE
   ========================================================== */
.blog-empty {
  max-width: 560px;
  margin: 0 auto;
  text-align: center;
  padding: clamp(var(--space-10), 5vw, var(--space-16)) 0;
}
.blog-empty__icon {
  width: 64px; height: 64px;
  margin: 0 auto var(--space-5);
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-lg);
  background: var(--wp-brand-soft);
  color: var(--wp-brand);
}
.blog-empty h2 { margin: 0 0 var(--space-3); }
.blog-empty p { color: var(--wp-soft); margin: 0 0 var(--space-6); }

.blog-searchform { display: flex; gap: var(--space-2); max-width: 420px; margin: 0 auto; }
.blog-searchform input[type="search"] {
  flex: 1;
  padding: 0 var(--space-4);
  height: 48px;
  border: 1px solid var(--wp-line-strong);
  border-radius: var(--radius-sm);
  background: var(--wp-surface);
  color: var(--wp-ink);
  font-size: 1rem;
}
.blog-searchform input[type="search"]:focus {
  outline: none;
  border-color: var(--wp-brand);
  box-shadow: 0 0 0 3px var(--wp-brand-soft);
}

/* ==========================================================
   BLOG v2 — grille uniforme, filtres, scroll infini,
   single (contenu + sidebar sticky) + carrousel. Mobile-first.
   ========================================================== */

/* ---- Grille : cartes uniformes, centrées, jamais pleine largeur ---- */
.post-grid {
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}
.post-card--featured { grid-column: auto; }            /* neutralise l'ancienne carte pleine largeur */
@media (max-width: 640px) { .post-grid { grid-template-columns: 1fr; } }
.post-card--in { animation: wp-card-in .5s var(--ease) both; }
@keyframes wp-card-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* ---- Barre de filtres (desktop : pills alignées à gauche, pleine largeur) ---- */
.blog-filters { max-width: var(--container); margin: 0 auto clamp(var(--space-8), 4vw, var(--space-12)); }
.blog-filters__scroll { display: flex; flex-wrap: wrap; gap: var(--space-2); padding: 2px; }
.blog-filter {
  flex: 0 0 auto; white-space: nowrap;
  padding: 9px 18px; border-radius: var(--radius-full);
  border: 1px solid var(--wp-line-strong); background: var(--wp-surface);
  color: var(--wp-soft); font-size: .9rem; font-weight: 600; text-decoration: none;
  transition: all var(--duration) var(--ease);
}
.blog-filter:hover { border-color: var(--wp-brand-border); color: var(--wp-brand); }
.blog-filter.is-active { background: var(--wp-brand); border-color: var(--wp-brand); color: #fff; }

/* ==========================================================
   BLOG — recherche (overlay type Amazon) + filtres (panneau)
   ========================================================== */
body.blog-noscroll { overflow: hidden; }
.blog-toolbar { display: none; }

/* --- Overlay RECHERCHE : plein écran, couvre le header --- */
.blog-search {
  position: fixed; inset: 0; z-index: 100060;
  flex-direction: column;
  background: var(--wp-surface);
  opacity: 0; transition: opacity .2s var(--ease);
}
.blog-search:not([hidden]) { display: flex; }
.blog-search.is-open { opacity: 1; }
.blog-search__bar {
  display: flex; align-items: center; gap: 10px;
  padding: calc(12px + env(safe-area-inset-top, 0px)) var(--gutter) 12px;
  border-bottom: 1px solid var(--wp-line);
}
.blog-search__form {
  flex: 1; min-width: 0; display: flex; align-items: center; gap: 8px;
  background: var(--wp-surface-2); border: 1.5px solid var(--wp-brand-border);
  border-radius: var(--radius-full); padding: 0 14px; min-height: 48px;
}
.blog-search__icon { display: inline-flex; color: var(--wp-brand); flex-shrink: 0; }
.blog-search__icon svg { width: 20px; height: 20px; }
.blog-search__input {
  flex: 1; min-width: 0; border: 0; background: transparent; outline: none;
  font-size: 1rem; color: var(--wp-ink); padding: 12px 0;
}
.blog-search__clear { border: 0; background: none; color: var(--wp-soft); cursor: pointer; display: inline-flex; padding: 4px; }
.blog-search__clear svg { width: 18px; height: 18px; }
.blog-search__cancel { border: 0; background: none; color: var(--wp-brand); font-weight: 600; font-size: .95rem; cursor: pointer; white-space: nowrap; padding: 4px 2px; }
.blog-search__results { flex: 1; overflow-y: auto; -webkit-overflow-scrolling: touch; padding: 6px 0 24px; }
.blog-search__hint, .blog-search__empty, .blog-search__loading { padding: 20px var(--gutter); color: var(--wp-soft); font-size: .95rem; line-height: 1.55; }
.blog-search__empty strong { color: var(--wp-ink); }
.blog-search__empty a, .blog-search__all { color: var(--wp-brand); font-weight: 600; text-decoration: none; }
.blog-search__list { list-style: none; margin: 0; padding: 0; }
.blog-search__list a {
  display: flex; align-items: center; gap: 14px;
  padding: 14px var(--gutter); text-decoration: none; color: var(--wp-ink);
  border-bottom: 1px solid var(--wp-line);
}
.blog-search__list a:active { background: var(--wp-brand-soft); }
.blog-search__list svg { width: 20px; height: 20px; color: var(--wp-brand); flex-shrink: 0; }
.blog-search__res-title { font-weight: 500; font-size: .98rem; line-height: 1.35; }
.blog-search__all { display: block; padding: 16px var(--gutter); }

/* --- Panneau FILTRES : sheet plein écran (bas) --- */
.blog-fpanel { position: fixed; inset: 0; z-index: 100060; }
.blog-fpanel:not([hidden]) { display: block; }
.blog-fpanel__overlay { position: absolute; inset: 0; background: rgba(29,24,25,.45); opacity: 0; transition: opacity .25s var(--ease); }
.blog-fpanel.is-open .blog-fpanel__overlay { opacity: 1; }
.blog-fpanel__sheet {
  position: absolute; left: 0; right: 0; bottom: 0; max-height: 90vh; overflow-y: auto;
  background: var(--wp-surface); border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  transform: translateY(100%); transition: transform .32s var(--ease);
  padding-bottom: calc(20px + env(safe-area-inset-bottom, 0px));
}
.blog-fpanel.is-open .blog-fpanel__sheet { transform: none; }
.blog-fpanel__head {
  position: sticky; top: 0; z-index: 1; background: var(--wp-surface);
  display: flex; align-items: center; justify-content: space-between;
  padding: 20px var(--gutter) 14px; border-bottom: 1px solid var(--wp-line);
}
.blog-fpanel__title { margin: 0; font-size: 1.2rem; }
.blog-fpanel__close { width: 38px; height: 38px; flex-shrink: 0; border-radius: 50%; border: 1px solid var(--wp-line); background: var(--wp-surface); color: var(--wp-soft); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.blog-fpanel__close svg { width: 18px; height: 18px; }
.blog-fpanel__body { padding: 4px var(--gutter) 16px; }
.blog-fpanel__group { padding: 18px 0; border-bottom: 1px solid var(--wp-line); }
.blog-fpanel__group:last-child { border-bottom: 0; }
.blog-fpanel__label { display: block; font-size: .78rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--wp-soft); margin-bottom: 13px; }
.blog-fpanel__chips { display: flex; flex-wrap: wrap; gap: 9px; }
.blog-chip {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 15px; border-radius: var(--radius-full);
  border: 1.5px solid var(--wp-brand-border); background: var(--wp-surface);
  color: var(--wp-ink); font-size: .92rem; font-weight: 600; text-decoration: none;
  transition: background var(--duration) var(--ease), border-color var(--duration) var(--ease);
}
.blog-chip:active { background: var(--wp-brand-soft); }
.blog-chip.is-active { background: var(--wp-brand); border-color: var(--wp-brand); color: #fff; }
.blog-chip__count { font-size: .78rem; opacity: .55; font-weight: 500; }
.blog-chip.is-active .blog-chip__count { opacity: .85; }

/* --- Toolbar fixe basse (mobile) : 2 boutons (recherche + filtre) --- */
@media (max-width: 720px) {
  .blog-filters { display: none; }
  .blog-section { padding-bottom: calc(var(--space-12) + 86px); }

  .blog-toolbar {
    display: flex; gap: 10px; align-items: stretch;
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 100050;
    padding: 10px var(--gutter) calc(10px + env(safe-area-inset-bottom, 0px));
    background: rgba(255,255,255,.93); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    border-top: 1px solid var(--wp-line); box-shadow: 0 -8px 24px -12px rgba(29,24,25,.18);
  }
  .blog-toolbar__search {
    flex: 1; min-width: 0; min-height: 50px;
    display: inline-flex; align-items: center; gap: 10px; padding: 0 18px;
    border-radius: var(--radius-full); background: var(--wp-surface);
    border: 1.5px solid var(--wp-brand-border); color: var(--wp-soft);
    font-size: .95rem; font-weight: 600; cursor: pointer; text-align: left;
  }
  .blog-toolbar__search svg { width: 20px; height: 20px; color: var(--wp-brand); flex-shrink: 0; }
  .blog-toolbar__search span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .blog-toolbar__filter {
    width: 52px; flex-shrink: 0; min-height: 50px;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: var(--radius-full); background: var(--wp-brand-soft);
    border: 1.5px solid var(--wp-brand-border); color: var(--wp-brand); cursor: pointer;
  }
  .blog-toolbar__filter svg { width: 22px; height: 22px; }

  /* Cookie : on le remonte au-dessus de la toolbar du blog (bannière + bouton
     réouverture) pour que la toolbar reste visible et devant. */
  .iliade-cc { bottom: calc(76px + env(safe-area-inset-bottom, 0px)) !important; }
  .iliade-cc-reopen { bottom: calc(76px + env(safe-area-inset-bottom, 0px)) !important; }
}

/* ---- « Charger plus » (scroll infini) ---- */
.blog-loadmore { display: flex; justify-content: center; margin-top: clamp(var(--space-8), 4vw, var(--space-12)); }
.blog-loadmore.is-loading .blog-loadmore__btn { opacity: .7; pointer-events: none; }

/* ==========================================================
   SINGLE v2 — hero large + contenu + sidebar sticky
   ========================================================== */
.single-hero .wp-breadcrumbs { margin-bottom: var(--space-4); }
.single-hero__title { max-width: 940px; }
.single-hero__figure { margin-top: clamp(var(--space-8), 4vw, var(--space-12)); width: 100%; }
.single-hero__figure img { width: 100%; height: auto; display: block; }

.single-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(300px, 27vw, 344px);
  gap: clamp(var(--space-8), 4vw, var(--space-16));
  align-items: start;
  padding-block: clamp(var(--space-6), 3vw, var(--space-10)) 0;
}
.single-main { min-width: 0; }
.single-main .prose { padding-top: 0; max-width: 760px; }

.single-aside {
  position: sticky;
  top: var(--wp-sticky-top, 96px);
  display: flex; flex-direction: column; gap: var(--space-5);
}
.aside-card {
  border: 1px solid var(--wp-line); border-radius: var(--radius-lg);
  background: var(--wp-surface); padding: var(--space-6); box-shadow: var(--shadow-xs);
}
.aside-card__eyebrow {
  display: block; margin-bottom: var(--space-4);
  font-size: .72rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--wp-brand);
}
.aside-tools__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.aside-tools__list a { display: block; padding: var(--space-3); border-radius: var(--radius-sm); text-decoration: none; transition: background var(--duration) var(--ease); }
.aside-tools__list a:hover { background: var(--wp-brand-soft); }
.aside-tools__name { display: block; color: var(--wp-ink); font-weight: 600; font-size: .95rem; }
.aside-tools__desc { display: block; color: var(--wp-muted); font-size: .82rem; margin-top: 1px; }
.aside-tools__all { display: inline-flex; align-items: center; gap: 6px; margin-top: var(--space-4); color: var(--wp-brand); font-weight: 600; font-size: .9rem; text-decoration: none; transition: gap var(--duration) var(--ease); }
.aside-tools__all:hover { gap: 10px; }
.aside-related__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--space-4); }
.aside-related__list a { display: flex; gap: var(--space-3); align-items: center; text-decoration: none; }
.aside-related__thumb { flex: 0 0 56px; }
.aside-related__thumb img { width: 56px; height: 56px; object-fit: cover; border-radius: var(--radius-sm); display: block; }
.aside-related__t { color: var(--wp-ink); font-weight: 600; font-size: .9rem; line-height: 1.35; }
.aside-related__list a:hover .aside-related__t { color: var(--wp-brand); }
.aside-promo { background: linear-gradient(150deg, var(--wp-brand-soft), var(--wp-gold-light)); border-color: var(--wp-gold-border); text-align: center; }
.aside-promo__title { margin: 0 0 var(--space-2); font-size: 1.15rem; }
.aside-promo p { margin: 0 0 var(--space-4); color: var(--wp-soft); font-size: .9rem; }
.aside-promo__btn { width: 100%; justify-content: center; }

@media (max-width: 980px) {
  .single-layout { grid-template-columns: 1fr; }
  .single-aside { position: static; }
}

/* ---- Carrousel d'outils (fin d'article) ---- */
.wp-carousel-section { margin-top: clamp(var(--space-10), 5vw, var(--space-16)); }
.wp-carousel__head { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--space-4); margin-bottom: clamp(var(--space-5), 3vw, var(--space-8)); }
.wp-carousel__title { margin: var(--space-1) 0 0; font-size: clamp(1.4rem, 3vw, 2rem); }
.wp-carousel__nav { display: flex; gap: var(--space-2); flex: 0 0 auto; }
.wp-carousel__btn {
  width: 44px; height: 44px; flex: 0 0 auto; display: inline-flex; align-items: center; justify-content: center;
  border-radius: 50%; border: 1px solid var(--wp-line-strong); background: var(--wp-surface); color: var(--wp-ink);
  cursor: pointer; transition: all var(--duration) var(--ease);
}
.wp-carousel__btn:hover:not(:disabled) { border-color: var(--wp-brand); color: var(--wp-brand); }
.wp-carousel__btn:disabled { opacity: .35; cursor: default; }
.wp-carousel--static .wp-carousel__nav { display: none; }
.wp-carousel__track {
  display: flex; gap: var(--space-4); overflow-x: auto;
  scroll-snap-type: x mandatory; scrollbar-width: none; -ms-overflow-style: none;
  padding: 4px 4px var(--space-3); margin-inline: -4px;
}
.wp-carousel__track::-webkit-scrollbar { display: none; }
.wp-carousel__card {
  flex: 0 0 244px; scroll-snap-align: start; display: flex; flex-direction: column; gap: 6px;
  padding: var(--space-6); border-radius: var(--radius-lg); border: 1px solid var(--wp-line);
  background: var(--wp-surface); text-decoration: none; box-shadow: var(--shadow-xs);
  transition: transform var(--duration-lg) var(--ease), box-shadow var(--duration-lg) var(--ease), border-color var(--duration) var(--ease);
}
.wp-carousel__card:hover { transform: translateY(-4px); box-shadow: var(--shadow-md); border-color: var(--wp-brand-border); }
.wp-carousel__card-name { color: var(--wp-ink); font-weight: 700; font-size: 1.05rem; }
.wp-carousel__card-desc { color: var(--wp-soft); font-size: .88rem; line-height: 1.5; flex: 1; }
.wp-carousel__card-go { display: inline-flex; align-items: center; gap: 6px; margin-top: var(--space-3); color: var(--wp-brand); font-weight: 600; font-size: .85rem; }
@media (max-width: 600px) {
  .wp-carousel__card { flex-basis: 78vw; max-width: 300px; }
  .wp-carousel__nav { display: none; }
}

/* Variante carte ARTICLE (carrousel « articles similaires ») */
.wp-carousel__card--post { padding: 0; overflow: hidden; }
.wp-carousel__card--post .wp-cpost-thumb { display: block; aspect-ratio: 16 / 10; background: var(--wp-surface-2); overflow: hidden; }
.wp-carousel__card--post .wp-cpost-thumb img { width: 100%; height: 100%; object-fit: cover; transition: transform var(--duration-lg) var(--ease); }
.wp-carousel__card--post:hover .wp-cpost-thumb img { transform: scale(1.05); }
.wp-carousel__card--post .wp-cpost-body { display: flex; flex-direction: column; gap: 6px; padding: var(--space-5); }
.wp-carousel__card--post .wp-cpost-title { color: var(--wp-ink); font-weight: 700; font-size: 1rem; line-height: 1.3; }
.wp-carousel__card--post .wp-cpost-meta { color: var(--wp-muted); font-size: .8rem; }

/* + de respiration entre la grille et la barre de filtres */
.blog-filters + .post-grid,
.post-grid { margin-top: 0; }

/* ==========================================================
   SOMMAIRE D'ARTICLE — accordéon (haut colonne gauche)
   Ouvert par défaut sur desktop (script inline), fermé sur mobile.
   ========================================================== */
.wp-toc {
  margin: 0 0 clamp(var(--space-6), 3vw, var(--space-8));
  border: 1px solid var(--wp-line);
  border-radius: var(--radius-md);
  background: var(--wp-surface);
  overflow: hidden;
}
.wp-toc__summary {
  list-style: none; cursor: pointer;
  display: flex; align-items: center; gap: 9px;
  padding: 12px 16px;
  font-size: .8rem; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
  color: var(--wp-soft);
  -webkit-user-select: none; user-select: none;
}
.wp-toc__summary::-webkit-details-marker { display: none; }
.wp-toc__summary:hover { color: var(--wp-brand); }
.wp-toc__ico { display: inline-flex; flex-shrink: 0; color: var(--wp-brand); }
.wp-toc__ico svg { width: 17px; height: 17px; }
.wp-toc__label { flex: 1; }
.wp-toc__chev { display: inline-flex; color: var(--wp-soft); transition: transform .25s var(--ease); }
.wp-toc__chev svg { width: 16px; height: 16px; }
.wp-toc[open] .wp-toc__chev { transform: rotate(180deg); color: var(--wp-brand); }

.wp-toc__nav { padding: 0 16px 14px; }
.wp-toc[open] .wp-toc__nav { animation: wpTocReveal .26s var(--ease); }
@keyframes wpTocReveal { from { opacity: 0; transform: translateY(-5px); } to { opacity: 1; transform: none; } }
.wp-toc__list {
  list-style: none; margin: 0; padding: 10px 0 0;
  counter-reset: wptoc; border-top: 1px solid var(--wp-line);
}
.wp-toc__item { margin: 0; }
.wp-toc__item a {
  display: block; padding: 8px 10px; border-radius: var(--radius-sm);
  color: var(--wp-soft); text-decoration: none; line-height: 1.4;
  font-family: var(--font-sans); font-weight: 600; font-size: .95rem;
  transition: background var(--duration) var(--ease), color var(--duration) var(--ease);
}
.wp-toc__item a:hover { color: var(--wp-brand); }
.wp-toc__item a.is-active { color: var(--wp-brand); font-weight: 700; }
.wp-toc__item--h2 > a.is-active::before { color: var(--wp-brand); }
.wp-toc__item--h2 > a { counter-increment: wptoc; }
.wp-toc__item--h2 > a::before { content: counter(wptoc) ". "; color: var(--wp-brand); font-weight: 700; }
.wp-toc__item--h3 > a {
  margin-left: 24px; font-weight: 500; font-size: .9rem; color: var(--wp-muted); padding-top: 6px; padding-bottom: 6px;
}
.wp-toc__item--h3 > a::before { content: "–"; color: var(--wp-brand); opacity: .55; margin-right: 7px; }

/* Ancres : décalage sous le header sticky */
.prose h2, .prose h3 { scroll-margin-top: 96px; }
