/* ============================================================
   APAM — ACTUALITÉS
   Feuille de style complète pour /actualites/actualites.html
============================================================ */


/* ============================================================
   VARIABLES
============================================================ */

:root {

    --apam-orange:
        #F5A623;

    --apam-orange-dark:
        #E59616;

    --apam-red:
        #C34324;

    --apam-cream:
        #FFF8EC;

    --apam-white:
        #FFFFFF;

    --apam-text:
        #3E3E3E;

    --apam-muted:
        #777777;

    --apam-light:
        #F4F4F4;

    --apam-border:
        rgba(0, 0, 0, 0.07);

    --apam-shadow:
        0 12px 35px
        rgba(0, 0, 0, 0.08);

    --apam-shadow-hover:
        0 24px 55px
        rgba(0, 0, 0, 0.16);

    --apam-radius:
        24px;

    --apam-transition:
        0.35s cubic-bezier(
            .2,
            .8,
            .2,
            1
        );
}


/* ============================================================
   RESET
============================================================ */

* {
    box-sizing: border-box;
}


html {
    scroll-behavior: smooth;
}


body {

    margin: 0;

    padding: 0;

    min-height: 100vh;

    font-family:
        "Poppins",
        Arial,
        Helvetica,
        sans-serif;

    background:
        var(--apam-cream);

    color:
        var(--apam-text);
}


body.modal-open {
    overflow: hidden;
}


button,
input,
textarea,
select {
    font: inherit;
}


button {
    -webkit-tap-highlight-color:
        transparent;
}


img {
    max-width: 100%;
}


a {
    color: inherit;
}


/* ============================================================
   HEADER
============================================================ */

.site-header {

    position:
        relative;

    z-index:
        20;

    background:
        #FFFFFF;

    border-bottom:
        1px solid
        rgba(0, 0, 0, 0.06);

    box-shadow:
        0 5px 20px
        rgba(0, 0, 0, 0.04);
}


.header-container {

    width:
        min(
            1180px,
            92%
        );

    min-height:
        88px;

    margin:
        0 auto;

    display:
        flex;

    align-items:
        center;

    justify-content:
        space-between;

    gap:
        25px;
}


.site-brand {

    display:
        flex;

    flex-direction:
        column;

    gap:
        2px;

    text-decoration:
        none;

    line-height:
        1.15;
}


.brand-name {

    color:
        var(--apam-orange);

    font-size:
        24px;

    font-weight:
        700;

    letter-spacing:
        0.5px;
}


.brand-subtitle {

    max-width:
        340px;

    color:
        var(--apam-text);

    font-size:
        12px;

    font-weight:
        500;

    line-height:
        1.45;
}


.back-button {

    display:
        inline-flex;

    align-items:
        center;

    justify-content:
        center;

    padding:
        11px 20px;

    border:
        1.5px solid
        var(--apam-orange);

    border-radius:
        999px;

    color:
        var(--apam-orange);

    background:
        transparent;

    text-decoration:
        none;

    font-size:
        13px;

    font-weight:
        600;

    transition:
        background 0.25s ease,
        color 0.25s ease,
        transform 0.25s ease;
}


.back-button:hover {

    background:
        var(--apam-orange);

    color:
        #FFFFFF;

    transform:
        translateY(-2px);
}


/* ============================================================
   PAGE
============================================================ */

.page {

    width:
        min(
            1180px,
            92%
        );

    margin:
        0 auto;

    padding:
        65px 0 90px;
}


/* ============================================================
   TITRE
============================================================ */

.page-heading {

    margin:
        0 auto 55px;

    text-align:
        center;
}


.eyebrow {

    margin:
        0 0 10px;

    color:
        var(--apam-red);

    font-size:
        13px;

    font-weight:
        700;

    letter-spacing:
        2px;

    text-transform:
        uppercase;
}


.page-heading h1 {

    margin:
        0 0 18px;

    color:
        var(--apam-orange);

    font-size:
        clamp(
            42px,
            6vw,
            68px
        );

    font-weight:
        700;

    line-height:
        1.05;
}


.page-intro {

    max-width:
        720px;

    margin:
        0 auto;

    color:
        #666666;

    font-size:
        17px;

    line-height:
        1.7;
}


/* ============================================================
   GRILLE ACTUALITÉS
============================================================ */

.news-grid {

    display:
        grid;

    grid-template-columns:
        repeat(
            3,
            minmax(
                0,
                1fr
            )
        );

    gap:
        28px;

    align-items:
        stretch;
}


/* ============================================================
   CARTE ACTUALITÉ
============================================================ */

.news-card {

    position:
        relative;

    display:
        flex;

    flex-direction:
        column;

    min-width:
        0;

    overflow:
        hidden;

    background:
        var(--apam-white);

    border:
        1px solid
        var(--apam-border);

    border-radius:
        var(--apam-radius);

    box-shadow:
        var(--apam-shadow);

    cursor:
        pointer;

    transform:
        translateY(0)
        scale(1);

    transition:
        transform
        var(--apam-transition),

        box-shadow
        var(--apam-transition);
}


.news-card:hover {

    transform:
        translateY(-10px)
        scale(1.015);

    box-shadow:
        var(--apam-shadow-hover);
}


/* ============================================================
   IMAGE CARTE
============================================================ */

.news-card-image {

    position:
        relative;

    width:
        100%;

    height:
        250px;

    overflow:
        hidden;

    background:
        #EFEFEF;
}


.news-card-image::after {

    content:
        "";

    position:
        absolute;

    inset:
        0;

    background:
        linear-gradient(
            to top,
            rgba(
                0,
                0,
                0,
                0.20
            ),
            transparent 48%
        );

    pointer-events:
        none;
}


.news-card-image img {

    display:
        block;

    width:
        100%;

    height:
        100%;

    object-fit:
        cover;

    transition:
        transform
        0.65s
        cubic-bezier(
            .2,
            .8,
            .2,
            1
        );
}


.news-card:hover
.news-card-image img {

    transform:
        scale(1.08);
}


/* ============================================================
   CONTENU CARTE
============================================================ */

.news-card-content {

    display:
        flex;

    flex-direction:
        column;

    flex:
        1;

    padding:
        24px 24px 27px;
}


.news-card-date {

    margin:
        0 0 8px;

    color:
        var(--apam-red);

    font-size:
        12px;

    font-weight:
        700;
}


.news-card-title {

    margin:
        0 0 11px;

    color:
        var(--apam-orange);

    font-size:
        22px;

    font-weight:
        700;

    line-height:
        1.2;
}


.news-card-description {

    margin:
        0 0 20px;

    color:
        #666666;

    font-size:
        14px;

    line-height:
        1.65;
}


.news-card-read {

    display:
        inline-flex;

    align-items:
        center;

    gap:
        8px;

    margin-top:
        auto;

    color:
        var(--apam-orange);

    font-size:
        14px;

    font-weight:
        700;

    transition:
        gap
        0.25s ease;
}


.news-card:hover
.news-card-read {

    gap:
        14px;
}


.news-card-read-arrow {

    font-size:
        18px;

    line-height:
        1;
}


/* ============================================================
   ÉTAT CHARGEMENT
============================================================ */

.news-status {

    display:
        flex;

    flex-direction:
        column;

    align-items:
        center;

    justify-content:
        center;

    min-height:
        250px;

    padding:
        40px;

    border-radius:
        var(--apam-radius);

    background:
        var(--apam-white);

    box-shadow:
        var(--apam-shadow);

    text-align:
        center;
}


.news-status p {

    margin:
        15px 0 0;

    color:
        var(--apam-muted);

    font-size:
        14px;
}


#news-loading {

    grid-column:
        1 / -1;
}


.loader {

    width:
        45px;

    height:
        45px;

    border:
        4px solid
        rgba(
            245,
            166,
            35,
            0.20
        );

    border-top-color:
        var(--apam-orange);

    border-radius:
        50%;

    animation:
        apam-spin
        0.8s linear infinite;
}


@keyframes apam-spin {

    to {
        transform:
            rotate(360deg);
    }
}


/* ============================================================
   ÉTAT VIDE
============================================================ */

#news-empty {

    grid-column:
        1 / -1;
}


.empty-icon {

    width:
        58px;

    height:
        58px;

    display:
        flex;

    align-items:
        center;

    justify-content:
        center;

    margin:
        0 auto 18px;

    border-radius:
        50%;

    background:
        rgba(
            245,
            166,
            35,
            0.10
        );

    font-size:
        28px;
}


#news-empty h2 {

    margin:
        0 0 10px;

    color:
        var(--apam-orange);

    font-size:
        25px;
}


#news-empty p {

    margin:
        0;

    color:
        var(--apam-muted);
}


/* ============================================================
   ÉTAT ERREUR
============================================================ */

#news-error {

    grid-column:
        1 / -1;
}


.news-error .empty-icon {

    background:
        rgba(
            195,
            67,
            36,
            0.10
        );
}


.news-error h2 {

    margin:
        0 0 10px;

    color:
        var(--apam-text);

    font-size:
        25px;
}


.news-error p {

    margin:
        0 0 25px;

    color:
        var(--apam-muted);
}


/* ============================================================
   BOUTON RETRY
============================================================ */

.button-primary {

    border:
        none;

    padding:
        12px 22px;

    border-radius:
        999px;

    background:
        var(--apam-orange);

    color:
        #FFFFFF;

    cursor:
        pointer;

    font-size:
        14px;

    font-weight:
        700;

    transition:
        background 0.2s ease,
        transform 0.2s ease,
        box-shadow 0.2s ease;
}


.button-primary:hover {

    background:
        var(--apam-orange-dark);

    transform:
        translateY(-2px);

    box-shadow:
        0 8px 20px
        rgba(
            245,
            166,
            35,
            0.22
        );
}


/* ============================================================
   UTILITAIRE HIDDEN
============================================================ */

.hidden {

    display:
        none !important;
}


/* ============================================================
   MODAL ACTUALITÉ
   Correspond EXACTEMENT à ton HTML :
   #article-modal
   .article-modal-overlay
   .article-modal-content
   .article-modal-close
   .article-modal-image
============================================================ */

.article-modal {

     position:
        fixed;

    inset:
        0;

    z-index:
        9999;

    display:
        flex;

    align-items:
        center;

    justify-content:
        center;

    padding:
        30px;

    opacity:
        0;

    visibility:
        hidden;

    pointer-events:
        none;

    transition:
        opacity
        0.35s ease,

        visibility
        0s linear 0.35s;
}


.article-modal.is-open {

     opacity:
        1;

    visibility:
        visible;

    pointer-events:
        auto;

    transition:
        opacity
        0.35s ease,

        visibility
        0s linear 0s;
}


/* ============================================================
   OVERLAY
============================================================ */

.article-modal-overlay {

     position:
        absolute;

    inset:
        0;

    background:
        rgba(
            18,
            18,
            18,
            0.76
        );

    backdrop-filter:
        blur(10px);

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

    opacity:
        0;

    transition:
        opacity
        0.4s ease;
}
.article-modal.is-open
.article-modal-overlay {

    opacity:
        1;
}


/* ============================================================
   CARTE OUVERTE
============================================================ */

.article-modal-content {

   
    position:
        relative;

    z-index:
        2;

    width:
        min(
            960px,
            100%
        );

    max-height:
        calc(
            100vh - 60px
        );

    overflow:
        hidden auto;

    background:
        #FFFFFF;

    border-radius:
        30px;

    box-shadow:
        0 35px 90px
        rgba(
            0,
            0,
            0,
            0.34
        );

    transform:
        translateY(100px)
        scale(0.78)
        rotateX(8deg);

    transform-origin:
        center center;

    opacity:
        0;

    transition:
        transform
        0.60s
        cubic-bezier(
            .16,
            1,
            .3,
            1
        ),

        opacity
        0.40s ease;
}


.article-modal.is-open
.article-modal-content {

    transform:
        translateY(0)
        scale(1)
        rotateX(0deg);

    opacity:
        1;
}


/* ============================================================
   BOUTON FERMER
============================================================ */

.article-modal-close {

    position:
        absolute;

    top:
        18px;

    right:
        18px;

    z-index:
        10;

    width:
        46px;

    height:
        46px;

    display:
        flex;

    align-items:
        center;

    justify-content:
        center;

    padding:
        0;

    border:
        none;

    border-radius:
        50%;

    background:
        rgba(
            0,
            0,
            0,
            0.62
        );

    color:
        #FFFFFF;

    font-size:
        31px;

    font-weight:
        300;

    line-height:
        1;

    cursor:
        pointer;

    transition:
        transform
        0.25s ease,

        background
        0.25s ease;
}


.article-modal-close:hover {

    transform:
        rotate(90deg);

    background:
        var(--apam-orange);
}


/* ============================================================
   IMAGE PRINCIPALE MODAL
============================================================ */

.article-modal-image {

    position:
        relative;

    width:
        100%;

    height:
        470px;

    overflow:
        hidden;

    background:
        #EFEFEF;

    background-position:
        center;

    background-size:
       contain;

    background-repeat:
        no-repeat;
        
    border-bottom:
     1px solid
    rgba(0, 0, 0, 0.06);
}


/* petit voile sur l'image */

.article-modal-image::after {

    content:
        "";

    position:
        absolute;

    left:
        0;

    right:
        0;

    bottom:
        0;

    height:
        150px;

    background:
        linear-gradient(
            to top,
            rgba(
                0,
                0,
                0,
                0.20
            ),
            transparent
        );

    pointer-events:
        none;
}


/* ============================================================
   CORPS DE L'ARTICLE
============================================================ */

.article-modal-body {

    padding:
        38px 45px 50px;
}


.article-modal-date {

    margin:
        0 0 9px;

    color:
        var(--apam-red);

    font-size:
        14px;

    font-weight:
        700;
}


.article-modal-body h2 {

    margin:
        0 0 28px;

    color:
        var(--apam-orange);

    font-size:
        clamp(
            32px,
            4.5vw,
            50px
        );

    font-weight:
        700;

    line-height:
        1.08;
}


.article-modal-text {

    max-width:
        820px;

    color:
        #454545;

    font-size:
        17px;

    line-height:
        1.85;
}


.article-modal-text p {

    margin:
        0 0 21px;
}


.article-modal-text p:last-child {

    margin-bottom:
        0;
}
/* ============================================================
   IMAGES SUPPLÉMENTAIRES DE L'ARTICLE
============================================================ */

.article-modal-images {

    display:
        grid;

    grid-template-columns:
        repeat(
            4,
            minmax(
                0,
                1fr
            )
        );

    gap:
        14px;

    margin-top:
        30px;

    width:
        100%;
}


.article-modal-images img {

    display:
        block;

    width:
        100%;

    aspect-ratio:
        1 / 1;

    object-fit:
        cover;

    object-position:
        center;

    border-radius:
        14px;

    cursor:
        pointer;

    transition:
        transform
        0.3s ease,

        filter
        0.3s ease;
}


.article-modal-images img:hover {

    transform:
        scale(1.03);

    filter:
        brightness(0.92);
}

/* ============================================================
   LIGHTBOX IMAGES DE L'ARTICLE
============================================================ */

.article-image-lightbox {

    position:
        fixed;

    inset:
        0;

    z-index:
        11000;

    display:
        flex;

    align-items:
        center;

    justify-content:
        center;

    padding:
        30px;

    background:
        rgba(
            0,
            0,
            0,
            0.88
        );

    opacity:
        0;

    visibility:
        hidden;

    pointer-events:
        none;

    transition:
        opacity
        0.3s ease,

        visibility
        0s linear
        0.3s;
}


.article-image-lightbox.is-open {

    opacity:
        1;

    visibility:
        visible;

    pointer-events:
        auto;

    transition:
        opacity
        0.3s ease,

        visibility
        0s linear
        0s;
}


/* ============================================================
   IMAGE
============================================================ */

.article-image-lightbox-content {

    position:
        relative;

    z-index:
        2;

    width:
        min(
            90vw,
            1100px
        );

    height:
        90vh;

    display:
        flex;

    align-items:
        center;

    justify-content:
        center;
}


.article-image-lightbox-content img {

    display:
        block;

    max-width:
        90vw;

    max-height:
        88vh;

    width:
        auto;

    height:
        auto;

    object-fit:
        contain;

    border-radius:
        15px;

    box-shadow:
        0 15px 50px
        rgba(
            0,
            0,
            0,
            0.45
        );

    transform:
        scale(0.92);

    transition:
        transform
        0.35s
        cubic-bezier(
            .2,
            .8,
            .2,
            1
        );
}


.article-image-lightbox.is-open
.article-image-lightbox-content img {

    transform:
        scale(1);
}


/* ============================================================
   BOUTON FERMER
============================================================ */

.article-image-lightbox-close {

    position:
        fixed;

    top:
        20px;

    right:
        25px;

    z-index:
        11010;

    width:
        50px;

    height:
        50px;

    display:
        flex;

    align-items:
        center;

    justify-content:
        center;

    padding:
        0;

    border:
        none;

    border-radius:
        50%;

    background:
        rgba(
            0,
            0,
            0,
            0.45
        );

    color:
        #FFFFFF;

    font-size:
        32px;

    line-height:
        1;

    cursor:
        pointer;

    transition:
        background
        0.25s ease,

        transform
        0.25s ease;
}


.article-image-lightbox-close:hover {

    background:
        rgba(
            0,
            0,
            0,
            0.75
        );

    transform:
        scale(1.08)
        rotate(90deg);
}


/* ============================================================
   BOUTONS PRÉCÉDENT / SUIVANT
============================================================ */

.article-image-lightbox-prev,
.article-image-lightbox-next {

    position:
        fixed;

    top:
        50%;

    z-index:
        11010;

    width:
        55px;

    height:
        55px;

    display:
        flex;

    align-items:
        center;

    justify-content:
        center;

    padding:
        0;

    border:
        none;

    border-radius:
        50%;

    background:
        rgba(
            0,
            0,
            0,
            0.45
        );

    color:
        #FFFFFF;

    font-size:
        38px;

    line-height:
        1;

    cursor:
        pointer;

    transform:
        translateY(-50%);

    transition:
        background
        0.25s ease,

        transform
        0.25s ease;
}


.article-image-lightbox-prev {

    left:
        25px;
}


.article-image-lightbox-next {

    right:
        25px;
}


.article-image-lightbox-prev:hover,
.article-image-lightbox-next:hover {

    background:
        rgba(
            0,
            0,
            0,
            0.75
        );

    transform:
        translateY(-50%)
        scale(1.08);
}


/* ============================================================
   RESPONSIVE LIGHTBOX
============================================================ */

@media (
    max-width: 700px
) {

    .article-image-lightbox {

        padding:
            15px;
    }


    .article-image-lightbox-content {

        width:
            100%;

        height:
            88vh;
    }


    .article-image-lightbox-content img {

        max-width:
            94vw;

        max-height:
            82vh;

        border-radius:
            10px;
    }


    .article-image-lightbox-close {

        top:
            12px;

        right:
            12px;

        width:
            42px;

        height:
            42px;

        font-size:
            28px;
    }


    .article-image-lightbox-prev,
    .article-image-lightbox-next {

        width:
            42px;

        height:
            42px;

        font-size:
            30px;
    }


    .article-image-lightbox-prev {

        left:
            10px;
    }


    .article-image-lightbox-next {

        right:
            10px;
    }

}

/* ============================================================
   FOOTER
============================================================ */

.site-footer {

    padding:
        30px 20px;

    background:
        #FFFFFF;

    border-top:
        1px solid
        rgba(
            0,
            0,
            0,
            0.06
        );

    text-align:
        center;
}


.site-footer p {

    margin:
        0;

    color:
        #777777;

    font-size:
        13px;
}


/* ============================================================
   FOCUS ACCESSIBLE
============================================================ */

.news-card:focus-visible,
.article-modal-close:focus-visible,
.button-primary:focus-visible,
.back-button:focus-visible {

    outline:
        3px solid
        rgba(
            245,
            166,
            35,
            0.50
        );

    outline-offset:
        4px;
}


/* ============================================================
   RESPONSIVE — TABLETTE
============================================================ */

@media (
    max-width: 1000px
) {

    .news-grid {

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


    .article-modal-image {

        height:
            400px;
    }

}


/* ============================================================
   RESPONSIVE — MOBILE
============================================================ */

@media (
    max-width: 700px
) {

    .header-container {

        min-height:
            76px;

        width:
            min(
                92%,
                100%
            );
    }


    .brand-name {

        font-size:
            21px;
    }


    .brand-subtitle {

        max-width:
            230px;

        font-size:
            10px;
    }


    .back-button {

        padding:
            9px 14px;

        font-size:
            12px;
    }


    .page {

        width:
            min(
                94%,
                100%
            );

        padding:
            45px 0 65px;
    }


    .page-heading {

        margin-bottom:
            38px;
    }


    .page-heading h1 {

        font-size:
            42px;
    }


    .page-intro {

        font-size:
            15px;
    }


    .news-grid {

        grid-template-columns:
            1fr;

        gap:
            20px;
    }


    .news-card-image {

        height:
            230px;
    }


    .news-card-content {

        padding:
            22px;
    }


    /* ========================================================
       MODAL MOBILE
    ======================================================== */

    .article-modal {

        padding:
            10px;
    }


    .article-modal-content {

        width:
            100%;

        max-height:
            calc(
                100vh - 20px
            );

        border-radius:
            22px;
    }


    .article-modal-image {

        height:
            280px;
    }


    .article-modal-body {

        padding:
            28px 22px 32px;
    }


    .article-modal-body h2 {

        font-size:
            31px;

        margin-bottom:
            22px;
    }


    .article-modal-text {

        font-size:
            16px;

        line-height:
            1.75;
    }


    .article-modal-close {

        top:
            12px;

        right:
            12px;

        width:
            42px;

        height:
            42px;

        font-size:
            28px;
    }

}


/* ============================================================
   PETITS ÉCRANS
============================================================ */

@media (
    max-width: 420px
) {

    .brand-subtitle {

        display:
            none;
    }


    .page-heading h1 {

        font-size:
            38px;
    }


    .news-card-image {

        height:
            210px;
    }


    .article-modal-image {

        height:
            240px;
    }

}


/* ============================================================
   RÉDUCTION DES ANIMATIONS
============================================================ */

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

    *,
    *::before,
    *::after {

        scroll-behavior:
            auto !important;

        transition:
            none !important;

        animation:
            none !important;
    }

}