/* Tableau comparatif — défilement horizontal tactile (v4) */

body.pricing-body {
    overflow-x: visible;
}

.compare-swipe-hint {
    display: none;
    font-size: 0.8125rem;
    font-weight: 600;
    color: #0369a1;
    text-align: center;
    margin-bottom: 0.75rem;
    padding: 0.5rem 0.75rem;
    background: #f0f9ff;
    border-radius: 0.5rem;
    border: 1px solid #bae6fd;
}

.compare-swipe-outer {
    position: relative;
    width: 100%;
    max-width: 100%;
    min-width: 0;
}

.compare-swipe-scroll {
    display: block;
    width: 100%;
    max-width: 100%;
    overflow-x: scroll;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior-x: contain;
    touch-action: pan-x pan-y;
    border-radius: 1rem;
    border: 1px solid #e5e7eb;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    background: #fff;
    scrollbar-width: thin;
    scrollbar-color: #94a3b8 transparent;
}

.compare-swipe-scroll::-webkit-scrollbar {
    height: 6px;
}

.compare-swipe-scroll::-webkit-scrollbar-thumb {
    background: #94a3b8;
    border-radius: 999px;
}

.compare-swipe-fade {
    display: none;
    pointer-events: none;
    position: absolute;
    top: 0;
    right: 0;
    bottom: 6px;
    width: 2.5rem;
    background: linear-gradient(to left, #fff 20%, rgba(255, 255, 255, 0));
    border-radius: 0 1rem 1rem 0;
    transition: opacity 0.2s;
}

.compare-swipe-fade.is-hidden {
    opacity: 0;
}

.compare-table {
    width: max-content;
    min-width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
    text-align: left;
}

.compare-table th,
.compare-table td {
    padding: 0.875rem 1rem;
    vertical-align: middle;
}

.compare-table thead {
    background: #f9fafb;
    color: #374151;
}

.compare-table th:not(:first-child),
.compare-table td:not(:first-child) {
    text-align: center;
    white-space: nowrap;
}

.compare-table tbody tr:nth-child(even) {
    background: #f8fafc;
}

.compare-table .col-popular {
    background: rgba(14, 165, 233, 0.06);
}

.compare-value-yes {
    color: #059669;
    font-weight: 600;
}

.compare-value-no {
    color: #d1d5db;
}

.compare-value-text {
    color: #0369a1;
    font-weight: 500;
}

@media (max-width: 767px) {
    .compare-swipe-hint {
        display: block;
    }

    .compare-swipe-fade {
        display: block;
    }

    .compare-table {
        min-width: 36rem;
    }

    .compare-table th:first-child,
    .compare-table td:first-child {
        position: sticky;
        left: 0;
        z-index: 2;
        min-width: 9.5rem;
        max-width: 10.5rem;
        white-space: normal;
        box-shadow: 4px 0 8px -4px rgba(15, 23, 42, 0.15);
    }

    .compare-table thead th:first-child {
        z-index: 3;
        background: #f9fafb;
    }

    .compare-table tbody tr:nth-child(even) td:first-child {
        background: #f8fafc;
    }

    .compare-table tbody tr:nth-child(odd) td:first-child {
        background: #fff;
    }

    .compare-table th:not(:first-child),
    .compare-table td:not(:first-child) {
        min-width: 6.5rem;
    }
}

@media (min-width: 768px) {
    .compare-table {
        width: 100%;
        table-layout: fixed;
    }

    .compare-table th:first-child,
    .compare-table td:first-child {
        width: 34%;
    }

    .compare-table th:not(:first-child),
    .compare-table td:not(:first-child) {
        width: 22%;
    }
}
