/* =============================================
   Theme: Comparative Table Section
   ============================================= */

.comparative-section {
    padding: 60px 0;
    background-color: #fff; /* Fond légèrement différent pour la section */
}

.special-offer-banner {
    background-color: #f0f9ff; /* Bleu très clair */
    border: 1px solid #bde0fe;
    border-left: 5px solid var(--accent-color, #48D1CC);
    border-radius: 8px;
    padding: 25px;
    margin: 0 auto 50px auto;
    max-width: 900px;
    text-align: center;
}

.special-offer-banner h3 {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary, #212529);
    margin-bottom: 10px;
}

.special-offer-banner p {
    font-size: 1.1rem;
    color: var(--text-secondary, #6C757D);
    margin: 0;
}

.comparative-table-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    max-width: 1100px;
    margin: 0 auto;
}

.comparative-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 800px; /* Pour forcer le scroll sur petits écrans */
}

.comparative-table th, .comparative-table td {
    padding: 15px;
    text-align: center;
    border-bottom: 1px solid var(--border-color, #E9ECEF);
}

.comparative-table th {
    background-color: var(--bg-light, #F8F9FA);
    font-size: 1.1rem;
    font-weight: 700;
    vertical-align: bottom;
    padding-bottom: 20px;
}

.comparative-table td:first-child {
    text-align: left;
    font-weight: 600;
    color: var(--text-primary, #212529);
}

.comparative-table .icon-check,
.comparative-table .icon-cross {
    font-size: 1.5rem;
    font-weight: bold;
}

.comparative-table .icon-check {
    color: #28a745; /* Vert */
}

.comparative-table .icon-cross {
    color: #dc3545; /* Rouge */
}

.comparative-table .highlight {
    background-color: #f0f9ff;
    border-left: 1px solid var(--border-color, #E9ECEF);
    border-right: 1px solid var(--border-color, #E9ECEF);
}

.comparative-table .highlight th {
    background-color: #e0f2fe;
    color: var(--accent-color, #48D1CC);
}

/* =============================================
   Responsive Design pour Mobile
   ============================================= */

@media (max-width: 768px) {
    .comparative-section {
        padding: 40px 0;
    }
    
    .special-offer-banner {
        padding: 20px;
        margin-bottom: 30px;
    }
    
    .special-offer-banner h3 {
        font-size: 1.3rem;
    }
    
    .special-offer-banner p {
        font-size: 1rem;
    }
    
    /* Indicateur de scroll horizontal */
    .comparative-table-container::before {
        content: "← Faites glisser pour voir toutes les colonnes →";
        display: block;
        text-align: center;
        font-size: 0.8rem;
        color: #6c757d;
        margin-bottom: 10px;
        font-style: italic;
    }
    
    .comparative-table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin: 0 -15px; /* Étendre sur toute la largeur */
        padding: 0 15px;
        border-radius: 8px;
        box-shadow: inset 0 0 0 1px rgba(0,0,0,0.1);
    }
    
    .comparative-table {
        min-width: 600px; /* Largeur minimale pour le scroll horizontal */
        font-size: 0.9rem;
    }
    
    .comparative-table th, 
    .comparative-table td {
        padding: 10px 8px;
        white-space: nowrap;
    }
    
    .comparative-table th {
        font-size: 0.95rem;
        padding-bottom: 15px;
    }
    
    .comparative-table td:first-child {
        font-size: 0.85rem;
        max-width: 120px;
        white-space: normal;
        line-height: 1.3;
    }
    
    .comparative-table .icon-check,
    .comparative-table .icon-cross {
        font-size: 1.2rem;
    }
}

@media (max-width: 480px) {
    .comparative-table {
        min-width: 500px;
        font-size: 0.8rem;
    }
    
    .comparative-table th, 
    .comparative-table td {
        padding: 8px 6px;
    }
    
    .comparative-table th {
        font-size: 0.9rem;
    }
    
    .comparative-table td:first-child {
        font-size: 0.8rem;
        max-width: 100px;
    }
    
    .comparative-table .icon-check,
    .comparative-table .icon-cross {
        font-size: 1.1rem;
    }
}

/* =============================================
   Section FAQ - Optimisation des espaces
   ============================================= */

.prestation-category:has(.faq-grid) {
    padding-top: 60px; /* Espace en haut pour décoller du tableau */
    padding-bottom: 5px; /* Espace très réduit en bas */
}

.section-title-container-unified + .faq-grid {
    margin-top: 40px; /* Espace entre le titre et les cartes FAQ */
}

.faq-grid {
    display: grid;
    gap: 25px;
    max-width: 900px;
    margin: 0 auto;
}

.faq-item {
    background: #fff;
    border: 1px solid #e9ecef;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    transition: all 0.3s ease;
}

.faq-item:hover {
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
    transform: translateY(-2px);
}

.faq-item h4 {
    font-size: 1.2rem;
    font-weight: 600;
    color: #212529;
    margin: 0 0 15px 0;
    line-height: 1.4;
}

.faq-item p {
    font-size: 1rem;
    line-height: 1.6;
    color: #6c757d;
    margin: 0;
}

/* Responsive pour FAQ */
@media (max-width: 768px) {
    .prestation-category:has(.faq-grid) {
        padding-top: 50px; /* Espace réduit sur tablette */
        padding-bottom: 5px; /* Espace très réduit sur tablette */
    }
    
    .section-title-container-unified + .faq-grid {
        margin-top: 30px; /* Moins d'espace sur tablette */
    }
    
    .faq-grid {
        gap: 20px;
        margin: 0 15px;
    }
    
    .faq-item {
        padding: 20px;
    }
    
    .faq-item h4 {
        font-size: 1.1rem;
        margin-bottom: 12px;
    }
    
    .faq-item p {
        font-size: 0.95rem;
    }
}

@media (max-width: 480px) {
    .prestation-category:has(.faq-grid) {
        padding-top: 40px; /* Espace adapté sur mobile */
        padding-bottom: 0px; /* Aucun espace en bas sur mobile */
    }
    
    .section-title-container-unified + .faq-grid {
        margin-top: 25px; /* Espace réduit sur mobile */
    }
    
    .faq-grid {
        gap: 15px;
    }
    
    .faq-item {
        padding: 18px;
    }
    
    .faq-item h4 {
        font-size: 1rem;
        margin-bottom: 10px;
    }
    
    .faq-item p {
        font-size: 0.9rem;
        line-height: 1.5;
    }
}

/* =============================================
   Section Packs Combinés - Mise en page optimisée
   ============================================= */

.packs-grid {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 30px;
    max-width: 1200px;
    margin: 0 auto;
}

/* Force l'affichage des cartes */
.prestation-offers-grid.packs-grid .offer-card {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
    position: relative !important;
    width: auto !important;
    height: auto !important;
}

/* Surcharge complète pour la grille des packs */
.prestation-offers-grid.packs-grid {
    display: grid !important;
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 30px !important;
    max-width: 1200px !important;
    margin: 0 auto !important;
}

.offer-card {
    height: auto;
    display: flex;
    flex-direction: column;
}

.offer-card .offer-price-cta {
    margin-top: auto; /* Pousse le bouton vers le bas */
}

/* Responsive pour Packs */
@media (max-width: 1200px) {
    .prestation-offers-grid.packs-grid {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 25px !important;
        max-width: 1000px !important;
        padding: 0 15px !important;
    }
}

@media (max-width: 900px) {
    .prestation-offers-grid.packs-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 20px !important;
        max-width: 700px !important;
    }
}

/* Breakpoint critique pour tablettes moyennes */
@media (max-width: 850px) {
    .prestation-offers-grid.packs-grid {
        grid-template-columns: repeat(2, 1fr) !important;
        gap: 20px !important;
        padding: 0 15px !important;
    }
}

/* Force mobile layout - breakpoint élargi */
@media (max-width: 800px) {
    .prestation-offers-grid.packs-grid {
        display: block !important;
        margin: 0 15px !important;
        width: calc(100% - 30px) !important;
        overflow-x: hidden !important;
    }
    
    .prestation-offers-grid.packs-grid .offer-card {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 0 40px 0 !important;
        box-sizing: border-box !important;
        display: block !important;
    }
    
    .prestation-offers-grid.packs-grid .offer-card:last-child {
        margin-bottom: 0 !important;
    }
}

@media (max-width: 768px) {
    .prestation-offers-grid.packs-grid {
        display: block !important;
        margin: 0 15px !important;
        width: calc(100% - 30px) !important;
        overflow-x: hidden !important;
    }
    
    .prestation-offers-grid.packs-grid .offer-card {
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 0 40px 0 !important;
        box-sizing: border-box !important;
        display: block !important;
    }
    
    .prestation-offers-grid.packs-grid .offer-card:last-child {
        margin-bottom: 0 !important;
    }
}

@media (max-width: 480px) {
    .prestation-offers-grid.packs-grid {
        display: block !important;
        margin: 0 10px !important;
        width: calc(100% - 20px) !important;
    }
    
    /* Optimisation du padding des cartes sur très petits écrans */
    .prestation-offers-grid.packs-grid .offer-card {
        padding: 25px 20px !important;
        width: 100% !important;
        max-width: 100% !important;
        margin: 0 0 40px 0 !important;
        box-sizing: border-box !important;
        display: block !important;
    }
    
    .prestation-offers-grid.packs-grid .offer-card:last-child {
        margin-bottom: 0 !important;
    }
}

/* =============================================
   Réduction de l'espace avant la section CTA finale
   ============================================= */

.final-cta-section {
    padding-top: 40px !important; /* Réduction drastique de l'espace en haut */
}

@media (max-width: 768px) {
    .final-cta-section {
        padding-top: 30px !important;
    }
}

@media (max-width: 480px) {
    .final-cta-section {
        padding-top: 20px !important;
    }
}
