/**
 * WS Booster - Tab Showcase
 * Grosse image + card overlay + tabs en bas (pattern Webflow "advantages")
 */
.ws-tabsh {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.ws-tabsh-tabs-top .ws-tabsh {
    flex-direction: column-reverse;
}

.ws-tabsh__img-wrap {
    position: relative;
    width: 100%;
    height: 70vh;
    min-height: 400px;
    overflow: hidden;
    border-radius: 24px;
}

.ws-tabsh__img {
    position: absolute;
    inset: 0;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 0.7s ease, transform 1.2s cubic-bezier(0.22, 1, 0.36, 1);
    transform: scale(1.04);
    z-index: 1;
}

.ws-tabsh__img.is-active {
    opacity: 1;
    transform: scale(1);
    z-index: 2;
}

.ws-tabsh__img::after {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.15);
    pointer-events: none;
}

/* Card */
.ws-tabsh__card {
    position: absolute;
    z-index: 10;
    display: flex;
    gap: 18px;
    align-items: center;
    max-width: 380px;
    padding: 20px 24px;
    background: rgba(255, 255, 255, 0.95);
    color: #0f172a;
    border-radius: 16px;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.15);
}

.ws-tabsh-pos-bottom-left .ws-tabsh__card  { left: 24px;  bottom: 24px; }
.ws-tabsh-pos-bottom-right .ws-tabsh__card { right: 24px; bottom: 24px; }
.ws-tabsh-pos-top-left .ws-tabsh__card     { left: 24px;  top: 24px; }
.ws-tabsh-pos-top-right .ws-tabsh__card    { right: 24px; top: 24px; }

.ws-tabsh__card-img-wrap {
    position: relative;
    flex: 0 0 auto;
    width: 72px;
    height: 72px;
    border-radius: 12px;
    overflow: hidden;
}

/* !important = override le `img { max-width:100%; height:auto }` que les
   themes WP appliquent par defaut (cf bible §9.13). Sinon image cropee a
   sa hauteur naturelle au lieu de remplir le carre/rectangle de la card. */
.ws-tabsh__card-img-wrap .ws-tabsh__card-img {
    position: absolute !important;
    inset: 0 !important;
    width: 100% !important;
    height: 100% !important;
    max-width: none !important;
    max-height: none !important;
    object-fit: cover;
    object-position: center center;
    opacity: 0;
    transition: opacity 0.5s ease;
}

.ws-tabsh__card-img.is-active {
    opacity: 1;
}

.ws-tabsh__card-body {
    position: relative;
    flex: 1 1 auto;
    min-width: 0;
    min-height: 64px;
}

.ws-tabsh__card-content {
    position: absolute;
    inset: 0;
    opacity: 0;
    transform: translateY(8px);
    transition: opacity 0.5s ease, transform 0.5s ease;
    pointer-events: none;
}

.ws-tabsh__card-content.is-active {
    opacity: 1;
    transform: translateY(0);
    position: relative;
    pointer-events: auto;
}

.ws-tabsh__card-title {
    font-size: 22px;
    font-weight: 600;
    line-height: 1.1;
    margin-bottom: 6px;
    text-transform: capitalize;
}

.ws-tabsh__card-desc {
    font-size: 13.5px;
    line-height: 1.5;
    opacity: 0.8;
}

/* Tabs nav */
.ws-tabsh__tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
}

.ws-tabsh__tab {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    background: transparent;
    color: #0f172a;
    border: 1px solid rgba(15, 23, 42, 0.15);
    border-radius: 999px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.3s ease, color 0.3s ease, border-color 0.3s ease, transform 0.2s ease;
}

.ws-tabsh__tab:hover {
    background: rgba(15, 23, 42, 0.05);
    transform: translateY(-1px);
}

.ws-tabsh__tab.is-active {
    background: #0f172a;
    color: #fff;
    border-color: #0f172a;
}

.ws-tabsh__star {
    display: inline-block;
    width: 12px;
    height: 12px;
    background: #ef3340;
    clip-path: polygon(50% 0, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
}

/* === FLECHES NAV === */
.ws-tabsh__arrow {
    position: absolute;
    z-index: 11;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: rgba(255,255,255,0.92);
    color: #0f172a;
    border: 0;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 20px rgba(0,0,0,0.18);
    transition: background 0.2s ease, transform 0.2s ease;
}
.ws-tabsh__arrow:hover {
    background: #fff;
    transform: scale(1.08);
}
.ws-tabsh-arrows-sides .ws-tabsh__arrow--prev { left: 16px; top: 50%; transform: translateY(-50%); }
.ws-tabsh-arrows-sides .ws-tabsh__arrow--next { right: 16px; top: 50%; transform: translateY(-50%); }
.ws-tabsh-arrows-sides .ws-tabsh__arrow--prev:hover,
.ws-tabsh-arrows-sides .ws-tabsh__arrow--next:hover { transform: translateY(-50%) scale(1.08); }

.ws-tabsh-arrows-corner .ws-tabsh__arrow { top: 16px; }
.ws-tabsh-arrows-corner .ws-tabsh__arrow--prev { right: 72px; }
.ws-tabsh-arrows-corner .ws-tabsh__arrow--next { right: 16px; }

.ws-tabsh-arrows-card .ws-tabsh__arrow { display: none; } /* JS dans card */

/* === LAYOUT CARD : horizontal (default) === */
.ws-tabsh-card-horizontal .ws-tabsh__card {
    flex-direction: row;
}

/* === LAYOUT CARD : vertical === */
.ws-tabsh-card-vertical .ws-tabsh__card {
    flex-direction: column;
    align-items: stretch;
}
.ws-tabsh-card-vertical .ws-tabsh__card-img-wrap {
    width: 100%;
    height: 140px;
}

/* === LAYOUT CARD : image-only (pas de body) === */
.ws-tabsh-card-image-only .ws-tabsh__card {
    flex-direction: column;
    padding: 0;
    background: transparent !important;
    backdrop-filter: none !important;
    box-shadow: none !important;
}
.ws-tabsh-card-image-only .ws-tabsh__card-body { display: none; }
.ws-tabsh-card-image-only .ws-tabsh__card-img-wrap {
    width: 100%;
    height: 200px;
    border-radius: 16px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.25);
}

/* === MODE GRILLE : toutes les cards visibles === */
.ws-tabsh-mode-grid .ws-tabsh__tabs { display: none; }

.ws-tabsh__grid {
    display: grid;
    gap: 20px;
    width: 100%;
}
.ws-tabsh-cols-1 .ws-tabsh__grid { grid-template-columns: 1fr; }
.ws-tabsh-cols-2 .ws-tabsh__grid { grid-template-columns: repeat(2, 1fr); }
.ws-tabsh-cols-3 .ws-tabsh__grid { grid-template-columns: repeat(3, 1fr); }
.ws-tabsh-cols-4 .ws-tabsh__grid { grid-template-columns: repeat(4, 1fr); }

.ws-tabsh__grid-card {
    background: rgba(255,255,255,0.95);
    color: #0f172a;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}
.ws-tabsh__grid-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 50px rgba(0,0,0,0.15);
}

.ws-tabsh__grid-img {
    aspect-ratio: 4 / 3;
    background-size: cover;
    background-position: center;
}

.ws-tabsh-card-vertical .ws-tabsh__grid-card,
.ws-tabsh-card-image-only .ws-tabsh__grid-card {
    display: flex;
    flex-direction: column;
}

.ws-tabsh-card-horizontal .ws-tabsh__grid-card {
    display: grid;
    grid-template-columns: 40% 1fr;
    align-items: center;
}
.ws-tabsh-card-horizontal .ws-tabsh__grid-img {
    aspect-ratio: auto;
    height: 100%;
    min-height: 160px;
}

.ws-tabsh__grid-body {
    padding: 18px 20px;
}

.ws-tabsh-card-image-only .ws-tabsh__grid-body {
    display: none;
}

@media (max-width: 768px) {
    .ws-tabsh__card {
        left: 12px !important;
        right: 12px !important;
        bottom: 12px !important;
        top: auto !important;
        max-width: none !important;
    }
    .ws-tabsh__img-wrap {
        height: 60vh;
        min-height: 360px;
    }
    .ws-tabsh-cols-3 .ws-tabsh__grid,
    .ws-tabsh-cols-4 .ws-tabsh__grid { grid-template-columns: 1fr; }
    .ws-tabsh-cols-2 .ws-tabsh__grid { grid-template-columns: 1fr; }
    .ws-tabsh-arrows-sides .ws-tabsh__arrow { width: 36px; height: 36px; }
    .ws-tabsh-arrows-sides .ws-tabsh__arrow--prev { left: 8px; }
    .ws-tabsh-arrows-sides .ws-tabsh__arrow--next { right: 8px; }
}
