/* --- Global Styles --- */
body { font-family: 'Segoe UI', Tahoma, sans-serif; margin: 0; padding: 0; background-color: #fcfcfc; }
.label { color: #c0392b; font-weight: bold; font-size: 0.75rem; text-transform: uppercase; margin-bottom: 10px; display: block; }
.red-line { width: 30px; height: 2px; background-color: #c0392b; margin-bottom: 15px; }

/* ==========================================================================
   1. CORE CONFIGURATION & VARIABLES
   ========================================================================== */
:root {
    --primary-blue: #0A3663;
    --primary-dark: #031020;
    --accent-red: #E30013;
    --text-dark: #1E293B;
    --text-muted: #64748B;
    --bg-light: #F8FAFC;
    --white: #FFFFFF;
    --font-heading: 'Montserrat', sans-serif;
    --font-body: 'Inter', sans-serif;
    --border-color: #E2E8F0;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}


.container {
    width: 90%;
    max-width: 1200px;
    margin: 0 auto;
}
.hero-services-dark {
    position: relative;
    width: 100%;
    height: 400px; /* Réduit pour un look plus compact */
    background: url('pages/servhero2.webp') no-repeat center center/cover;
    display: flex;
    align-items: center;
    color: white;
}

.hero-overlay {
    position: absolute;
    top: 0; left: 0; width: 100%; height: 100%;
    background: linear-gradient(to right, rgba(3, 16, 32, 0.9) 30%, rgba(3, 16, 32, 0.4) 100%);
}

.hero-content {
    position: relative;
    z-index: 1;
    padding-left: 40px; /* Réduit */
    padding-right: 40px; /* Réduit */
    max-width: 600px;
}

.label-red { 
    color: #E30013; font-weight: bold; text-transform: uppercase; 
    letter-spacing: 1.5px; font-size: 0.65rem; /* Plus petit */
    display: block; margin-bottom: 15px; 
}

.hero-section h1 {
    font-size: 30px;
    font-weight: 800;
    letter-spacing: -0.5px;
    line-height: 1.2;
    color: var(--white);
    font-family: var(--font-heading);
    margin-bottom: 20px; /* Réduit */
}

.hero-content p { 
    font-size: 0.95rem; /* Plus léger */
    margin-bottom: 45px; /* Réduit */
    margin-top: 20px;
    color: #cbd5e0; 
    line-height: 1.5;
}

/* Grille plus compacte */
.services-grid { display: flex; gap: 30px; }
.s-item { 
    border-left: 1px solid rgba(255,255,255,0.3); 
    padding-left: 15px; 
}
.s-item i { 
    font-size: 1.2rem; /* Icônes plus petites */
    color: #fff; margin-bottom: 5px; display: block;
}
.s-item h3 { 
    font-size: 0.8rem; /* Titres plus petits */
    font-weight: 600; margin: 0; 
}
.s-item p { display: none; }
.services-list { padding: 50px 20px; max-width: 1100px; margin: 0 auto; }

.service-item { 
    display: flex; 
    align-items: center; 
    gap: 40px; 
    margin-bottom: 60px; 
}

/* Alternance pour le design "Zig-Zag" */
.service-item:nth-child(even) { flex-direction: row-reverse; }

.service-text { flex: 1; }
/* --- Mise à jour pour les images des services --- */
/* Image à GAUCHE (service impair) - Inclinaison vers la GAUCHE */
.service-item:nth-child(odd) .service-image {
    clip-path: polygon(0% 0, 85% 0, 100% 100%, 15% 100%);
}

.service-text { flex: 1; }

/* Espace entre les deux lignes quand un <br> est utilisé dans la description */
.service-desc p {
    margin-bottom: 15px;
}
.service-desc p:last-child {
    margin-bottom: 0;
}

/* Image à DROITE (service pair) - Inclinaison vers la DROITE */
.service-item:nth-child(even) .service-image {
    clip-path: polygon(15% 0, 100% 0, 85% 100%, 0% 100%);
}

/* Style de base des cadres */
.service-image { 
    flex: 1; 
    height: 300px; 
    overflow: hidden; 
    box-shadow: 0 10px 20px rgba(0,0,0,0.1); 
}

.service-image img { 
    width: 100%; 
    height: 100%; 
    object-fit: cover; 
    display: block;
}
/* Ajustement de l'alignement pour que texte et image soient centrés verticalement */
.service-item { 
    display: flex; 
    align-items: center; /* Centre verticalement */
    gap: 40px; 
    margin-bottom: 60px; 
}
.service-header2 { display: flex; align-items: center; gap: 15px; margin-bottom: 15px; }

.icon-circle { 
    background: #05163d; color: white; width: 50px; height: 50px; 
    border-radius: 50%; display: flex; align-items: center; justify-content: center; 
    flex-shrink: 0; font-size: 1.2rem; 
}

h2 { color: #05163d; font-size: 1.5rem; margin: 0; }

/* Nettoyage des listes */
.service-points { 
    margin-top: 15px;
    list-style: none; /* Supprime les points (puces) par défaut */
    padding: 0; 
}

.service-points li { 
    margin-bottom: 10px; 
    margin-top: 10px; 
    padding-left: 30px; /* Espace pour la coche */
    position: relative; 
    color: #4a5568; 
    list-style: none; /* Sécurité supplémentaire */
}

/* Ajout des petites coches rouges */
.service-points li::before { 
    content: "✔"; 
    position: absolute; 
    left: 0; 
    color: #c0392b; 
    font-weight: bold; 
}

@media (max-width: 768px) {
    .service-item, .service-item:nth-child(even) { flex-direction: column; text-align: center; }
}



/* Animation de base */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Classe à appliquer aux éléments */
.animate-on-scroll {
    opacity: 0;
    animation: fadeInUp 0.8s ease-out forwards;
}

/* Délai optionnel pour les services pour un effet en cascade */
.service-item:nth-child(1) { animation-delay: 0.2s; }
.service-item:nth-child(2) { animation-delay: 0.4s; }
.service-item:nth-child(3) { animation-delay: 0.6s; }


@media (max-width: 768px) {
    /* 1. Hero : Ajustement de la hauteur et du texte */
    .hero-services-dark {
        height: auto;
        padding: 40px 20px;
        text-align: center;
    }
    .hero-content {
        padding: 0;
        width: 100%;
    }
    .hero-section h1 {
        font-size: 24px; /* Texte plus petit sur mobile */
    }

    /* 2. Services Grid (la barre d'icônes en haut) */
    .services-grid {
        display: none; /* Souvent plus propre de cacher la barre d'icônes sur mobile */
    }

    /* 3. Items de Services (Zig-Zag) */
    .services-list {
        padding: 20px 15px; /* Padding plus serré */
    }
    
    .service-item, 
    .service-item:nth-child(even) {
        flex-direction: column;
        text-align: center;
        margin-bottom: 40px;
        gap: 20px;
    }

    /* 4. Images des services : supprimer le clip-path et ajuster la taille */
    .service-image {
        width: 100%;
        height: 200px; /* Hauteur réduite pour mobile */
        clip-path: none !important; /* On annule l'inclinaison */
        border-radius: 12px; /* Coins arrondis plus agréables sur mobile */
    }

    /* 5. Texte et listes */
    .service-header2 {
        justify-content: center;
    }
    .service-text {
        width: 100%;
        padding: 0;
    }
    h2 {
        font-size: 1.25rem;
    }
    .service-points {
        text-align: left; /* Garde les listes alignées à gauche pour la lisibilité */
        display: inline-block;
    }
}