/* ==========================================================
   CAROUSEL
========================================================== */

.vc-carousel {
    position: relative;

    /* Permet au carousel de toucher le bord droit de l'écran,
       même dans un container Divi. */
    width: calc(100% + (100vw - 100%) / 2);
    margin-right: calc((100% - 100vw) / 2);
}


/* ==========================================================
   VIEWPORT
========================================================== */

.vc-carousel-viewport {
    width: 100%;
    overflow: hidden;
    cursor: grab;
    user-select: none;
    -webkit-user-select: none;
    touch-action: pan-y;
}

.vc-carousel-viewport.is-dragging {
    cursor: grabbing;
}


/* ==========================================================
   TRACK
========================================================== */

.vc-carousel-track {
    display: flex;
    gap: 24px;
    width: max-content;
    padding-right: 24px; /* marge après la dernière carte en fin de slide */
    will-change: transform;
}


/* ==========================================================
   CARDS
========================================================== */

.vc-carousel-card {
    position: relative;

    width: 420px;
    min-width: 420px;
    min-height: 480px;

    box-sizing: border-box;
    padding: 40px;

    border-radius: 8px;
    border: 1px solid #2d392d;
    box-shadow: none;
    overflow: hidden;

    display: flex;
    flex-direction: column;
    justify-content: flex-end;

    background-color: #101010;
}

/* Calque de fond séparé : permet un zoom fluide via transform
   (transform s'anime toujours en douceur, contrairement à background-size
   dont le point de départ "cover" ne peut pas s'interpoler vers une valeur en %). */
.vc-carousel-card-bg {
    position: absolute;
    inset: 0;
    z-index: 0;

    background-size: cover;
    background-position: center;

    transform: scale(1);
    transition: transform 0.5s ease;
}

.vc-carousel-card:hover .vc-carousel-card-bg {
    transform: scale(1.06);
}

/* dégradé sombre pour garder le texte lisible sur l'image (uniquement en mode texte clair) */
.vc-carousel-card-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, rgba(0, 0, 0, 0) 28%, rgba(0, 0, 0, .58) 62%, rgba(0, 0, 0, .92) 100%);
    mix-blend-mode: multiply;
    z-index: 1;
    pointer-events: none;
}

.vc-carousel-number {
    position: absolute;
    top: 40px;
    left: 40px;
    z-index: 2;
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #ffffff;
}

.vc-carousel-card-text {
    position: relative;
    z-index: 2;
}

.vc-carousel-card h3 {
    margin: 0 0 8px;
    font-size: 36px;
    line-height: 1;
    color: #ffffff;
}

.vc-carousel-card p {
    margin: 0;
    font-size: 17px;
    line-height: 1.5;
    color: #ffffff;
}

/* Mode texte foncé */
.vc-carousel-card--dark .vc-carousel-number {
    color: #0d1c0d;
}

.vc-carousel-card--dark h3 {
    color: #0d1c0d;
}

.vc-carousel-card--dark p {
    color: #2d392d;
}


/* ==========================================================
   ARROWS
========================================================== */

.vc-carousel-arrow {
    position: absolute;
    top: 50%;
    z-index: 20;

    width: 52px;
    height: 52px;

    border: 1px solid rgba(255, 255, 255, .5);
    border-radius: 50%;

    background: rgba(255, 255, 255, .25);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: #ffffff;

    cursor: pointer;

    padding: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    transform: translateY(-50%);

    opacity: 1;
    visibility: visible;

    transition: opacity 0.25s ease, visibility 0.25s ease, transform 0.25s ease, background-color 0.25s ease;
}

.vc-carousel-arrow svg {
    display: block;
    width: 18px;
    height: 18px;
    flex-shrink: 0;
}

.vc-carousel-arrow.is-hidden {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.vc-carousel-arrow:hover {
    transform: translateY(-50%) scale(1.08);
}

.vc-carousel-prev {
    left: 20px;
}

.vc-carousel-next {
    right: 20px;
}


/* ==========================================================
   TABLET
========================================================== */

@media (max-width: 980px) {
    .vc-carousel-card {
        width: 340px;
        min-width: 340px;
        min-height: 420px;
    }
}


/* ==========================================================
   MOBILE
========================================================== */

@media (max-width: 767px) {
    .vc-carousel-card {
        width: 82vw;
        min-width: 82vw;
        min-height: 400px;
        padding: 30px;
    }

    .vc-carousel-number {
        top: 30px;
        left: 30px;
    }

    .vc-carousel-arrow {
        width: 44px;
        height: 44px;
    }

    .vc-carousel-arrow svg {
        width: 16px;
        height: 16px;
    }

    .vc-carousel-prev {
        left: 10px;
    }

    .vc-carousel-next {
        right: 10px;
    }
}
