/* =========================================================
   BNI GESTION — ACTUALITÉS
   Palette BNI :
   Vert principal  : #008b45
   Vert foncé      : #123c2a
   Vert sombre     : #073b25
   Orange accent   : #f28c00
   Blanc           : #ffffff
========================================================= */


/* =========================================================
   SECTION
========================================================= */

.news-section {
    position: relative;

    padding: 105px 20px;

    background:
        radial-gradient(
            circle at 5% 5%,
            rgba(0, 139, 69, .07),
            transparent 27%
        ),
        radial-gradient(
            circle at 95% 90%,
            rgba(242, 140, 0, .06),
            transparent 30%
        ),
        linear-gradient(
            180deg,
            #f8faf9 0%,
            #ffffff 100%
        );

    overflow: hidden;
}


/* décoration */

.news-section::before {
    content: "";

    position: absolute;

    width: 280px;
    height: 280px;

    top: -150px;
    right: -100px;

    border-radius: 50%;

    border: 1px solid rgba(0, 139, 69, .08);

    pointer-events: none;
}

.news-section::after {
    content: "";

    position: absolute;

    width: 180px;
    height: 180px;

    bottom: -100px;
    left: -70px;

    border-radius: 50%;

    background: rgba(242, 140, 0, .035);

    pointer-events: none;
}


/* =========================================================
   CONTAINER
========================================================= */

.news-container {
    position: relative;

    z-index: 2;

    width: min(1200px, 100%);

    margin: 0 auto;
}


/* =========================================================
   HEADER
========================================================= */

.news-section-header {

    display: flex;

    align-items: flex-end;

    justify-content: space-between;

    gap: 60px;

    margin-bottom: 55px;
}


/* =========================================================
   HEADER — GAUCHE
========================================================= */

.news-section-heading {
    max-width: 680px;
}


/* Petit label */

.news-section-eyebrow {

    position: relative;

    display: inline-flex;

    align-items: center;

    gap: 12px;

    margin-bottom: 17px;

    color: #008b45;

    font-size: 12px;

    font-weight: 800;

    letter-spacing: 2.5px;

    text-transform: uppercase;
}

.news-section-eyebrow::before {

    content: "";

    display: block;

    width: 36px;

    height: 3px;

    background: #f28c00;

    border-radius: 10px;
}


/* =========================================================
   TITRE
========================================================= */

.news-section-heading h2 {

    margin: 0;

    color: #123c2a;

    font-family: Arial, sans-serif;

    font-size: clamp(34px, 4vw, 50px);

    line-height: 1.08;

    font-weight: 800;

    letter-spacing: -1.7px;
}

.news-section-heading h2 span {

    display: block;

    color: #008b45;
}


/* =========================================================
   HEADER — DROITE
========================================================= */

.news-section-intro {

    width: 330px;

    flex-shrink: 0;
}

.news-section-intro p {

    margin: 0 0 22px;

    color: #68756f;

    font-size: 14px;

    line-height: 1.75;
}


/* =========================================================
   TOUTES LES ACTUALITÉS
========================================================= */

.news-view-all {

    display: inline-flex;

    align-items: center;

    gap: 12px;

    color: #008b45;

    font-size: 13px;

    font-weight: 800;

    text-decoration: none;

    transition:
        color .25s ease,
        transform .25s ease;
}

.news-view-all span {

    display: inline-flex;

    align-items: center;

    justify-content: center;

    width: 31px;

    height: 31px;

    color: #ffffff;

    background: #008b45;

    border-radius: 50%;

    font-size: 16px;

    transition:
        transform .25s ease,
        background .25s ease;
}

.news-view-all:hover {

    color: #f28c00;

}

.news-view-all:hover span {

    background: #f28c00;

    transform: translateX(4px);
}


/* =========================================================
   GRILLE
========================================================= */

.news-grid {

    display: grid;

    grid-template-columns:
        repeat(3, minmax(0, 1fr));

    gap: 27px;
}


/* =========================================================
   CARTE
========================================================= */

.news-card {

    position: relative;

    display: flex;

    flex-direction: column;

    min-width: 0;

    background: #ffffff;

    border: 1px solid rgba(18, 60, 42, .08);

    border-radius: 4px;

    overflow: hidden;

    box-shadow:
        0 8px 25px rgba(18, 60, 42, .035);

    transition:
        transform .35s cubic-bezier(.2,.8,.2,1),
        box-shadow .35s ease,
        border-color .35s ease;
}

.news-card:hover {

    transform: translateY(-9px);

    border-color: rgba(0, 139, 69, .18);

    box-shadow:
        0 22px 50px rgba(18, 60, 42, .13);
}


/* petite ligne verte au sommet */

.news-card::before {

    content: "";

    position: absolute;

    z-index: 5;

    top: 0;
    left: 0;

    width: 0;

    height: 3px;

    background: #f28c00;

    transition: width .4s ease;
}

.news-card:hover::before {

    width: 100%;
}


/* =========================================================
   IMAGE
========================================================= */

.news-image-wrapper {

    position: relative;

    height: 245px;

    overflow: hidden;

    background: #e9efec;
}

.news-image {

    display: block;

    width: 100%;
    height: 100%;

    object-fit: cover;

    transition:
        transform .65s cubic-bezier(.2,.8,.2,1);
}

.news-card:hover .news-image {

    transform: scale(1.07);
}


/* =========================================================
   OVERLAY IMAGE
========================================================= */

.news-image-wrapper::after {

    content: "";

    position: absolute;

    inset: 0;

    background:
        linear-gradient(
            to bottom,
            rgba(0, 0, 0, .02) 0%,
            rgba(0, 0, 0, .03) 45%,
            rgba(7, 59, 37, .20) 100%
        );

    pointer-events: none;
}


/* =========================================================
   DATE
========================================================= */

.news-date-badge {

    position: absolute;

    z-index: 3;

    left: 18px;

    bottom: 18px;

    display: flex;

    flex-direction: column;

    align-items: center;

    justify-content: center;

    width: 60px;

    height: 64px;

    color: #ffffff;

    background: #008b45;

    border-radius: 5px;

    box-shadow:
        0 9px 25px rgba(0, 70, 40, .25);

    transition:
        background .25s ease,
        transform .25s ease;
}

.news-card:hover .news-date-badge {

    background: #f28c00;

    transform: translateY(-3px);
}

.news-date-badge strong {

    font-size: 23px;

    line-height: 1;

    font-weight: 800;
}

.news-date-badge span {

    margin-top: 5px;

    font-size: 9px;

    line-height: 1;

    font-weight: 800;

    letter-spacing: 1.3px;
}


/* =========================================================
   BODY
========================================================= */

.news-card-body {

    display: flex;

    flex-direction: column;

    flex: 1;

    padding: 28px 27px 27px;
}


/* =========================================================
   CATÉGORIE
========================================================= */

.news-category {

    position: relative;

    width: fit-content;

    margin-bottom: 12px;

    padding-left: 13px;

    color: #f28c00;

    font-size: 10px;

    font-weight: 800;

    letter-spacing: 1.5px;

    text-transform: uppercase;
}

.news-category::before {

    content: "";

    position: absolute;

    left: 0;

    top: 50%;

    width: 5px;

    height: 5px;

    border-radius: 50%;

    background: #f28c00;

    transform: translateY(-50%);
}


/* =========================================================
   TITRE CARTE
========================================================= */

.news-card-title {

    margin: 0;

    color: #123c2a;

    font-size: 19px;

    line-height: 1.42;

    font-weight: 750;

    letter-spacing: -.3px;

    transition: color .25s ease;
}

.news-card:hover .news-card-title {

    color: #008b45;
}


/* =========================================================
   EXCERPT
========================================================= */

.news-excerpt {

    margin: 15px 0 23px;

    color: #68756f;

    font-size: 13.5px;

    line-height: 1.72;

    display: -webkit-box;

    -webkit-line-clamp: 4;

    -webkit-box-orient: vertical;

    overflow: hidden;
}


/* =========================================================
   LIRE PLUS
========================================================= */

.news-read-more {

    display: inline-flex;

    align-items: center;

    gap: 9px;

    width: fit-content;

    margin-top: auto;

    color: #008b45;

    font-size: 11px;

    font-weight: 800;

    letter-spacing: 1px;

    text-transform: uppercase;

    text-decoration: none;

    transition:
        color .25s ease;
}

.news-read-more span {

    display: inline-flex;

    align-items: center;

    justify-content: center;

    width: 27px;

    height: 27px;

    color: #ffffff;

    background: #008b45;

    border-radius: 50%;

    font-size: 15px;

    line-height: 1;

    transition:
        transform .25s ease,
        background .25s ease;
}

.news-read-more:hover {

    color: #f28c00;
}

.news-read-more:hover span {

    background: #f28c00;

    transform: translateX(5px);
}


/* =========================================================
   FOOTER
========================================================= */

.news-card-footer {

    display: flex;

    align-items: center;

    flex-wrap: wrap;

    gap: 8px;

    min-height: 52px;

    padding: 0 27px;

    color: #929e97;

    background: #fbfcfb;

    border-top: 1px solid #edf1ee;

    font-size: 10.5px;
}

.news-card-footer span {

    display: inline-flex;

    align-items: center;

    gap: 5px;
}

.news-card-footer svg {

    width: 13px;

    height: 13px;

    fill: none;

    stroke: #008b45;

    stroke-width: 1.7;

    stroke-linecap: round;

    stroke-linejoin: round;
}

.news-card-footer .separator {

    color: #c3cbc6;
}


/* =========================================================
   BOUTON BAS
========================================================= */

.news-bottom-action {

    display: flex;

    justify-content: center;

    margin-top: 50px;
}

.news-all-button {

    display: inline-flex;

    align-items: center;

    justify-content: center;

    gap: 15px;

    padding: 14px 25px;

    color: #ffffff;

    background: #008b45;

    border: 1px solid #008b45;

    border-radius: 5px;

    font-size: 12px;

    font-weight: 800;

    letter-spacing: .6px;

    text-decoration: none;

    box-shadow:
        0 8px 20px rgba(0, 139, 69, .16);

    transition:
        background .25s ease,
        transform .25s ease,
        box-shadow .25s ease;
}

.news-all-button span {

    font-size: 19px;

    line-height: 1;

    transition: transform .25s ease;
}

.news-all-button:hover {

    color: #ffffff;

    background: #006f38;

    border-color: #006f38;

    transform: translateY(-3px);

    box-shadow:
        0 13px 28px rgba(0, 139, 69, .22);
}

.news-all-button:hover span {

    transform: translateX(5px);
}


/* =========================================================
   AUCUNE ACTUALITÉ
========================================================= */

.news-empty {

    display: flex;

    flex-direction: column;

    align-items: center;

    justify-content: center;

    min-height: 300px;

    padding: 50px;

    text-align: center;

    background: #ffffff;

    border: 1px solid #e6ece8;

    border-radius: 8px;
}

.news-empty-icon {

    display: flex;

    align-items: center;

    justify-content: center;

    width: 65px;

    height: 65px;

    margin-bottom: 20px;

    color: #008b45;

    background: rgba(0, 139, 69, .08);

    border-radius: 50%;
}

.news-empty-icon svg {

    width: 29px;

    height: 29px;

    fill: none;

    stroke: currentColor;

    stroke-width: 1.5;

    stroke-linecap: round;

    stroke-linejoin: round;
}

.news-empty h3 {

    margin: 0 0 9px;

    color: #123c2a;

    font-size: 21px;

    font-weight: 800;
}

.news-empty p {

    max-width: 450px;

    margin: 0;

    color: #78847e;

    font-size: 14px;

    line-height: 1.7;
}


/* =========================================================
   ANIMATION
========================================================= */

@keyframes newsFadeUp {

    from {

        opacity: 0;

        transform: translateY(25px);
    }

    to {

        opacity: 1;

        transform: translateY(0);
    }
}

.news-card {

    animation:
        newsFadeUp .7s cubic-bezier(.2,.8,.2,1) both;
}

.news-card:nth-child(1) {
    animation-delay: .05s;
}

.news-card:nth-child(2) {
    animation-delay: .12s;
}

.news-card:nth-child(3) {
    animation-delay: .19s;
}

.news-card:nth-child(4) {
    animation-delay: .26s;
}

.news-card:nth-child(5) {
    animation-delay: .33s;
}

.news-card:nth-child(6) {
    animation-delay: .40s;
}


/* =========================================================
   TABLETTE
========================================================= */

@media (max-width: 1000px) {

    .news-section {

        padding: 80px 20px;
    }

    .news-section-header {

        align-items: flex-start;

        flex-direction: column;

        gap: 25px;

        margin-bottom: 42px;
    }

    .news-section-intro {

        width: 100%;

        max-width: 600px;
    }

    .news-grid {

        grid-template-columns:
            repeat(2, minmax(0, 1fr));

        gap: 22px;
    }
}


/* =========================================================
   TABLETTE PETITE
========================================================= */

@media (max-width: 700px) {

    .news-section {

        padding: 70px 18px;
    }

    .news-section-heading h2 {

        font-size: 37px;

        letter-spacing: -1.1px;
    }

    .news-grid {

        grid-template-columns: 1fr;

        gap: 22px;
    }

    .news-card {

        max-width: 600px;

        width: 100%;

        margin: 0 auto;
    }

    .news-image-wrapper {

        height: 260px;
    }
}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 500px) {

    .news-section {

        padding: 58px 14px;
    }

    .news-section-eyebrow {

        margin-bottom: 14px;

        font-size: 10px;

        letter-spacing: 2px;
    }

    .news-section-eyebrow::before {

        width: 28px;

        height: 2px;
    }

    .news-section-heading h2 {

        font-size: 31px;

        line-height: 1.12;
    }

    .news-section-intro p {

        font-size: 13.5px;

        line-height: 1.7;
    }

    .news-view-all {

        font-size: 12px;
    }

    .news-view-all span {

        width: 29px;

        height: 29px;
    }

    .news-image-wrapper {

        height: 230px;
    }

    .news-date-badge {

        left: 15px;

        bottom: 15px;

        width: 57px;

        height: 60px;
    }

    .news-date-badge strong {

        font-size: 21px;
    }

    .news-card-body {

        padding: 23px 21px 24px;
    }

    .news-card-title {

        font-size: 18px;

        line-height: 1.4;
    }

    .news-excerpt {

        font-size: 13px;

        line-height: 1.7;
    }

    .news-card-footer {

        min-height: 48px;

        padding: 0 21px;

        font-size: 9.5px;
    }

    .news-bottom-action {

        margin-top: 35px;
    }

    .news-all-button {

        width: 100%;

        padding: 14px 20px;
    }
}


/* =========================================================
   TRÈS PETITS ÉCRANS
========================================================= */

@media (max-width: 360px) {

    .news-section {

        padding-left: 12px;

        padding-right: 12px;
    }

    .news-section-heading h2 {

        font-size: 28px;
    }

    .news-image-wrapper {

        height: 210px;
    }

    .news-card-title {

        font-size: 17px;
    }
}


/* =========================================================
   ACCESSIBILITÉ
========================================================= */

@media (prefers-reduced-motion: reduce) {

    .news-card {

        animation: none;

        transition: none;
    }

    .news-image,
    .news-date-badge,
    .news-read-more span,
    .news-view-all span,
    .news-all-button,
    .news-all-button span {

        transition: none;
    }
}
