/**
 * Section 3 - Nos Offres
 * Styles affinés pour matcher exactement la capture d'écran : tailles réduites, boutons conditionnels (bordure violette par défaut, fond violet sur sélection), couleur #7c6cd6.
 */

.services {
    padding: 60px 0;
    background: white;
}

.services__container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header centré */
.section__header {
    text-align: center;
    margin-bottom: 40px;
}

.section__title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 10px;
}

.section__subtitle {
    font-size: 1.1rem;
    color: #666;
    text-align: center !important;
}

/* Grille des cartes */
.services__grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

/* Carte individuelle */
.service-card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    padding: 24px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    cursor: pointer;
}

.service-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

/* Bordure active sur la carte sélectionnée (gérée par JS) */
.service-card--selected {
    border: 3px solid #7c6cd6;
    box-shadow: 0 4px 20px rgba(124, 108, 214, 0.3);
}

/* Header de la carte */
.service-card__header {
    text-align: center;
    margin-bottom: 5px;
}

.service-card__title {
    font-size: 1.3rem;
    font-weight: 700;
    color: #333;
    margin-bottom: 2px;
}

.service-card__price {
    display: flex;
    align-items: baseline;
    justify-content: center;
    margin-bottom: 10px;
}

.price-amount {
    font-size: 2rem;
    font-weight: 700;
    color: #7c6cd6;
}

.price-period {
    font-size: 1rem;
    color: #666;
    margin-left: 6px;
}

.service-card__subtitle {
    text-align: center;
    margin-bottom: 15px;
    font-style: italic;
    color: #666;
    font-size: 0.9rem;
}

/* Liste des fonctionnalités */
.service-card__features {
    flex-grow: 1;
    margin-bottom: 15px;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 8px;
    color: #333;
    font-size: 0.9rem;
}

.feature-icon {
    width: 16px;
    height: 16px;
    color: #7c6cd6;
}

.feature-item--reference {
    font-style: italic;
    color: #666;
    text-align: center;
    margin-bottom: 4px;
    font-size: 0.9rem;
}

/* Bouton CTA (par défaut : bordure violette, texte violet) */
.service-card__cta {
    display: block;
    background: white;
    color: #7c6cd6;
    text-align: center;
    padding: 10px 20px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    transition: transform 0.3s ease, box-shadow 0.3s ease, background 0.3s ease, color 0.3s ease;
    border: 2px solid #7c6cd6;
    position: relative;
    overflow: hidden;
    will-change: transform;
}

/* Shine sweep effect */
.service-card__cta::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    transform: skewX(-25deg);
    transition: left 0.6s ease;
    pointer-events: none;
}

/* Hover overlay effect */
.service-card__cta::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    border-radius: inherit;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

/* Bouton sur carte sélectionnée : fond violet, texte blanc */
.service-card--selected .service-card__cta {
    background: #7c6cd6;
    color: white;
    border: none;
}

.service-card__cta:hover {
    background: #6b5bb5;
    color: white;
    border: none;
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(124,108,214,0.35);
}

.service-card__cta:hover::before {
    left: 100%;
}

.service-card__cta:hover::after {
    opacity: 1;
}

/* Responsive Design */
@media (max-width: 968px) {
    .services__grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .section__title {
        font-size: 1.8rem;
    }
}

@media (max-width: 768px) {
    .services {
        padding: 50px 0;
    }
    
    .services__grid {
        grid-template-columns: 1fr;
        gap: 12px;
        max-width: 350px;
        margin-top: 30px;
    }
    
    .service-card {
        padding: 18px 16px;
        margin: 0 8px;
        border: 1px solid #7c6cd6;
    }
    
    .service-card--selected {
        border: 3px solid #7c6cd6 !important;
    }
    
    .service-card__title {
        font-size: 1.1rem;
        margin-bottom: 3px;
    }
    
    .service-card__price {
        font-size: 1.8rem;
        margin-bottom: 3px;
    }
    
    .service-card__features {
        margin-bottom: 5px;
    }
    
    .feature-item {
        margin-bottom: 1px;
        font-size: 0.85rem;
    }
    
    .service-card__feature {
        font-size: 0.85rem;
        margin-bottom: 6px;
    }
    
    .service-card__cta {
        padding: 8px 16px;
        font-size: 0.9rem;
    }
    
    .section__title {
        font-size: 2.2rem;
    }
    
    .section__subtitle {
        font-size: 1rem;
    }
    
    .price-amount {
        font-size: 1.8rem;
    }
}

/* Force l'affichage des cartes sur mobile - Correction spécifique */
@media (max-width: 768px) {
    .services {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    .services__grid {
        display: grid !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    .service-card {
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
        min-height: auto !important;
        height: auto !important;
    }
    
    .service-card__price,
    .price-amount {
        display: flex !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
}

/* Force l'affichage sur très petits écrans */
@media (max-width: 480px) {
    .services,
    .services__grid,
    .service-card,
    .service-card__price,
    .price-amount {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
    
    .services__grid {
        display: grid !important;
    }
    
    .service-card {
        display: flex !important;
    }
    
    .service-card__price {
        display: flex !important;
    }
}

@media (max-width: 480px) {
    .services {
        padding: 40px 0;
    }
    
    .services__container {
        padding: 0 12px;
    }
    
    .services__grid {
        gap: 10px;
        max-width: 320px;
        margin-top: 25px;
    }
    
    .service-card {
        padding: 16px 12px;
        margin: 0 3px;
        border: 1px solid #7c6cd6;
    }
    
    .service-card--selected {
        border: 3px solid #7c6cd6 !important;
    }
    
    .service-card__title {
        font-size: 1.05rem;
        margin-bottom: 2px;
    }
    
    .service-card__price {
        font-size: 1.6rem;
        margin-bottom: 2px;
    }
    
    .service-card__subtitle {
        font-size: 0.8rem;
        margin-bottom: 10px;
    }
    
    .feature-item {
        font-size: 0.8rem;
        padding: 6px 0;
        margin-bottom: 0px;
    }
    
    .service-card__feature {
        font-size: 0.75rem;
        margin-bottom: 4px;
    }
    
    .service-card__features {
        margin-bottom: 8px;
    }
    
    .service-card__cta {
        padding: 10px 16px;
        font-size: 0.85rem;
    }
    
    .section__title {
        font-size: 2rem;
    }
    
    .section__subtitle {
        font-size: 1rem;
    }
    
    .price-amount {
        font-size: 1.8rem;
    }
}