/* ===== CAROUSELS STYLES ===== */

/* Réalisations Carousel */
.realizations-carousel {
    margin: 2rem 0;
    position: relative;
}

.carousel-container {
    position: relative;
    overflow: hidden;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    height: 420px; /* 3 lignes de 200px + gaps */
}

.carousel-track {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(3, 1fr);
    gap: 1rem;
    padding: 1rem;
    height: 100%;
    transition: transform 0.5s ease-in-out;
}

.carousel-item {
    border-radius: 10px;
    overflow: hidden;
    position: relative;
    cursor: pointer;
    transition: transform 0.3s ease;
    height: 200px;
}

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

.carousel-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.carousel-item .item-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, rgba(0, 171, 240, 0.8), rgba(0, 123, 191, 0.8));
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.carousel-item:hover .item-overlay {
    opacity: 1;
}

.item-overlay h3 {
    color: white;
    font-size: 1.2rem;
    font-weight: 600;
    text-align: center;
}

.carousel-btn {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.9);
    border: none;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 10;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.2);
}

.carousel-btn:hover {
    background: white;
    transform: translateY(-50%) scale(1.1);
}

.carousel-btn.prev-btn {
    left: 15px;
}

.carousel-btn.next-btn {
    right: 15px;
}

.carousel-btn i {
    font-size: 1.2rem;
    color: #00abf0;
}

.carousel-dots {
    display: flex;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1rem;
}

.carousel-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ddd;
    cursor: pointer;
    transition: all 0.3s ease;
}

.carousel-dot.active {
    background: #00abf0;
    transform: scale(1.2);
}

/* Reviews Carousel Mobile */
.reviews-carousel {
    display: none;
    margin: 2rem 0;
}

.reviews-carousel .carousel-container {
    position: relative;
    overflow: hidden;
    border-radius: 15px;
}

.reviews-carousel .carousel-track {
    display: flex;
    transition: transform 0.5s ease-in-out;
    gap: 1rem;
    padding: 1rem;
}

.reviews-carousel .carousel-item {
    min-width: 100%;
    flex-shrink: 0;
}

.reviews-carousel .review-card {
    margin: 0;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
}

/* Responsive Design */
@media (max-width: 768px) {
    .desktop-reviews {
        display: none;
    }
    
    .reviews-carousel {
        display: block;
    }
    
    .carousel-container {
        height: 280px; /* 2 lignes de 180px + gaps */
    }
    
    .carousel-track {
        grid-template-columns: repeat(2, 1fr);
        grid-template-rows: repeat(2, 1fr);
    }
    
    .carousel-item {
        height: 180px;
    }
    
    .carousel-btn {
        width: 40px;
        height: 40px;
    }
    
    .carousel-btn.prev-btn {
        left: 10px;
    }
    
    .carousel-btn.next-btn {
        right: 10px;
    }
}

@media (max-width: 480px) {
    .carousel-item {
        min-width: 250px;
        height: 160px;
    }
    
    .carousel-track {
        padding: 0.5rem;
    }
    
    .carousel-btn {
        width: 35px;
        height: 35px;
    }
    
    .carousel-btn i {
        font-size: 1rem;
    }
}

/* Animation pour les carousels */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.carousel-item {
    animation: slideIn 0.5s ease-out;
}

/* Styles pour les filtres de réalisations */
.realizations-carousel .carousel-item[data-category] {
    display: block;
}

.realizations-carousel .carousel-item.hidden {
    display: none;
}

/* Indicateur de chargement */
.carousel-loading {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 200px;
    color: #00abf0;
    font-size: 1.2rem;
}

.carousel-loading i {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}
