/* Style identique aux flèches swiper mais pour news */
.news-swiper-button-next,
.news-swiper-button-prev {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 10;
    color: var(--light-green);
    font-size: 1.5rem;
    cursor: pointer;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    min-width: 40px;
    min-height: 40px;
    display: flex !important;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    padding: 0;
    opacity: 1;
    pointer-events: auto;
}
.news-swiper-button-next {
    right: -20px;
}
.news-swiper-button-prev {
    left: -20px;
}
.news-swiper-button-next:hover,
.news-swiper-button-prev:hover {
    color: #02835d;
    transform: translateY(-50%) scale(1.1);
}
.news-swiper-button-next:focus,
.news-swiper-button-prev:focus {
    outline: none;
}
#news.section::before {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 120px;
    z-index: 2;
    pointer-events: none;
   
    transition: background 0.4s;
}
#news.section::after {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 600px;
    z-index: 2;
    pointer-events: none;
    background: linear-gradient(
        to bottom,
        #101010 0%,
        #181818 4%,
        rgba(24, 24, 24, 0) 100%
    ) !important;
    transition: background 0.4s;
}
/* Section News - Actualités */

#news.section {
    background: url('/img/backgrounds/rustic-black-wooden-background-with-copy-space.jpg')  no-repeat;
    background-size: 130% 140%;
    background-position: center -200px;
    background-attachment: fixed;
    position: relative;
    z-index: 1;
}

#news.section > .container {
    position: relative;
    z-index: 3;
}

/* Effet parallax identique pour la section carousel et à propos */

#about.section {
    background: url('/img/backgrounds/rustic-black-wooden-background-with-copy-space.jpg') center center/cover no-repeat;
    background-attachment: fixed;
    position: relative;
    z-index: 1;
}

/* Cards de news */
.news-card {
    background: rgba(30, 30, 30, 0.70);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 0;
    overflow: hidden;
    transition: all 0.4s ease;
    backdrop-filter: blur(10px);
    position: relative;
    max-width: 100%; /* Sera surchargé sur desktop */
    box-sizing: border-box;
    animation: newsCardFadeIn 0.6s ease-out;
    min-height: 320px; /* Valeur par défaut mobile/tablette */
    height: auto;
}

.news-card:hover {
    transform: none;
    box-shadow: none;
    clip-path: inset(0);
}

.news-card.h-100 {
    display: flex;
    flex-direction: column;
}

.news-image-container {
    position: relative;
    overflow: hidden;
    border-radius: 20px 20px 0 0;
    height: 250px; /* Sera surchargé sur desktop */
    box-shadow: 0 0 12px 2px #02835d33;
}

.news-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.news-card:hover .news-image {
    transform: scale(1.08);
}

.news-date {
    position: absolute;
    top: 20px;
    right: 20px;
    background: rgba(0, 0, 0, 0.8);
    border-radius: 12px;
    padding: 8px 12px;
    text-align: center;
    min-width: 80px;
    backdrop-filter: blur(10px);
}

.news-date .month {
    display: block;
    font-size: 1rem;
    color: #fff;
    line-height: 1;
    text-transform: uppercase;
}

.news-date .year {
    display: block;
    font-size: 1.1rem;
    color: #ccc;
    margin-top: 2px;
    line-height: 1.2;
}

.news-content {
    padding: 2rem; /* Sera surchargé sur desktop */
    height: auto;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.news-meta {
    margin-bottom: 1rem;
}

.news-title {
    font-size: 1.3rem;
    font-weight: bold;
    line-height: 1.4;
    margin-bottom: 1rem;
}

.news-title a {
    text-decoration: none;
    transition: color 0.3s ease;
}

.news-title a:hover {
    color: #02835d !important;
}

.news-excerpt {
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 1.5rem;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
    flex: 1;
}

.news-link {
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    transition: all 0.3s ease;
    margin-top: auto;
}

.news-link:hover {
    color: #02835d !important;
    transform: translateX(5px);
}

.news-link i {
    transition: transform 0.3s ease;
}

.news-link:hover i {
    transform: translateX(3px);
}

/* News Placeholder */
.news-placeholder {
    padding: 4rem 2rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    text-align: center;
}

.news-placeholder i {
    opacity: 0.7;
}

/* News Carousel */
.news-carousel-container {
    position: relative;
    margin-top: 2rem;
    
    padding: 0 60px;
}

.news-carousel-wrapper {
    overflow: hidden;
    position: relative;
}

.news-carousel-track {
    position: relative;
    width: 100%;
}

.news-carousel-slide {
    display: none;
    width: 100%;
}

.news-carousel-slide.active {
    display: block;
    animation: fadeInSlide 0.5s ease-in-out;
}

/* Pagination dots */
.news-carousel-pagination {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-top: 1.5rem;
}

.news-carousel-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: none;
    background: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
}

.news-carousel-dot.active {
    background: var(--primary);
    transform: scale(1.2);
}

.news-carousel-dot:hover {
    background: rgba(255, 255, 255, 0.6);
    transform: scale(1.1);
}

/* Animations */
@keyframes newsCardFadeIn {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    0% {
        opacity: 0;
        transform: translateY(30px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInSlide {
    0% {
        opacity: 0;
        transform: translateX(20px);
    }
    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

/* Responsive Design */
@media (min-width: 992px) {
    .news-carousel-slide .col-responsive {
        flex: 33.333333%;
        max-width: 30%;
        padding-left: 8px;
        padding-right: 8px;
    }
    
    .news-carousel-container {
        padding: 0 10px;
    }
    
    .swiper-button-next {
        right: 20px;
    }

    .swiper-button-prev {
        left: 20px;
    }

    /* Surcharge des cards sur desktop */
    .news-card {
        max-width: 420px;
        min-height: 340px;
        height: 340px;
    }
    .news-image-container {
        height: 180px;
    }
    .news-content {
        padding: 1.2rem 1.5rem;
    }
}

@media (min-width: 775px) and (max-width: 991px) {
    .news-carousel-slide .col-responsive {
        flex: 0 0 40%;
        max-width: 45%;
        padding-left: 8px;
        padding-right: 8px;
    }
    .news-carousel-container {
        padding: 10px 0px;
    }

    .news-card {
        height: 200px;
        
    }
    .news-title {
    font-size: 1rem;
    font-weight: bold;
    line-height: 1.4;
    margin-bottom: 1rem;
}
    
    .news-image-container {
        height: 140px;
    }
    
    .swiper-button-next {
        right: 15px;
    }

    .swiper-button-prev {
        left: 15px;
    }
}

@media (max-width: 774px) {
    .news-carousel-slide .col-responsive {
        flex: 1 1;
        max-width: 100%;
    }

    .news-carousel-container {
        padding: 0 50px;
    }
    
    .swiper-button-next {
        right: 5px;
    }

    .swiper-button-prev {
        left: 5px;
    }
    
    .swiper-button-next,
    .swiper-button-prev {
        min-width: 35px;
        min-height: 35px;
        font-size: 1.3rem;
    }
    
    .swiper-button-next::before,
    .swiper-button-prev::before {
        font-size: 1.8rem;
    }
    
    .news-carousel-pagination {
        margin-top: 2rem;
    }

    .news-content {
        padding: 1.5rem;
    }

    .news-title {
        font-size: 1.1rem;
    }

    .news-excerpt {
        font-size: 0.9rem;
    }

    .news-image-container {
        height: 200px;
    }
}

@media (max-width: 576px) {
    .news-carousel-container {
        padding: 0 45px;
    }
    
    .swiper-button-next {
        right: 0px;
    }

    .swiper-button-prev {
        left: 0px;
    }
    
    .swiper-button-next,
    .swiper-button-prev {
        min-width: 32px;
        min-height: 32px;
        font-size: 1.2rem;
    }
    
    .swiper-button-next::before,
    .swiper-button-prev::before {
        font-size: 1.6rem;
    }

    .news-card {
        margin-bottom: 2rem;
    }

    .news-content {
        padding: 1rem;
    }

    .news-image-container {
        height: 180px;
    }

    .news-date {
        top: 15px;
        right: 15px;
        padding: 6px 10px;
    }

    .news-date .day {
        font-size: 1.2rem;
    }
}

