/* ==========================================================================
   Blog — styles propres à la page d’index
   S’appuie sur reset.css, variables.css et styles.css.
   ========================================================================== */

.blog-page {
    background: var(--white);
}

.blog-page .masthead {
    background: var(--coffee-light);
    border-bottom: 1px solid var(--grey-300);
}

/* Une du blog */

.blog-hero {
    background: linear-gradient(135deg, var(--coffee-cream) 0%, var(--coffee-light) 100%);
    padding: 5rem 0 4.5rem;
    text-align: center;
}

.blog-hero-inner {
    max-width: 880px;
}

.blog-hero h1 {
    margin-bottom: 1.25rem;
}

.blog-hero p {
    max-width: 720px;
    margin: 0 auto;
    color: var(--grey-700);
    font-family: var(--ff-serif);
    font-size: clamp(1.2rem, 2.2vw, 1.55rem);
    line-height: 1.55;
}

.blog-categories {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.96);
    border-bottom: 1px solid var(--grey-300);
    box-shadow: var(--shadow-sm);
}

.blog-categories ul {
    display: flex;
    gap: 2rem;
    justify-content: center;
    overflow-x: auto;
    padding: 1rem 0;
    scrollbar-width: none;
}

.blog-categories li {
    flex: 0 0 auto;
}

.blog-categories a {
    color: var(--grey-700);
    font-size: var(--text-sm);
    font-weight: 600;
}

.blog-categories a:hover,
.blog-categories a.active {
    color: var(--red);
}

/* Article à la une */

.featured-card {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(300px, 0.85fr);
    background: var(--white);
    border: 1px solid var(--grey-300);
    box-shadow: var(--shadow-md);
}

.featured-visual {
    position: relative;
    display: flex;
    min-height: 430px;
    padding: 2rem;
    overflow: hidden;
    align-items: flex-end;
    color: var(--white);
    background:
        linear-gradient(125deg, rgba(23, 23, 23, 0.2), rgba(23, 23, 23, 0.7)),
        linear-gradient(145deg, var(--red) 0 42%, #8c1c1c 42% 58%, var(--coffee-cream) 58%);
}

.featured-visual::before,
.featured-visual::after {
    position: absolute;
    content: "";
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 50%;
}

.featured-visual::before {
    top: -6rem;
    right: -4rem;
    width: 20rem;
    height: 20rem;
}

.featured-visual::after {
    right: 4rem;
    bottom: -8rem;
    width: 15rem;
    height: 15rem;
}

.visual-country {
    position: absolute;
    top: 2rem;
    left: 2rem;
    z-index: 1;
    padding: 0.4rem 0.8rem;
    border: 1px solid rgba(255, 255, 255, 0.55);
    font-size: var(--text-xs);
    font-weight: 600;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.visual-word {
    position: relative;
    z-index: 1;
    font-family: var(--ff-serif);
    font-size: clamp(4rem, 9vw, 8rem);
    font-weight: 800;
    letter-spacing: -0.06em;
    line-height: 0.8;
}

.featured-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: clamp(2rem, 5vw, 4rem);
}

.featured-content h2 {
    margin-bottom: 1rem;
    font-size: clamp(2rem, 3.5vw, 3.2rem);
}

.featured-content h2 a,
.post-card h3 a,
.archive-item h3 a {
    color: inherit;
}

.featured-content h2 a:hover,
.post-card h3 a:hover,
.archive-item h3 a:hover {
    color: var(--red);
}

.post-meta {
    color: var(--grey-600);
    font-size: var(--text-xs);
    letter-spacing: 0.4px;
    text-transform: uppercase;
}

.featured-deck {
    margin: 1.5rem 0;
    color: var(--grey-700);
    font-size: 1.05rem;
}

.read-more,
.section-link {
    width: fit-content;
    color: var(--red);
    font-size: var(--text-sm);
    font-weight: 700;
}

.read-more:hover,
.section-link:hover {
    text-decoration: underline;
    text-underline-offset: 0.25rem;
}

/* Derniers billets */

.blog-section-header {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 2rem;
    margin-bottom: 2.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--grey-400);
}

.blog-section-header .kicker,
.archive-heading .kicker,
.blog-about .kicker {
    margin-bottom: 0.4rem;
}

.post-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2rem;
}

.post-card {
    background: var(--white);
    border: 1px solid var(--grey-300);
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.post-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.post-card-visual {
    display: flex;
    aspect-ratio: 16 / 9;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    color: var(--white);
}

.post-card-visual span {
    font-family: var(--ff-serif);
    font-size: clamp(3.5rem, 7vw, 6rem);
    font-weight: 800;
    opacity: 0.9;
    transition: transform var(--transition-slow);
}

.post-card:hover .post-card-visual span {
    transform: scale(1.08);
}

.visual-spain {
    background: linear-gradient(145deg, #ba1e2e 0 45%, #e3ad32 45% 60%, #8f1723 60%);
}

.visual-europe {
    background: radial-gradient(circle at center, #315ea8 0 18%, transparent 19%), #183b73;
}

.visual-data {
    background: linear-gradient(115deg, var(--grey-800) 0 45%, var(--red) 45% 62%, var(--coffee-cream) 62%);
}

.post-card-content {
    padding: 1.5rem;
}

.post-card-content .kicker {
    margin-bottom: 0.5rem;
    font-size: var(--text-xs);
}

.post-card h3 {
    margin-bottom: 0.75rem;
    font-size: 1.45rem;
}

.post-card-content>p:last-child {
    margin-top: 1rem;
    color: var(--grey-700);
    font-size: 0.93rem;
}

/* Archives */

.archive-layout {
    display: grid;
    grid-template-columns: minmax(220px, 0.7fr) minmax(0, 1.3fr);
    gap: clamp(3rem, 8vw, 7rem);
}

.archive-heading p {
    margin-top: 1rem;
    color: var(--grey-700);
}

.archive-list {
    border-top: 1px solid var(--grey-300);
}

.archive-item {
    position: relative;
    padding: 1.75rem 3rem 1.75rem 0;
    border-bottom: 1px solid var(--grey-300);
}

.archive-item h3 {
    margin-top: 0.4rem;
    font-size: clamp(1.25rem, 2vw, 1.6rem);
}

.archive-arrow {
    position: absolute;
    top: 50%;
    right: 0;
    color: var(--red);
    font-size: 1.5rem;
    transform: translateY(-50%);
    transition: transform var(--transition-base);
}

.archive-item:hover .archive-arrow {
    transform: translate(0.4rem, -50%);
}

/* Manifeste de fin de page */

.blog-about {
    padding: 3.5rem 0;
    border-top: 4px solid var(--black);
}

.blog-about-inner {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
}

.blog-about h2 {
    font-size: clamp(1.8rem, 3vw, 2.6rem);
}

.blog-about p {
    color: var(--grey-700);
    font-size: 1.05rem;
}

/* Responsive */

@media (max-width: 1024px) {
    .blog-page .masthead {
        height: auto;
    }

    .featured-card {
        grid-template-columns: 1fr;
    }

    .featured-visual {
        min-height: 360px;
    }

    .featured-content {
        max-width: 760px;
    }

    .post-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .post-card:last-child {
        grid-column: 1 / -1;
        display: grid;
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .blog-hero {
        padding: 3.5rem 0 3rem;
    }

    .blog-categories ul {
        justify-content: flex-start;
    }

    .featured-post {
        padding: 2rem 0;
    }

    .featured-visual {
        min-height: 260px;
    }

    .visual-word {
        font-size: clamp(4rem, 20vw, 7rem);
    }

    .blog-section-header,
    .archive-layout,
    .blog-about-inner {
        display: block;
    }

    .blog-section-header .section-link {
        display: inline-block;
        margin-top: 1rem;
    }

    .post-grid {
        grid-template-columns: 1fr;
    }

    .post-card:last-child {
        grid-column: auto;
        display: block;
    }

    .archive-list {
        margin-top: 2rem;
    }

    .blog-about p {
        margin-top: 1rem;
    }
}

@media (max-width: 480px) {
    .blog-hero {
        padding: 2.75rem 0;
    }

    .featured-visual {
        min-height: 220px;
        padding: 1.25rem;
    }

    .visual-country {
        top: 1.25rem;
        left: 1.25rem;
    }

    .featured-content,
    .post-card-content {
        padding: 1.25rem;
    }
}

/* ==========================================================================
   Gabarit d’article
   ========================================================================== */

.article-header {
    padding: 5rem 0 3.5rem;
    background: linear-gradient(135deg, var(--coffee-cream) 0%, var(--coffee-light) 100%);
}

.article-header-inner {
    max-width: 960px;
}

.back-to-blog {
    display: inline-block;
    margin-bottom: 3rem;
    color: var(--grey-700);
    font-size: var(--text-sm);
    font-weight: 600;
}

.back-to-blog:hover {
    color: var(--red);
}

.article-header h1 {
    max-width: 900px;
    font-size: clamp(2.7rem, 6vw, 5.4rem);
}

.article-deck {
    max-width: 780px;
    margin-top: 1.75rem;
    color: var(--grey-700);
    font-family: var(--ff-serif);
    font-size: clamp(1.25rem, 2.4vw, 1.65rem);
    line-height: 1.5;
}

.article-byline {
    display: flex;
    gap: 1rem;
    align-items: center;
    margin-top: 2.5rem;
    color: var(--grey-700);
    font-size: var(--text-sm);
}

.author-mark {
    display: flex;
    width: 3rem;
    height: 3rem;
    flex: 0 0 3rem;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--red);
    color: var(--white);
    font-family: var(--ff-serif);
    font-weight: 700;
}

.article-lead-figure {
    margin: 0;
    padding: 0 0 1rem;
    background: var(--coffee-light);
}

.article-lead-visual {
    display: flex;
    width: min(calc(100% - 4rem), 1200px);
    min-height: 520px;
    margin: 0 auto;
    align-items: flex-end;
    padding: clamp(2rem, 5vw, 4rem);
    overflow: hidden;
    color: var(--white);
    background:
        linear-gradient(120deg, rgba(23, 23, 23, 0.1), rgba(23, 23, 23, 0.65)),
        linear-gradient(145deg, var(--red) 0 42%, #8c1c1c 42% 58%, var(--coffee-cream) 58%);
}

.article-lead-visual span {
    font-family: var(--ff-serif);
    font-size: clamp(5rem, 15vw, 12rem);
    font-weight: 800;
    letter-spacing: -0.06em;
    line-height: 0.75;
}

.article-lead-figure figcaption {
    max-width: 1200px;
}

.article-layout {
    max-width: 820px;
    padding-top: 4.5rem;
    padding-bottom: 5rem;
}

.article-body {
    color: var(--grey-800);
    font-size: 1.16rem;
    line-height: 1.85;
}

.article-body>p {
    margin-bottom: 1.5rem;
}

.article-body .article-intro {
    color: var(--black);
    font-size: 1.3rem;
    line-height: 1.75;
}

.article-intro::first-letter {
    float: left;
    margin: 0.08em 0.12em 0 0;
    color: var(--red);
    font-size: 4.6rem;
    font-weight: 700;
    line-height: 0.78;
}

.article-body h2 {
    margin: 3.5rem 0 1.25rem;
    color: var(--black);
    font-size: clamp(1.8rem, 4vw, 2.5rem);
}

.article-body blockquote {
    margin: 3.5rem 0;
    font-size: 1.35rem;
    line-height: 1.65;
}

.article-note {
    margin: 3rem 0;
    padding: 1.75rem 2rem;
    border-top: 3px solid var(--red);
    background: var(--coffee);
    font-family: var(--ff-sans);
    font-size: 1rem;
    line-height: 1.65;
}

.article-note .kicker {
    margin-bottom: 0.5rem;
}

.article-footer {
    margin-top: 4rem;
    padding-top: 2rem;
    border-top: 1px solid var(--grey-300);
}

.article-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    font-family: var(--ff-sans);
}

.article-tags a {
    padding: 0.35rem 0.85rem;
    border: 1px solid var(--grey-400);
    border-radius: 9999px;
    color: var(--grey-700);
    font-size: var(--text-sm);
}

.article-tags a:hover {
    border-color: var(--red);
    color: var(--red);
}

.article-signature {
    margin-top: 2.5rem;
    color: var(--red);
    font-size: 1.4rem;
    font-style: italic;
    font-weight: 600;
    text-align: right;
}

.article-navigation {
    padding: 3rem 0;
    border-top: 1px solid var(--grey-300);
}

.article-navigation-inner {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 3rem;
    align-items: center;
}

.article-navigation a {
    color: var(--grey-800);
}

.article-navigation a:hover {
    color: var(--red);
}

.article-navigation span {
    display: block;
    margin-bottom: 0.4rem;
    color: var(--grey-600);
    font-size: var(--text-xs);
    font-weight: 600;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.article-navigation strong {
    display: block;
    font-family: var(--ff-serif);
    line-height: 1.4;
}

.next-article {
    text-align: right;
}

.all-articles {
    padding: 0.6rem 1rem;
    border: 1px solid var(--grey-500);
    font-size: var(--text-sm);
    font-weight: 600;
    white-space: nowrap;
}

@media (max-width: 768px) {
    .article-header {
        padding: 3rem 0 2.5rem;
    }

    .back-to-blog {
        margin-bottom: 2rem;
    }

    .article-lead-visual {
        width: 100%;
        min-height: 320px;
    }

    .article-layout {
        padding-top: 3rem;
        padding-bottom: 3.5rem;
    }

    .article-body {
        font-size: 1.08rem;
        line-height: 1.75;
    }

    .article-navigation-inner {
        grid-template-columns: 1fr 1fr;
        gap: 2rem;
    }

    .all-articles {
        grid-column: 1 / -1;
        grid-row: 1;
        justify-self: center;
    }
}

@media (max-width: 480px) {
    .article-header h1 {
        font-size: 2.6rem;
    }

    .article-lead-visual {
        min-height: 240px;
        padding: 1rem;
    }

    .article-lead-figure figcaption {
        padding-inline: 1rem;
    }

    .article-body blockquote,
    .article-note {
        margin-inline: 0;
    }

    .article-navigation-inner {
        display: block;
    }

    .article-navigation a {
        display: block;
    }

    .all-articles {
        width: fit-content;
        margin: 0 auto 2rem;
    }

    .previous-article,
    .next-article {
        padding: 1.5rem 0;
        border-top: 1px solid var(--grey-300);
        text-align: left;
    }
}
