
/* ============================================================
   CUSTOM CAROUSEL (Galerie & Homepage)
   ============================================================ */
.custom-carousel-wrapper {
    position: relative;
    padding: 0 40px; /* Space for buttons */
    margin: 20px 0;
}

.custom-carousel {
    display: flex;
    overflow-x: auto;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    gap: 15px; /* Espace entre les photos */
    padding-bottom: 15px; 
    /* Scrollbar styles default visible now */
    scrollbar-width: thin;
    scrollbar-color: var(--color-primary) #f0f0f0;
}

.custom-carousel::-webkit-scrollbar {
    height: 8px;
}
.custom-carousel::-webkit-scrollbar-track {
    background: #f0f0f0;
    border-radius: 4px;
}
.custom-carousel::-webkit-scrollbar-thumb {
    background-color: var(--color-primary);
    border-radius: 4px;
}

.carousel-item-custom {
    flex: 0 0 calc(25% - 12px); /* 4 items per row minus gap approximation */
    aspect-ratio: 1 / 1;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

/* Responsiveness for carousel items */
@media (max-width: 992px) {
    .carousel-item-custom {
        flex: 0 0 calc(33.333% - 10px); /* 3 items */
    }
}
@media (max-width: 768px) {
    .carousel-item-custom {
        flex: 0 0 calc(50% - 10px); /* 2 items */
    }
}
@media (max-width: 480px) {
    .carousel-item-custom {
        flex: 0 0 calc(100% - 10px); /* 1 item */
    }
    .custom-carousel-wrapper {
        padding: 0 10px;
    }
}

.carousel-item-custom img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

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

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 40px;
    height: 40px;
    background-color: var(--color-primary); /* Use primary color */
    color: white;
    border: none;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 10;
    box-shadow: 0 2px 5px rgba(0,0,0,0.3);
    transition: background 0.3s;
}

.carousel-btn:hover {
    background-color: var(--color-secondary);
}

.carousel-btn.prev {
    left: 0;
}
.carousel-btn.next {
    right: 0;
}

/* ============================================================
   LIGHTBOX STYLES REINFORCED
   ============================================================ */
.gallery-modal .prev, 
.gallery-modal .next {
    background-color: transparent;
    padding: 20px;
    font-size: 2rem;
    text-shadow: 0 0 10px rgba(0,0,0,0.8);
}
.gallery-modal .prev:hover, 
.gallery-modal .next:hover {
    background-color: transparent;
    color: white;
    transform: scale(1.1);
}
