/* Barre de navigation (onglets) */
.news-carousel-wrapper nav {
    position: relative;
    margin-bottom: 30px;
    width: 100%;
}

/* Image de flèche (id corrigé si besoin) */
#arrow-img img {
    height: 15px;
    margin-bottom: -2px;
    margin-right: 10px;
}

/* Conteneur des boutons (onglets) */
.news-carousel-wrapper .nav-container {
    width: 100%;
    display: flex;
    position: relative;
    gap: 32px;
    justify-content: center;

    border-bottom: 2px solid var(--green-carousel);
}

/* Boutons d'onglets */
.news-carousel-wrapper .nav-button {
    padding: 9px 8px;
    background: none;
    border: none;
    cursor: pointer;
    color: #000;
    font-size: var(--font-size-22);
}

.news-carousel-wrapper .nav-button:focus {
    outline: none;
}

/* Slider sous l'onglet actif */
.news-carousel-wrapper .slider {
    position: absolute;
    bottom: 0;
    border-bottom: 1px solid var(--red-icon);
    width: 65px;
    transition: transform 0.3s ease-in-out;
    left: 43%;
}

/* Onglet actif */
.news-carousel-wrapper .nav-button.active {
    border-bottom: 2px solid var(--red-icon);
    margin-bottom: -2px;
}

/* Position spécifique si "articles" actif */
.news-carousel-wrapper .slider.articles {
    transform: translateX(88px);
}

/* Sections de contenu */
.news-carousel-wrapper .content-section {
    display: none;
}

.news-carousel-wrapper .content-section.active {
    display: block;
}

/* Grille des items */
.news-carousel-wrapper .carousel-container {
    max-width: 1200px;
    margin: 0 auto;
    padding-bottom: 7%;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 5px;
    row-gap: 35px;
}

/* Pages */
.news-carousel-wrapper .page-content {
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

.news-carousel-wrapper .page-content.active {
    display: block;
    opacity: 1;
}

/* Cartes */
.news-carousel-wrapper .news-item {
    background: #fff;
    overflow: hidden;
    display: block;
}

/* Image article (si tu utilises une div bg) */
.news-carousel-wrapper .news-image {
    height: 277px;
    background-size: cover;
    background-position: center;
}

/* Légende */
.news-carousel-wrapper .news-caption {
    padding-top: 10px;
}

/* Date */
.news-carousel-wrapper .news-date {
    font-size: 16px;
    color: var(--grey-800);
    line-height: 1.2em;
}

.news-carousel-wrapper .news-date .tag-item {
    margin-left: 5px;
}

/* Titre */
.news-carousel-wrapper .news-title {
    font-size: 16px;
    line-height: 18px;
    color: var(--black);
    margin-top: 5px;
}

/* Pagination */
.news-carousel-wrapper .pagination {
    display: flex;
    justify-content: center;
    margin-left: 20px;
}

/* Bouton de page */
.news-carousel-wrapper .page {
    width: 18px;
    height: 27px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: var(--font-size-17);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1;
    margin: 1px;
}

/* Page active */
.news-carousel-wrapper .page.active {
    background-color: var(--yellow);
    font-weight: bold;
    border-radius: 2px;
}

/* Flèches */
.arrow {
    font-size: var(--font-size-19);
    color: #000;
    cursor: pointer;
}

/* Hover pages inactives */
.news-carousel-wrapper .page:hover:not(.active) {
    background-color: var(--yellow);
    padding: 0 3px 5px;
}

/* Nav container mobile */
.news-carousel-wrapper .nav-container {
    gap: 10px;
    width: 93%;
    margin: 0 10px;
    border-bottom: 2px solid rgba(0, 158, 131, 1);
}

/* Slider mobile */
.news-carousel-wrapper .slider {
    margin-left: -47px;
}

.news-carousel-wrapper .slider.articles {
    transform: translateX(0);
}

/* Reset Elementor (syntaxe corrigée) */
div[data-element_type="container"] {
    padding: unset !important;
    padding-left: unset !important;
    padding-right: unset !important;
}

.news-carousel-wrapper .slider {
    margin: unset !important;
}

.e-con>.e-con-inner {
    width: unset !important;
}

/* ----------- RESPONSIVE ----------- */

/* Tablette et plus */
@media (min-width: 415px) {
    .news-carousel-wrapper .carousel-container {
        grid-template-columns: repeat(2, 1fr);
        gap: 24px;
    }

    .news-carousel-wrapper .nav-container {
        gap: 20px;
        width: 100%;
        margin: 0;
        border-bottom: 2px solid var(--green-carousel);
    }

    .news-carousel-wrapper .pagination {
        margin-left: 0;
    }

    .news-carousel-wrapper .page:hover:not(.active) {
        background-color: var(--yellow);
        width: 21px;
        border-radius: 2px;
        margin: 0 1px;
        height: 27px;
        padding: 0;
    }

    .news-carousel-wrapper .slider {
        margin-left: -25px;
    }

    .news-carousel-wrapper .slider.articles {
        transform: translateX(67px);
    }
}

/* Desktop et plus */
@media (min-width: 769px) {
    .news-carousel-wrapper .carousel-container {
        grid-template-columns: repeat(3, 1fr);
    }

    .news-carousel-wrapper .nav-container {
        gap: 32px;
    }

    .news-carousel-wrapper .slider {
        margin-left: 0;
        left: 43%;
    }

    .news-carousel-wrapper .slider.articles {
        transform: translateX(88px);
    }
}

/* Large desktop */
@media (min-width: 1025px) {
    .news-carousel-wrapper .carousel-container {
        grid-template-columns: repeat(4, 1fr);
    }
}