/**
 * CAROUSEL COMPONENT STYLES
 */

.property-carousel {
    position: relative;
    width: 100%;
    height: 100%;
    overflow: hidden;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.carousel-container {
    position: relative;
    width: 100%;
    height: 100%;
}

.carousel-track {
    display: flex;
    transition: transform 0.5s ease-in-out;
    height: 100%;
}

.carousel-slide {
    min-width: 100%;
    height: 100%;
    position: relative;
}

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

/* Navigation Buttons */
.carousel-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    background: rgba(255, 255, 255, 0.95);
    color: #1e293b;
    border: none;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    z-index: 10;
    backdrop-filter: blur(8px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
    opacity: 0;
}

.property-carousel:hover .carousel-nav {
    opacity: 1;
}

.carousel-nav:hover {
    background: white;
    transform: translateY(-50%) scale(1.15);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    color: var(--primary, #6366f1);
}

.carousel-nav:active {
    transform: translateY(-50%) scale(1.05);
}

.carousel-nav.prev {
    left: 12px;
}

.carousel-nav.next {
    right: 12px;
}

.carousel-nav svg {
    width: 22px;
    height: 22px;
    stroke-width: 2.5;
}

/* Hide navigation if only one image */
.property-carousel[data-slides="1"] .carousel-nav {
    display: none;
}

/* Indicators */
.carousel-indicators {
    position: absolute;
    bottom: 15px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}

.carousel-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 0;
}

.carousel-indicator.active {
    background: white;
    width: 24px;
    border-radius: 4px;
}

/* Hide indicators if only one image */
.property-carousel[data-slides="1"] .carousel-indicators {
    display: none;
}

/* Image Counter */
.carousel-counter {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(0, 0, 0, 0.6);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 500;
    z-index: 10;
    backdrop-filter: blur(4px);
}

/* Hide counter if only one image */
.property-carousel[data-slides="1"] .carousel-counter {
    display: none;
}

/* Responsive */
@media (max-width: 768px) {
    .property-carousel {
        border-radius: 0;
    }
    
    .carousel-nav {
        width: 40px;
        height: 40px;
        opacity: 1; /* Toujours visible sur mobile */
        background: rgba(255, 255, 255, 0.98);
    }
    
    .carousel-nav.prev {
        left: 10px;
    }
    
    .carousel-nav.next {
        right: 10px;
    }
    
    .carousel-nav svg {
        width: 20px;
        height: 20px;
        stroke-width: 2.5;
    }
    
    .carousel-nav:hover {
        transform: translateY(-50%) scale(1.1);
    }
    
    .carousel-counter {
        font-size: 0.75rem;
        padding: 5px 10px;
        top: 12px;
        right: 12px;
    }
    
    .carousel-indicators {
        bottom: 12px;
        gap: 6px;
    }
    
    .carousel-indicator {
        width: 7px;
        height: 7px;
    }
    
    .carousel-indicator.active {
        width: 20px;
    }
}

@media (max-width: 480px) {
    .carousel-nav {
        width: 36px;
        height: 36px;
    }
    
    .carousel-nav.prev {
        left: 8px;
    }
    
    .carousel-nav.next {
        right: 8px;
    }
    
    .carousel-nav svg {
        width: 18px;
        height: 18px;
    }
    
    .carousel-counter {
        font-size: 0.6875rem;
        padding: 4px 8px;
        top: 10px;
        right: 10px;
    }
    
    .carousel-indicators {
        bottom: 10px;
        gap: 5px;
    }
    
    .carousel-indicator {
        width: 6px;
        height: 6px;
    }
    
    .carousel-indicator.active {
        width: 18px;
    }
}

/* Touch devices - always show navigation */
@media (hover: none) {
    .carousel-nav {
        opacity: 1;
    }
}