/* =========================================================
 * LP SOCIAL FEED — CARROUSEL
 * ========================================================= */

/* =========================================================
 * LP SOCIAL FEED — CARROUSEL
 * ========================================================= */

.lp-social-feed-carousel {
    position: relative;
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    overflow: hidden;
}

.lp-social-feed-carousel-track {
    display: flex !important;
    flex-direction: row !important;
    flex-wrap: nowrap !important;
    align-items: flex-start !important;
    justify-content: flex-start !important;
    gap: var(--lp-social-feed-gap, 20px);
    width: 100% !important;
    max-width: none !important;
    overflow-x: auto;
    overflow-y: hidden;
    scroll-behavior: smooth;
    scrollbar-width: none;
}

.lp-social-feed-carousel-track::-webkit-scrollbar {
    display: none;
}

.lp-social-feed-carousel-item {
    display: block !important;
    flex-grow: 0 !important;
    flex-shrink: 0 !important;
    flex-basis: calc(
        (100% - (var(--lp-social-feed-visible, 3) - 1) * var(--lp-social-feed-gap, 20px))
        / var(--lp-social-feed-visible, 3)
    ) !important;
    width: calc(
        (100% - (var(--lp-social-feed-visible, 3) - 1) * var(--lp-social-feed-gap, 20px))
        / var(--lp-social-feed-visible, 3)
    ) !important;
    max-width: none !important;
    min-width: 0 !important;
    margin: 0 !important;
}

@media (max-width: 1024px) {
    .lp-social-feed-carousel-item {
        flex-basis: calc(
            (100% - (var(--lp-social-feed-visible, 2) - 1) * var(--lp-social-feed-gap, 20px))
            / var(--lp-social-feed-visible, 2)
        ) !important;
        width: calc(
            (100% - (var(--lp-social-feed-visible, 2) - 1) * var(--lp-social-feed-gap, 20px))
            / var(--lp-social-feed-visible, 2)
        ) !important;
    }
}

@media (max-width: 767px) {
    .lp-social-feed-carousel-item {
        flex-basis: calc(
            (100% - (var(--lp-social-feed-visible, 1) - 1) * var(--lp-social-feed-gap, 20px))
            / var(--lp-social-feed-visible, 1)
        ) !important;
        width: calc(
            (100% - (var(--lp-social-feed-visible, 1) - 1) * var(--lp-social-feed-gap, 20px))
            / var(--lp-social-feed-visible, 1)
        ) !important;
    }
}


/* Correction images du carrousel */
.lp-social-feed-carousel-item > a {
    display: block !important;
    width: 100% !important;
}

.lp-social-feed-carousel-item > a > img {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
}


/* Masquer la barre de défilement du carousel */
.lp-social-feed-carousel-track {
    scrollbar-width: none !important;
}

.lp-social-feed-carousel-track::-webkit-scrollbar {
    display: none !important;
    width: 0 !important;
    height: 0 !important;
}


/* Largeur du contenu contrôlée par Elementor */
.elementor-widget-lp-social-feed .lp-social-feed,
.elementor-widget-lp-social-feed .lp-social-feed-carousel,
.elementor-widget-lp-social-feed .lp-social-feed-tiktok {
    max-width: 100%;
    box-sizing: border-box;
}

/* Respect de la largeur définie sur le widget */
.elementor-widget-lp-social-feed .lp-social-feed-carousel {
    width: var(--lp-social-feed-content-width, 100%);
}

