/* ================================================================
   ACTUALITÉS / HISTORIQUE — editorial theme "The Interlocutor"
   Paper-coloured background, Fraunces & Instrument Serif typography,
   rust accents, grain overlay, corner-marker cards, scroll reveals.
================================================================ */

@import url("https://fonts.googleapis.com/css2?family=Fraunces:ital,opsz,wght,SOFT@0,9..144,200..900,30..100;1,9..144,200..900,30..100&family=Instrument+Serif:ital@0;1&family=JetBrains+Mono:wght@300;400;500&display=swap");

:root {
    --paper: #efe7d6;
    --paper-2: #e7ddc7;
    --paper-3: #ddd3bb;
    --ink: #1b140c;
    --ink-soft: #3a2f22;
    --ink-mute: #6a5a46;
    --rust: #b8441f;
    --rust-deep: #8a2d12;
    --rule: rgba(27, 20, 12, .22);
    --rule-soft: rgba(27, 20, 12, .12);
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

html, body {
    margin: 0;
    padding: 0;
}

body {
    background: var(--paper);
    color: var(--ink);
    font-family: "Fraunces", Georgia, serif;
    font-variation-settings: "opsz" 14, "SOFT" 30;
    font-size: 18px;
    line-height: 1.65;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
    overflow-x: hidden;
    background-image:
        radial-gradient(1200px 600px at 80% -10%, rgba(184, 68, 31, .12), transparent 60%),
        radial-gradient(900px 500px at -10% 110%, rgba(27, 20, 12, .10), transparent 55%);
}

/* Grain overlay */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='240' height='240'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.11  0 0 0 0 0.08  0 0 0 0 0.05  0 0 0 0.08 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
    mix-blend-mode: multiply;
    opacity: .55;
}

::selection {
    background: var(--rust);
    color: var(--paper);
}

.news-history-shell {
    position: relative;
    z-index: 2;
    max-width: 1280px;
    margin: 0 auto;
    padding: 48px 48px 84px;
}

/* ============ HEADER / MASTHEAD ============ */
.news-history-header {
    padding: 24px 0 36px;
    border-bottom: 1px solid var(--ink);
    margin-bottom: 40px;
    position: relative;
}

.news-history-header::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -4px;
    height: 1px;
    background: var(--rule);
}

.news-history-back {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: "JetBrains Mono", monospace;
    font-size: 11px;
    letter-spacing: .22em;
    text-transform: uppercase;
    color: var(--ink-soft);
    text-decoration: none;
    font-weight: 400;
    padding-bottom: 4px;
    border-bottom: 1px solid var(--rule);
    transition: color .3s, border-color .3s;
}

.news-history-back:hover {
    color: var(--rust);
    border-color: var(--rust);
}

.news-history-header h1 {
    margin: 28px 0 14px;
    font-family: "Fraunces", serif;
    font-variation-settings: "opsz" 144, "SOFT" 100;
    font-weight: 300;
    font-size: clamp(48px, 7.2vw, 112px);
    line-height: .94;
    letter-spacing: -.032em;
    color: var(--ink);
    opacity: 0;
    transform: translateY(24px);
    animation: nh-rise 1.1s cubic-bezier(.2, .8, .2, 1) .15s forwards;
}

.news-history-header h1::after {
    content: ".";
    color: var(--rust);
    font-family: "Instrument Serif", serif;
    font-style: italic;
}

@keyframes nh-rise {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.news-history-header p {
    margin: 0;
    max-width: 58ch;
    font-family: "Instrument Serif", serif;
    font-style: italic;
    font-size: 22px;
    line-height: 1.48;
    color: var(--ink-soft);
    border-left: 1px solid var(--rule);
    padding: 4px 0 4px 20px;
    opacity: 0;
    animation: nh-fade 1s ease .85s forwards;
}

@keyframes nh-fade {
    to {
        opacity: 1;
    }
}

/* ============ FILTERS ============ */
.news-history-filters {
    margin: 0 0 40px;
    background: var(--paper-2);
    border: 1px solid var(--rule);
    border-radius: 0;
    padding: 22px 24px;
    position: relative;
    opacity: 0;
    animation: nh-fade 1s ease 1.05s forwards;
}

.news-history-filters::before {
    content: "";
    position: absolute;
    top: -1px;
    left: -1px;
    width: 14px;
    height: 14px;
    border-top: 2px solid var(--rust);
    border-left: 2px solid var(--rust);
}

.news-history-filters::after {
    content: "";
    position: absolute;
    bottom: -1px;
    right: -1px;
    width: 14px;
    height: 14px;
    border-bottom: 2px solid var(--rust);
    border-right: 2px solid var(--rust);
}

.news-history-form {
    display: grid;
    grid-template-columns: 1.6fr 1fr auto;
    gap: 18px;
    align-items: end;
}

.news-history-form label {
    display: grid;
    gap: 8px;
    font-family: "JetBrains Mono", monospace;
    font-size: 11px;
    letter-spacing: .2em;
    text-transform: uppercase;
    color: var(--rust-deep);
    font-weight: 500;
}

.news-history-form input,
.news-history-form select {
    min-height: 46px;
    border-radius: 0;
    border: 1px solid var(--ink);
    background: var(--paper);
    padding: 10px 14px;
    font-family: "Fraunces", serif;
    font-size: 16px;
    color: var(--ink);
    transition: border-color .3s, background .3s;
}

.news-history-form input:focus,
.news-history-form select:focus {
    outline: none;
    border-color: var(--rust);
    background: #fff;
}

.news-history-form button {
    min-height: 46px;
    border: 1px solid var(--ink);
    border-radius: 0;
    background: var(--ink);
    color: var(--paper);
    font-family: "JetBrains Mono", monospace;
    font-size: 12px;
    letter-spacing: .22em;
    text-transform: uppercase;
    padding: 0 24px;
    cursor: pointer;
    transition: background .35s, color .35s, transform .35s, border-color .35s;
}

.news-history-form button:hover {
    background: var(--rust);
    border-color: var(--rust);
    transform: translate(-2px, -2px);
}

.news-history-stats {
    margin-top: 16px;
    display: flex;
    justify-content: space-between;
    gap: 12px;
    font-family: "JetBrains Mono", monospace;
    font-size: 11px;
    letter-spacing: .18em;
    text-transform: uppercase;
    color: var(--ink-mute);
    padding-top: 14px;
    border-top: 1px solid var(--rule);
}

.news-history-stats span::before {
    content: "◦ ";
    color: var(--rust);
}

/* ============ GRID ============ */
.news-history-grid {
    margin-top: 4px;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 28px;
}

.news-history-card {
    position: relative;
    background: var(--paper-2);
    border: 1px solid var(--rule);
    border-radius: 0;
    overflow: hidden;
    box-shadow: none;
    opacity: 0;
    transform: translateY(18px);
    transition: opacity .8s ease, transform .8s cubic-bezier(.2, .8, .2, 1), box-shadow .5s;
}

.news-history-card.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.news-history-card::before {
    content: "";
    position: absolute;
    top: -1px;
    left: -1px;
    width: 14px;
    height: 14px;
    border-top: 2px solid var(--rust);
    border-left: 2px solid var(--rust);
    z-index: 2;
}

.news-history-card::after {
    content: "";
    position: absolute;
    bottom: -1px;
    right: -1px;
    width: 14px;
    height: 14px;
    border-bottom: 2px solid var(--rust);
    border-right: 2px solid var(--rust);
    z-index: 2;
}

.news-history-card:hover {
    transform: translateY(-6px) rotate(-.25deg);
    box-shadow: 0 24px 36px -24px rgba(27, 20, 12, .35);
}

.news-history-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
    filter: saturate(.9) contrast(1.04);
    transition: transform .9s cubic-bezier(.2, .8, .2, 1), filter .6s;
}

.news-history-card:hover img {
    transform: scale(1.04);
    filter: saturate(1.05) contrast(1.05);
}

.news-history-card-body {
    padding: 22px 22px 24px;
}

.news-history-meta {
    margin: 0 0 12px;
    font-family: "JetBrains Mono", monospace;
    font-size: 10px;
    letter-spacing: .24em;
    text-transform: uppercase;
    color: var(--rust-deep);
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.news-history-meta::before {
    content: "";
    width: 20px;
    height: 1px;
    background: var(--rust);
}

.news-history-card h2 {
    margin: 0 0 12px;
    font-family: "Fraunces";
    font-weight: 400;
    font-size: 22px;
    line-height: 1.2;
    letter-spacing: -.01em;
    color: var(--ink);
}

.news-history-card p {
    margin: 0;
    font-size: 15px;
    line-height: 1.6;
    color: var(--ink-soft);
}

/* ============ EMPTY STATE ============ */
.news-history-empty {
    margin-top: 40px;
    padding: 64px 32px;
    background: var(--paper-2);
    border: 1px dashed var(--rule);
    color: var(--ink-soft);
    text-align: center;
    font-family: "Instrument Serif", serif;
    font-style: italic;
    font-size: 22px;
}

/* ============ PAGINATION ============ */
.news-history-pagination {
    margin-top: 56px;
    padding: 28px 0 0;
    border-top: 1px solid var(--ink);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 18px;
    font-family: "JetBrains Mono", monospace;
    font-size: 11px;
    letter-spacing: .2em;
    text-transform: uppercase;
    color: var(--ink-soft);
}

.news-history-pagination a {
    text-decoration: none;
    color: var(--ink);
    padding: 12px 20px;
    border: 1px solid var(--ink);
    transition: background .35s, color .35s, transform .35s;
}

.news-history-pagination a:hover {
    background: var(--rust);
    border-color: var(--rust);
    color: var(--paper);
    transform: translate(-2px, -2px);
}

.news-history-pagination span {
    font-family: "Instrument Serif", serif;
    font-style: italic;
    font-size: 18px;
    letter-spacing: 0;
    text-transform: none;
    color: var(--rust);
}

/* ============ Responsive ============ */
@media (max-width: 860px) {
    .news-history-shell {
        padding: 32px 24px 56px;
    }

    .news-history-form {
        grid-template-columns: 1fr;
    }

    .news-history-form button {
        width: 100%;
    }

    .news-history-stats {
        flex-direction: column;
        align-items: flex-start;
    }

    .news-history-pagination {
        flex-direction: column;
        gap: 14px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation: none !important;
        transition: none !important;
    }
    .news-history-header h1,
    .news-history-header p,
    .news-history-filters,
    .news-history-card {
        opacity: 1;
        transform: none;
    }
}
