/*
Theme Name: Wistrow Ressources
Theme URI: https://wistrow.fr/ressources/
Author: Wistrow
Author URI: https://wistrow.fr
Description: Thème du blog Ressources de Wistrow, agence de marketing industriel et technologique B2B. Reprend l'en-tête, le pied de page et la charte de wistrow.fr. Crée à l'activation les 4 rubriques (catégories) et les formats (étiquettes).
Version: 1.2.1
Requires at least: 6.2
Tested up to: 6.8
Requires PHP: 7.4
License: Propriétaire — Wistrow
Text Domain: wistrow
*/

/* La base (couleurs, typographie, en-tête, pied de page, boutons, cartes) est dans assets/css/site.css,
   identique au site principal. Ce fichier ne contient que ce qui est propre au blog. */

.screen-reader-text { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(1px, 1px, 1px, 1px); white-space: nowrap; }

/* Barre de progression de lecture */
.w-progress { position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 150; pointer-events: none; }
.w-progress span { display: block; height: 100%; width: 0; background: var(--w-red); }
.admin-bar .w-progress { top: 32px; }
.admin-bar .w-header { top: 32px; }
@media (max-width: 782px) { .admin-bar .w-progress, .admin-bar .w-header { top: 46px; } }

/* ---------- En-têtes de page du blog ---------- */
.w-blog-hero { padding: 72px 0 68px; }
.w-blog-hero h1 { font-size: clamp(30px, 4vw, 50px); }

/* ---------- Filtres ---------- */
.w-filters { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 48px; padding-bottom: 28px; border-bottom: 1px solid var(--w-line); }
.w-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.w-chip { display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; font-size: 13.5px; font-weight: 600; color: var(--w-text); background: var(--w-white); border: 1px solid var(--w-line); transition: border-color 0.2s, color 0.2s, background 0.2s; }
.w-chip:hover { border-color: var(--w-black); color: var(--w-black); }
.w-chip.is-active { background: var(--w-black); border-color: var(--w-black); color: #fff; }
.w-chip__count { font-size: 11px; font-weight: 700; color: var(--w-stone); }
.w-chip.is-active .w-chip__count { color: var(--w-red-soft); }

.w-search { display: flex; align-items: stretch; min-width: 300px; background: var(--w-white); border: 1px solid var(--w-line); }
.w-search:focus-within { border-color: var(--w-red); }
.w-search input { flex-grow: 1; border: 0; background: transparent; padding: 11px 14px; font-family: inherit; font-size: 14px; color: var(--w-black); min-width: 0; }
.w-search input:focus { outline: none; }
.w-search button { border: 0; background: var(--w-black); color: #fff; padding: 0 16px; cursor: pointer; display: flex; align-items: center; }
.w-search button:hover { background: var(--w-red); }
.w-404-search .w-search { max-width: 460px; margin: 0 auto; }

/* ---------- Cartes d'articles ---------- */
.w-post-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px 24px; }
.w-post-card { display: flex; flex-direction: column; background: var(--w-white); border: 1px solid var(--w-line); transition: border-color 0.2s, transform 0.2s, box-shadow 0.2s; }
.w-post-card:hover { border-color: var(--w-red); transform: translateY(-3px); box-shadow: 0 16px 36px rgba(233, 32, 79, 0.08); }
.w-post-card__media { display: block; aspect-ratio: 16 / 10; overflow: hidden; background: var(--w-black); }
.w-post-card__media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.4s ease; }
.w-post-card:hover .w-post-card__media img { transform: scale(1.03); }
.w-post-card__placeholder { position: relative; display: flex; align-items: flex-end; width: 100%; height: 100%; padding: 22px; overflow: hidden;
  background: radial-gradient(circle at 85% 10%, rgba(233, 32, 79, 0.35) 0%, transparent 55%), linear-gradient(rgba(255,255,255,0.05) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,0.05) 1px, transparent 1px), var(--w-black);
  background-size: auto, 40px 40px, 40px 40px, auto; }
.w-post-card__placeholder span { display: inline-flex; align-items: center; gap: 10px; color: #fff; font-size: 13px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.14em; }
.w-post-card__placeholder span::before { content: ''; width: 9px; height: 9px; background: var(--w-red); }
.w-post-card__body { display: flex; flex-direction: column; flex-grow: 1; padding: 26px 26px 22px; }
.w-post-card__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-bottom: 14px; }
.w-post-card__cat { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.12em; color: var(--w-red); }
.w-post-card__format { font-size: 11px; font-weight: 600; padding: 3px 8px; border: 1px solid var(--w-line); color: var(--w-muted); }
.w-post-card__title { font-size: 19px; line-height: 1.32; margin-bottom: 10px; }
.w-post-card__title a:hover { color: var(--w-red); }
.w-post-card__excerpt { font-size: 14px; color: var(--w-muted); line-height: 1.7; flex-grow: 1; }
.w-post-card__foot { display: flex; justify-content: space-between; gap: 10px; margin-top: 20px; padding-top: 16px; border-top: 1px solid var(--w-line); font-size: 12px; color: var(--w-stone); }

.w-post-card--featured { flex-direction: row; margin-bottom: 40px; }
.w-post-card--featured .w-post-card__media { flex: 0 0 56%; aspect-ratio: auto; min-height: 380px; }
.w-post-card--featured .w-post-card__body { padding: 44px 40px; justify-content: center; }
.w-post-card--featured .w-post-card__title { font-size: clamp(24px, 2.4vw, 32px); line-height: 1.2; margin-bottom: 16px; }
.w-post-card--featured .w-post-card__excerpt { font-size: 15.5px; flex-grow: 0; }
.w-post-card--featured .w-post-card__foot { margin-top: 28px; }

.w-empty { padding: 40px 0; max-width: 680px; }

/* ---------- Pagination ---------- */
.w-pagination { margin-top: 56px; }
.w-pagination .nav-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.w-pagination .page-numbers { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; height: 44px; padding: 0 14px; border: 1px solid var(--w-line); background: var(--w-white); font-size: 14px; font-weight: 600; }
.w-pagination .page-numbers.current { background: var(--w-black); border-color: var(--w-black); color: #fff; }
.w-pagination a.page-numbers:hover { border-color: var(--w-red); color: var(--w-red); }
.w-pagination .dots { border: 0; background: none; }

/* ---------- Newsletter ---------- */
.w-newsletter { background: var(--w-white); border-top: 1px solid var(--w-line); padding: 88px 0; }
.w-newsletter__inner { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.w-newsletter__form { background: var(--w-cream); border: 1px solid var(--w-line); padding: 32px; }

/* ---------- Article ---------- */
.w-article-hero { padding: 72px 0 64px; }
.w-article-hero h1 { font-size: clamp(30px, 4vw, 52px); max-width: 960px; }
.w-article-hero__tags { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; margin-bottom: 18px; }
.w-article-hero__tags .w-eyebrow { margin-bottom: 0; }
.w-article-hero__format { font-size: 11.5px; font-weight: 600; padding: 4px 10px; border: 1px solid rgba(255,255,255,0.25); color: rgba(255,255,255,0.8); }
.w-article-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 26px; margin-top: 30px; padding-top: 24px; border-top: 1px solid rgba(255,255,255,0.12); font-size: 13.5px; color: rgba(255,255,255,0.6); }
.w-article-meta__author { display: inline-flex; align-items: center; gap: 12px; color: #fff; font-weight: 600; }
.w-avatar { border-radius: 50%; }
.w-article-cover { margin: -36px auto 0; position: relative; z-index: 2; }
.w-article-cover img { width: 100%; height: auto; aspect-ratio: 1600 / 840; object-fit: cover; }
.w-article-cover figcaption { font-size: 12.5px; color: var(--w-stone); margin-top: 10px; }

.w-article-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 64px; padding-top: 64px; padding-bottom: 96px; }
.w-article-aside { position: relative; }
.w-article-aside > * { position: sticky; top: calc(var(--w-header-h) + 32px); }
.w-article-aside > .w-share { position: static; margin-top: 28px; }
.w-toc__title { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.14em; color: var(--w-stone); margin-bottom: 14px; }
.w-toc ol { list-style: none; margin: 0; padding: 0; border-left: 2px solid var(--w-line); }
.w-toc li { margin: 0; }
.w-toc a { display: block; padding: 7px 0 7px 16px; margin-left: -2px; border-left: 2px solid transparent; font-size: 13.5px; line-height: 1.45; color: var(--w-muted); transition: color 0.2s, border-color 0.2s; }
.w-toc a:hover { color: var(--w-black); }
.w-toc a.is-active { color: var(--w-black); font-weight: 600; border-left-color: var(--w-red); }
.w-share { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; }
.w-share a, .w-share button { font-family: inherit; font-size: 13.5px; font-weight: 600; color: var(--w-black); background: none; border: 0; padding: 0; cursor: pointer; border-bottom: 1.5px solid var(--w-red); }
.w-share button.is-copied { border-bottom-color: var(--w-black); }

/* ---------- Contenu rédigé (éditeur WordPress) ---------- */
.w-prose { max-width: 740px; font-size: 17.5px; line-height: 1.85; color: var(--w-ink); }
.w-prose--center { margin: 0 auto; }
.w-prose > * + * { margin-top: 1.15em; }
.w-prose h2 { font-size: clamp(24px, 2.4vw, 31px); line-height: 1.25; margin-top: 2.1em; margin-bottom: 0.2em; scroll-margin-top: calc(var(--w-header-h) + 24px); }
.w-prose h3 { font-size: 21px; line-height: 1.35; margin-top: 1.8em; scroll-margin-top: calc(var(--w-header-h) + 24px); }
.w-prose h4 { font-size: 17.5px; margin-top: 1.6em; }
.w-prose p { margin: 0; }
.w-prose > p:first-child { font-size: 19.5px; line-height: 1.75; color: var(--w-black); }
.w-prose a { color: var(--w-black); font-weight: 600; text-decoration: underline; text-decoration-color: var(--w-red); text-decoration-thickness: 2px; text-underline-offset: 3px; }
.w-prose a:hover { color: var(--w-red); }
.w-prose strong { color: var(--w-black); }
.w-prose ul, .w-prose ol { padding-left: 0; }
.w-prose ul > li { position: relative; padding-left: 26px; margin-top: 0.5em; list-style: none; }
.w-prose ul > li::before { content: ''; position: absolute; left: 2px; top: 0.72em; width: 7px; height: 7px; background: var(--w-red); }
.w-prose ol { counter-reset: w-ol; }
.w-prose ol > li { position: relative; padding-left: 38px; margin-top: 0.6em; list-style: none; counter-increment: w-ol; }
.w-prose ol > li::before { content: counter(w-ol, decimal-leading-zero); position: absolute; left: 0; top: 0.05em; font-size: 14px; font-weight: 700; color: var(--w-red); }
.w-prose blockquote, .w-prose .wp-block-quote { margin: 2em 0; padding: 6px 0 6px 26px; border-left: 3px solid var(--w-red); font-size: 20px; line-height: 1.6; font-weight: 500; color: var(--w-black); }
.w-prose blockquote cite, .w-prose .wp-block-quote cite { display: block; margin-top: 12px; font-size: 13.5px; font-style: normal; font-weight: 600; color: var(--w-stone); }
.w-prose .wp-block-pullquote { margin: 2.4em 0; padding: 34px 0; border-top: 2px solid var(--w-black); border-bottom: 2px solid var(--w-black); text-align: left; }
.w-prose .wp-block-pullquote blockquote { border: 0; padding: 0; margin: 0; font-size: clamp(22px, 2.4vw, 28px); line-height: 1.4; font-weight: 600; }
.w-prose figure { margin: 2em 0; }
.w-prose img { height: auto; }
.w-prose figcaption, .w-prose .wp-element-caption { font-size: 13px; color: var(--w-stone); margin-top: 10px; text-align: left; }
.w-prose hr { border: 0; height: 1px; background: var(--w-line); margin: 2.6em 0; }
.w-prose code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 0.88em; background: var(--w-white); border: 1px solid var(--w-line); padding: 1px 6px; }
.w-prose pre { background: var(--w-black); color: #f4f2ee; padding: 22px; overflow-x: auto; font-size: 14px; }
.w-prose pre code { background: none; border: 0; padding: 0; color: inherit; }
.w-prose table, .w-prose .wp-block-table table { width: 100%; border-collapse: collapse; font-size: 15px; line-height: 1.55; }
.w-prose .wp-block-table { overflow-x: auto; }
.w-prose th { text-align: left; background: var(--w-black); color: #fff; font-weight: 600; padding: 12px 14px; }
.w-prose td { padding: 12px 14px; border-bottom: 1px solid var(--w-line); vertical-align: top; }
.w-prose tr:nth-child(even) td { background: var(--w-white); }
.w-prose .wp-block-button__link { display: inline-flex; align-items: center; gap: 10px; background: var(--w-red); color: #fff; text-decoration: none; font-size: 14px; font-weight: 700; padding: 16px 28px; border-radius: 0; }
.w-prose .wp-block-button__link::after { content: '→'; }
.w-prose .wp-block-button__link:hover { background: var(--w-red-dark); color: #fff; }
.w-prose .is-style-outline .wp-block-button__link { background: none; color: var(--w-black); border: 1.5px solid var(--w-black); }
.w-prose .wp-block-embed iframe { width: 100%; }
.w-prose .wp-block-embed.is-type-video .wp-block-embed__wrapper { position: relative; aspect-ratio: 16 / 9; }
.w-prose .wp-block-embed.is-type-video iframe { position: absolute; inset: 0; height: 100%; }
.w-prose .alignwide { margin-left: -60px; margin-right: -60px; max-width: none; }
.w-prose .alignleft { float: left; margin: 0.3em 1.6em 1em 0; max-width: 50%; }
.w-prose .alignright { float: right; margin: 0.3em 0 1em 1.6em; max-width: 50%; }
.w-prose .aligncenter { margin-left: auto; margin-right: auto; }

/* Encadré « À retenir » : bloc Groupe avec la classe CSS w-callout */
.w-prose .w-callout { background: var(--w-white); border: 1px solid var(--w-line); border-left: 3px solid var(--w-red); padding: 26px 28px; margin: 2em 0; }
.w-prose .w-callout > :first-child { margin-top: 0; }

.w-article-tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 3em; padding-top: 28px; border-top: 1px solid var(--w-line); }
.w-article-tags .w-tag { text-decoration: none; font-weight: 600; color: var(--w-text); }
/* Bloc « À propos de Wistrow » en bas d'article */
.w-about { margin-top: 2.4em; padding: 32px; background: var(--w-black); color: #fff; border-left: 3px solid var(--w-red); }
.w-about__head { display: flex; align-items: center; gap: 16px; margin-bottom: 16px; }
.w-about__mark { flex-shrink: 0; display: inline-flex; align-items: center; justify-content: center; width: 52px; height: 52px; background: var(--w-red); color: #fff; font-size: 24px; font-weight: 700; line-height: 1; }
.w-about__eyebrow { margin: 0 !important; font-size: 12px; font-weight: 600; letter-spacing: .12em; text-transform: uppercase; color: rgba(255,255,255,.6); }
.w-about__name { margin: 2px 0 0 !important; font-size: 20px; font-weight: 700; color: #fff; }
.w-prose .w-about__text { margin: 0 0 22px; font-size: 15.5px; line-height: 1.75; color: rgba(255,255,255,.82); }
.w-prose .w-about__btn { display: inline-flex; align-items: center; gap: 10px; padding: 12px 20px; background: var(--w-red); color: #fff; font-size: 14.5px; font-weight: 600; text-decoration: none; transition: background .2s ease; }
.w-prose .w-about__btn:hover, .w-prose .w-about__btn:focus-visible { background: #c8173f; color: #fff; }
.w-article-meta__mark { display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; background: var(--w-red); color: #fff; font-size: 15px; font-weight: 700; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .w-post-grid { grid-template-columns: repeat(2, 1fr); }
  .w-article-layout { grid-template-columns: 1fr; gap: 0; }
  .w-article-aside { display: none; }
  .w-prose { margin: 0 auto; }
  .w-prose .alignwide { margin-left: 0; margin-right: 0; }
}
@media (max-width: 860px) {
  .w-post-card--featured { flex-direction: column; }
  .w-post-card--featured .w-post-card__media { flex: none; min-height: 0; aspect-ratio: 16 / 10; }
  .w-post-card--featured .w-post-card__body { padding: 28px 24px; }
  .w-newsletter__inner { grid-template-columns: 1fr; gap: 28px; }
  .w-filters { flex-direction: column; align-items: stretch; }
  .w-search { min-width: 0; }
}
@media (max-width: 640px) {
  .w-post-grid { grid-template-columns: 1fr; }
  .w-filters { display: block; }
  .w-filters .w-search { margin-top: 16px; }
  .w-chips { flex-wrap: nowrap; overflow-x: auto; margin: 0 calc(-1 * var(--w-pad)); padding: 0 var(--w-pad) 4px; scrollbar-width: none; }
  .w-chip { flex-shrink: 0; }
  .w-article-cover { margin-top: 0; padding: 0; }
  .w-article-layout { padding-top: 40px; padding-bottom: 64px; }
  .w-prose { font-size: 16.5px; }
  .w-prose > p:first-child { font-size: 18px; }
  .w-prose .alignleft, .w-prose .alignright { float: none; margin: 1.5em 0; max-width: 100%; }
  .w-about { padding: 26px 22px; }
  .w-newsletter { padding: 64px 0; }
  .w-newsletter__form { padding: 22px; }
}
