.swiper {
    position: relative;
    width: 100%;
    height: 100%;
    margin: 0 auto;
    border-radius: 12px;
    overflow: hidden;
}

.swiper-container {
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.swiper-wrapper {
    display: flex;
    width: 100%;
    height: 100%;
    transition: transform 0.3s ease-in-out;
}

.swiper-slide {
    flex: 0 0 100%;
    width: 100%;
    height: 100%;
    min-height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

.swiper-slide.active {
    opacity: 1;
}

.swiper-image {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* Mode stretch - l'image s'étire pour remplir tout l'espace */
.swiper-slide.stretch .swiper-image {
    object-fit: fill;
}

/* Mode stretch height - force la hauteur même si ça déforme */
.swiper-slide.stretch-height .swiper-image {
    object-fit: cover;
    width: 100%;
    height: 100%;
    min-height: 100%;
}

/* Mode center avec blur - l'image est centrée avec un arrière-plan flouté */
.swiper-slide.center-blur {
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    display: block;
    height: 100% !important;
    min-height: 100% !important;
}

.swiper-slide.center-blur .swiper-image {
    object-fit: cover;
    width: 100% !important;
    height: 100% !important;
    min-height: 100% !important;
    filter: none;
    z-index: 2;
    position: relative;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.swiper-slide.center-blur::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: inherit;
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    filter: blur(20px) brightness(0.7);
    z-index: 1;
    transform: scale(1.1);
}

/* Navigation Buttons */
.swiper-btn {
    position: absolute;
    top: 75%;
    transform: translateY(-50%);
    z-index: 10;
    background: rgba(255, 255, 255, 0.75);
    border: none;
    border-radius: 50%;
    width: 25px;
    height: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(4px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.swiper-btn:hover {
    background: rgba(255, 255, 255, 1);
    transform: translateY(-50%) scale(1.1);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
}

.swiper-btn:active {
    transform: translateY(-50%) scale(0.95);
}

.swiper-btn-prev {
    left: 12px;
}

.swiper-btn-next {
    right: 12px;
}

.swiper-arrow {
    width: 13px;
    height: 13px;
    color: #374151;
}

/* Pagination */
.swiper-pagination {
    position: absolute;
    bottom: 16px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 8px;
    z-index: 10;
}

.swiper-pagination-bullet {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(4px);
}

.swiper-pagination-bullet:hover {
    background: rgba(255, 255, 255, 0.8);
    transform: scale(1.2);
}

.swiper-pagination-bullet.active {
    background: #ffffff;
    transform: scale(1.3);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Content Overlays */
.swiper-content,
.swiper-content-front {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.7));
    color: white;
    padding: 20px;
    z-index: 2;
}

.swiper-content-back {
    padding: 20px;
    text-align: center;
}

.swiper-content-back p {
    margin: 0;
    font-size: 16px;
    line-height: 1.5;
}

/* Empty State */
.swiper-empty {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    color: #6b7280;
    font-style: italic;
}

/* Responsive Design */
@media (max-width: 640px) {

    .swiper-btn {
        width: 36px;
        height: 36px;
    }

    .swiper-arrow {
        width: 11px;
        height: 11px;
    }

    .swiper-btn-prev {
        left: 8px;
    }

    .swiper-btn-next {
        right: 8px;
    }

    .swiper-content,
    .swiper-content-front {
        padding: 16px;
    }
}

/* Animation for slide transitions */
@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(20px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.swiper-slide.active {
    animation: slideIn 0.3s ease-out;
}

/* Focus styles for accessibility */
.swiper-btn:focus,
.swiper-pagination-bullet:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* Loading state */
.swiper.loading {
    background: #f3f4f6;
}

.swiper.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 40px;
    height: 40px;
    border: 3px solid #e5e7eb;
    border-top: 3px solid #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% {
        transform: translate(-50%, -50%) rotate(0deg);
    }

    100% {
        transform: translate(-50%, -50%) rotate(360deg);
    }
}

/* Placeholder styles */
.swiper-placeholder,
.swiper-no-image {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    min-height: 100%;
    flex: 1;
    background: #f9fafb;
    text-align: center;
    padding: 2rem;
    box-sizing: border-box;
}

.swiper-placeholder i,
.swiper-no-image i {
    display: block;
    margin-bottom: 0.5rem;
}

.placeholder-text {
    color: #6b7280;
    font-weight: 500;
}