/**
 * ==================================================================================
 * STYLES PAGE SERVICES INDEX - VERSION OPTIMISÉE
 * ==================================================================================
 * 
 * Design moderne et cohérent pour la page d'index des services
 * Les composants globaux (FAQ, CTA, animations) sont dans styles.css
 * 
 * SECTIONS :
 * 1. Introduction avec stats
 * 2. Services Grid - Cards détaillées
 * 3. Pourquoi choisir
 * 4. Packages / Formules
 * 5. Responsive
 * 
 * Date : Janvier 2025 - Version 3.0 Optimisée
 * ==================================================================================
 */

/* ==================================================================================
   1. SECTION INTRODUCTION AVEC STATS
   ================================================================================== */

.section-intro-services {
    padding: 80px 20px;
    background: linear-gradient(135deg, #ffffff 0%, #f0f9ff 100%);
    position: relative;
    overflow: hidden;
}

.section-intro-services::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.03) 1px, transparent 1px);
    background-size: 40px 40px;
    pointer-events: none;
}

.intro-content {
    max-width: 900px;
    margin: 0 auto;
    text-align: center;
    position: relative;
    z-index: 1;
}

.intro-content h2 {
    font-size: clamp(28px, 5vw, 38px);
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 20px;
}

.intro-content .lead {
    font-size: 18px;
    line-height: 1.8;
    color: #475569;
    margin-bottom: 50px;
}

/* Stats */
.intro-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 30px;
    margin-top: 50px;
}

.stat-item {
    text-align: center;
    padding: 25px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    transition: all 0.3s ease;
}

.stat-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.1);
}

.stat-number {
    font-size: 42px;
    font-weight: 800;
    background: linear-gradient(135deg, #3b82f6 0%, #10b981 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    margin-bottom: 10px;
}

.stat-label {
    font-size: 14px;
    color: #64748b;
    font-weight: 500;
}

/* ==================================================================================
   2. SERVICES GRID - CARDS DÉTAILLÉES
   ================================================================================== */

.section-services-grid {
    padding: 80px 20px;
    background: #f8fafc;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: 35px;
    max-width: 1400px;
    margin: 0 auto;
}

/* Service Card Détaillée */
.service-card-detail {
    background: white;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.08);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    border: 2px solid transparent;
}

.service-card-detail:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    border-color: #3b82f6;
}

/* Header de la card avec image */
.service-card-header {
    position: relative;
    height: 220px;
    overflow: hidden;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%); /* fallback si pas d'image */
}

/* Image de fond */
.service-card-header-img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    z-index: 1;
    transition: transform 0.5s ease;
}

.service-card-detail:hover .service-card-header-img {
    transform: scale(1.05);
}

/* Overlay coloré par-dessus l'image */
.service-card-header-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(1, 106, 83, 0.72) 0%, rgba(1, 50, 39, 0.72) 100%);
    z-index: 2;
    padding: 30px 28px;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
    color: white;
}

.service-card-header-overlay h3 {
    font-size: 20px;
    font-weight: 700;
    margin: 0;
    color: white;
    line-height: 1.3;
}

.service-icon-wrapper {
    width: 56px;
    height: 56px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
    backdrop-filter: blur(10px);
    flex-shrink: 0;
}

.service-icon-wrapper i {
    font-size: 26px;
    color: white;
}

.service-header-content h3 {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 12px;
}

.service-tagline {
    font-size: 14px;
    line-height: 1.6;
    opacity: 0.95;
    margin: 0;
}

/* Prix Badge */
.service-price-badge {
    padding: 20px 30px;
    background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
    text-align: center;
    border-bottom: 2px dashed #bfdbfe;
}

.price-label {
    display: block;
    font-size: 13px;
    color: #64748b;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 5px;
}

.price-value {
    display: block;
    font-size: 22px;
    font-weight: 800;
    color: #1e40af;
}

/* Avantages */
.service-advantages {
    padding: 30px;
    flex: 1;
}

.service-advantages h4 {
    font-size: 16px;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.service-advantages h4 i {
    color: #10b981;
    font-size: 18px;
}

.advantages-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.advantages-list li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 10px 0;
    border-bottom: 1px solid #f1f5f9;
}

.advantages-list li:last-child {
    border-bottom: none;
}

.advantages-list i {
    color: #10b981;
    font-size: 16px;
    margin-top: 3px;
    flex-shrink: 0;
}

.advantages-list span {
    font-size: 14px;
    line-height: 1.6;
    color: #475569;
}

.more-advantages {
    font-style: italic;
    opacity: 0.8;
}

.more-advantages i {
    color: #3b82f6;
}

/* Processus Preview */
.service-process-preview {
    padding: 25px 30px;
    background: #fafafa;
    border-top: 2px solid #f1f5f9;
}

.service-process-preview h4 {
    font-size: 16px;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.service-process-preview h4 i {
    color: #3b82f6;
    font-size: 18px;
}

.process-steps-mini {
    list-style: none;
    padding: 0;
    margin: 0;
    counter-reset: step-counter;
}

.process-steps-mini li {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 10px 0;
}

.step-number-mini {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 700;
    flex-shrink: 0;
}

.step-title {
    font-size: 14px;
    color: #334155;
    font-weight: 500;
}

/* Footer de la card */
.service-card-footer {
    padding: 25px 30px;
    background: #f8fafc;
    display: flex;
    gap: 12px;
    border-top: 2px solid #e2e8f0;
}

.service-card-footer .btn-primary,
.service-card-footer .btn-secondary {
    flex: 1;
    padding: 14px 20px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.service-card-footer .btn-primary {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border: none;
}

.service-card-footer .btn-primary:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(16, 185, 129, 0.3);
}

.service-card-footer .btn-secondary {
    background: white;
    color: #3b82f6;
    border: 2px solid #3b82f6;
}

.service-card-footer .btn-secondary:hover {
    background: #3b82f6;
    color: white;
    transform: translateY(-2px);
}

/* ==================================================================================
   3. SECTION POURQUOI CHOISIR
   ================================================================================== */

.section-why-services {
    padding: 80px 20px;
    background: white;
}

.why-services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 35px;
    max-width: 1200px;
    margin: 50px auto 0;
}

.why-item {
    text-align: center;
    padding: 40px 30px;
    background: linear-gradient(135deg, #f8fafc 0%, #ffffff 100%);
    border-radius: 20px;
    border: 2px solid #e2e8f0;
    transition: all 0.4s ease;
}

.why-item:hover {
    transform: translateY(-8px);
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.1);
    border-color: #3b82f6;
}

.why-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 25px;
    box-shadow: 0 10px 30px rgba(59, 130, 246, 0.3);
}

.why-icon i {
    font-size: 36px;
    color: white;
}

.why-item h3 {
    font-size: 20px;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 15px;
}

.why-item p {
    font-size: 15px;
    line-height: 1.7;
    color: #64748b;
    margin: 0;
}

/* ==================================================================================
   4. SECTION PACKAGES / FORMULES
   ================================================================================== */

.section-services-packages {
    padding: 80px 20px;
    background: linear-gradient(135deg, #f8fafc 0%, #e0f2fe 100%);
}

.packages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 40px;
    max-width: 1300px;
    margin: 0 auto;
}

.package-card {
    background: white;
    border-radius: 24px;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
    transition: all 0.4s ease;
    position: relative;
    border: 2px solid transparent;
}

.package-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
}

.package-card.recommended {
    border-color: #10b981;
    transform: scale(1.03);
}

.package-card.recommended:hover {
    transform: scale(1.03) translateY(-10px);
}

/* Badge Package */
.package-badge {
    position: absolute;
    top: 20px;
    right: 20px;
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    padding: 8px 18px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    z-index: 10;
}

.package-badge.featured {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    padding: 10px 22px;
    font-size: 13px;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.4);
}

/* Header Package */
.package-header {
    padding: 45px 35px 35px;
    background: linear-gradient(135deg, #475569 0%, #334155 100%);
    color: white;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.package-card.recommended .package-header {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
}

.package-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 1px, transparent 1px);
    background-size: 30px 30px;
}

.package-header h3 {
    font-size: 26px;
    font-weight: 700;
    margin-bottom: 25px;
    position: relative;
    z-index: 1;
}

.package-price {
    position: relative;
    z-index: 1;
}

.package-price .price {
    font-size: 56px;
    font-weight: 800;
    display: block;
    line-height: 1;
}

.package-price .label {
    font-size: 16px;
    opacity: 0.9;
    margin-top: 8px;
    display: block;
}

/* Body Package */
.package-body {
    padding: 35px 30px;
}

.package-description {
    font-size: 15px;
    color: #64748b;
    line-height: 1.7;
    margin-bottom: 25px;
    text-align: center;
}

.package-includes {
    list-style: none;
    padding: 0;
    margin: 0 0 25px 0;
}

.package-includes li {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid #f1f5f9;
}

.package-includes li:last-child {
    border-bottom: none;
}

.package-includes i {
    color: #10b981;
    font-size: 18px;
    margin-top: 2px;
    flex-shrink: 0;
}

.package-includes span {
    font-size: 15px;
    color: #334155;
    line-height: 1.6;
}

/* Notes et Highlights */
.package-note {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    padding: 15px 18px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 20px;
}

.package-note i {
    color: #f59e0b;
    font-size: 20px;
    flex-shrink: 0;
}

.package-note span {
    font-size: 13px;
    color: #78350f;
    font-weight: 500;
}

.package-highlight {
    background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%);
    padding: 18px 20px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 20px;
}

.package-highlight i {
    color: #10b981;
    font-size: 24px;
    flex-shrink: 0;
}

.package-highlight span {
    font-size: 14px;
    color: #065f46;
    line-height: 1.6;
}

/* Footer Package */
.package-footer {
    padding: 0 30px 35px;
}

.package-footer .btn-primary,
.package-footer .btn-secondary {
    display: block;
    width: 100%;
    padding: 16px 30px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    transition: all 0.3s ease;
}

.package-footer .btn-primary {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    border: none;
}

.package-footer .btn-primary:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(16, 185, 129, 0.3);
}

.package-footer .btn-secondary {
    background: white;
    color: #3b82f6;
    border: 2px solid #3b82f6;
}

.package-footer .btn-secondary:hover {
    background: #3b82f6;
    color: white;
    transform: translateY(-3px);
}

/* Badge SOLDE - Style ruban professionnel */
.badge-solde {
    position: absolute;
    top: 25px;
    right: -8px;
    background: linear-gradient(135deg, #fbbf24 0%, #f59e0b 100%);
    color: #78350f;
    padding: 8px 20px 8px 16px;
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    z-index: 10;
    box-shadow: 
        0 4px 15px rgba(251, 191, 36, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
    border-radius: 4px 0 0 4px;
    text-shadow: 0 1px 2px rgba(120, 53, 15, 0.2);
    animation: badgeShine 3s ease-in-out infinite;
}

.badge-solde::after {
    content: '';
    position: absolute;
    right: 0;
    bottom: -8px;
    width: 0;
    height: 0;
    border-right: 8px solid transparent;
    border-top: 8px solid #d97706;
    filter: brightness(0.8);
}

.badge-solde::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 50%;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.3) 0%, transparent 100%);
    border-radius: 4px 0 0 0;
}

@keyframes badgeShine {
    0%, 100% {
        box-shadow: 
            0 4px 15px rgba(251, 191, 36, 0.5),
            inset 0 1px 0 rgba(255, 255, 255, 0.3);
    }
    50% {
        box-shadow: 
            0 6px 20px rgba(251, 191, 36, 0.7),
            inset 0 1px 0 rgba(255, 255, 255, 0.5);
    }
}

/* ==================================================================================
   5. RESPONSIVE
   ================================================================================== */

@media (max-width: 992px) {
    .services-grid {
        grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    }
    
    .packages-grid {
        grid-template-columns: 1fr;
    }
    
    .package-card.recommended {
        transform: scale(1);
    }
    
    .package-card.recommended:hover {
        transform: translateY(-10px);
    }
}

@media (max-width: 768px) {
    .section-intro-services,
    .section-services-grid,
    .section-why-services,
    .section-services-packages {
        padding: 60px 15px;
    }
    
    .intro-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 20px;
    }
    
    .services-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }
    
    .service-card-footer {
        flex-direction: column;
    }
    
    .why-services-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }
}

@media (max-width: 480px) {
    .stat-item {
        padding: 20px 15px;
    }
    
    .stat-number {
        font-size: 36px;
    }
    
    .service-card-header {
        height: 180px;
    }

    .service-card-header-overlay {
        padding: 20px 18px;
    }

    .service-card-header-overlay h3 {
        font-size: 17px;
    }
    
    .service-icon-wrapper {
        width: 60px;
        height: 60px;
    }
    
    .service-icon-wrapper i {
        font-size: 28px;
    }
    
    .badge-solde {
        top: 15px;
        right: -6px;
        padding: 6px 16px 6px 12px;
        font-size: 10px;
        letter-spacing: 1px;
    }
    
    .badge-solde::after {
        border-right: 6px solid transparent;
        border-top: 6px solid #d97706;
        bottom: -6px;
    }
    
    .package-header {
        padding: 35px 25px 25px;
    }
    
    .package-price .price {
        font-size: 48px;
    }
}

/* Animation au chargement */
.service-card-detail {
    animation: fadeInUp 0.6s ease-out backwards;
}

.service-card-detail:nth-child(1) { animation-delay: 0.1s; }
.service-card-detail:nth-child(2) { animation-delay: 0.2s; }
.service-card-detail:nth-child(3) { animation-delay: 0.3s; }
.service-card-detail:nth-child(4) { animation-delay: 0.4s; }
.service-card-detail:nth-child(5) { animation-delay: 0.5s; }
.service-card-detail:nth-child(6) { animation-delay: 0.6s; }

@media (prefers-reduced-motion: reduce) {
    .service-card-detail,
    .service-card-header::before,
    .package-header::before {
        animation: none;
    }
}
