/* ===================================================================
   BLOG : liste, carte d'article, article, pages génériques (.rte),
   pagination. .rte reste après .article-body (page.php porte les deux).
   =================================================================== */
.post-feature{display:grid;grid-template-columns:1.1fr 1fr;gap:clamp(28px,4vw,48px);align-items:center;
  background:#fff;border:1px solid var(--line-soft);border-radius:22px;overflow:hidden}
.post-feature .photo{height:100%;min-height:340px;border-radius:0}
.post-feature .pf-body{padding:clamp(28px,4vw,44px) clamp(28px,4vw,44px) clamp(28px,4vw,44px) 0}
.post-feature.noimg .pf-body{padding-left:clamp(28px,4vw,44px)}
.cat-tag{display:inline-flex;align-items:center;gap:7px;font-size:12px;font-weight:700;letter-spacing:.06em;
  text-transform:uppercase;color:var(--red-deep);background:var(--red-soft);padding:6px 12px;border-radius:999px}
.cat-tag.blue{color:var(--blue-texte);background:var(--blue-soft)}
.post-feature h2{font-size:clamp(24px,3.2vw,34px);font-weight:800;margin:16px 0 0;line-height:1.1}
.post-feature p{color:var(--ink-soft);font-size:16px;margin-top:14px}
.post-meta{display:flex;align-items:center;gap:16px;margin-top:20px;font-size:13.5px;color:var(--ink-faint);font-weight:600}
.post-meta .m{display:flex;align-items:center;gap:6px}
.post-meta .m svg{width:15px;height:15px}
.post-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:22px}
.post-card{background:#fff;border:1px solid var(--line-soft);border-radius:18px;overflow:hidden;
  display:flex;flex-direction:column;transition:transform .2s,box-shadow .2s}
.post-card:hover{transform:translateY(-4px);box-shadow:var(--shadow-md)}
.post-card .photo{height:184px;border-radius:0}
.post-card .pc-body{padding:22px 22px 24px;display:flex;flex-direction:column;flex:1}
.post-card :is(h2,h3){font-size:18.5px;font-weight:700;margin:13px 0 0;line-height:1.25}
.post-card p{font-size:14px;color:var(--ink-faint);margin-top:9px;line-height:1.55;flex:1}
.post-card .post-meta{margin-top:18px;font-size:12.5px}
.post-card .pc-tag{align-self:flex-start}

/* ===================================================================
   ARTICLE
   =================================================================== */
.article{max-width:760px;margin:0 auto}
.article-hero{margin-bottom:clamp(28px,4vw,40px)}
.article-hero .photo{height:clamp(280px,40vw,440px)}
.article-body{font-size:17px;color:var(--ink-2);line-height:1.75}
.article-body h2{font-size:clamp(22px,3vw,28px);font-weight:800;margin:36px 0 14px}
.article-body p{margin-top:16px}
.article-body ul{margin:16px 0 16px 4px;padding-left:22px;display:flex;flex-direction:column;gap:10px}
.article-body li{padding-left:4px}
.article-body strong{color:var(--ink)}
.article-body blockquote{margin:28px 0;padding:20px 26px;background:var(--paper-2);border-left:4px solid var(--red);
  border-radius:0 12px 12px 0;font-size:18px;font-weight:600;color:var(--ink)}
.article-back{display:inline-flex;align-items:center;gap:8px;font-weight:700;font-size:14.5px;color:var(--red-deep);margin-bottom:24px;white-space:nowrap}
.article-back svg{width:16px;height:16px}
.article-share{display:flex;align-items:center;gap:14px;margin-top:36px;padding-top:24px;border-top:1px solid var(--line)}
.article-share .lbl{font-size:13.5px;font-weight:700;color:var(--ink-faint)}

@media (max-width:880px){
  .post-feature{grid-template-columns:1fr}
  .post-feature .photo{min-height:240px}
  .post-feature .pf-body{padding:0 28px 32px}
  .post-feature.noimg .pf-body{padding-top:32px}
}
@media (max-width:680px){
  .post-grid{grid-template-columns:1fr}
}

/* -- RTE pages génériques -- */
.rte h2{font-size:clamp(22px,3vw,28px);font-weight:800;margin:32px 0 12px}
.rte h3{font-size:20px;font-weight:700;margin:24px 0 10px}
.rte a{color:var(--red-deep);font-weight:600}
.rte a:hover{text-decoration:underline}

/* -- Pagination -- */
.pagination-row .nav-links{display:flex;gap:8px;flex-wrap:wrap;align-items:center}
.pagination-row .page-numbers{display:inline-flex;align-items:center;justify-content:center;
  min-width:42px;height:42px;padding:0 12px;border-radius:11px;border:1px solid var(--line);
  background:#fff;font-weight:700;color:var(--ink-2)}
.pagination-row .page-numbers.current{background:var(--red-deep);border-color:var(--red-deep);color:#fff}
.pagination-row .page-numbers:hover{border-color:var(--red);color:var(--red)}
.pagination-row .page-numbers.current:hover{color:#fff}

/* ---------- cartes d'article dans une boucle de requête (gabarits HTML) ----------
   Groupe .post-card dans li.wp-block-post : lien du titre étiré sur la carte. */
.post-grid > .wp-block-post{display:flex;flex-direction:column}
.post-grid > .wp-block-post > .post-card{flex:1 1 auto}
.post-card.wp-block-group{position:relative}
.post-card .wp-block-post-title a{display:inline;color:inherit}
.post-card .wp-block-post-title a::after{content:"";position:absolute;inset:0;z-index:2}
.post-card .wp-block-post-title a:focus-visible{outline:none}
.post-card:has(.wp-block-post-title a:focus-visible){outline:2px solid var(--red);outline-offset:3px}

/* ===================================================================
   GABARITS À BLOCS DU BLOG ET DES PAGES GÉNÉRIQUES (L8)
   templates/home.html, single.html, archive.html, search.html, index.html,
   page.html, 404.html.
   Reprennent le rendu de home.php, single.php, archive.php, index.php,
   page.php et 404.php (supprimés) ; les anciens style="" deviennent des classes.
   =================================================================== */
:root{
  --ic-calendrier:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3' y='4' width='18' height='18' rx='2'/%3E%3Cpath d='M16 2v4M8 2v4M3 10h18'/%3E%3C/svg%3E");
  --ic-utilisateur:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='8' r='4'/%3E%3Cpath d='M4 21a8 8 0 0 1 16 0'/%3E%3C/svg%3E");
  --ic-retour:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m15 6-6 6 6 6'/%3E%3C/svg%3E");
}

/* -- Date et auteur (core/post-date, core/post-author de classe « m ») : icône en masque CSS
   à la place du SVG des gabarits PHP (15 px, gap 6 px de .post-meta .m). -- */
.post-meta .wp-block-post-date.m::before,
.post-meta .wp-block-post-author.m::before{content:"";flex:none;width:15px;height:15px;background:currentColor;
  -webkit-mask:var(--ic-calendrier) center/contain no-repeat;mask:var(--ic-calendrier) center/contain no-repeat}
.post-meta .wp-block-post-author.m::before{-webkit-mask-image:var(--ic-utilisateur);mask-image:var(--ic-utilisateur)}
/* « Par » + nom : core/post-author rend deux <p> (signature, nom) ; on les remet en ligne. */
.post-meta .wp-block-post-author.m{display:flex;flex-wrap:nowrap}
.post-meta .wp-block-post-author__content{display:flex;flex:none}
.post-meta .wp-block-post-author__byline::after{content:"\a0"}
.post-meta .wp-block-post-author__byline,
.post-meta .wp-block-post-author__name{width:auto;margin:0;font-size:inherit;text-wrap:wrap}
/* Méta de l'article dans le hero (ex-style="color:rgba(255,255,255,.7);margin-top:18px" de single.php). */
.page-hero .post-meta.hero-meta{color:rgba(255,255,255,.7);margin-top:18px}

/* -- Article à la une (page des articles) : groupe .post-feature, lien du titre étiré sur la carte
   (l'ancien <a class="post-feature"> entier). -- */
.post-feature.wp-block-group{position:relative}
.post-feature .wp-block-post-title a{display:inline;color:inherit}
.post-feature .wp-block-post-title a::after{content:"";position:absolute;inset:0;z-index:2}
.post-feature .wp-block-post-title a:focus-visible{outline:none}
.post-feature:has(.wp-block-post-title a:focus-visible){outline:2px solid var(--red);outline-offset:3px}
/* En-tête « Tous les articles » (ex-style="margin:… 0 26px" et h2 style="font-size:…" de home.php). */
.sec-head.blog-tous{margin:clamp(40px,5vw,56px) 0 26px}
.sec-head.blog-tous h2{font-size:clamp(24px,3vw,32px)}

/* -- Cartes d'article en boucle de requête (.post-grid) -- */
/* Titre premier enfant de .pc-body (carte sans catégorie : recherche) : la règle du cœur
   :root :where(.is-layout-flow) > :first-child (0,2,0) annulait la marge de .post-card :is(h2,h3) (0,1,1). */
.post-card .pc-body > :is(h2,h3).wp-block-post-title{margin-top:13px}
/* L'extrait est enveloppé dans un div : c'est lui qui pousse la date en bas de carte. */
.post-card .pc-body > .wp-block-post-excerpt{flex:1}
/* Carte sans image : les gabarits PHP gardaient un bloc .photo.has-img vide (184 px, fond sombre). */
.post-grid .post-card.wp-block-group:not(:has(> .photo))::before{content:"";display:block;
  flex:none;height:184px;background:#1a1c20}
/* Pagination (ex-.pagination-row style="margin-top:32px;display:flex;justify-content:center"). */
.wp-block-query > .pagination-row{margin-top:32px;display:flex;justify-content:center}
.wp-block-query:has(> .wp-block-query-no-results) > .pagination-row{display:none}
.pagination-row .wp-block-query-pagination{display:flex;gap:8px;flex-wrap:wrap;align-items:center;margin:0}
.pagination-row .wp-block-query-pagination-numbers{display:flex;gap:8px;flex-wrap:wrap;align-items:center}
.pagination-row .wp-block-query-pagination-previous,
.pagination-row .wp-block-query-pagination-next{display:inline-flex;align-items:center;justify-content:center;
  min-width:42px;height:42px;padding:0 12px;border-radius:11px;border:1px solid var(--line);
  background:#fff;font-weight:700;color:var(--ink-2)}
.pagination-row .wp-block-query-pagination-previous:hover,
.pagination-row .wp-block-query-pagination-next:hover{border-color:var(--red);color:var(--red)}
/* Aucun résultat (ex-<p style="text-align:center;color:var(--ink-soft);padding:40px 0"> d'index.php). */
.wp-block-query-no-results > p.aucun-resultat{text-align:center;color:var(--ink-soft);padding:40px 0;margin:0}

/* -- Article et fiches : lien de retour, image, encart devis -- */
.wp-block-buttons.article-back{display:block;margin:0}
.wp-block-buttons.article-back > .wp-block-button{display:block}
.wp-block-buttons.article-back > .wp-block-button > .wp-block-button__link{display:inline-flex;align-items:center;gap:8px;
  width:auto;font-weight:700;font-size:14.5px;line-height:inherit;color:var(--red-deep);margin-bottom:24px;white-space:nowrap}
.wp-block-buttons.article-back > .wp-block-button > .wp-block-button__link::before{content:"";flex:none;width:16px;height:16px;
  background-color:currentColor;-webkit-mask:var(--ic-retour) center/contain no-repeat;mask:var(--ic-retour) center/contain no-repeat}
.wp-block-buttons.article-back > .wp-block-button > .wp-block-button__link:hover{color:var(--red)}
/* Image de l'article : le bloc image à la une porte lui-même .article-hero (pas de conteneur vide sans image). */
.wp-block-post-featured-image.article-hero{margin:0 0 clamp(28px,4vw,40px);height:clamp(280px,40vw,440px)}
/* Encart devis : sorti de .article-body (le contenu est un core/post-content), mêmes valeurs héritées. */
/* core/post-content est en display:flow-root (cœur) : ses marges extrêmes ne fusionneraient plus avec
   celles de l’image et de l’encart, comme dans l’ancien div.article-body. */
.article > .wp-block-post-content.article-body{display:block}
.article > .article-share{font-size:17px;line-height:1.75;color:var(--ink-2)}
/* Le bouton de l’ancien encart héritait l’interligne de .article-body (1.75). */
.article-share .wp-block-button > .wp-block-button__link{line-height:inherit}
.article-share .lbl{margin:0}

/* -- 404 : boutons centrés (ex-style="justify-content:center" ; .hero-cta garde sa marge de 32 px
   même en premier enfant du .shell). -- */
.wp-block-buttons.hero-cta.actions-404{justify-content:center;margin-top:32px}
