/* ============================================================
   BETON-CIRE-MUR.CSS — Journal AdLucem, article n°02
   Structure originale : hero rideau, dot-nav, sticky media,
   steps verticaux animés, galerie horizontale pinnée.
   ============================================================ */

.wm {
    --wm-dark: #0e0e0e;
    --wm-warm: #faf8f5;
    --wm-rust: #a8482c;
    --wm-rust-light: #c46b4a;
    --wm-muted: #6b6560;
    --wm-border: rgba(14, 14, 14, 0.1);

    /* La page reprend quelques composants editoriaux d'article.css (encarts,
       avertissements, mots-cles, CTA, articles lies). Leurs variables sont
       declarees sur .art, que cette page n'utilise pas : on les redonne ici,
       calees sur la palette du mur, sans reprendre la mise en page de .art. */
    --art-warm: var(--wm-warm);
    --art-dark: var(--wm-dark);
    --art-brown: #1a1a1a;
    --art-brown-light: #555555;
    --art-muted: var(--wm-muted);
    --art-border: var(--wm-border);
    --art-max-body: 760px;
    --art-max-layout: 1200px;

    background: var(--wm-warm);
    color: var(--wm-dark);
    font-family: 'Inter', sans-serif;
    overflow-x: clip;
}

.wm * {
    box-sizing: border-box;
}

/* ---------- HERO ---------- */
.wm-hero {
    position: relative;
    min-height: 100vh;
    background: var(--wm-dark);
    color: var(--wm-warm);
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    overflow: hidden;
}

.wm-hero-bg {
    position: absolute;
    inset: 0;
}

.wm-hero-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.wm-hero-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to bottom, rgba(14, 14, 14, 0.35) 0%, rgba(14, 14, 14, 0.2) 40%, rgba(14, 14, 14, 0.92) 100%);
}

/* Curtain panels — reveal on load, evokes a wall opening */
/* Le rideau ne couvre le hero QUE si son animation peut reellement jouer :
   la classe .wm-anim est posee par le script du <head> quand le mouvement
   n'est pas reduit, puis retiree a DOMContentLoaded si le script d'animation
   n'a pas pris la main (GSAP absent). Par defaut, titre et contenu sont
   visibles. */
.wm-curtain {
    position: absolute;
    inset: 0;
    z-index: 5;
    display: none;
    pointer-events: none;
}

html.wm-anim .wm-curtain {
    display: flex;
}

.wm-curtain-panel {
    flex: 1;
    background: var(--wm-dark);
}

.wm-hero-inner {
    position: relative;
    z-index: 2;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    padding: clamp(7rem, 15vh, 11rem) clamp(1.5rem, 5vw, 4rem) clamp(3.5rem, 8vh, 6rem);
}

.wm-breadcrumb ol {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 0.6rem;
    list-style: none;
    margin: 0 0 2.5rem;
    padding: 0;
    font-size: 0.75rem;
    color: rgba(250, 248, 245, 0.45);
}

.wm-breadcrumb li:not(:last-child)::after {
    content: '/';
    margin-left: 0.6rem;
    opacity: 0.4;
}

.wm-breadcrumb a {
    color: rgba(250, 248, 245, 0.55);
    text-decoration: none;
    transition: color 0.2s;
}

.wm-breadcrumb a:hover {
    color: var(--wm-warm);
}

.wm-hero-kicker {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--wm-rust-light);
    margin-bottom: 1.4rem;
}

.wm-hero-title {
    font-family: 'Playfair Display', serif;
    font-size: clamp(3.2rem, 9vw, 7.5rem);
    font-weight: 700;
    line-height: 1.02;
    letter-spacing: -0.025em;
    margin: 0 0 1.3rem;
}

.wm-line {
    display: block;
    overflow: hidden;
}

.wm-word {
    display: inline-block;
    will-change: transform;
}

.wm-word--em {
    font-style: italic;
    color: var(--wm-rust-light);
}

.wm-hero-sub {
    font-size: clamp(1rem, 1.8vw, 1.18rem);
    font-weight: 300;
    color: rgba(250, 248, 245, 0.65);
    max-width: 50ch;
    margin: 0 0 2.2rem;
    line-height: 1.65;
}

.wm-hero-meta {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.4rem 1rem;
    font-size: 0.78rem;
    color: rgba(250, 248, 245, 0.42);
}

.wm-meta-sep {
    opacity: 0.3;
}

.wm-hero-scroll {
    position: absolute;
    right: clamp(1.5rem, 5vw, 4rem);
    bottom: 2.2rem;
    z-index: 3;
    display: flex;
    align-items: center;
    gap: 0.7rem;
    font-size: 0.68rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: rgba(250, 248, 245, 0.5);
}

.wm-hero-scroll-line {
    width: 1px;
    height: 34px;
    background: rgba(250, 248, 245, 0.35);
    position: relative;
    overflow: hidden;
}

.wm-hero-scroll-line::after {
    content: '';
    position: absolute;
    top: -100%;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--wm-rust-light);
    animation: wmScrollLine 1.8s ease-in-out infinite;
}

@keyframes wmScrollLine {
    0% { top: -100%; }
    60% { top: 100%; }
    100% { top: 100%; }
}

/* ---------- DOT NAV (fixed, right edge) ---------- */
.wm-dotnav {
    position: fixed;
    right: clamp(1rem, 3vw, 2.2rem);
    top: 50%;
    transform: translateY(-50%);
    z-index: 80;
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
    align-items: center;
}

.wm-dotnav a {
    position: relative;
    display: block;
    width: 9px;
    height: 9px;
}

.wm-dotnav a span {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: rgba(14, 14, 14, 0.18);
    transition: background 0.25s, transform 0.25s;
}

.wm-dotnav a::before {
    content: attr(data-label);
    position: absolute;
    right: 140%;
    top: 50%;
    transform: translateY(-50%);
    white-space: nowrap;
    font-size: 0.72rem;
    color: var(--wm-dark);
    background: var(--wm-warm);
    padding: 0.3em 0.7em;
    border: 1px solid var(--wm-border);
    border-radius: 2px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s;
}

.wm-dotnav a:hover::before {
    opacity: 1;
}

.wm-dotnav a:hover span,
.wm-dotnav a.active span {
    background: var(--wm-rust);
    transform: scale(1.35);
}

@media (max-width: 1024px) {
    .wm-dotnav { display: none; }
}

/* ---------- LEAD ---------- */
.wm-lead {
    max-width: 1200px;
    margin: 0 auto;
    padding: clamp(4rem, 8vw, 6rem) clamp(1.5rem, 5vw, 4rem);
}

.wm-lead-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr;
    gap: clamp(2rem, 5vw, 4rem);
    align-items: center;
}

.wm-lead-text {
    font-size: clamp(1.1rem, 2vw, 1.35rem);
    line-height: 1.75;
    font-weight: 300;
    color: #191919;
    margin: 0;
}

.wm-lead-text strong {
    font-weight: 600;
    color: var(--wm-dark);
}

.wm-lead-figure {
    margin: 0;
}

.wm-lead-figure img {
    width: 100%;
    height: auto;
    aspect-ratio: 4 / 5;
    object-fit: cover;
    border-radius: 2px;
    display: block;
}

.wm-lead-figure figcaption {
    font-size: 0.76rem;
    color: var(--wm-muted);
    margin-top: 0.6rem;
    font-style: italic;
}

@media (max-width: 900px) {
    .wm-lead-grid {
        grid-template-columns: 1fr;
    }

    .wm-lead-figure {
        order: -1;
    }
}

/* ---------- CHAPTERS (generic) ---------- */
.wm-chapter {
    max-width: 1200px;
    margin: 0 auto;
    padding: clamp(3rem, 6vw, 5rem) clamp(1.5rem, 5vw, 4rem);
    border-bottom: 1px solid var(--wm-border);
}

.wm-chapter-head {
    display: flex;
    align-items: baseline;
    gap: 1.2rem;
    margin-bottom: 1.8rem;
}

.wm-chapter-num {
    font-family: 'Playfair Display', serif;
    font-size: clamp(2.2rem, 5vw, 3.2rem);
    font-weight: 700;
    color: var(--wm-rust);
    line-height: 1;
    flex-shrink: 0;
}

.wm-chapter-title {
    font-family: 'Playfair Display', serif;
    font-size: clamp(1.5rem, 3vw, 2.1rem);
    font-weight: 700;
    line-height: 1.2;
    color: var(--wm-dark);
    margin: 0;
}

.wm-chapter-body {
    max-width: 760px;
}

.wm-chapter-body p,
.wm-sticky-text p {
    font-size: 1rem;
    line-height: 1.82;
    font-weight: 300;
    color: #1c1c1c;
    margin: 0 0 1.3rem;
}

.wm-chapter-body p strong,
.wm-sticky-text p strong {
    font-weight: 600;
    color: var(--wm-dark);
}

.wm-chapter-body a,
.wm-sticky-text a,
.wm-gallery-note a {
    color: var(--wm-dark);
    text-decoration-color: var(--wm-rust);
    text-underline-offset: 3px;
}

.wm-chapter-intro {
    max-width: 620px;
    font-size: 1.05rem;
    font-weight: 300;
    color: var(--wm-muted);
    line-height: 1.7;
    margin: 0 0 2.5rem;
}

/* ---------- STATS ---------- */
.wm-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1px;
    background: var(--wm-border);
    border: 1px solid var(--wm-border);
    margin-top: 2.2rem;
}

.wm-stat {
    background: var(--wm-warm);
    padding: 1.5rem 1rem;
    text-align: center;
}

.wm-stat-val {
    display: block;
    font-family: 'Playfair Display', serif;
    font-size: 1.9rem;
    font-weight: 700;
    color: var(--wm-rust);
    line-height: 1.1;
}

.wm-stat-key {
    display: block;
    font-size: 0.68rem;
    font-weight: 600;
    color: var(--wm-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-top: 0.5rem;
}

@media (max-width: 768px) {
    .wm-stats { grid-template-columns: repeat(2, 1fr); }
}

/* ---------- STICKY SECTION (ch.02) ---------- */
.wm-sticky-section {
    display: grid;
    grid-template-columns: 0.9fr 1.1fr;
    max-width: 1440px;
    margin: 0 auto;
    border-bottom: 1px solid var(--wm-border);
}

.wm-sticky-media {
    position: sticky;
    top: 0;
    height: 100vh;
    overflow: hidden;
}

.wm-sticky-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.wm-sticky-text {
    padding: clamp(3.5rem, 8vh, 6rem) clamp(1.5rem, 5vw, 4rem);
    display: flex;
    flex-direction: column;
    justify-content: center;
    max-width: 640px;
}

.wm-callout {
    margin: 1.8rem 0;
}

@media (max-width: 900px) {
    .wm-sticky-section {
        grid-template-columns: 1fr;
    }

    .wm-sticky-media {
        position: static;
        height: 60vh;
    }

    .wm-sticky-text {
        max-width: 100%;
        padding-top: 2.5rem;
    }
}

/* ---------- VERTICAL STEPS (ch.03) ---------- */
.wm-vsteps {
    position: relative;
    max-width: 760px;
    padding-left: 2.6rem;
}

.wm-vsteps-line {
    position: absolute;
    left: 0.4rem;
    top: 0.4rem;
    bottom: 0.4rem;
    width: 2px;
    background: var(--wm-border);
}

.wm-vsteps-line-fill {
    display: block;
    width: 100%;
    height: 0%;
    background: var(--wm-rust);
    transform-origin: top;
}

.wm-vstep {
    position: relative;
    padding-bottom: 2.6rem;
}

.wm-vstep:last-child {
    padding-bottom: 0;
}

.wm-vstep-dot {
    position: absolute;
    left: -2.6rem;
    top: 0;
    width: 1.9rem;
    height: 1.9rem;
    border-radius: 50%;
    background: var(--wm-warm);
    border: 2px solid var(--wm-border);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.68rem;
    font-weight: 700;
    color: var(--wm-muted);
    transition: border-color 0.3s, color 0.3s, background 0.3s;
}

.wm-vstep.is-active .wm-vstep-dot {
    background: var(--wm-rust);
    border-color: var(--wm-rust);
    color: var(--wm-warm);
}

.wm-vstep-body h3 {
    font-family: 'Inter', sans-serif;
    font-size: 1.05rem;
    font-weight: 600;
    margin: 0 0 0.6rem;
    color: var(--wm-dark);
}

.wm-vstep-body p {
    font-size: 0.96rem;
    line-height: 1.75;
    font-weight: 300;
    color: #1c1c1c;
    margin: 0;
}

.wm-vstep-body p strong {
    font-weight: 600;
    color: var(--wm-dark);
}

/* ---------- HIGHLIGHT ---------- */
.wm-highlight {
    max-width: 1200px;
    margin: 0 auto;
    padding: clamp(2.5rem, 5vw, 3.5rem) clamp(1.5rem, 5vw, 4rem);
    border-top: 1px solid var(--wm-border);
    border-bottom: 1px solid var(--wm-border);
}

.wm-highlight p {
    font-family: 'Playfair Display', serif;
    font-size: clamp(1.15rem, 2.4vw, 1.5rem);
    font-weight: 500;
    line-height: 1.5;
    color: var(--wm-dark);
    max-width: 34ch;
    margin: 0;
}

/* ---------- WARNCARD (ch.04) ---------- */
.wm-warncard {
    background: rgba(168, 72, 44, 0.06);
    border-left: 3px solid var(--wm-rust);
    padding: 1.3rem 1.6rem;
    margin: 1.8rem 0;
    border-radius: 2px;
}

.wm-warncard-tag {
    display: block;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--wm-rust);
    margin-bottom: 0.55rem;
}

.wm-warncard p {
    font-size: 0.92rem;
    margin: 0;
    line-height: 1.65;
    color: #2a2a2a;
}

.wm-warncard p strong {
    font-weight: 600;
    color: var(--wm-dark);
}

/* ---------- GALLERY PIN (ch.05) ---------- */
.wm-gallery-pin {
    position: relative;
    background: var(--wm-dark);
    color: var(--wm-warm);
    padding-top: clamp(3rem, 6vw, 5rem);
    padding-bottom: clamp(3rem, 6vw, 5rem);
    overflow: hidden;
}

.wm-gallery-head {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 clamp(1.5rem, 5vw, 4rem);
    margin-bottom: 2.5rem;
}

.wm-gallery-head .wm-chapter-num {
    color: var(--wm-rust-light);
}

.wm-gallery-head .wm-chapter-title {
    color: var(--wm-warm);
    margin: 0.3rem 0 1rem;
}

.wm-gallery-head p {
    max-width: 60ch;
    font-size: 0.98rem;
    font-weight: 300;
    color: rgba(250, 248, 245, 0.6);
    line-height: 1.7;
    margin: 0;
}

.wm-gallery-viewport {
    width: 100%;
    overflow: hidden;
}

/* La bande n'est tiree au scroll que si le pin est reellement installe
   (.wm-pin-ok, pose par pinGallery). Dans tous les autres cas — mouvement
   reduit, GSAP ou ScrollTrigger absent, ecran sous 901 px — elle se parcourt
   au defilement natif, sinon les derniers echantillons resteraient hors
   d'atteinte. */
html:not(.wm-pin-ok) .wm-gallery-viewport {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.wm-gallery-track {
    display: flex;
    gap: 1.4rem;
    padding: 0 clamp(1.5rem, 5vw, 4rem);
    width: max-content;
    will-change: transform;
}

.wm-swatch {
    margin: 0;
    flex: 0 0 auto;
    width: min(70vw, 300px);
}

.wm-swatch img {
    width: 100%;
    aspect-ratio: 3 / 4;
    object-fit: cover;
    display: block;
    border-radius: 2px;
}

.wm-swatch figcaption {
    margin-top: 0.8rem;
    font-family: 'Playfair Display', serif;
    font-size: 1.05rem;
    font-style: italic;
    color: var(--wm-warm);
}

.wm-gallery-note {
    max-width: 1200px;
    margin: 2.5rem auto 0;
    padding: 0 clamp(1.5rem, 5vw, 4rem);
    font-size: 0.88rem;
    color: rgba(250, 248, 245, 0.5);
}

.wm-gallery-note a {
    color: var(--wm-warm);
    text-decoration-color: var(--wm-rust-light);
}

@media (max-width: 900px) {
    .wm-gallery-viewport {
        overflow-x: auto;
        scroll-snap-type: x proximity;
        -webkit-overflow-scrolling: touch;
    }

    .wm-gallery-track {
        transform: none !important;
    }

    .wm-swatch {
        scroll-snap-align: start;
    }
}

/* ---------- WARNINGS override (reuse .art-warnings) ---------- */
.wm-warnings {
    margin-top: 1.5rem;
}

.wm-tags {
    margin-top: 3rem;
}

/* ---------- RESPONSIVE ---------- */
@media (max-width: 768px) {
    .wm-hero-title {
        font-size: clamp(2.6rem, 11vw, 4rem);
    }

    .wm-hero-scroll {
        display: none;
    }

    .wm-vsteps {
        padding-left: 2.2rem;
    }

    .wm-vstep-dot {
        left: -2.2rem;
        width: 1.6rem;
        height: 1.6rem;
        font-size: 0.6rem;
    }
}
