/* ===========================================================
   Anchors
   =========================================================== */

:root {
    --anchor-offset: calc(var(--header-h) + var(--s2) + env(safe-area-inset-top));
}

html {
    scroll-padding-top: var(--anchor-offset);
    scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
}

.article h2,
.article h3 {
    scroll-margin-top: var(--anchor-offset);
}

/* ===========================================================
   Reading progress
   =========================================================== */

.reading-progress {
    position: fixed;
    left: 0;
    right: 0;
    top: var(--header-h);
    height: 3px;
    z-index: 30;
    background: rgb(0 0 0 / 0.06);
}

.reading-progress__bar {
    display: block;
    height: 100%;
    width: 100%;
    transform-origin: left center;
    transform: scaleX(0);
    background: rgb(var(--accentColor));
}


/* ===========================================================
   Hero (same glass recipe as blog hero card)
   =========================================================== */

.article-hero {
    padding: var(--s5) 0;
    text-align: center;
}

.article-hero .container {
    display: flex;
    justify-content: center;
}

.article-hero-card {
    --glassRadius: 34px;
    --glassBlur: 18px;
    --glassAlpha: 0.035;
    --glassSat: 1.12;

    --glassCaustics:
        radial-gradient(60% 55% at 18% 22%, rgb(255 255 255 / 0.070) 0%, transparent 72%),
        radial-gradient(60% 55% at 82% 30%, rgb(255 255 255 / 0.045) 0%, transparent 74%);

    --glassBorder: rgb(255 255 255 / 0.16);
    --glassShadow:
        0 28px 80px rgb(0 0 0 / 0.14),
        inset 0 1px 0 rgb(255 255 255 / 0.16),
        inset 0 -1px 0 rgb(0 0 0 / 0.10),
        inset 0 0 0 1px rgb(255 255 255 / 0.06);

    width: 100%;
    padding: clamp(18px, 3vw, 44px);
}

.article-kicker {
    margin: 0 0 var(--s2);
    font-family: var(--fontAccent);
    text-transform: uppercase;
    letter-spacing: .03em;
    color: rgb(var(--textColor) / .70);
    font-size: clamp(1.6rem, 5.2vw, 3.0rem);
    line-height: 1.02;
}

.article-title {
    margin: 0;
    font-family: var(--fontTitle);
    letter-spacing: .14em;
    text-transform: uppercase;
    color: rgb(var(--textColor));
    font-size: clamp(1.2rem, 4.2vw, 1.55rem);
    text-wrap: balance;
}

.article-meta {
    margin-top: var(--s4);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: var(--s3);
    color: rgb(var(--textColor));
    font-family: var(--fontText);
    font-size: 0.95rem;
}

.article-meta__item {
    display: inline-flex;
    align-items: center;
    gap: var(--s2);
}

.article-meta__sep {
    width: 6px;
    height: 6px;
    border-radius: 999px;
    background: rgb(var(--textColor) / 0.35);
}

.article-meta__link {
    font-family: var(--fontTitle);
    font-weight: 900;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    border-bottom: 2px solid rgb(var(--textColor) / 0.25);
}

/* ===========================================================
   Layout
   =========================================================== */

.article {
    padding-bottom: var(--s7);
}

/* ===========================================================
   Layout article : TOC sidebar + prose
   =========================================================== */

/* Sur mobile : .article reste en block normal */
.article {
    position: relative;
}

/* ===========================================================
   TOC — Mobile (inline, toggle)
   =========================================================== */

.article-toc {
    /* Sticky mobile — pas de glass ici */
    position: sticky;
    top: calc(var(--header-h) + var(--s3));
    z-index: 10;
    margin-bottom: var(--s6);
}

/* Card glass uniquement sur le sommaire */
.article-toc__card {
    --glassRadius: 20px;
    --glassBlur: 16px;
    --glassAlpha: 0.04;
    --glassSat: 1.10;
    --glassCaustics:
        radial-gradient(60% 55% at 18% 22%, rgb(255 255 255 / 0.065) 0%, transparent 72%),
        radial-gradient(60% 55% at 82% 30%, rgb(255 255 255 / 0.045) 0%, transparent 74%);

    padding: var(--s4) var(--s5);
    border-radius: var(--glassRadius, 20px);

    /* Transition entre light et dark */
    transition:
        background 300ms ease,
        box-shadow 300ms ease,
        border-color 300ms ease;
}

/* ── Dark quand sticky (classe ajoutée par JS) ─────────────── */
.article-toc.is-sticky .article-toc__card {
    --glassBlur: 22px;
    --glassBg: rgb(var(--textColor) / 0.82);
    --glassBorder: rgb(255 255 255 / 0.10);
    --glassShadow:
        0 16px 40px rgb(0 0 0 / 0.35),
        inset 0 1px 0 rgb(255 255 255 / 0.10),
        inset 0 -1px 0 rgb(0 0 0 / 0.20),
        inset 0 0 0 1px rgb(255 255 255 / 0.05);
}

.article-toc.is-sticky .article-toc__card .article-toc__title {
    color: rgb(var(--backgroundLight));
}

.article-toc.is-sticky .article-toc__card .article-toc__toggle {
    background: rgb(255 255 255 / 0.10);
    border-color: rgb(255 255 255 / 0.18);
}

.article-toc.is-sticky .article-toc__card .article-toc__toggle svg {
    stroke: rgb(var(--backgroundLight));
}

.article-toc.is-sticky .article-toc__card .article-toc__nav a {
    color: rgb(var(--backgroundLight) / 0.60);
}

.article-toc.is-sticky .article-toc__card .article-toc__nav a:hover {
    color: rgb(var(--backgroundLight));
    background: rgb(255 255 255 / 0.08);
}

.article-toc.is-sticky .article-toc__card .article-toc__nav a.is-active {
    color: rgb(var(--backgroundLight));
    background: rgb(var(--accentColor) / 0.20);
    border-left-color: rgb(var(--accentColor));
}

/* Header : titre + toggle bouton */
.article-toc__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: var(--s3);
}

.article-toc__title {
    font-family: var(--fontTitle);
    font-weight: 900;
    letter-spacing: .10em;
    text-transform: uppercase;
    font-size: .82rem;
    color: rgb(var(--textColor));
}

/* Toggle chevron */
.article-toc__toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 999px;
    background: rgb(var(--accentColor) / 0.12);
    border: 1px solid rgb(var(--accentColor) / 0.18);
    cursor: pointer;
    transition: background 180ms ease;
    flex-shrink: 0;
}

.article-toc__toggle:hover {
    background: rgb(var(--accentColor) / 0.20);
}

/* Rotation du SVG entier — plus fiable que cibler la polyline */
.article-toc__toggle svg {
    transition: transform 280ms cubic-bezier(.16, 1, .3, 1);
    display: block;
}

.article-toc__toggle[aria-expanded="true"] svg {
    transform: rotate(180deg);
}

/* Nav — caché par défaut sur mobile */
.article-toc__nav {
    display: grid;
    gap: 2px;
    max-height: 0;
    overflow: hidden;
    transition: max-height 360ms cubic-bezier(.16, 1, .3, 1),
        margin-top 360ms ease;
    margin-top: 0;
}

.article-toc[data-open="true"] .article-toc__nav {
    max-height: 600px;
    margin-top: var(--s4);
}

/* Liens */
.article-toc__nav a {
    display: block;
    font-family: var(--fontText);
    font-size: .92rem;
    line-height: 1.4;
    color: rgb(var(--textColor) / 0.65);
    padding: 6px var(--s3);
    border-radius: 8px;
    border-left: 2px solid transparent;
    transition:
        color 180ms ease,
        background 180ms ease,
        border-color 180ms ease;
}

.article-toc__nav a:hover {
    color: rgb(var(--textColor));
    background: rgb(var(--accentColor) / 0.08);
}

/* Lien actif — section en cours de lecture */
.article-toc__nav a.is-active {
    color: rgb(var(--textColor));
    background: rgb(var(--accentColor) / 0.12);
    border-left-color: rgb(var(--accentColor));
    font-weight: 600;
}

/* Boutons sociaux — masqués sur mobile */
.article-toc-socials {
    display: none;
}


/* ===========================================================
   Lead — card Apple-ish
   =========================================================== */

.article-lead {
    --glassRadius: 28px;
    --glassBlur: 16px;
    --glassAlpha: 0.04;
    --glassSat: 1.10;
    --glassCaustics:
        radial-gradient(60% 55% at 18% 22%, rgb(255 255 255 / 0.065) 0%, transparent 72%),
        radial-gradient(60% 55% at 82% 30%, rgb(255 255 255 / 0.045) 0%, transparent 74%);

    display: grid;
    grid-template-columns: 1fr;
    gap: var(--s5);
    align-items: center;
    /* photo centrée verticalement vs texte */
    padding: clamp(18px, 3vw, 36px);
    margin-bottom: var(--s6);
}

.article-feature {
    margin: 0;
    order: 2;
}

/* ✅ cohérent avec .post-media : pas de border “cadre” */
.article-media {
    width: 100%;
    padding: 0;
    border: 0;
    background: rgb(var(--textColor));
    cursor: pointer;
    display: block;

    aspect-ratio: 4 / 5;
    border-radius: 28px;
    overflow: hidden;

    position: relative;
    isolation: isolate;

    box-shadow: 0 24px 70px rgb(0 0 0 / 0.16);
}

.article-media img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;

    transform: scale(1.02);
    transition: transform 900ms cubic-bezier(.16, 1, .3, 1);
}

/* Shine (comme blog post-media) */
.article-media::after {
    content: "";
    position: absolute;
    inset: -60%;
    pointer-events: none;
    z-index: 1;

    background: linear-gradient(120deg,
            transparent 35%,
            rgb(var(--accentColor) / 0.26) 50%,
            transparent 65%);

    transform: translateX(-70%) rotate(12deg);
    opacity: 0;

    mix-blend-mode: overlay;
    filter: blur(1px);

    transition: transform 0.55s ease, opacity 0.18s ease;
}

@media (hover:hover) and (pointer:fine) {
    .article-media:hover img {
        transform: scale(1.08);
    }

    .article-media:hover::after {
        opacity: 1;
        transform: translateX(70%) rotate(12deg);
    }
}

.article-lead-text {
    display: grid;
    order: 1;
}

.article-lead-text p {
    margin: 0 0 var(--s3);
    font-family: var(--fontText);
    color: rgb(var(--textColor) / .86);
    line-height: 1.75;
    font-size: clamp(1.02rem, 1.05vw, 1.12rem);
}

.article-lead-text p:last-child {
    margin-bottom: 0;
}

/* ===========================================================
   Prose
   =========================================================== */

/* ===========================================================
   Prose — card Apple-ish
   =========================================================== */

.article-content {
    --glassRadius: 28px;
    --glassBlur: 16px;
    --glassAlpha: 0.04;
    --glassSat: 1.10;
    --glassCaustics:
        radial-gradient(60% 55% at 18% 22%, rgb(255 255 255 / 0.065) 0%, transparent 72%),
        radial-gradient(60% 55% at 82% 30%, rgb(255 255 255 / 0.045) 0%, transparent 74%);

    padding: clamp(18px, 3vw, 40px);
}

/* Supprimer le gradient sombre du ::before sur article-content */
.article-content::before {
    background:
        radial-gradient(120% 90% at 50% -10%, rgb(255 255 255 / 0.12) 0%, transparent 55%),
        linear-gradient(180deg, rgb(255 255 255 / 0.05) 0%, transparent 40%);
}

.article-prose {
    margin-top: 0;
    font-family: var(--fontText);
    color: rgb(var(--textColor) / .86);
}

.article-prose h2 {
    margin-top: var(--s7);
    margin-bottom: var(--s3);
    font-family: var(--fontTitle);
    font-weight: 900;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: rgb(var(--textColor));
    font-size: clamp(1.2rem, 4.2vw, 1.55rem);
}

.article-prose p {
    line-height: 1.75;
    margin-bottom: var(--s4);
}

/* Quote */

.article-quote {
    /* Card autonome entre le lead et la prose */
    --glassRadius: 22px;
    --glassBlur: 16px;
    --glassAlpha: 0.04;
    --glassSat: 1.10;
    --glassCaustics:
        radial-gradient(60% 55% at 18% 22%, rgb(255 255 255 / 0.065) 0%, transparent 72%),
        radial-gradient(60% 55% at 82% 30%, rgb(255 255 255 / 0.045) 0%, transparent 74%);

    margin: 0;
    margin-bottom: var(--s6);
    padding: clamp(18px, 3vw, 32px) clamp(20px, 3vw, 36px);
    border: 0;
    background: rgb(var(--accentColor) / 0.12);
    text-align: center;
    position: relative;

    /* Border-left accent — directif, éditorial */
    border-left: 4px solid rgb(var(--accentColor));
    border-right: 4px solid rgb(var(--accentColor));
}

.article-quote p {
    margin: 0;
    position: relative;
    z-index: 1;

    font-family: var(--fontAccent);
    font-style: italic;
    letter-spacing: 0.015em;
    color: rgb(var(--textColor));
    font-size: clamp(1.15rem, 2.6vw, 1.5rem);
    line-height: 1.4;
    text-transform: uppercase;
}

/* Lists */
.article-prose ul,
.article-prose ol {
    margin: var(--s3) 0 var(--s5);
    padding: 0;
    display: grid;
    gap: var(--s2);
    line-height: 1.65;
}

.article-prose ul {
    list-style: none;
}

.article-prose ul li {
    position: relative;
    padding-left: calc(var(--s4) + 10px);
}

.article-prose ul li::before {
    content: "";
    position: absolute;
    left: 0;
    top: 0.72em;
    transform: translateY(-50%);
    width: 8px;
    height: 8px;
    border-radius: 999px;
    border: 1px solid rgb(var(--textColor) / 0.9);
    background: rgb(var(--textColor) / 0.18);
}

.article-prose ol {
    list-style: none;
    counter-reset: item;
}

.article-prose ol li {
    counter-increment: item;
    position: relative;
    padding-left: var(--s6);
}

.article-prose ol li::before {
    content: counter(item) ".";
    position: absolute;
    left: 0;
    top: 0;
    font-family: var(--fontTitle);
    font-weight: 900;
    letter-spacing: 0.06em;
    color: rgb(var(--te));
}

/* ===========================================================
   Gallery (same “media” logic as Blog)
   =========================================================== */

.article-gallery {
    margin-top: var(--s7);
}

.article-gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--s4);
}

.article-thumb {
    padding: 0;
    border: 0;
    background: rgb(var(--textColor));
    cursor: pointer;

    border-radius: 22px;
    overflow: hidden;
    position: relative;
    isolation: isolate;

    box-shadow: 0 22px 64px rgb(0 0 0 / 0.14);
}

.article-thumb img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    aspect-ratio: 1 / 1;

    transform: scale(1.02);
    transition: transform 900ms cubic-bezier(.16, 1, .3, 1);
}

.article-thumb::after {
    content: "";
    position: absolute;
    inset: -60%;
    pointer-events: none;
    z-index: 1;

    background: linear-gradient(120deg,
            transparent 35%,
            rgb(var(--accentColor) / 0.26) 50%,
            transparent 65%);

    transform: translateX(-70%) rotate(12deg);
    opacity: 0;

    mix-blend-mode: overlay;
    filter: blur(1px);

    transition: transform 0.55s ease, opacity 0.18s ease;
}

@media (hover:hover) and (pointer:fine) {
    .article-thumb:hover img {
        transform: scale(1.08);
    }

    .article-thumb:hover::after {
        opacity: 1;
        transform: translateX(70%) rotate(12deg);
    }
}

/* ===========================================================
   Footer meta
   =========================================================== */

.article-foot {
    margin-top: var(--s7);
    display: grid;
    grid-template-areas: "byline" "back";
    gap: var(--s4);
    align-items: end;
    justify-items: center;
}

.article-back {
    grid-area: back;
    width: fit-content;
    display: inline-flex;
    align-items: center;
    gap: var(--s3);

    padding: 12px 16px;
    border-radius: 999px;

    font-family: var(--fontTitle);
    font-weight: 900;
    letter-spacing: .10em;
    text-transform: uppercase;

    color: rgb(var(--textColor));
    background: rgb(var(--accentColor) / 0.18);
    border: 1px solid rgb(var(--accentColor) / 0.14);

    -webkit-backdrop-filter: blur(10px) saturate(1.12);
    backdrop-filter: blur(10px) saturate(1.12);

    transition: gap 0.22s ease, background 180ms ease;
}

.article-back svg {
    flex-shrink: 0;
    transition: transform 0.22s ease;
}

@media (hover:hover) and (pointer:fine) {
    .article-back:hover {
        gap: var(--s4);
        background: rgb(var(--accentColor) / 0.24);
    }

    .article-back:hover svg {
        transform: translateX(-3px);
    }
}

.article-byline {
    grid-area: byline;
    text-align: right;
    font-family: var(--fontTitle);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: rgb(var(--textColor));
    opacity: 0.85;
    font-size: 0.9rem;
}

.article-byline__date {
    font-family: var(--fontAccent);
    font-style: italic;
    letter-spacing: 0.03em;
    text-transform: none;
    margin-top: var(--s1);
}

/* ===========================================================
   CTA (same glass recipe)
   =========================================================== */

.article-cta {
    padding-top: var(--s7);
    padding-bottom: var(--s9);
}

.article-cta-inner {
    --glassRadius: 34px;
    --glassBlur: 18px;
    --glassAlpha: 0.035;
    --glassSat: 1.12;

    --glassCaustics:
        radial-gradient(60% 55% at 18% 22%, rgb(255 255 255 / 0.070) 0%, transparent 72%),
        radial-gradient(60% 55% at 82% 30%, rgb(255 255 255 / 0.045) 0%, transparent 74%);

    padding: clamp(18px, 3vw, 44px);

    display: grid;
    gap: var(--s5);
    justify-items: center;
    text-align: center;
}

.article-cta-text {
    margin: 0;
    font-family: var(--fontTitle);
    font-size: clamp(1.1rem, 4.6vw, 1.45rem);
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: rgb(var(--textColor));
    line-height: 1.2;
}

.article-cta-btn {
    height: var(--s8);
    padding-inline: var(--s6);
}

/* ===========================================================
   ARTICLE — Gutenberg bridge (WP blocks -> design site)
   =========================================================== */

/* Base typo dans le contenu */
.article-prose :where(p, ul, ol) {
    font-family: var(--fontText);
    line-height: 1.65;
    color: rgb(var(--textColor) / 0.88);
}

.article-prose p {
    margin: 0 0 var(--s4);
}

.article-prose :where(ul, ol) {
    margin: 0 0 var(--s4);
    padding-left: 1.2em;
}

.article-prose li+li {
    margin-top: .35em;
}

/* Titres */
.article-prose h2 {
    margin: var(--s7) 0 var(--s4);
}

.article-prose h3 {
    margin: var(--s6) 0 var(--s3);
    font-family: var(--fontTitle);
    font-weight: 900;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: rgb(var(--textColor));
    font-size: clamp(1.05rem, 2.2vw, 1.35rem);
    line-height: 1.15;
}

/* Liens */
.article-prose a {
    color: rgb(var(--textColor));
    text-decoration: underline;
    text-underline-offset: 3px;
}

/* ===== Quotes ===== */
.article-prose .wp-block-quote {
    margin: var(--s6) 0;
    padding: 0;
    border: 0;
    background: transparent;
    text-align: center;
}

.article-prose .wp-block-quote p {
    margin: 0;
    display: inline-block;
    max-width: min(62ch, 100%);

    padding: clamp(16px, 2.4vw, 26px) clamp(18px, 2.8vw, 34px);

    background: rgb(var(--backgroundLight) / 0.70);
    border: 1px solid rgb(var(--accentColor) / 0.14);
    border-radius: 22px;

    -webkit-backdrop-filter: blur(12px) saturate(1.12);
    backdrop-filter: blur(12px) saturate(1.12);

    box-shadow:
        0 18px 46px rgb(0 0 0 / 0.12),
        0 6px 16px rgb(0 0 0 / 0.06),
        inset 0 1px 0 rgb(255 255 255 / 0.22);

    font-family: var(--fontAccent);
    font-style: italic;
    letter-spacing: 0.02em;
    color: rgb(var(--textColor));
    font-size: clamp(1.05rem, 2.4vw, 1.35rem);
    line-height: 1.35;
}

/* ===== Images (bloc Image) ===== */
.article-prose figure.wp-block-image {
    margin: var(--s6) 0;
}

.article-prose figure.wp-block-image :where(a, .lb-trigger) {
    display: block;
    border-radius: 22px;
    overflow: hidden;
    position: relative;
    isolation: isolate;
    background: rgb(var(--textColor));
    box-shadow: 0 22px 64px rgb(0 0 0 / 0.14);
}

.article-prose figure.wp-block-image img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: cover;
    transform: scale(1.02);
    transition: transform 900ms cubic-bezier(.16, 1, .3, 1);
}

/* Caption */
.article-prose figure.wp-block-image figcaption {
    margin-top: var(--s2);
    font-family: var(--fontTitle);
    letter-spacing: .08em;
    text-transform: uppercase;
    font-size: .78rem;
    color: rgb(var(--textColor) / 0.65);
    text-align: center;
}

/* Hover zoom si device hover */
@media (hover:hover) and (pointer:fine) {
    .article-prose figure.wp-block-image :where(a, .lb-trigger):hover img {
        transform: scale(1.08);
    }
}

/* ===== Gallery (bloc Galerie Gutenberg moderne + ancien) ===== */

/* Gutenberg moderne (figure.wp-block-gallery avec nested images) */
.article-prose figure.wp-block-gallery {
    margin: var(--s6) 0;
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--s4);
    padding: 0;
}

.article-prose figure.wp-block-gallery figure.wp-block-image {
    margin: 0;
}

/* Ancien markup (ul.wp-block-gallery + li.blocks-gallery-item) */
.article-prose ul.wp-block-gallery {
    margin: var(--s6) 0;
    padding: 0;
    list-style: none;

    display: grid;
    grid-template-columns: 1fr;
    gap: var(--s4);
}

.article-prose .blocks-gallery-item {
    margin: 0;
}

/* ===========================================================
   TOC — Desktop (sticky sidebar)
   =========================================================== */

@media (min-width: 1024px) {

    /* Layout grid : TOC sidebar gauche + contenu principal */
    .article {
        display: grid;
        grid-template-columns: 260px 1fr;
        grid-template-rows: auto;
        align-items: start;
        gap: 0 var(--s7);
        /* TOC en col 1, tout le reste en col 2 */
    }

    .article-toc {
        grid-column: 1;
        position: sticky;
        top: calc(var(--header-h) + var(--s4));
        margin-bottom: 0;
        max-height: calc(100dvh - var(--header-h) - var(--s8));
        overscroll-behavior: contain;
        scrollbar-width: thin;
        scrollbar-color: rgb(var(--accentColor) / 0.25) transparent;

        /* Plus de variables glass ici — elles sont sur .article-toc__card */
        grid-row: 1 / 99;
    }

    /* Réinitialiser les couleurs dark sur desktop */
    .article-toc .article-toc__card .article-toc__title {
        color: rgb(var(--textColor));
    }

    .article-toc .article-toc__toggle {
        background: rgb(var(--accentColor) / 0.12);
        border-color: rgb(var(--accentColor) / 0.18);
    }

    .article-toc .article-toc__toggle svg {
        stroke: currentColor;
    }

    .article-toc .article-toc__nav a {
        color: rgb(var(--textColor) / 0.65);
    }

    .article-toc .article-toc__nav a:hover {
        color: rgb(var(--textColor));
        background: rgb(var(--accentColor) / 0.08);
    }

    .article-toc .article-toc__nav a.is-active {
        color: rgb(var(--textColor));
        background: rgb(var(--accentColor) / 0.12);
        border-left-color: rgb(var(--accentColor));
    }

    .article-main {
        grid-column: 2;
    }

    /* Sur desktop : toggle caché, nav toujours visible */
    .article-toc__toggle {
        display: none;
    }

    /* Boutons sociaux — dans le aside sticky, séparés du nav */
    .article-toc-socials {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: var(--s4);
        margin-top: var(--s8);
        padding-top: var(--s4);
    }

    .article-toc-social-btn {
        --btn-size: 72px;
        --icon-size: 34px;
        /* Shine blanc sur fond dark — même rendu que portfolio */
        --shineColor: rgb(255 255 255 / 0.30);

        /* Version dark pour ressortir sur fond light */
        background-color: rgb(var(--textColor) / 0.8);
        border: 1px solid var(--glassBorder);
        color: rgb(var(--accentColor)) !important;

        -webkit-backdrop-filter: blur(14px) saturate(1.20);
        backdrop-filter: blur(14px) saturate(1.20);

        box-shadow:
            0 6px 18px rgb(0 0 0 / 0.22),
            inset 0 1px 0 rgb(255 255 255 / 0.10);
    }

    /* Shine au-dessus du fond dark */
    .article-toc-social-btn::after {
        z-index: 1;
        mix-blend-mode: screen;
    }

    .article-toc__nav {
        max-height: none;
        overflow: visible;
        margin-top: var(--s4);
        transition: none;
    }
}

@media (min-width: 1024px) {

    .article-prose figure.wp-block-gallery,
    .article-prose ul.wp-block-gallery {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Lien / trigger dans la galerie */
.article-prose :where(figure.wp-block-gallery, ul.wp-block-gallery) :where(a, .lb-trigger) {
    display: block;
    border-radius: 22px;
    overflow: hidden;
    background: rgb(var(--textColor));
    box-shadow: 0 22px 64px rgb(0 0 0 / 0.14);
}

.article-prose :where(figure.wp-block-gallery, ul.wp-block-gallery) img {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
    transform: scale(1.02);
    transition: transform 900ms cubic-bezier(.16, 1, .3, 1);
}

@media (hover:hover) and (pointer:fine) {
    .article-prose :where(figure.wp-block-gallery, ul.wp-block-gallery) :where(a, .lb-trigger):hover img {
        transform: scale(1.08);
    }
}

/* ===========================================================
   Desktop
   =========================================================== */

@media (min-width: 1024px) {
    .article-hero {
        padding: var(--s7) 0 var(--s9);
    }

    .article {
        padding-bottom: var(--s8);
    }

    .article-lead {
        grid-template-columns: minmax(260px, 380px) 1fr;
        gap: var(--s6);
        align-items: start;
    }

    .article-feature {
        margin: 0;
        order: 1;
        align-self: stretch;
        /* remplit la hauteur de la row = hauteur du texte */
        position: relative;
        /* ancre l'image absolute */
        overflow: hidden;
        border-radius: 20px;
        min-height: 300px;
        /* plancher si le texte est très court */
    }

    .article-feature .article-media {
        position: absolute;
        inset: 0;
        width: 100%;
        height: 100%;
        aspect-ratio: unset;
        border-radius: 0;
        min-height: unset;
    }

    .article-lead-text {
        order: 2;
        align-self: center;
        /* texte centré verticalement si plus court que photo */
    }

    .article-gallery-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: var(--s4);
    }

    .article-foot {
        grid-template-columns: 1fr 1fr;
        grid-template-areas: "back byline";
        align-items: end;
        justify-items: start;
    }

    .article-back {
        justify-self: start;
    }

    .article-byline {
        justify-self: end;
    }

    .article-cta-inner {
        grid-template-columns: max-content max-content;
        justify-content: center;
        justify-items: center;
        align-items: center;
        gap: var(--s7);
    }

    .article-cta-text {
        font-size: clamp(1.4rem, 1.8vw, 1.9rem);
        line-height: 1.12;
    }

    .article-prose .wp-block-gallery {
        grid-template-columns: repeat(3, 1fr);
    }
}

@media (prefers-reduced-motion: reduce) {

    .article-media img,
    .article-media::after,
    .article-thumb img,
    .article-thumb::after {
        transition: none !important;
    }
}