/**
 * Service Carousel Elementor - Styles
 * Carrousel de services avec formes organiques colorées
 */

/* Wrapper principal */
.service-carousel-wrapper {
    position: relative;
    width: 100%;
    overflow: visible;
    padding: 20px 0;
}

/* Container Swiper */
.service-carousel-container {
    width: 100%;
    overflow: hidden;
}

/* Slide */
.service-carousel-container .swiper-slide {
    height: auto;
}

/* Item / Carte */
.service-carousel-item {
    position: relative;
    min-height: 380px;
    border-radius: 30px;
    overflow: hidden;
    background-color: #ffffff;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    padding: 30px 25px;
    display: flex;
    flex-direction: column;
}

/* Forme organique en arrière-plan (blob) */
.service-carousel-item::before {
    content: '';
    position: absolute;
    width: 200%;
    height: 200%;
    top: -50%;
    left: -50%;
    background: var(--blob-color, #c8e6c9);
    border-radius: 40% 60% 70% 30% / 40% 50% 60% 50%;
    z-index: 0;
    transition: all 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    transform: translate(-30%, -30%) rotate(0deg);
    opacity: 0.6;
}

.service-carousel-item:hover::before {
    transform: translate(-30%, -30%) rotate(10deg) scale(1.05);
}

/* Couleur de blob personnalisée */
.service-carousel-item[style*="--custom-blob-color"]::before {
    background: var(--custom-blob-color) !important;
}

/* Couleurs des blobs par slide (défaut) */
.swiper-slide:nth-child(5n+1) .service-carousel-item:not([style*="--custom-blob-color"])::before {
    background: linear-gradient(135deg, #a8d5ba 0%, #c8e6c9 100%);
}

.swiper-slide:nth-child(5n+2) .service-carousel-item:not([style*="--custom-blob-color"])::before {
    background: linear-gradient(135deg, #ffcc80 0%, #ffe0b2 100%);
}

.swiper-slide:nth-child(5n+3) .service-carousel-item:not([style*="--custom-blob-color"])::before {
    background: linear-gradient(135deg, #81d4fa 0%, #b3e5fc 100%);
}

.swiper-slide:nth-child(5n+4) .service-carousel-item:not([style*="--custom-blob-color"])::before {
    background: linear-gradient(135deg, #ce93d8 0%, #e1bee7 100%);
}

.swiper-slide:nth-child(5n+5) .service-carousel-item:not([style*="--custom-blob-color"])::before {
    background: linear-gradient(135deg, #ef9a9a 0%, #ffcdd2 100%);
}

/* Image cachée (on utilise les blobs à la place) */
.service-carousel-image {
    display: none;
}

/* Lien global */
.service-carousel-link {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10;
}

/* Contenu */
.service-carousel-content {
    position: relative;
    z-index: 5;
    display: flex;
    flex-direction: column;
    flex: 1;
    justify-content: flex-end;
}

/* Icône wrapper - Style flèche dans cercle */
.service-carousel-icon-wrapper {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 45px;
    height: 45px;
    border-radius: 50%;
    background-color: transparent;
    border: 2px solid #1a1a2e;
    margin-bottom: 20px;
    transition: all 0.3s ease;
}

.service-carousel-item:hover .service-carousel-icon-wrapper {
    background-color: #1a1a2e;
    transform: translateX(5px);
}

.service-carousel-icon {
    font-size: 18px;
    color: #1a1a2e;
    line-height: 1;
    transition: all 0.3s ease;
}

.service-carousel-icon svg {
    width: 18px;
    height: 18px;
    fill: #1a1a2e;
    transition: all 0.3s ease;
}

.service-carousel-item:hover .service-carousel-icon {
    color: #ffffff;
}

.service-carousel-item:hover .service-carousel-icon svg {
    fill: #ffffff;
}

/* Titre */
.service-carousel-title {
    font-size: 22px;
    font-weight: 600;
    color: #1a1a2e;
    margin: 0 0 15px 0;
    line-height: 1.3;
    transition: all 0.3s ease;
}

/* Description */
.service-carousel-description {
    font-size: 15px;
    line-height: 1.7;
    color: #5a5a6e;
    overflow: hidden;
    transition: all 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.service-carousel-description span {
    display: block;
}

/* ========================
   PAGINATION
   ======================== */
.service-carousel-pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 40px;
}

.service-carousel-pagination .swiper-pagination-bullet {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background-color: transparent;
    border: 2px solid #c5c5d0;
    opacity: 1;
    transition: all 0.3s ease;
    cursor: pointer;
    position: relative;
}

.service-carousel-pagination .swiper-pagination-bullet::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 0;
    height: 0;
    border-radius: 50%;
    background-color: #1a1a2e;
    transition: all 0.3s ease;
}

.service-carousel-pagination .swiper-pagination-bullet-active {
    border-color: #1a1a2e;
}

.service-carousel-pagination .swiper-pagination-bullet-active::before {
    width: 6px;
    height: 6px;
}

/* Style 2 - Points pleins */
.service-carousel-pagination.style-2 .swiper-pagination-bullet {
    width: 10px;
    height: 10px;
    background-color: #e0e0e0;
    border: none;
}

.service-carousel-pagination.style-2 .swiper-pagination-bullet-active {
    background-color: #1a1a2e;
}

/* ========================
   NAVIGATION (ARROWS)
   ======================== */
.service-carousel-navigation {
    position: absolute;
    top: 50%;
    left: -20px;
    right: -20px;
    transform: translateY(-50%);
    display: flex;
    justify-content: space-between;
    pointer-events: none;
    z-index: 15;
}

.service-carousel-nav {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background-color: #ffffff;
    border: 2px solid #e0e0e0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    cursor: pointer;
    pointer-events: auto;
    transition: all 0.3s ease;
    color: #1a1a2e;
    font-size: 18px;
}

.service-carousel-nav:hover {
    background-color: #1a1a2e;
    border-color: #1a1a2e;
    color: #ffffff;
    transform: scale(1.05);
}

.service-carousel-nav:disabled,
.service-carousel-nav.swiper-button-disabled {
    opacity: 0.4;
    cursor: not-allowed;
    pointer-events: none;
}

/* ========================
   BARRE DE PROGRESSION
   ======================== */
.service-carousel-pagination.swiper-pagination-progressbar {
    position: relative;
    height: 3px;
    background-color: #e0e0e0;
    border-radius: 2px;
    margin-top: 40px;
}

.service-carousel-pagination.swiper-pagination-progressbar .swiper-pagination-progressbar-fill {
    background-color: #1a1a2e;
    border-radius: 2px;
}

/* ========================
   RESPONSIVE
   ======================== */
@media (max-width: 1200px) {
    .service-carousel-item {
        min-height: 350px;
    }
}

@media (max-width: 1024px) {
    .service-carousel-item {
        min-height: 340px;
        padding: 25px 20px;
    }
    
    .service-carousel-title {
        font-size: 20px;
    }
}

@media (max-width: 768px) {
    .service-carousel-item {
        min-height: 320px;
        padding: 25px 20px;
        border-radius: 25px;
    }
    
    .service-carousel-title {
        font-size: 18px;
    }
    
    .service-carousel-description {
        font-size: 14px;
    }
    
    .service-carousel-nav {
        width: 45px;
        height: 45px;
        font-size: 16px;
    }
    
    .service-carousel-icon-wrapper {
        width: 40px;
        height: 40px;
    }
    
    .service-carousel-icon {
        font-size: 16px;
    }
    
    .service-carousel-pagination {
        margin-top: 30px;
    }
}

@media (max-width: 576px) {
    .service-carousel-wrapper {
        padding: 10px 0;
    }
    
    .service-carousel-item {
        min-height: 300px;
        padding: 20px 18px;
    }
    
    .service-carousel-title {
        font-size: 17px;
        margin-bottom: 12px;
    }
    
    .service-carousel-description {
        font-size: 13px;
        line-height: 1.6;
    }
    
    .service-carousel-navigation {
        display: none;
    }
}

/* ========================
   ANIMATION D'ENTRÉE
   ======================== */
.service-carousel-wrapper.animated .service-carousel-item {
    animation: fadeInUp 0.6s ease forwards;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========================
   EFFET HOVER CARTE
   ======================== */
.service-carousel-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
}

/* ========================
   MODE ÉDITEUR ELEMENTOR
   ======================== */
.elementor-editor-active .service-carousel-wrapper {
    overflow: visible;
}

/* ========================
   ACCESSIBILITÉ
   ======================== */
@media (prefers-reduced-motion: reduce) {
    .service-carousel-item,
    .service-carousel-item::before,
    .service-carousel-content,
    .service-carousel-icon-wrapper,
    .service-carousel-description {
        transition: none !important;
    }
}

/* Focus visible pour navigation clavier */
.service-carousel-nav:focus-visible {
    outline: 3px solid #1a1a2e;
    outline-offset: 2px;
}

.swiper-pagination-bullet:focus-visible {
    outline: 2px solid #1a1a2e;
    outline-offset: 2px;
}

/* ========================
   VARIANTES DE STYLE
   ======================== */

/* Style avec image visible */
.service-carousel-wrapper.with-images .service-carousel-image {
    display: block;
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
}

.service-carousel-wrapper.with-images .service-carousel-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.service-carousel-wrapper.with-images .service-carousel-item::before {
    display: none;
}

.service-carousel-wrapper.with-images .service-carousel-content {
    background: linear-gradient(to top, rgba(255,255,255,0.95) 60%, transparent 100%);
    padding-top: 80px;
}

/* Style sombre */
.service-carousel-wrapper.dark-mode .service-carousel-item {
    background-color: #1a1a2e;
}

.service-carousel-wrapper.dark-mode .service-carousel-title {
    color: #ffffff;
}

.service-carousel-wrapper.dark-mode .service-carousel-description {
    color: rgba(255, 255, 255, 0.75);
}

.service-carousel-wrapper.dark-mode .service-carousel-icon-wrapper {
    border-color: #ffffff;
}

.service-carousel-wrapper.dark-mode .service-carousel-icon {
    color: #ffffff;
}

.service-carousel-wrapper.dark-mode .service-carousel-icon svg {
    fill: #ffffff;
}

.service-carousel-wrapper.dark-mode .service-carousel-item:hover .service-carousel-icon-wrapper {
    background-color: #ffffff;
}

.service-carousel-wrapper.dark-mode .service-carousel-item:hover .service-carousel-icon {
    color: #1a1a2e;
}

.service-carousel-wrapper.dark-mode .service-carousel-item:hover .service-carousel-icon svg {
    fill: #1a1a2e;
}
