/**
 * Services Page Styles - VERSION COMPLÈTE
 * 
 * @package Maisons-CTL
 * @version 2.0.0
 * @date 22/10/2025
 * @path assets/css/services.css
 * 
 * ═══════════════════════════════════════════════════════════════
 * VERSION COMPLÈTE pour PHP Vanilla
 * ═══════════════════════════════════════════════════════════════
 * ✅ CSS d'origine (services WordPress)
 * ✅ Nouveaux styles pour sections ajoutées
 * ✅ Corrections pour PHP Vanilla
 * ✅ Responsive complet
 */

/* ============================================
   VARIABLES & RESET
============================================ */
.services-page {
    background: #f8f9fa;
}

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

.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-title {
    font-size: 2.3em;
    color: #2C3E50;
    text-align: center;
    margin-bottom: 15px;
    font-weight: 700;
    line-height: 1.4;
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
}

.section-subtitle {
    font-size: 1.2em;
    color: #666;
    text-align: center;
    margin-bottom: 50px;
}

/* ============================================
   AFFICHAGE CONDITIONNEL DESKTOP/MOBILE
============================================ */
.text-mobile {
    display: none;
}

.text-desktop {
    display: inline;
}

@media (max-width: 768px) {
    .text-mobile {
        display: inline;
    }
    
    .text-desktop {
        display: none;
    }
}

/* ============================================
   CARROUSEL MOBILE HERO
   Identique à la page Accueil
============================================ */
.hero-services-mobile-image {
    display: none; /* Masqué par défaut sur desktop */
    width: 100%;
    position: relative;
    overflow: hidden;
}

/* Conteneur du carrousel mobile - RATIO 16:9 STRICT */
.hero-services-mobile-carousel {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    overflow: hidden;
}

/* Chaque slide du carrousel mobile */
.hero-services-mobile-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center;
    opacity: 0;
    transition: opacity 1.5s ease-in-out;
    will-change: opacity;
    transform: translateZ(0); /* GPU acceleration */
}

/* Slide active visible */
.hero-services-mobile-slide.active {
    opacity: 1;
    z-index: 1;
}

/* Points de navigation mobile */
.hero-services-mobile-dots {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 10px;
    z-index: 3;
}

.hero-services-mobile-dots .dot-services-mobile {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    transition: all 0.3s ease;
    border: 2px solid transparent;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.3);
}

.hero-services-mobile-dots .dot-services-mobile:active {
    transform: scale(0.9);
}

.hero-services-mobile-dots .dot-services-mobile.active {
    background: #fff;
    border-color: #E74C3C;
    transform: scale(1.2);
}

/* Afficher le carrousel mobile sur tablette et mobile */
@media (max-width: 1024px) {
    .hero-services-mobile-image {
        display: block;
    }
}

/* Points de navigation - Ajustement pour mobile portrait */
@media (max-width: 480px) {
    .hero-services-mobile-dots {
        bottom: 15px;
    }
    
    .hero-services-mobile-dots .dot-services-mobile {
        width: 8px;
        height: 8px;
    }
}

/* ============================================
   HERO SECTION
============================================ */
.services-hero {
    background: linear-gradient(135deg, rgba(44, 62, 80, 0.5) 0%, rgba(52, 73, 94, 0.65) 100%),
                url('../images/hero-maison.jpg') center/cover;
    color: white;
    padding: 80px 20px;
    text-align: center;
    position: relative;
    overflow: hidden;
}

/* Sur mobile : pas de background-image, juste contenu */
@media (max-width: 1024px) {
    .services-hero {
        background: #f8f9fa;
        color: #2C3E50;
        padding: 60px 20px 80px;
    }
}

.services-hero .container {
    position: relative;
    z-index: 2;
}

.services-hero h1 {
    font-size: 2.8em;
    margin-bottom: 20px;
    font-weight: 700;
    color: white !important;
    line-height: 1.3;
    max-width: 1000px;
    margin-left: auto;
    margin-right: auto;
}

/* Titre mobile en noir */
@media (max-width: 1024px) {
    .services-hero h1 {
        color: #2C3E50 !important;
        font-size: 2em;
    }
}

.services-hero h1 .subtitle-inline {
    display: block;
    font-size: 0.5em;
    margin-top: 10px;
    font-weight: 600;
    opacity: 0.95;
}

.hero-subtitle {
    font-size: 1.2em;
    margin-bottom: 40px;
    opacity: 0.95;
    line-height: 1.6;
    max-width: 900px;
    margin-left: auto;
    margin-right: auto;
}

/* Sous-titre mobile */
@media (max-width: 1024px) {
    .hero-subtitle {
        color: #666;
        font-size: 1.1em;
    }
}

.btn-hero {
    display: inline-block;
    padding: 18px 45px;
    background: #3498db;
    color: white !important;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1.1em;
    transition: all 0.3s ease;
    box-shadow: 0 5px 20px rgba(52, 152, 219, 0.4);
}

.btn-hero:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(52, 152, 219, 0.6);
    text-decoration: none;
}

/* ============================================
   SECTION INTRODUCTION
============================================ */
.services-intro {
    padding: 60px 20px;
    background: white;
    text-align: center;
}

.intro-text {
    font-size: 1.2em;
    color: #555;
    line-height: 1.8;
    max-width: 900px;
    margin: 0 auto;
}

/* ============================================
   SERVICES PRINCIPAUX (GRID 3x2 OPTIMISÉE)
============================================ */
.services-main {
    padding: 80px 20px;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    margin-top: 50px;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.service-card {
    background: white;
    padding: 40px 30px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    position: relative;
    border: 2px solid transparent;
    text-align: center;
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.15);
    border-color: #3498db;
}

.service-card.featured {
    border-color: #3498db;
    box-shadow: 0 15px 50px rgba(52, 152, 219, 0.2);
}

.badge-popular {
    position: absolute;
    top: -15px;
    right: 20px;
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
    padding: 8px 20px;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(52, 152, 219, 0.4);
    z-index: 10;
}

.badge-zone {
    position: absolute;
    top: -10px;
    right: 15px;
    background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
    color: white;
    padding: 6px 15px;
    border-radius: 15px;
    font-size: 0.8em;
    font-weight: 600;
    box-shadow: 0 4px 15px rgba(243, 156, 18, 0.4);
    z-index: 10;
}

.service-icon {
    font-size: 3.5em;
    margin-bottom: 20px;
    text-align: center;
}

.service-card h3 {
    font-size: 1.8em;
    color: #2C3E50;
    margin-bottom: 15px;
    text-align: center;
    font-weight: 700;
    line-height: 1.3;
}

.service-card p {
    color: #666;
    line-height: 1.7;
    margin-bottom: 25px;
    text-align: center;
}

.service-features {
    list-style: none;
    padding: 0;
    margin: 0 0 30px 0;
    text-align: left;
}

.service-features li {
    padding: 10px 0;
    color: #555;
    font-size: 1.05em;
    border-bottom: 1px solid #f0f0f0;
}

.service-features li:last-child {
    border-bottom: none;
}

.service-highlights {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 25px;
    text-align: left;
}

.highlight-item {
    color: #3498db;
    font-weight: 600;
    font-size: 0.95em;
}

.btn-service {
    display: block;
    text-align: center;
    padding: 15px 30px;
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white !important;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(52, 152, 219, 0.3);
}

.btn-service:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(52, 152, 219, 0.5);
    text-decoration: none;
}

/* ============================================
   SECTION PRESTATIONS
============================================ */
.prestations-section {
    padding: 80px 20px;
    background: white;
}

.prestations-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    margin-top: 50px;
}

.prestation-card {
    background: #f8f9fa;
    padding: 40px 30px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
    transition: all 0.3s ease;
    position: relative;
    text-align: center;
}

.prestation-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.15);
}

.prestation-card.featured {
    background: linear-gradient(135deg, #3498db 0%, #2980b9 100%);
    color: white;
}

.prestation-card.featured h3,
.prestation-card.featured p,
.prestation-card.featured li {
    color: white !important;
}

.prestation-icon {
    font-size: 4em;
    margin-bottom: 20px;
}

.prestation-card h3 {
    font-size: 1.8em;
    color: #2C3E50;
    margin-bottom: 15px;
    font-weight: 700;
}

.prestation-description {
    color: #666;
    font-size: 1.1em;
    margin-bottom: 25px;
}

.prestation-features {
    list-style: none;
    padding: 0;
    margin: 0 0 30px 0;
    text-align: left;
}

.prestation-features li {
    padding: 10px 0;
    color: #555;
    font-size: 1.05em;
    border-bottom: 1px solid rgba(0,0,0,0.1);
}

.prestation-card.featured .prestation-features li {
    border-bottom: 1px solid rgba(255,255,255,0.2);
}

.prestation-features li:last-child {
    border-bottom: none;
}

.btn-prestation {
    display: inline-block;
    padding: 15px 30px;
    background: #2C3E50;
    color: white !important;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-prestation.primary {
    background: white;
    color: #3498db !important;
}

.btn-prestation:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0,0,0,0.2);
    text-decoration: none;
}

/* ============================================
   ZONE D'INTERVENTION
============================================ */
.zone-intervention {
    padding: 80px 20px;
    background: #f8f9fa;
}

.zone-content {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 50px;
    margin-top: 50px;
}

.zone-map {
    position: relative;
}

.zone-map iframe {
    width: 100%;
    height: 450px;
    border-radius: 15px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.map-link {
    display: inline-block;
    margin-top: 20px;
    padding: 12px 30px;
    background: #3498db;
    color: white !important;
    text-decoration: none;
    border-radius: 50px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.map-link:hover {
    background: #2980b9;
    transform: translateY(-2px);
    text-decoration: none;
}

.zone-cities {
    background: white;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.08);
}

.zone-cities h3 {
    color: #2C3E50;
    font-size: 1.8em;
    margin-bottom: 25px;
    font-weight: 700;
}

.cities-list {
    list-style: none;
    padding: 0;
    margin: 0 0 30px 0;
}

.cities-list li {
    padding: 12px 0;
    color: #555;
    font-size: 1.1em;
    border-bottom: 1px solid #f0f0f0;
}

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

.zone-info {
    background: #f8f9fa;
    padding: 25px;
    border-radius: 15px;
    border-left: 5px solid #3498db;
}

.zone-info p {
    margin: 0;
    color: #555;
    line-height: 1.8;
}

/* ============================================
   SECTION POURQUOI NOUS
============================================ */
.why-section {
    padding: 80px 20px;
    background: white;
}

.why-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 30px;
    margin-top: 50px;
}

.why-item {
    background: #f8f9fa;
    padding: 40px 30px;
    border-radius: 20px;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 5px 20px rgba(0,0,0,0.05);
}

.why-item:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.1);
    background: white;
}

.why-icon {
    font-size: 4em;
    margin-bottom: 20px;
}

.why-item h3 {
    color: #2C3E50;
    font-size: 1.5em;
    margin-bottom: 15px;
    font-weight: 700;
}

.why-item p {
    color: #666;
    line-height: 1.7;
    margin: 0;
}

/* Compteur animé */
.counter {
    display: inline-block;
    font-weight: 700;
    color: #3498db;
}

/* ============================================
   CTA FINAL + FORMULAIRE DE CONTACT
============================================ */
.cta-section {
    padding: 80px 20px;
    background: linear-gradient(135deg, #2C3E50 0%, #34495E 100%);
    color: white;
    text-align: center;
}

.cta-section h2 {
    font-size: 2.5em;
    margin-bottom: 20px;
    font-weight: 700;
    color: white !important;
}

.cta-subtitle {
    font-size: 1.2em;
    margin-bottom: 50px;
    opacity: 0.95;
}

.contact-wrapper {
    display: grid;
    grid-template-columns: 1.5fr 1fr;
    gap: 50px;
    margin-top: 50px;
}

.contact-form-container {
    background: white;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

.contact-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 25px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-group label {
    font-weight: 600;
    color: #2C3E50;
    margin-bottom: 8px;
    font-size: 1.05em;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 15px;
    border: 2px solid #ddd;
    border-radius: 10px;
    font-size: 1em;
    font-family: inherit;
    background: white;
    transition: all 0.3s ease;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.form-group input.error,
.form-group select.error,
.form-group textarea.error {
    border-color: #e74c3c;
}

.error-message {
    color: #e74c3c;
    font-size: 0.9em;
    margin-top: 5px;
    display: none;
}

.btn-submit {
    grid-column: 1 / -1;
    padding: 18px 45px;
    background: #27ae60;
    color: white;
    border: none;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1.1em;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 5px 20px rgba(39, 174, 96, 0.4);
}

.btn-submit:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 30px rgba(39, 174, 96, 0.6);
}

.success-message {
    grid-column: 1 / -1;
    background: #27ae60;
    color: white;
    padding: 20px;
    border-radius: 10px;
    text-align: center;
    font-weight: 600;
    font-size: 1.1em;
}

/* Colonne d'infos contact */
.contact-info {
    background: rgba(255,255,255,0.1);
    padding: 40px;
    border-radius: 20px;
    backdrop-filter: blur(10px);
}

.contact-info h3 {
    color: white;
    font-size: 1.8em;
    margin-bottom: 30px;
    font-weight: 700;
}

.info-item {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
    align-items: flex-start;
}

.info-icon {
    font-size: 2.5em;
    line-height: 1;
}

.info-content {
    flex: 1;
}

.info-content strong {
    display: block;
    color: white;
    font-size: 1.2em;
    margin-bottom: 8px;
}

.info-content a {
    color: white;
    text-decoration: none;
    font-size: 1.1em;
    font-weight: 600;
}

.info-content a:hover {
    text-decoration: underline;
}

.info-detail {
    display: block;
    color: rgba(255,255,255,0.8);
    font-size: 0.95em;
    margin-top: 5px;
}

.info-content p {
    color: rgba(255,255,255,0.9);
    line-height: 1.6;
    margin: 0;
}

.cta-info {
    color: rgba(255,255,255,0.85);
    font-size: 1em;
    margin-top: 30px;
}

/* ============================================
   RESPONSIVE
============================================ */

/* Tablette */
@media (max-width: 1024px) {
    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .prestations-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .why-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .zone-content {
        grid-template-columns: 1fr;
    }
    
    .contact-wrapper {
        grid-template-columns: 1fr;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .container {
        padding: 0 15px;
    }

    .services-hero h1 {
        font-size: 1.8em;
        line-height: 1.3;
        padding: 0 10px;
    }

    .hero-subtitle {
        font-size: 1em;
        line-height: 1.5;
        padding: 0 10px;
    }

    .section-title {
        font-size: 1.6em;
        line-height: 1.3;
        padding: 0 10px;
    }

    /* Grid devient 1 colonne sur mobile */
    .services-grid,
    .prestations-grid,
    .why-grid {
        grid-template-columns: 1fr;
        gap: 25px;
    }
    
    .contact-form {
        grid-template-columns: 1fr;
    }
    
    .zone-map iframe {
        height: 300px;
    }
    
    /* Padding cartes réduit sur mobile */
    .service-card,
    .prestation-card,
    .why-item {
        padding: 25px 15px;
    }
    
    .contact-form-container,
    .contact-info {
        padding: 30px 20px;
    }
    
    .cta-section h2 {
        font-size: 1.8em;
    }
}

/* Petit mobile */
@media (max-width: 480px) {
    .container {
        padding: 0 10px;
    }
    
    .services-hero h1 {
        font-size: 1.5em;
    }
    
    .section-title {
        font-size: 1.4em;
    }
}
