/* Container principal */
.zbsec-expertise-carousel {
    display: flex;
    gap: 2rem;
    width: 100%;
    position: relative;
    align-items: flex-start;
}

/* Conteneur vidéo - 66% */
.zbsec-video-container {
    flex: 0 0 75%;
    position: relative;
    background: #000;
    border-radius: 8px;
    overflow: hidden;
}

.zbsec-video-wrapper {
    position: relative;
    width: 100%;
    height: 0;
    padding-bottom: 56.25%; /* Ratio 16:9 */
    overflow: hidden;
}

.zbsec-video-placeholder {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    border: 0;
    padding: 0;
    margin: 0;
    background: #000;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: #fff;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}

.zbsec-video-placeholder:focus-visible {
    outline: 2px solid #0E4CE7;
    outline-offset: 2px;
}

.zbsec-video-placeholder.is-disabled {
    cursor: default;
    opacity: 1;
}

.zbsec-video-placeholder.is-disabled .zbsec-video-placeholder-overlay {
    display: none;
}

.zbsec-video-placeholder-media {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    overflow: hidden;
}

.zbsec-video-placeholder-media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.zbsec-video-placeholder-fallback {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    text-align: center;
    font-weight: 600;
    background: rgba(0, 0, 0, 0.6);
}

.zbsec-video-placeholder-overlay {
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.65rem;
    padding: 1rem 1.5rem;
    color: #fff;
    text-shadow: 0 12px 32px rgba(5, 10, 40, 0.6);
    pointer-events: none;
}

.zbsec-video-play-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: rgba(14, 76, 231, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 15px 35px rgba(5, 10, 40, 0.4);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.zbsec-video-play-icon::after {
    content: '';
    width: 0;
    height: 0;
    border-style: solid;
    border-width: 12px 0 12px 18px;
    border-color: transparent transparent transparent #fff;
    margin-left: 4px;
}

.zbsec-video-play-label {
    font-size: 0.95rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-weight: 600;
}

.zbsec-video-placeholder:hover .zbsec-video-play-icon {
    transform: scale(1.08);
    box-shadow: 0 20px 40px rgba(5, 10, 40, 0.55);
}

.zbsec-video-placeholder:hover .zbsec-video-play-label {
    letter-spacing: 0.16em;
}

.zbsec-youtube-player {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 1;
    transition: opacity 0.3s ease;
}

.zbsec-video-wrapper.has-placeholder .zbsec-youtube-player {
    opacity: 0;
}

.zbsec-video-wrapper.has-placeholder.is-playing .zbsec-youtube-player {
    opacity: 1;
}

.zbsec-video-wrapper.has-placeholder.is-playing .zbsec-video-placeholder {
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
}

.zbsec-no-video {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    color: #fff;
    padding: 2rem;
}

.zbsec-no-video p {
    margin: 0;
    font-size: 16px;
}

/* Conteneur carrousel - 34% */
.zbsec-carousel-container {
    flex: 0 0 calc(25% - 2rem);
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    /* La hauteur sera calculée dynamiquement en JS pour correspondre à la vidéo */
}

.zbsec-carousel-wrapper {
    height: 100%;
    overflow: hidden;
    position: relative;
}

.zbsec-carousel-track {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* Animations par défaut (seront remplacées par JavaScript) */
.zbsec-carousel-track.scroll-up {
    animation: scrollUp linear infinite;
}

@keyframes scrollUp {
    0% {
        transform: translateY(0);
    }
    100% {
        transform: translateY(-50%);
    }
}

.zbsec-carousel-track.scroll-down {
    animation: scrollDown linear infinite;
}

@keyframes scrollDown {
    0% {
        transform: translateY(-50%);
    }
    100% {
        transform: translateY(0);
    }
}

/* Boutons du carrousel */
.zbsec-carousel-button {
    padding: 1.5rem 1.5rem;
    background: #fff;
    border: 1px solid #1A3190;
    border-radius: 20px;
    color: #1A3190;
    font-size: 18px;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: stretch;
    flex-shrink: 0;
    line-height: 1.4;
    position: relative;
    /* La hauteur sera calculée dynamiquement pour que 4 boutons = hauteur vidéo */
}

.zbsec-button-title {
    display: block;
    width: 100%;
    text-align: left;
    word-wrap: break-word;
    white-space: normal;
    line-height: 1.3;
    position: relative;
    z-index: 2;
}

.zbsec-button-arrow {
    display: flex;
    justify-content: flex-end;
    align-items: flex-end;
    margin-top: auto;
    position: relative;
    z-index: 2;
}

.zbsec-button-overlay {
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0);
    z-index: 1;
    cursor: pointer;
    pointer-events: none;
}

/* Styles pour le chevron dans les boutons */
.zbsec-carousel-button .chevron-arrow-wrapper {
    display: inline-flex;
}

.zbsec-carousel-button.active .chevron-arrow-wrapper {
    --chevron-arrow-color: #ffffff;
}

/*.zbsec-carousel-button:hover:not(.active) {*/
/*    border-color: #0E4CE7;*/
/*    box-shadow: inset 0 0 5px 3px rgb(62 62 62 / 21%);*/
/*}*/

.zbsec-carousel-button.active {
    background: #0E4CE7;
    color: #fff;
    border-color: #0E4CE7;
}

.zbsec-carousel-button.active .zbsec-button-title {
    color: #fff;
}

/* Responsive */
@media (max-width: 1170px) {
    .zbsec-carousel-button {
        padding: .5rem .5rem;
    }
    .zbsec-button-title {
        font-size: 15px;
    }
    .zbsec-button-arrow {
        margin-top: -10px;
    }
}

/* Layout tablette/mobile : vidéo en haut, carousel horizontal en bas */
@media (max-width: 980px) {
    .zbsec-expertise-carousel {
        flex-direction: column;
        gap: 1.5rem;
    }

    .zbsec-video-container {
        flex: 0 0 100%;
        width: 100%;
    }

    .zbsec-carousel-container {
        flex: 0 0 100%;
        width: 100%;
        height: auto !important; /* Override JS */
        max-height: none;
        overflow-x: auto;
        overflow-y: hidden;
    }

    .zbsec-carousel-wrapper {
        height: auto;
        width: 100%;
    }

    /* Carousel devient horizontal */
    .zbsec-carousel-track {
        flex-direction: row;
        gap: 1rem;
        align-items: stretch;
    }

    /* Boutons horizontaux : 4 boutons = width du player */
    .zbsec-carousel-button {
        height: auto !important;
        min-height: 120px !important;
        /* La width sera calculée dynamiquement en JS */
        flex-shrink: 0;
    }

    /* Animations horizontales */
    .zbsec-carousel-track.scroll-up {
        animation: scrollLeft linear infinite;
    }

    @keyframes scrollLeft {
        0% {
            transform: translateX(0);
        }
        100% {
            transform: translateX(-50%);
        }
    }

    .zbsec-carousel-track.scroll-down {
        animation: scrollRight linear infinite;
    }

    @keyframes scrollRight {
        0% {
            transform: translateX(-50%);
        }
        100% {
            transform: translateX(0);
        }
    }
}

/* Layout mobile : carousel vertical, pas de player */
@media (max-width: 600px) {

    .zbsec-video-container {
        display: none;
    }

    .zbsec-carousel-container {
        overflow: hidden;
        max-height: 448px; /* 4 boutons de 100px + 3 gaps de 16px */
    }

    .zbsec-carousel-wrapper {
        height: 100%;
    }

    .zbsec-carousel-track {
        flex-direction: column;
        gap: 1rem;
        align-items: center;
    }

    .zbsec-carousel-button {
        width: 100% !important;
        max-width: 400px;
        height: 100px !important;
        min-height: 100px !important;
        padding: 1rem !important;
    }

    .et_pb_section:not(#expert_home) .zbsec-carousel-button .zbsec-button-arrow {
        display: none;
    }

    .zbsec-button-title {
        font-size: 22px;
        line-height: 1.3;
    }

    .zbsec-button-arrow {
        margin-top: 0.5rem;
    }
}

