/* Image Box Carousel - Styles principaux */
.elementor-widget-image-box-carousel {
    --image-box-spacing: 30px;
    --image-box-text-color: #333;
    --image-box-title-color: #000;
}

/* Wrapper principal */
.elementor-widget-image-box-carousel .elementor-image-carousel-wrapper {
    position: relative;
	overflow: visible;
}
.elementor-widget-image-box-carousel .swiper-container {
    overflow: hidden !important; /* Forcer l'overflow normal sur le swiper */
}

/* Flèches extérieures */
.elementor-widget-image-box-carousel .swiper-arrows-outside .elementor-swiper-button-prev {
    left: -50px !important;
    z-index: 10 !important;
    position: absolute !important;
}

.elementor-widget-image-box-carousel .swiper-arrows-outside .elementor-swiper-button-next {
    right: -50px !important;
    z-index: 10 !important;
    position: absolute !important;
}

/* Marge pour laisser place aux flèches */
.elementor-widget-image-box-carousel .swiper-arrows-outside {
    margin: 0 50px;
	position: relative;
}

/* Style des slides */
.elementor-widget-image-box-carousel .swiper-slide {
    height: auto;
}

/* Image Box Wrapper */
.elementor-widget-image-box-carousel .elementor-image-box-wrapper {
    display: flex;
    align-items: flex-start;
    gap: 30px;
    height: 100%;
}

/* Position de l'image */
.elementor-widget-image-box-carousel.elementor-position-left .elementor-image-box-wrapper {
    flex-direction: row;
}

.elementor-widget-image-box-carousel.elementor-position-right .elementor-image-box-wrapper {
    flex-direction: row-reverse;
}

.elementor-widget-image-box-carousel.elementor-position-top .elementor-image-box-wrapper {
    flex-direction: column;
    text-align: center;
}

/* Style des images */
.elementor-widget-image-box-carousel .elementor-image-box-img {
    flex-shrink: 0;
    margin: 0;
    overflow: hidden;
    position: relative;
    width: 100% !important;
    max-width: none !important;
    min-width: unset !important;
}

/* Ratio d'aspect carré */
.elementor-widget-image-box-carousel .elementor-image-box-img::before {
    content: "";
    display: block;
    padding-bottom: 100%; /* Ratio 1:1 pour un carré */
}

/* Gestion de la balise picture */
.elementor-widget-image-box-carousel .elementor-image-box-img picture {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: block;
}

/* Images carrées avec object-fit */
.elementor-widget-image-box-carousel .elementor-image-box-img img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100% !important;
    height: 100% !important;
    object-fit: cover;
    display: block;
    transition: transform 0.3s ease;
}

/* Hover effect sur l'image */
.elementor-widget-image-box-carousel .elementor-image-box-img:hover img {
    transform: scale(1.05);
}

/* Contenu texte */
.elementor-widget-image-box-carousel .elementor-image-box-content {
    flex: 1;
    padding: 20px;
}

/* Titre */
.elementor-widget-image-box-carousel .elementor-image-box-title {
    color: var(--image-box-title-color);
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* Description avec limitation de hauteur */
.elementor-widget-image-box-carousel .elementor-image-box-description {
    color: var(--image-box-text-color);
    font-size: 16px;
    line-height: 1.6;
    position: relative;
    max-height: 100px;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

/* État expandé de la description */
.elementor-widget-image-box-carousel .elementor-image-box-description.expanded {
    max-height: none;
}

/* Gradient pour texte tronqué */
.elementor-widget-image-box-carousel .elementor-image-box-description:not(.expanded)::after {
    content: "";
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 30px;
    background: linear-gradient(to bottom, transparent, white);
}

/* Bouton "Voir plus" */
.elementor-widget-image-box-carousel .elementor-image-box-toggle {
    display: inline-block;
    margin-top: 10px;
    padding: 5px 15px;
    background: transparent;
    border: 1px solid #ddd;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s ease;
}

.elementor-widget-image-box-carousel .elementor-image-box-toggle:hover {
    background: #f5f5f5;
    border-color: #999;
}

/* Responsive - Tablette */
@media (max-width: 991px) {
    .elementor-widget-image-box-carousel .elementor-image-box-wrapper {
        flex-direction: column !important;
        text-align: center;
    }
    
    .elementor-widget-image-box-carousel .elementor-image-box-img {
        width: 100%;
        max-width: 400px;
        min-width: unset; /* Retire la largeur minimale sur tablette */
        margin: 0 auto;
    }
    
    .elementor-widget-image-box-carousel .elementor-image-box-title {
        font-size: 20px;
    }
    .elementor-widget-image-box-carousel .elementor-image-carousel-wrapper {
        margin: 0; /* Retirer la marge */
    }
    
    .elementor-widget-image-box-carousel .elementor-swiper-button {
        display: none; /* Masquer les flèches */
    }
}

/* Responsive - Mobile */
@media (max-width: 767px) {
    .elementor-widget-image-box-carousel .elementor-image-box-wrapper {
        gap: 20px;
    }
    
    .elementor-widget-image-box-carousel .elementor-image-box-img {
        max-width: 300px;
    }
    
    .elementor-widget-image-box-carousel .elementor-image-box-content {
        padding: 15px;
    }
    
    .elementor-widget-image-box-carousel .elementor-image-box-title {
        font-size: 18px;
        margin-bottom: 10px;
    }
    
    .elementor-widget-image-box-carousel .elementor-image-box-description {
        font-size: 14px;
        max-height: 80px;
    }
}

/* Navigation personnalisée */
.elementor-widget-image-box-carousel .elementor-swiper-button {
    background-color: #ffbc00;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.elementor-widget-image-box-carousel .elementor-swiper-button:hover {
    background-color: #ffbc00;
}

.elementor-widget-image-box-carousel .elementor-swiper-button:after {
    font-size: 20px;
    color: #333;
}

/* Pagination */
.elementor-widget-image-box-carousel .swiper-pagination-bullet {
    width: 10px;
    height: 10px;
    background: #ddd;
    opacity: 1;
    transition: all 0.3s ease;
}

.elementor-widget-image-box-carousel .swiper-pagination-bullet-active {
    background: #333;
    width: 30px;
    border-radius: 5px;
}

/* Espacement entre les slides */
.elementor-widget-image-box-carousel .swiper-wrapper {
    align-items: stretch;
}

.elementor-widget-image-box-carousel .swiper-slide-inner {
    height: 100%;
	margin: 0 15px;
    padding: 15px;
	border: 1px solid #e0e0e0;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    background: #fff;
}

/* Fix pour PrestaShop picture/webp */
.elementor-widget-image-box-carousel picture.swiper-slide-image {
    width: 100% !important;
    height: 100% !important;
    display: block;
}

/* Reset des attributs width/height inline */
.elementor-widget-image-box-carousel .elementor-image-box-img img[width],
.elementor-widget-image-box-carousel .elementor-image-box-img img[height] {
    width: 100% !important;
    height: 100% !important;
}

/* Pour les images stretch */
.elementor-widget-image-box-carousel.swiper-image-stretch .elementor-image-box-img {
    width: 100%;
}

/* Styles pour l'alignement vertical */
.elementor-widget-image-box-carousel.elementor-vertical-align-top .elementor-image-box-wrapper {
    align-items: flex-start;
}

.elementor-widget-image-box-carousel.elementor-vertical-align-middle .elementor-image-box-wrapper {
    align-items: center;
}

.elementor-widget-image-box-carousel.elementor-vertical-align-bottom .elementor-image-box-wrapper {
    align-items: flex-end;
}

/* Ratio paysage 4:3 */
.elementor-widget-image-box-carousel[data-image-ratio="landscape"] .elementor-image-box-img::before {
    padding-bottom: 75%;
}

/* Ratio portrait 3:4 */
.elementor-widget-image-box-carousel[data-image-ratio="portrait"] .elementor-image-box-img::before {
    padding-bottom: 133.33%;
}

/* Ratio widescreen 16:9 */
.elementor-widget-image-box-carousel[data-image-ratio="widescreen"] .elementor-image-box-img::before {
    padding-bottom: 56.25%;
}