/* ==========================================================================
   Mojo Horizon — Blog (liste des articles + article)
   Loaded only on blog views (home.php, archive.php, single.php).
   Palette: plum #54414B · beige #F6F0E8 · sand #EDE5DE · terracotta #D89276 / #B07054
   ========================================================================== */

.mjb {
    font-family: 'Mulish', system-ui, sans-serif;
    color: #54414B;
    background: #F6F0E8;
}

.mjb h1,
.mjb h2,
.mjb h3 {
    font-family: 'Archivo', sans-serif;
    font-stretch: 110%;
    font-weight: 700;
    letter-spacing: -0.02em;
}

/* Links are colored per component (no global `.mjb a` rule: it would override .mj-btn colors) */
.mjb-kicker a {
    color: inherit;
    text-decoration: none;
}

.mjb-wrap {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 28px;
}

.mjb-wrap--narrow {
    max-width: 776px; /* 720px text + gutters */
}

.mjb-kicker {
    margin: 0;
    font-size: 13px;
    letter-spacing: .2em;
    text-transform: uppercase;
    font-weight: 700;
    line-height: 1.4;
    color: #B07054;
}

/* ── Blog list: header band ─────────────────────────────────────────── */
.mjb-head {
    background: #54414B;
    color: #EDE5DE;
    padding: 184px 0 88px; /* includes the fixed site header (~100px) */
}

.mjb-head .mjb-kicker {
    color: #D89276;
}

.mjb-head h1 {
    margin: 20px 0 0;
    font-size: clamp(34px, 5vw, 60px);
    line-height: 1.05;
    color: #F6F0E8;
}

.mjb-head-intro {
    margin: 24px 0 0;
    max-width: 60ch;
    font-size: 19px;
    line-height: 1.7;
    color: #D9CCC4;
}

.mjb-head-intro p {
    margin: 0 0 12px;
}

/* Category filter */
.mjb-cats {
    margin: 40px 0 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.mjb-cats a {
    display: inline-block;
    padding: 9px 18px;
    border: 1px solid rgba(237, 229, 222, .35);
    border-radius: 999px;
    font-size: 15px;
    font-weight: 600;
    color: #EDE5DE;
    text-decoration: none;
    transition: background-color 160ms ease, border-color 160ms ease;
}

.mjb-cats a:hover {
    border-color: #D89276;
}

.mjb-cats a.is-active {
    background: #D89276;
    border-color: #D89276;
    color: #54414B;
}

/* ── Blog list: grid of cards ───────────────────────────────────────── */
.mjb-list {
    padding: 80px 0 112px;
}

.mjb-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(100%, 340px), 1fr));
    gap: 32px;
}

.mjb-card {
    background: #FFFFFF;
    display: flex;
    flex-direction: column;
    transition: box-shadow 180ms ease, transform 180ms ease;
}

.mjb-card:hover {
    box-shadow: 0 16px 40px rgba(84, 65, 75, .13);
    transform: translateY(-2px);
}

.mjb-card-link {
    display: flex;
    flex-direction: column;
    height: 100%;
    color: inherit;
    text-decoration: none;
}

.mjb-card-img {
    aspect-ratio: 16 / 10;
    overflow: hidden;
    background: linear-gradient(135deg, #54414B 0%, #8C7B6E 100%);
}

.mjb-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.mjb-card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 28px 30px 32px;
    border-top: 4px solid #D89276;
}

.mjb-meta {
    margin: 0;
    font-size: 14px;
    color: #8C7B6E;
}

.mjb-meta .mjb-cat {
    font-size: 12px;
    letter-spacing: .18em;
    text-transform: uppercase;
    font-weight: 700;
    color: #B07054;
}

.mjb-card-title {
    margin: 0;
    font-size: 23px;
    line-height: 1.25;
    color: #54414B;
}

.mjb-excerpt {
    margin: 0;
    font-size: 17px;
    line-height: 1.65;
    color: #6B5B62;
}

.mjb-more {
    margin-top: auto;
    padding-top: 6px;
    font-family: 'Archivo', sans-serif;
    font-stretch: 110%;
    font-weight: 700;
    font-size: 16px;
    color: #B07054;
}

/* Featured (latest) post: spans the full row, image beside text */
@media (min-width: 900px) {
    .mjb-card--featured {
        grid-column: 1 / -1;
    }

    .mjb-card--featured .mjb-card-link {
        display: grid;
        grid-template-columns: 1.25fr 1fr;
    }

    .mjb-card--featured .mjb-card-img {
        aspect-ratio: auto;
        min-height: 380px;
    }

    .mjb-card--featured .mjb-card-body {
        border-top: 0;
        border-left: 4px solid #D89276;
        padding: 48px 52px;
        justify-content: center;
    }

    .mjb-card--featured .mjb-card-title {
        font-size: clamp(26px, 2.6vw, 34px);
    }

    .mjb-card--featured .mjb-more {
        margin-top: 10px;
    }
}

/* Pagination */
.mjb-pagination {
    margin-top: 64px;
}

.mjb-pagination .nav-links {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}

.mjb-pagination .page-numbers {
    min-width: 46px;
    padding: 11px 16px;
    text-align: center;
    background: #FFFFFF;
    color: #54414B;
    font-weight: 700;
    text-decoration: none;
}

.mjb-pagination .page-numbers.current {
    background: #54414B;
    color: #F6F0E8;
}

.mjb-empty {
    max-width: 56ch;
    font-size: 19px;
    line-height: 1.7;
    color: #6B5B62;
}

/* ── Single article ─────────────────────────────────────────────────── */
.mjb-article-head {
    padding: 168px 0 48px; /* includes the fixed site header (~100px) */
}

.mjb-back {
    display: inline-block;
    margin-bottom: 36px;
    font-size: 15px;
    font-weight: 600;
    color: #8C7B6E !important;
    text-decoration: none;
}

.mjb-back:hover {
    color: #54414B !important;
}

.mjb-article-head h1 {
    margin: 18px 0 0;
    font-size: clamp(32px, 4.6vw, 54px);
    line-height: 1.08;
    color: #54414B;
    text-wrap: balance;
}

.mjb-article-head .mjb-meta {
    margin-top: 24px;
    font-size: 15px;
}

.mjb-cover-band {
    padding-bottom: 8px;
}

.mjb-cover {
    max-width: 1136px;
    margin: 0 auto;
    padding: 0 28px;
}

.mjb-cover img {
    width: 100%;
    height: auto;
    aspect-ratio: 16 / 9;
    object-fit: cover;
    display: block;
}

.mjb-article-body {
    padding: 64px 0 24px;
}

/* Article typography */
.mjb-prose {
    font-size: 19px;
    line-height: 1.78;
    color: #4A3A42;
}

.mjb-prose > *,
.mjb-prose > .elementor-widget-container > * {
    margin: 0 0 24px;
}

/* Elementor « Contenu de l'article » widget carrying the mjb-prose class */
.elementor-widget.mjb-prose {
    font-family: 'Mulish', system-ui, sans-serif;
}

.mjb-prose h2,
.mjb-prose h3 {
    font-family: 'Archivo', sans-serif;
    font-stretch: 110%;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.mjb-prose h2 {
    margin: 56px 0 18px;
    font-size: clamp(26px, 3vw, 32px);
    line-height: 1.2;
    color: #54414B;
}

.mjb-prose h3 {
    margin: 40px 0 14px;
    font-size: 22px;
    line-height: 1.3;
    color: #54414B;
}

.mjb-prose a {
    color: #B07054;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.mjb-prose strong {
    color: #54414B;
}

.mjb-prose ul,
.mjb-prose ol {
    padding-left: 1.3em;
}

.mjb-prose li {
    margin-bottom: 8px;
}

.mjb-prose li::marker {
    color: #D89276;
}

.mjb-prose blockquote {
    margin: 40px 0;
    padding: 4px 0 4px 26px;
    border-left: 4px solid #D89276;
    font-family: 'Archivo', sans-serif;
    font-stretch: 110%;
    font-weight: 600;
    font-size: clamp(21px, 2.4vw, 26px);
    line-height: 1.4;
    color: #54414B;
}

.mjb-prose blockquote p {
    margin: 0;
}

.mjb-prose img,
.mjb-prose figure {
    max-width: 100%;
    height: auto;
}

.mjb-prose figcaption {
    margin-top: 10px;
    font-size: 14px;
    color: #8C7B6E;
}

.mjb-prose hr {
    border: 0;
    border-top: 1px solid rgba(84, 65, 75, .18);
    margin: 48px 0;
}

/* Author box */
.mjb-author {
    margin-top: 56px;
    margin-bottom: 72px; /* space before « À lire aussi », on the beige background */
    padding: 36px 0 0;
    border-top: 1px solid rgba(84, 65, 75, .18);
    display: flex;
    gap: 24px;
    align-items: flex-start;
}

.mjb-author img {
    width: 88px;
    height: 88px;
    border-radius: 50%;
    object-fit: cover;
    flex-shrink: 0;
}

.mjb-author-name {
    margin: 0 0 6px;
    font-family: 'Archivo', sans-serif;
    font-stretch: 110%;
    font-weight: 700;
    font-size: 19px;
    color: #54414B;
}

.mjb-author p {
    margin: 0 0 10px;
    font-size: 17px;
    line-height: 1.65;
    color: #6B5B62;
}

.mjb-author a {
    font-weight: 700;
    color: #B07054;
    text-decoration: none;
}

/* Related posts */
.mjb-related {
    background: #EDE5DE;
    padding: 88px 0 96px;
}

.mjb-related h2 {
    margin: 0 0 40px;
    font-size: clamp(26px, 3vw, 36px);
    color: #54414B;
}

/* Closing CTA */
.mjb-cta {
    background: #54414B;
    color: #EDE5DE;
    padding: 96px 0;
}

.mjb-cta h2 {
    margin: 0;
    max-width: 22ch;
    font-size: clamp(28px, 3.6vw, 44px);
    line-height: 1.12;
    color: #F6F0E8;
}

.mjb-cta p {
    margin: 20px 0 36px;
    max-width: 52ch;
    font-size: 19px;
    line-height: 1.7;
    color: #D9CCC4;
}

/* ── Mobile ─────────────────────────────────────────────────────────── */
@media (max-width: 767px) {
    .mjb-wrap,
    .mjb-cover {
        padding: 0 20px;
    }

    .mjb-head {
        padding: 144px 0 56px;
    }

    .mjb-list {
        padding: 48px 0 72px;
    }

    .mjb-card-body {
        padding: 24px 22px 26px;
    }

    .mjb-article-head {
        padding: 136px 0 32px;
    }

    .mjb-article-body {
        padding: 40px 0 16px;
    }

    .mjb-prose {
        font-size: 18px;
    }

    .mjb-author {
        flex-direction: column;
        margin-bottom: 48px;
    }

    .mjb-related,
    .mjb-cta {
        padding: 64px 0;
    }
}

/* ── Article built with Elementor (content rendered inside the « Contenu de la publication » widget) ──
   Same typography as classic articles, applied to Elementor widgets. */
:is(.mjb-prose, body.single-post [data-elementor-type="wp-post"]) .e-con {
    --padding-left: 0px !important;
    --padding-right: 0px !important;
    --padding-top: 0px !important;
    --padding-bottom: 0px !important;
    --gap: 0px !important;
    --row-gap: 0px !important;
}

:is(.mjb-prose, body.single-post [data-elementor-type="wp-post"]) .elementor-widget-text-editor {
    font-size: 19px;
    line-height: 1.78;
    color: #4A3A42;
}

:is(.mjb-prose, body.single-post [data-elementor-type="wp-post"]) .elementor-widget-text-editor p,
:is(.mjb-prose, body.single-post [data-elementor-type="wp-post"]) .elementor-widget-text-editor ul,
:is(.mjb-prose, body.single-post [data-elementor-type="wp-post"]) .elementor-widget-text-editor ol {
    margin: 0 0 24px;
}

:is(.mjb-prose, body.single-post [data-elementor-type="wp-post"]) .elementor-widget-heading .elementor-heading-title {
    font-family: 'Archivo', sans-serif;
    font-stretch: 110%;
    font-weight: 700;
    letter-spacing: -0.02em;
    color: #54414B;
}

:is(.mjb-prose, body.single-post [data-elementor-type="wp-post"]) .elementor-widget-heading h2.elementor-heading-title {
    margin: 56px 0 18px;
    font-size: clamp(26px, 3vw, 32px);
    line-height: 1.2;
}

:is(.mjb-prose, body.single-post [data-elementor-type="wp-post"]) .elementor-widget-heading h3.elementor-heading-title {
    margin: 40px 0 14px;
    font-size: 22px;
    line-height: 1.3;
}

:is(.mjb-prose, body.single-post [data-elementor-type="wp-post"]) .elementor-widget-image {
    margin: 16px 0 40px;
}

:is(.mjb-prose, body.single-post [data-elementor-type="wp-post"]) .elementor-widget-image img {
    width: 100%;
    height: auto;
}

/* Article content is full width (header widget inside); text widgets keep the reading column */
:is(.mjb-prose, body.single-post [data-elementor-type="wp-post"]) .elementor-widget:not(.elementor-widget-mj-blog-article-head) {
    width: 100%;
    max-width: 776px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 28px;
    padding-right: 28px;
}

:is(.mjb-prose, body.single-post [data-elementor-type="wp-post"]) .elementor-widget-mj-blog-article-head {
    width: 100%;
    margin-bottom: 56px;
}

/* Classic (non-Elementor) article content: the whole widget becomes the reading column */
.elementor-widget.mjb-prose:not(:has([data-elementor-type])) {
    max-width: 776px;
    margin-left: auto;
    margin-right: auto;
    padding-left: 28px;
    padding-right: 28px;
}

@media (max-width: 767px) {
    :is(.mjb-prose, body.single-post [data-elementor-type="wp-post"]) .elementor-widget:not(.elementor-widget-mj-blog-article-head) {
        padding-left: 20px;
        padding-right: 20px;
    }
    :is(.mjb-prose, body.single-post [data-elementor-type="wp-post"]) .elementor-widget-mj-blog-article-head {
        margin-bottom: 36px;
    }
    .elementor-widget.mjb-prose:not(:has([data-elementor-type])) {
        padding-left: 20px;
        padding-right: 20px;
    }
}

/* Header widget placed inside the article content: keep its own link styles */
:is(.mjb-prose, body.single-post [data-elementor-type="wp-post"]) .mjb-article-head a {
    text-decoration: none;
}
