/* --- SECTION CARROUSEL --- */
.events-carousel-section {
    max-width: 1100px;
    margin: 2.5rem auto;
    padding: 0 1.5rem;
}

.carousel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
}

.carousel-header h2 {
    margin: 0;
    font-size: 1.6rem;
    color: #1e293b;
}

.carousel-controls {
    display: flex;
    gap: 0.5rem;
}

.carousel-arrow {
    background: #ffffff;
    border: 1px solid #cbd5e1;
    color: #334155;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.carousel-arrow:hover {
    background: #0ea5e9;
    color: #ffffff;
    border-color: #0ea5e9;
}

/* Enveloppe & Track */
.carousel-wrapper {
    overflow: hidden;
    position: relative;
    border-radius: 12px;
}

.carousel-track {
    display: flex;
    gap: 1.25rem;
    overflow-x: auto;
    scroll-behavior: smooth;
    scroll-snap-type: x mandatory;
    scrollbar-width: none; /* Cache la barre Firefox */
    padding-bottom: 0.5rem;
}

.carousel-track::-webkit-scrollbar {
    display: none; /* Cache la barre Chrome/Safari */
}

.carousel-loading {
    padding: 2rem;
    color: #64748b;
    text-align: center;
    width: 100%;
}

/* Carte de slide */
.carousel-slide {
    flex: 0 0 calc(33.333% - 0.85rem); /* 3 cartes par vue sur desktop */
    height: 320px; /* Un peu plus haut pour laisser respirer le contenu */
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    scroll-snap-align: start;
    background-color: #0f172a;
    box-shadow: 0 4px 6px -1px rgba(0,0,0,0.1);
}

/* Responsive slider */
@media (max-width: 900px) {
    .carousel-slide {
        flex: 0 0 calc(50% - 0.65rem); /* 2 cartes sur tablette */
        height: 300px;
    }
}
@media (max-width: 600px) {
    .carousel-slide {
        flex: 0 0 85%; /* 1 carte + aperçu de la suivante sur smartphone */
        height: 300px;
    }
}

.carousel-slide-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    transition: transform 0.4s ease;
}

/* Filtre assombrissant renforcé pour bloquer les écritures de l'affiche */
.carousel-slide::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        rgba(15, 23, 42, 0.65) 0%,
        rgba(15, 23, 42, 0.55) 40%,
        rgba(15, 23, 42, 0.85) 100%
    );
    transition: background 0.3s ease;
    z-index: 1;
}

.carousel-slide:hover .carousel-slide-img {
    transform: scale(1.05);
}

.carousel-slide:hover::after {
    background: rgba(15, 23, 42, 0.75);
}

/* Contenu textuel et bouton */
.carousel-slide-content {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1.25rem;
    text-align: center;
    box-sizing: border-box;
}

/* Badge Date avec fond distinctif */
.carousel-slide-date {
    display: inline-block;
    background: rgba(14, 165, 233, 0.95);
    color: #ffffff;
    font-size: 0.78rem;
    font-weight: 700;
    padding: 4px 12px;
    border-radius: 20px;
    margin-bottom: 0.6rem;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

/* Titre avec ombre portée nette pour se détacher du fond */
.carousel-slide-title {
    color: #ffffff;
    font-size: 1.1rem;
    font-weight: 700;
    line-height: 1.3;
    margin: 0 0 0.25rem 0;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.85);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.carousel-slide-city {
    color: #f1f5f9;
    font-size: 0.85rem;
    font-weight: 500;
    margin-bottom: 1rem;
    text-shadow: 0 1px 4px rgba(0, 0, 0, 0.85);
}

/* Bouton au centre */
.btn-carousel-view {
    display: inline-block;
    background: #ffffff;
    color: #0f172a;
    padding: 0.65rem 1.25rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 700;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    transition: all 0.2s ease;
}

.btn-carousel-view:hover {
    background: #0ea5e9;
    color: #ffffff;
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(14, 165, 233, 0.4);
}