.card ul {
    display: inline-block;
    text-align: left;
    list-style-position: inside;
    padding-left: 20px;
}

/* --- 1. STYLES DE BASE DU CARROUSEL --- */
.carousel-container {
    width: 80%; /* Vous pouvez ajuster cette taille */
    margin: 20px auto;
    position: relative; /* Indispensable pour positionner les flèches */
    border: 1px solid #ddd;
    border-radius: 8px;
}

.carousel-viewport {
    overflow: hidden; /* Le secret ! Cache tout ce qui dépasse. */
}

.carousel-track {
    display: flex; /* Aligne les images horizontalement */
    transition: transform 0.5s ease-in-out;
}

.carousel-slide {
    /* Chaque slide prend 100% de la largeur du viewport */
    flex: 0 0 100%;
    min-width: 100%;
    cursor: pointer; /* Indique que c'est cliquable */
}

.carousel-slide img {
    width: 100%; /* L'image remplit son slide */
    height: auto;
    display: block; /* Évite les petits espaces sous l'image */
}

/* --- Styles pour les flèches DU CARROUSEL --- */
.carousel-arrow {
    position: absolute; /* Positionnées par-dessus le viewport */
    top: 50%;
    transform: translateY(-50%); /* Centrage vertical parfait */
    z-index: 10;

    background-color: rgba(255, 255, 255, 0.7);
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    font-size: 1.5rem;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.carousel-arrow:hover {
    background-color: rgba(255, 255, 255, 1);
}

.carousel-arrow.left {
    left: 10px;
}

.carousel-arrow.right {
    right: 10px;
}

/* Classe JS pour cacher les flèches aux extrémités */
.hidden {
    display: none;
}


/* --- 2. STYLES DE LA LIGHTBOX (POP-UP) --- */

/* Le fond noir semi-transparent (L'ÉTAT CACHÉ) */
.lightbox-cachee {
    display: none; /* <-- C'est LA SEULE règle 'display' ici. */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    z-index: 1000;
}

/* Classe pour afficher la lightbox (L'ÉTAT VISIBLE) */
.lightbox-visible {
    display: flex; /* <-- C'est ICI qu'on le rend visible */
    justify-content: center;
    align-items: center;

    /* Et on répète les styles de positionnement */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    z-index: 1000;
}

/* L'image agrandie */
#lightbox-image {
    max-width: 90%;
    max-height: 90%;
    border: 4px solid white;
    border-radius: 8px;
}

/* Le bouton fermer "X" */
.lightbox-close {
    position: absolute;
    top: 15px;
    right: 25px;
    color: #fff;
    font-size: 3rem;
    font-weight: bold;
    cursor: pointer;
    z-index: 1002; /* Au-dessus de l'image */
}

/* Les flèches de navigation de la lightbox */
.lightbox-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    z-index: 1001;

    background-color: rgba(255, 255, 255, 0.7);
    border: none;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.lightbox-arrow:hover {
    background-color: white;
}

/* Positionnement des flèches de la lightbox */
.lightbox-arrow.left {
    left: 20px;
}

.lightbox-arrow.right {
    right: 20px;
}

/* On réutilise la classe .hidden pour les flèches de la lightbox aussi */
.lightbox-arrow.hidden {
    display: none;
}