/* --- 1. STYLES GLOBAUX --- */
body,
main {
    background-color: #ffffff !important;
}

.pricing-header {
    padding-top: 180px;
    padding-bottom: 4rem;
}

/* --- 2. DESIGN DU TOGGLE SEGMENTÉ --- */
.pricing-toggle-wrapper {
    display: inline-flex;
    background: #f4f6f8;
    padding: 5px;
    border-radius: 50px;
    border: 1px solid #e2e8f0;
    margin-bottom: 3rem;
}

.pricing-toggle-btn {
    border: none;
    padding: 10px 28px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
    cursor: pointer;
    color: #64748b;
    background: transparent;
}

.pricing-toggle-btn.active {
    background: #ffffff;
    color: #0d6efd;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.discount-tag {
    font-size: 0.7rem;
    background: #e7f3ff;
    color: #0d6efd;
    padding: 2px 8px;
    border-radius: 10px;
    margin-left: 5px;
}

/* --- 3. TABLEAU RESPONSIVE (Scroll Horizontal) --- */
.table-responsive-custom {
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    border-radius: 24px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.05);
    background: white;
    position: relative;
    transform: translateZ(0); /* Force l'accélération matérielle */
}

/* Custom Scrollbar */
.table-responsive-custom::-webkit-scrollbar {
    height: 6px;
}
.table-responsive-custom::-webkit-scrollbar-thumb {
    background-color: #dee2e6;
    border-radius: 4px;
}
.table-responsive-custom::-webkit-scrollbar-track {
    background-color: transparent;
}

.pricing-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    min-width: 900px;
}

.pricing-table th,
.pricing-table td {
    padding: 1.5rem 1rem; /* ✅ FIX : Remis à 1.5rem pour aérer le tableau */
    text-align: center;
    vertical-align: middle;
    border-bottom: 1px solid #e9ecef;
    background-color: #fff;
}

/* --- 4. GESTION DES Z-INDEX (Le cœur du correctif) --- */

/* A. L'EN-TÊTE (Les noms des plans) */
.pricing-table thead th {
    position: sticky;
    background: white;
    z-index: 200;
    padding-top: 3rem;
    padding-bottom: 2rem;
    border-bottom: 2px solid #e9ecef;
    box-shadow: 0 4px 10px -5px rgba(0, 0, 0, 0.1);
}

/* Coin haut-gauche */
.pricing-table thead th:first-child {
    z-index: 210;
}

/* B. LA COLONNE DE GAUCHE (Les noms des features) */
.pricing-table td:first-child,
.pricing-table th:first-child {
    text-align: left;
    font-weight: 700;
    color: #212529;
    position: sticky;
    left: 0;
    background: white;
    z-index: 20;
    width: 25%;
    min-width: 220px;
    border-right: 2px solid #f1f5f9;
    padding-left: 2rem;
}

/* C. LES BARRES DE SECTION (Limites, Fonctionnalités...) */
.table-section-head {
    background-color: #fafafa !important;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 1.5px;
    color: #6c757d;
    font-weight: 800;
    padding-top: 1.5rem;
    padding-bottom: 1.5rem;
    text-align: left !important;
    padding-left: 2rem;
    border-bottom: 1px solid #e9ecef;
    position: sticky;
    left: 0;
    z-index: 50; /* Au-dessus du contenu (20), mais SOUS l'en-tête (200) */
}

/* --- 5. STYLE VISUEL DES CELLULES --- */
/* Zébrure et Survol */
.pricing-table tbody tr:hover td {
    background-color: #f8faff;
    transition: background-color 0.2s ease;
}
.pricing-table tbody tr:hover td:first-child {
    background-color: #f8faff;
}

/* Typographie plans */
.plan-name {
    font-size: 1.5rem;
    font-weight: 800;
    display: block;
    margin-bottom: 0.5rem;
    color: #212529;
}
.plan-price {
    font-size: 2.2rem;
    font-weight: 800;
    color: #0d6efd;
    letter-spacing: -1px;
}
.plan-period {
    font-size: 0.9rem;
    color: #6c757d;
    font-weight: 600;
}
.plan-price-unit {
    font-size: 1.4rem;
    font-weight: 800;
    color: #0d6efd;
    margin-left: 2px;
}

/* Option Populaire */
.th-popular {
    background-color: #f8faff !important;
    border-top: 4px solid #0d6efd !important;
    border-left: 2px solid #e0effe;
    border-right: 2px solid #e0effe;
    position: relative;
}
.td-popular {
    background-color: #f4f9ff !important;
    border-left: 2px solid #e0effe;
    border-right: 2px solid #e0effe;
    font-weight: 600;
    color: #0d6efd;
}
.pricing-table tbody tr:hover .td-popular {
    background-color: #eaf4ff !important;
}

.popular-badge {
    position: absolute;
    top: -1px;
    left: 50%;
    transform: translateX(-50%);
    background: #0d6efd;
    color: white;
    padding: 6px 16px;
    border-radius: 0 0 12px 12px;
    font-size: 0.75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 4px 10px rgba(13, 110, 253, 0.3);
    z-index: 250;
}

.check-icon {
    color: #198754;
    font-size: 1.4rem;
}
.cross-icon {
    color: #e9ecef;
    font-size: 1.4rem;
}
.text-value {
    font-weight: 700;
    color: #212529;
}

/* ✅ FIX : Restauration du design du bouton d'achat dans le tableau */
.btn-table {
    width: 100%;
    border-radius: 50px;
    font-weight: 700;
    padding: 0.8rem 1rem;
    transition: all 0.2s;
    white-space: nowrap;
}
.btn-table:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

.badge-pill-soft {
    background-color: rgba(13, 110, 253, 0.08);
    color: #0d6efd;
    padding: 0.6em 1.2em;
    border-radius: 50px;
    font-weight: 700;
    font-size: 0.8rem;
    letter-spacing: 1px;
    margin-bottom: 1.5rem;
    display: inline-block;
    text-transform: uppercase;
}

/* --- 6. ACCORDEON FAQ & COMPOSANTS --- */
.accordion-item {
    border: none;
    border-bottom: 1px solid #f1f5f9;
}
.accordion-button {
    font-weight: 700;
    font-size: 1.1rem;
    padding: 1.5rem 0;
    color: #212529;
    background: transparent;
}
.accordion-button:not(.collapsed) {
    color: #0d6efd;
    background: transparent;
    box-shadow: none;
}
.accordion-button:focus {
    box-shadow: none;
}
.accordion-body {
    padding-top: 0;
    padding-bottom: 2rem;
    padding-left: 0;
    color: #6c757d;
    font-size: 1.05rem;
}

.cta-card {
    background: linear-gradient(135deg, #0d6efd 0%, #0a58ca 100%);
    border-radius: 30px;
    padding: 5rem 2rem;
    color: white;
    position: relative;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(13, 110, 253, 0.4);
}

/* --- 7. RESPONSIVE MOBILE SPÉCIFIQUES --- */
@media (max-width: 768px) {
    .pricing-header {
        padding-top: 150px;
        padding-bottom: 2rem;
    }
    .pricing-table {
        min-width: 700px;
    }
    .pricing-table td:first-child,
    .pricing-table th:first-child {
        min-width: 130px;
        width: 130px;
        font-size: 0.85rem;
        padding-left: 10px;
        padding-right: 5px;
    }
    .pricing-table th,
    .pricing-table td {
        padding: 0.75rem 0.5rem;
    }
    .plan-name {
        font-size: 1.1rem;
    }
    .plan-price {
        font-size: 1.4rem;
    }
    .table-section-head {
        padding-left: 10px;
        font-size: 0.7rem;
    }
}
