/* =====================================================================
   SHAVAS : blog « Ressources » (accueil, catégories, articles).
   Chargé seulement sur ces pages, après styles.css dont il reprend les variables et les cartes (.press-card).
   ===================================================================== */

/* ---------- commun ---------- */
.blog .breadcrumb { flex-wrap: wrap; }
.blog .breadcrumb a { text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 3px; transition: color .2s, text-decoration-color .2s; }
.blog .breadcrumb a:hover { text-decoration-color: currentColor; }
.blog a.chip { transition: background .2s, color .2s; }
.blog a.chip:hover { background: var(--sh-accent); color: var(--sh-ink); }

/* ---------- accueil et catégories ---------- */
.blog-hero { padding-bottom: clamp(36px, 5vw, 56px); background: radial-gradient(ellipse at 20% 0%, rgba(255,255,255,0.06), transparent 60%); }
.blog-hero h1 { max-width: 980px; text-wrap: balance; }
.blog-hero .lead { max-width: 760px; margin-bottom: 0; }
.blog-list { padding-top: 0; }
.blog-cats { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: clamp(24px, 3vw, 36px); }
.blog-cats a { display: inline-flex; align-items: center; min-height: 38px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--sh-border); font-size: 13.5px; font-weight: 700; color: var(--sh-text-70); transition: background .2s, color .2s, border-color .2s; }
.blog-cats a:hover { color: var(--sh-white); border-color: rgba(255,255,255,0.4); }
.blog-cats a[aria-current="page"] { background: var(--sh-accent); border-color: var(--sh-accent); color: var(--sh-ink); }

.post-card .press-card__media img { width: 100%; height: 100%; object-fit: cover; }
.post-card .press-card__media--type b { font-size: clamp(1.8rem, 1.4rem + 1.4vw, 2.6rem); }
.post-card.press-card:hover .press-card__media img { transform: scale(1.04); }
.post-card h2, .post-card h3 { font-size: 1.2rem; line-height: 1.3; margin: 14px 0 10px; }
.post-card h2 a, .post-card h3 a { transition: color .2s; }
.post-card h2 a:hover, .post-card h3 a:hover { color: var(--sh-accent); }
.post-card .press-card__desc { margin-bottom: 0; }
.post-card .press-card__actions .note { font-size: 12.5px; }

.blog-pagination { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: clamp(36px, 5vw, 56px); }
.blog-pagination .page-numbers { display: inline-flex; align-items: center; justify-content: center; min-width: 44px; height: 44px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--sh-border); font-size: 14px; font-weight: 700; color: var(--sh-text-70); transition: background .2s, color .2s, border-color .2s; }
.blog-pagination a.page-numbers:hover { color: var(--sh-white); border-color: rgba(255,255,255,0.4); }
.blog-pagination .page-numbers.current { background: var(--sh-accent); border-color: var(--sh-accent); color: var(--sh-ink); }
.blog-pagination .page-numbers.dots { border-color: transparent; }

.blog-empty { max-width: 760px; padding: clamp(26px, 4vw, 44px); border: 1px solid var(--sh-border); border-radius: var(--sh-radius-lg); background: var(--sh-surface); }
.blog-empty h2 { font-size: clamp(1.4rem, 1.1rem + 1.2vw, 2rem); margin: 14px 0 12px; }
.blog-empty p { color: var(--sh-text-70); margin-bottom: 22px; }

/* ---------- article : en-tête (texte à gauche, image mise en avant à droite sur ordinateur) ---------- */
.container--post { max-width: 1280px; }
.post-hero { padding: calc(var(--sh-header-h) + clamp(40px, 7vw, 88px)) 0 clamp(36px, 5vw, 64px); background: radial-gradient(ellipse at 20% 0%, rgba(255,255,255,0.06), transparent 60%); }
.post-hero__grid { display: grid; grid-template-columns: minmax(0, 1fr); gap: clamp(28px, 4vw, 60px); align-items: center; }
.post-hero h1 { font-size: clamp(2rem, 1.1rem + 2.7vw, 3.5rem); line-height: 1.07; margin: 18px 0 20px; max-width: 1000px; text-wrap: balance; }
.post-hero .lead { max-width: 780px; }
.post-byline { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; width: fit-content; max-width: 100%; margin-top: 26px; padding: 8px 20px 8px 8px; border: 1px solid var(--sh-border); border-radius: 32px; background: var(--sh-surface); }
.post-byline img { width: 48px; height: 48px; flex: none; border-radius: 50%; object-fit: cover; border: 1.5px solid var(--sh-accent); }
.post-byline__who { font-size: 14.5px; line-height: 1.3; color: var(--sh-text-70); }
.post-byline__who a { font-weight: 700; color: var(--sh-white); transition: color .2s; }
.post-byline__who a:hover { color: var(--sh-accent); }
.post-byline__who small { display: block; font-size: 12.5px; color: var(--sh-text-55); }
/* bouton de contact et pastille LinkedIn : un seul groupe, toujours sur la même ligne que le nom */
.post-byline__who { flex: 1 1 auto; min-width: 0; }
.post-byline__actions { display: inline-flex; flex: none; align-items: center; gap: 10px; margin-left: 2px; }
.post-byline__contact { font-size: 13.5px; white-space: nowrap; }
@media (min-width: 641px) { .post-byline { flex-wrap: nowrap; gap: 10px 12px; padding-right: 9px; } }
/* LinkedIn de l'auteur : pastille ronde, le mot « LinkedIn » reste lu par les lecteurs d'écran */
.post-byline__in { position: relative; display: inline-grid; place-items: center; flex: none; width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--sh-border); color: var(--sh-text-70); transition: color .2s, border-color .2s, background .2s; }
.post-byline__in svg { width: 14px; height: 14px; }
.post-byline__in span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.post-byline__in:hover { color: var(--sh-accent); border-color: rgba(226, 243, 122, 0.6); background: rgba(226, 243, 122, 0.08); }
.post-meta__dates { display: flex; flex-wrap: wrap; gap: 4px 0; margin-top: 16px; font-size: 13.5px; color: var(--sh-text-55); }
.post-meta__dates span + span::before { content: "·"; margin: 0 10px; }
.post-meta__dates sup { font-size: .7em; }
.post-cover { margin: 0; }
.post-cover img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; border-radius: var(--sh-radius-lg); border: 1px solid var(--sh-border); background: var(--sh-surface); }
.post-cover figcaption { margin-top: 10px; font-size: 12.5px; color: var(--sh-text-55); }
@media (min-width: 1024px) {
  .post-hero--media .post-hero__grid { grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr); }
  .post-hero--media h1 { font-size: clamp(2rem, 0.9rem + 2.1vw, 3rem); }
  .post-hero--media .post-cover img { aspect-ratio: 4 / 3; }
}

/* ---------- article : colonne de gauche (sommaire, encart technologie) et corps ---------- */
.post-layout { display: grid; grid-template-columns: 280px minmax(0, 780px); gap: clamp(32px, 5vw, 80px); align-items: start; padding-top: clamp(8px, 2vw, 24px); }
.post-aside { position: sticky; top: calc(var(--sh-header-h) + 26px); display: grid; gap: 26px; }
.post-toc .eyebrow { margin-bottom: 12px; }
.post-toc ol { counter-reset: toc; display: grid; gap: 2px; max-height: calc(100vh - var(--sh-header-h) - 460px); min-height: 150px; overflow-y: auto; }
.post-toc li { counter-increment: toc; }
.post-toc a { display: grid; grid-template-columns: 22px 1fr; gap: 6px; padding: 7px 8px 7px 14px; font-size: 14px; line-height: 1.4; color: var(--sh-text-70); border-left: 1px solid var(--sh-border); transition: color .2s, border-color .2s; }
.post-toc a::before { content: counter(toc); font-size: 12px; font-weight: 700; color: var(--sh-accent); padding-top: 1px; }
.post-toc a:hover { color: var(--sh-white); border-left-color: var(--sh-accent); }
.post-aside__cta { position: relative; overflow: hidden; border: 1px solid var(--sh-border); border-radius: var(--sh-radius-lg); background: #000; transition: border-color .25s; }
.post-aside__cta:hover { border-color: rgba(226, 243, 122, 0.55); }
.post-aside__cta img { width: 100%; height: auto; aspect-ratio: 16 / 9; object-fit: cover; }
.post-aside__cta > div { padding: 4px 18px 18px; }
.post-aside__cta img.post-cta__logo { width: auto; height: 15px; aspect-ratio: auto; object-fit: contain; margin: 6px 0 12px; }
.post-aside__title { font-size: 1.05rem; font-weight: 700; line-height: 1.25; color: var(--sh-white); }
.post-aside__desc { margin-top: 6px; font-size: 13px; line-height: 1.5; color: var(--sh-text-70); }
.post-aside__cta .text-link { margin-top: 14px; font-size: 13.5px; line-height: 1.3; }
.post-aside__cta .text-link::after { content: ""; position: absolute; inset: 0; }

.post-body { font-size: clamp(1.03rem, 0.99rem + 0.2vw, 1.13rem); line-height: 1.72; color: rgba(250, 250, 250, 0.86); overflow-wrap: break-word; }
.post-body > * + * { margin-top: 1.15em; }
.post-body h2 { font-size: clamp(1.5rem, 1.2rem + 1.1vw, 2.1rem); line-height: 1.15; color: var(--sh-white); margin-top: 2.1em; scroll-margin-top: calc(var(--sh-header-h) + 24px); }
.post-body h3 { font-size: clamp(1.18rem, 1.06rem + 0.5vw, 1.42rem); line-height: 1.25; color: var(--sh-white); margin-top: 1.8em; scroll-margin-top: calc(var(--sh-header-h) + 24px); }
.post-body h4 { font-size: 1.08rem; line-height: 1.3; color: var(--sh-white); margin-top: 1.6em; }
.post-body > :first-child { margin-top: 0; }
.post-body strong, .post-body b { color: var(--sh-white); }
.post-body a:not(.cta):not(.text-link):not(.wp-block-button__link) { color: var(--sh-white); text-decoration: underline; text-decoration-color: var(--sh-accent); text-decoration-thickness: 1.5px; text-underline-offset: 3px; transition: color .2s; }
.post-body a:not(.cta):not(.text-link):not(.wp-block-button__link):hover { color: var(--sh-accent); }
.post-body ul, .post-body ol { padding-left: 1.35em; }
.post-body ul { list-style: disc; }
.post-body ol { list-style: decimal; }
.post-body li + li { margin-top: .45em; }
.post-body li::marker { color: var(--sh-accent); font-weight: 700; }
.post-body li > ul, .post-body li > ol { margin-top: .45em; }
.post-body blockquote { margin-inline: 0; padding: 6px 0 6px 24px; border-left: 2px solid var(--sh-accent); font-size: 1.12em; line-height: 1.5; color: var(--sh-white); }
.post-body blockquote > * + * { margin-top: .7em; }
.post-body blockquote cite { display: block; font-size: .78em; font-style: normal; color: var(--sh-text-55); }
.post-body figure { margin-inline: 0; }
.post-body img { height: auto; border-radius: 12px; }
.post-body figcaption { margin-top: 8px; font-size: 13px; line-height: 1.45; color: var(--sh-text-55); }
.post-body .aligncenter, .post-body .aligncenter img { margin-inline: auto; }
.post-body hr { border: 0; border-top: 1px solid var(--sh-border); margin-block: 2.2em; }
.post-body sup { font-size: .7em; }
.post-body code { font-size: .9em; padding: 2px 6px; border-radius: 6px; background: var(--sh-surface-hover); }
.post-body .wp-block-table, .post-body .table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.post-body table { width: 100%; border-collapse: collapse; font-size: .9em; line-height: 1.45; }
.post-body th, .post-body td { padding: 12px 14px; border-bottom: 1px solid var(--sh-border); text-align: left; vertical-align: top; }
.post-body thead th { font-size: 12px; letter-spacing: .5px; text-transform: uppercase; color: var(--sh-white); background: var(--sh-surface); border-bottom-color: rgba(255,255,255,0.28); }
.post-body tbody th { color: var(--sh-white); }
.post-body .wp-block-embed__wrapper { position: relative; aspect-ratio: 16 / 9; }
.post-body .wp-block-embed__wrapper iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; border-radius: 12px; }
.post-body iframe, .post-body video { max-width: 100%; }
.post-body .wp-block-buttons { display: flex; flex-wrap: wrap; gap: 12px; }
.post-body .wp-block-button__link { display: inline-flex; align-items: center; min-height: 48px; padding: 0 24px; border-radius: 999px; background: var(--sh-accent); color: var(--sh-ink); font-size: 15px; font-weight: 700; text-decoration: none; }
.post-body .wp-block-button__link:hover { color: var(--sh-ink); filter: brightness(1.06); }
.post-body .wp-block-columns { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 24px; }
.post-body .wp-block-columns > * { margin-top: 0; }
/* encadré « à retenir » : bloc Groupe ou paragraphe portant la classe a-retenir */
.post-body .a-retenir { padding: 20px 24px; border: 1px solid rgba(226, 243, 122, 0.4); border-radius: var(--sh-radius-lg); background: var(--sh-accent-soft); color: var(--sh-white); }
.post-body .a-retenir > * + * { margin-top: .7em; }
/* encart « Découvrir la technologie SHAVAS », posé par le thème après chaque dixième paragraphe */
.post-body .post-cta { display: grid; grid-template-columns: minmax(0, 1fr) 42%; align-items: center; margin-block: 2.2em; overflow: hidden; border: 1px solid var(--sh-border); border-radius: var(--sh-radius-lg); background: #000; }
.post-body .post-cta__text { padding: clamp(18px, 2.4vw, 26px); }
.post-body .post-cta img.post-cta__logo { display: block; order: 0; width: auto; height: 20px; min-height: 0; aspect-ratio: auto; object-fit: contain; border-radius: 0; -webkit-mask-image: none; mask-image: none; }
.post-body .post-cta__title { margin-top: 14px; font-size: 1.12em; font-weight: 700; line-height: 1.25; color: var(--sh-white); }
.post-body .post-cta__text p + p { margin-top: 8px; font-size: .95em; line-height: 1.5; color: var(--sh-white); }
.post-body .post-cta .cta { margin-top: 16px; white-space: normal; text-align: left; line-height: 1.25; }
.post-body .post-cta img { width: 100%; height: 100%; min-height: 150px; object-fit: cover; border-radius: 0; -webkit-mask-image: linear-gradient(90deg, transparent, #000 34%); mask-image: linear-gradient(90deg, transparent, #000 34%); }
/* questions fréquentes : <details><summary><h3>Question</h3></summary>… */
.post-body details { border: 1px solid var(--sh-border); border-radius: 18px; background: var(--sh-surface); transition: background .25s, border-color .25s; }
.post-body details + details { margin-top: 10px; }
.post-body details[open] { background: var(--sh-surface-hover); border-color: rgba(255,255,255,0.22); }
.post-body summary { display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 16px 20px; cursor: pointer; list-style: none; font-weight: 700; line-height: 1.35; color: var(--sh-white); }
.post-body summary::-webkit-details-marker { display: none; }
.post-body summary::after { content: "+"; flex: none; font-size: 1.3em; font-weight: 400; line-height: 1; color: var(--sh-accent); transition: transform .3s var(--sh-ease); }
.post-body details[open] summary::after { transform: rotate(45deg); }
.post-body summary h3, .post-body summary h4 { margin: 0; font: inherit; color: inherit; }
.post-body details > :not(summary) { margin: 0; padding: 0 20px 16px; }
.post-body details > :not(summary) + :not(summary) { margin-top: -6px; }

/* ---------- article : encadré auteur (fin d'article) ---------- */
.post-author { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 22px; align-items: start; margin-top: clamp(44px, 6vw, 72px); padding: clamp(22px, 3vw, 32px); border: 1px solid var(--sh-border); border-radius: var(--sh-radius-lg); background: var(--sh-surface); scroll-margin-top: calc(var(--sh-header-h) + 24px); }
.post-author img { width: 84px; height: 84px; border-radius: 50%; object-fit: cover; padding: 3px; background: var(--sh-ink); border: 2px solid var(--sh-accent); }
.post-author__label { font-size: 12px; font-weight: 700; letter-spacing: .5px; text-transform: uppercase; color: var(--sh-text-55); }
.post-author__name { margin-top: 6px; font-size: 1.25rem; font-weight: 700; color: var(--sh-white); }
.post-author__name a { transition: color .2s; }
.post-author__name a:hover { color: var(--sh-accent); }
.post-author__role { font-size: 14px; color: var(--sh-text-70); }
.post-author__bio { margin-top: 12px; font-size: 15px; line-height: 1.6; color: var(--sh-text-70); }
.post-author__links { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; margin-top: 18px; }

/* ---------- article : corps sur fond blanc ----------
   L'en-tête du site, l'en-tête de l'article, les articles connexes et le pied de page restent noirs.
   Les variables de couleur sont redéfinies pour ce bloc ; les encarts SHAVAS y gardent leur fond noir.
   Le citron n'y sert jamais de couleur de texte : surlignage des liens, filets, pastilles. */
.post-paper { --sh-white: #0a0a0a; --sh-text-70: rgba(10, 10, 10, 0.74); --sh-text-55: rgba(10, 10, 10, 0.6); --sh-border: rgba(10, 10, 10, 0.14); --sh-surface: #f4f4f2; --sh-surface-hover: #ecece8;
  background: #fff; color: #0a0a0a; padding: clamp(36px, 5vw, 64px) 0 clamp(48px, 7vw, 88px); }
.post-paper .post-layout { padding-top: 0; }
.post-paper .post-body { color: #1d1d1b; }
.post-paper .post-toc a::before { color: #0a0a0a; }
.post-paper .post-toc a:hover { border-left-color: #0a0a0a; }
.post-paper .post-body li::marker { color: #0a0a0a; }
.post-paper .post-body a:not(.cta):not(.text-link):not(.wp-block-button__link) { color: #0a0a0a; text-decoration: none; background: linear-gradient(transparent 62%, #e2f37a 62%); transition: background .2s; }
.post-paper .post-body a:not(.cta):not(.text-link):not(.wp-block-button__link):hover { color: #0a0a0a; background: #e2f37a; }
.post-paper .post-body blockquote { border-left-width: 4px; }
.post-paper .post-body thead th { color: #fff; background: #0a0a0a; border-bottom-color: #0a0a0a; }
.post-paper .post-body .a-retenir { border: 0; border-left: 4px solid #e2f37a; border-radius: 0 var(--sh-radius-lg) var(--sh-radius-lg) 0; background: #f4f4f2; color: #0a0a0a; }
.post-paper .post-body details[open] { border-color: rgba(10, 10, 10, 0.3); }
.post-paper .post-body summary::after { color: #0a0a0a; }
.post-paper .post-cta, .post-paper .post-aside__cta { --sh-white: #fafafa; --sh-text-70: rgba(250, 250, 250, 0.72); --sh-text-55: rgba(250, 250, 250, 0.55); --sh-border: rgba(255, 255, 255, 0.13); --sh-surface: rgba(255, 255, 255, 0.05); color: #fafafa; }
.post-paper .post-author__name a:hover { color: #0a0a0a; text-decoration: underline; text-underline-offset: 3px; }
.post-paper .post-author .cta { background: #0a0a0a; color: #fff; }
.post-paper .post-author .cta:hover { background: #000; box-shadow: 0 10px 30px rgba(10, 10, 10, 0.18); }
.post-paper .press-person__in { background: #fff; }
.post-paper .press-person__in:hover { color: #0a0a0a; border-color: #0a0a0a; background: #e2f37a; }
/* en-tête du site, une fois la page défilée : fond noir sur un article, sinon son verre dépoli disparaît sur le blanc */
body.single-post .site-header.is-scrolled .container { background: rgba(10, 10, 10, 0.9); border-color: rgba(255, 255, 255, 0.16); }

/* ---------- articles connexes ---------- */
.post-related { padding-bottom: 0; }
.post-related__head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px 30px; margin-bottom: clamp(24px, 3vw, 36px); }
.post-related__head .h-section { font-size: clamp(1.6rem, 1.2rem + 1.4vw, 2.3rem); }

/* ---------- petits écrans ---------- */
@media (max-width: 1023px) {
  .post-layout { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .post-aside { position: static; }
  .post-aside__cta { display: none; }                 /* sur téléphone, les encarts du texte suffisent */
  .post-toc { padding: 18px 20px; border: 1px solid var(--sh-border); border-radius: var(--sh-radius-lg); background: var(--sh-surface); }
  .post-toc ol { max-height: none; min-height: 0; }
  .post-toc a { border-left: 0; padding-left: 0; }
  .post-main { max-width: 780px; }
}
@media (max-width: 640px) {
  .post-byline { border-radius: var(--sh-radius-lg); padding: 12px 14px; width: 100%; }
  .post-byline__actions { margin-left: 0; flex-basis: 100%; }
  .post-meta__dates { flex-direction: column; gap: 2px; }
  .post-meta__dates span + span::before { content: none; }
  .post-author { grid-template-columns: minmax(0, 1fr); }
  .post-author img { width: 72px; height: 72px; }
  .post-body .post-cta { grid-template-columns: minmax(0, 1fr); }
  .post-body .post-cta img { order: -1; min-height: 0; aspect-ratio: 16 / 7; -webkit-mask-image: linear-gradient(0deg, transparent, #000 40%); mask-image: linear-gradient(0deg, transparent, #000 40%); }
  .post-body table { font-size: .84em; }
  .post-body th, .post-body td { padding: 10px 10px; }
}
@media (prefers-reduced-motion: reduce) {
  .post-card.press-card:hover .press-card__media img { transform: none; }
}
