/**
 * WS Booster - Comparison Table
 */
.ws-ct {
    --ws-ct-accent: #10b981;
    --ws-ct-cross: #94a3b8;
    --ws-ct-border: #e5e7eb;
    width: 100%;
    overflow-x: auto;
}

.ws-ct__check { color: var(--ws-ct-accent); flex-shrink: 0; display: inline-block; }
.ws-ct__cross { color: var(--ws-ct-cross); flex-shrink: 0; display: inline-block; }
.ws-ct__dash  { color: var(--ws-ct-cross); font-weight: 700; font-size: 18px; }

.ws-ct__mobile { display: none; } /* visible uniquement mobile (voir bottom) */

.ws-ct__table {
    width: 100%;
    border-collapse: collapse;
    min-width: 640px;
}

.ws-ct__table th,
.ws-ct__table td {
    padding: 16px 20px;
    text-align: center;
    border-bottom: 1px solid var(--ws-ct-border);
    vertical-align: middle;
}

.ws-ct__feat-col { width: 35%; }
.ws-ct__feat {
    text-align: left;
    color: #374151;
    font-weight: 500;
    font-size: 14px;
}

.ws-ct__plan-col {
    font-weight: 600;
    padding: 24px 16px !important;
    background: #fff;
    position: relative;
}

.ws-ct-sticky-yes thead .ws-ct__plan-col,
.ws-ct-sticky-yes thead .ws-ct__feat-col {
    position: sticky;
    top: 0;
    z-index: 5;
    background: #fff;
}

.ws-ct__col--hl {
    background: color-mix(in srgb, var(--ws-ct-accent) 7%, white);
}

.ws-ct__plan-col.ws-ct__col--hl {
    background: var(--ws-ct-accent);
    color: #fff;
    border-radius: 12px 12px 0 0;
}

.ws-ct__plan-col.ws-ct__col--hl .ws-ct__plan-price,
.ws-ct__plan-col.ws-ct__col--hl .ws-ct__plan-name {
    color: #fff;
}

.ws-ct__plan-name {
    font-size: 18px;
    color: #0f172a;
    font-weight: 700;
    margin-bottom: 4px;
}

.ws-ct__plan-price {
    font-size: 14px;
    color: #6b7280;
    font-weight: 500;
    margin-bottom: 12px;
}

.ws-ct__badge {
    position: absolute;
    top: 10px;
    right: 10px;
    padding: 3px 10px;
    background: #fbbf24;
    color: #0f172a;
    font-size: 11px;
    font-weight: 700;
    border-radius: 999px;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.ws-ct__cta {
    display: inline-block;
    padding: 8px 20px;
    background: #0f172a;
    color: #fff;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: transform 0.2s ease;
}

.ws-ct__plan-col.ws-ct__col--hl .ws-ct__cta {
    background: #fff;
    color: var(--ws-ct-accent);
}

.ws-ct__cta:hover { transform: translateY(-1px); }

.ws-ct__val {
    font-size: 14px;
    color: #374151;
    font-weight: 500;
}

.ws-ct__check { color: #10b981; }
.ws-ct__cross { color: #d1d5db; }

.ws-ct__section td {
    background: #f9fafb;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-size: 12px;
    color: #6b7280;
    text-align: left;
    padding: 10px 20px;
}

/* Tooltip */
.ws-ct__tooltip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 16px;
    height: 16px;
    margin-left: 4px;
    background: #e5e7eb;
    color: #6b7280;
    border-radius: 50%;
    font-size: 11px;
    font-weight: 700;
    cursor: help;
    vertical-align: middle;
    position: relative;
}

.ws-ct__tooltip-body {
    position: absolute;
    bottom: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%);
    min-width: 200px;
    padding: 8px 12px;
    background: #0f172a;
    color: #fff;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 400;
    line-height: 1.4;
    text-transform: none;
    letter-spacing: 0;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 10;
}

.ws-ct__tooltip:hover .ws-ct__tooltip-body,
.ws-ct__tooltip:focus .ws-ct__tooltip-body {
    opacity: 1;
}

@media (max-width: 768px) {
    .ws-ct__table th,
    .ws-ct__table td {
        padding: 12px 8px;
        font-size: 13px;
    }
}

/* === MOBILE : transforme la table en cards empilees (plus d'overflow) === */
@media (max-width: 640px) {
    .ws-ct {
        overflow: visible;
    }
    .ws-ct__table,
    .ws-ct__table thead,
    .ws-ct__table tbody,
    .ws-ct__table tr,
    .ws-ct__table th,
    .ws-ct__table td {
        display: block;
        min-width: 0;
        width: 100%;
        box-sizing: border-box;
    }
    .ws-ct__table { min-width: 0; }

    /* Hide header row - plans become stacked cards */
    .ws-ct__table thead { display: none; }

    /* Chaque ligne devient une "feature row" avec value+label cote a cote par plan */
    .ws-ct__table tbody tr {
        display: flex;
        flex-wrap: wrap;
        align-items: center;
        padding: 12px 0;
        border-bottom: 1px solid var(--ws-ct-border);
    }

    /* Label feature a gauche, prend la moitie */
    .ws-ct__feat {
        flex: 1 1 100%;
        text-align: left;
        font-weight: 600;
        color: #0f172a;
        padding: 0 0 8px !important;
        border: 0;
        font-size: 14px;
    }

    /* Valeurs : cote a cote en dessous */
    .ws-ct__val {
        flex: 1;
        min-width: 0;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 4px;
        padding: 8px 6px !important;
        border: 0;
        background: #f9fafb;
        border-radius: 8px;
        margin: 0 3px;
    }

    .ws-ct__val::before {
        content: attr(data-plan);
        font-size: 10px;
        font-weight: 700;
        text-transform: uppercase;
        letter-spacing: 0.06em;
        color: #6b7280;
    }

    .ws-ct__val.ws-ct__col--hl {
        background: color-mix(in srgb, var(--ws-ct-accent) 12%, white);
        border: 1px solid var(--ws-ct-accent);
    }

    /* Section separator en mode mobile */
    .ws-ct__section td {
        margin: 8px 0 4px;
        padding: 6px 12px !important;
        background: #0f172a;
        color: #fff;
        border-radius: 6px;
    }
}

/* ============================================
   MOBILE : 3 modes (scroll / cards / tabs)
   ============================================ */
@media (max-width: 768px) {
    /* Mode "cards" : on cache la table, on affiche les cards empilees */
    .ws-ct-mobile-cards .ws-ct__table { display: none; }
    .ws-ct-mobile-cards .ws-ct__mobile { display: flex; flex-direction: column; gap: 16px; }

    /* Mode "tabs" : meme structure que cards mais 1 visible a la fois */
    .ws-ct-mobile-tabs .ws-ct__table { display: none; }
    .ws-ct-mobile-tabs .ws-ct__mobile {
        display: flex;
        overflow-x: auto;
        scroll-snap-type: x mandatory;
        gap: 12px;
        padding-bottom: 8px;
        scrollbar-width: thin;
    }
    .ws-ct-mobile-tabs .ws-ct__mcard {
        flex: 0 0 92%;
        scroll-snap-align: start;
    }

    /* Mode "scroll" : table scroll horizontal (par defaut) */
    .ws-ct-mobile-scroll .ws-ct__mobile { display: none; }

    /* Defaut si pas de classe explicite : cards */
    .ws-ct:not(.ws-ct-mobile-scroll):not(.ws-ct-mobile-tabs):not(.ws-ct-mobile-cards) .ws-ct__table { display: none; }
    .ws-ct:not(.ws-ct-mobile-scroll):not(.ws-ct-mobile-tabs):not(.ws-ct-mobile-cards) .ws-ct__mobile { display: flex; flex-direction: column; gap: 16px; }
}

/* === MOBILE CARDS === */
.ws-ct__mcard {
    position: relative;
    background: #fff;
    border: 1px solid var(--ws-ct-border, #e5e7eb);
    border-radius: 14px;
    padding: 20px 18px 18px;
    box-sizing: border-box;
}

.ws-ct__mcard--hl {
    border-color: var(--ws-ct-accent, #10b981);
    box-shadow: 0 0 0 2px var(--ws-ct-accent, #10b981);
}

.ws-ct__mcard-head {
    text-align: center;
    padding-bottom: 14px;
    margin-bottom: 14px;
    border-bottom: 1px solid var(--ws-ct-border);
}

.ws-ct__mcard-list {
    list-style: none;
    padding: 0;
    margin: 0 0 16px;
}

.ws-ct__mcard-list li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    padding: 10px 0;
    border-bottom: 1px dashed rgba(0,0,0,0.06);
    font-size: 14px;
}

.ws-ct__mcard-list li:last-child { border-bottom: 0; }

.ws-ct__mcard-section {
    background: rgba(0,0,0,0.04);
    margin: 8px -18px;
    padding: 8px 18px !important;
    font-weight: 700;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #64748b;
    border-bottom: 0 !important;
    justify-content: flex-start !important;
}

.ws-ct__mcard-feat { color: #475569; }
.ws-ct__mcard-val { font-weight: 600; }

.ws-ct__cta--mobile {
    display: flex;
    width: 100%;
    justify-content: center;
}

/* Mobile : on cache mobile par defaut sur desktop */
@media (min-width: 769px) {
    .ws-ct__mobile { display: none !important; }
}
