/* --- 1. Bases & Navigation --- */
:root {
    --primary: #003366;   /* Bleu foncé SI2D */
    --secondary: #00bcd4; /* Cyan Dépannage */
    --light: #f4f4f4;
    --dark: #333;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: Arial, sans-serif;
    margin: 0;
    line-height: 1.6;
    color: var(--dark);
    overflow-x: hidden; /* Empêche le défilement horizontal sur mobile */
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 10%;
    background: var(--primary);
    color: white;
}

.logo-img {
    height: 60px;
    width: auto;
    display: block;
}

nav ul {
    display: flex;
    list-style: none;
    margin: 0;
    padding: 0;
}

nav ul li a {
    color: white;
    text-decoration: none;
    margin-left: 20px;
    font-weight: bold;
    transition: color 0.3s;
}

nav ul li a:hover {
    color: var(--secondary);
}

/* --- 2. Hero Section --- */
.hero {
    background: linear-gradient(rgba(0, 51, 102, 0.164), rgba(0, 51, 102, 0.164)), url('image/setup.png');
    background-size: cover;
    background-position: center;
    height: 80vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    color: white;
    text-align: center;
    padding: 0 20px;
}

.hero h1 { font-size: 2.5rem; margin-bottom: 10px; }

.btn {
    background: var(--secondary);
    color: white;
    padding: 12px 30px;
    text-decoration: none;
    border-radius: 5px;
    margin-top: 20px;
    font-weight: bold;
}

/* --- 3. Grille des Services (Accueil) --- */
#services {
    padding: 50px 10%;
    text-align: center;
}

.services-container {
    display: grid;
    /* On utilise repeat(3, 1fr) pour garantir 3 colonnes sur PC */
    grid-template-columns: repeat(3, 1fr); 
    gap: 20px;
    margin-top: 30px;
}

.service-card {
    display: flex;
    flex-direction: column;
    padding: 25px;
    border: 1px solid #ddd;
    border-radius: 8px;
    background-color: #fff;
    text-decoration: none;
    color: var(--dark);
    transition: all 0.3s ease;
    /* On supprime le min-height fixe pour laisser le contenu respirer */
    height: auto;
}

.service-card h3 {
    margin-top: 0;
    margin-bottom: 15px;
    color: var(--primary);
}

.service-card p {
    margin: 0;
    flex-grow: 1; /* Permet d'équilibrer l'espace si un texte est plus court */
}

.service-card:hover {
    border-color: var(--secondary);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transform: translateY(-5px);
}

/* Correction spécifique pour le mobile */
@media (max-width: 768px) {
    .services-container {
        grid-template-columns: 1fr; /* Une seule colonne sur téléphone */
    }
}


/* --- 4. Pages de Détails & À Propos --- */
.page-detail, .about-section {
    padding: 60px 10%;
    max-width: 1200px;
    margin: 0 auto;
}

.intro-service { text-align: center; margin-bottom: 40px; }

.contenu-detail {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: start;
}

/* Correction des ✔ */
.texte-explication { text-align: left; }
.texte-explication ul { list-style: none; padding: 0; }
.texte-explication li, .about-text ul li {
    margin-bottom: 15px;
    padding-left: 30px;
    position: relative;
    text-align: left;
}

.texte-explication li::before, .about-text ul li::before {
    content: "✔";
    color: var(--secondary);
    position: absolute;
    left: 0; /* CORRIGÉ : plus de décalage à 400px */
    font-weight: bold;
}

/* --- Correction Finale du carré Processus --- */
.processus {
    background: #fff;
    padding: 30px;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    text-align: left !important;
}

.etape {
    display: flex !important;
    align-items: center; /* Aligne verticalement le numéro et le titre */
    margin-bottom: 25px !important;
    gap: 15px; /* Crée un espace automatique entre numéro et contenu */
}

.numero {
    background: var(--primary);
    color: white;
    width: 35px;
    height: 35px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0; /* Empêche absolument le rond de s'écraser */
    font-weight: bold;
}

/* On force le titre à prendre une place définie pour que la description ne le chevauche pas */
.etape strong {
    min-width: 120px; /* Donne assez de place au mot "Diagnostic" ou "Analyse" */
    display: inline-block;
    color: var(--primary);
    margin: 0;
}

.etape p {
    margin: 0 !important;
    flex: 1; /* La description prend tout le reste de la place */
    color: #555;
    font-size: 0.95rem;
}

/* --- 5. Contact & Footer --- */
#contact { background: var(--light); padding: 60px 10%; text-align: center; }
footer { background: var(--dark); color: white; text-align: center; padding: 30px 0; }
.contact-container {
    display: grid;
    grid-template-columns: 1fr 2fr; /* Infos à gauche (étroit), Formulaire à droite (large) */
    gap: 40px;
    max-width: 1000px;
    margin: 30px auto 0;
    text-align: left;
}

.contact-info p {
    margin-bottom: 15px;
    font-size: 1.1rem;
}

/* Style du formulaire */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.form-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
}

.contact-form input, 
.contact-form select, 
.contact-form textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 5px;
    font-family: inherit;
    font-size: 1rem;
    box-sizing: border-box; /* Évite que les champs ne dépassent */
}

.contact-form input:focus, 
.contact-form select:focus, 
.contact-form textarea:focus {
    border-color: var(--secondary);
    outline: none;
    box-shadow: 0 0 5px rgba(0, 188, 212, 0.3);
}

.btn-submit {
    background: var(--secondary);
    color: white;
    padding: 15px;
    border: none;
    border-radius: 5px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s;
    text-transform: uppercase;
}

.btn-submit:hover {
    background: #0097a7;
}

/* --- RESPONSIVE CONTACT --- */
@media (max-width: 768px) {
    .contact-container {
        grid-template-columns: 1fr; /* On empile sur mobile */
        text-align: center;
    }
    
    .form-group {
        grid-template-columns: 1fr;
    }
}

/* --- 6. RESPONSIVE (MOBILE) --- */
@media (max-width: 768px) {
    nav {
        flex-direction: column;
        text-align: center;
    }

    nav ul {
        margin-top: 15px;
    }

    nav ul li a {
        margin: 0 10px;
    }

    .hero h1 { font-size: 1.8rem; }

    .contenu-detail {
        grid-template-columns: 1fr; /* Une seule colonne sur mobile */
        gap: 30px;
    }

    .page-detail, .about-section, #services {
        padding: 40px 5%;
    }
    
    .about-text { text-align: center; }
    .about-text ul li { text-align: left; }
}
