/* style.css */

:root {
    --primary: #0F172A;
    --secondary: #0EA5E9;
    --accent: #F97316;
    --accent-hover: #ea580c;
    --light: #F8FAFC;
    --dark: #333333;
    --white: #ffffff;
    --font-main: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: var(--font-main);
    line-height: 1.6;
    color: var(--dark);
    background-color: var(--light);
}

a { text-decoration: none; color: inherit; }
ul { list-style: none; }
img { max-width: 100%; height: auto; }

/* ================= HEADER & NAVIGATION ================= */
header {
    background: var(--white);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.top-bar {
    background: var(--primary);
    color: var(--white);
    padding: 8px 0;
    text-align: center;
    font-size: 0.85rem;
}

.nav-container {
    display: flex;
    justify-content: space-between; /* Logo à gauche, Menu à droite */
    align-items: center;            /* Centrage vertical */
    max-width: 1200px;
    margin: 0 auto;
    padding: 10px 20px;
    min-height: 80px;               /* Hauteur minimale garantie */
}

/* --- LOGO (Image) --- */
.logo {
    display: flex;
    align-items: center;
    text-decoration: none;
    /* Pas de largeur fixe, il prend la place de l'image */
}

.logo img {
    display: block;
    max-height: 60px; /* Taille par défaut sur ordinateur */
    width: auto;      /* Garde les proportions */
    object-fit: contain;
}

/* --- MENU --- */
nav ul { 
    display: flex; 
    gap: 20px; 
    align-items: center; 
}

nav a { 
    font-weight: 500; 
    transition: color 0.3s; 
    font-size: 0.95rem;
}
nav a:hover { color: var(--secondary); }

/* BOUTON CTA (DEVIS) */
.btn-cta {
    background: var(--accent);
    color: var(--white);
    padding: 10px 20px;
    border-radius: 5px;
    font-weight: bold;
    transition: background 0.3s;
}
.btn-cta:hover { background: var(--accent-hover); }

/* ================= HERO & SECTIONS ================= */
.hero {
    background: linear-gradient(rgba(15, 23, 42, 0.8), rgba(15, 23, 42, 0.8)), url('https://images.unsplash.com/photo-1621905251189-08b45d6a269e?auto=format&fit=crop&w=1920&q=80');
    background-size: cover;
    background-position: center;
    color: var(--white);
    padding: 100px 20px;
    text-align: center;
}

.hero h1 { font-size: 3rem; margin-bottom: 20px; }
.hero p { font-size: 1.2rem; margin-bottom: 30px; max-width: 700px; margin-left: auto; margin-right: auto; }

section { padding: 60px 20px; max-width: 1200px; margin: 0 auto; }

.section-title {
    text-align: center;
    margin-bottom: 40px;
}
.section-title h2 { color: var(--primary); font-size: 2.2rem; margin-bottom: 10px; }
.section-title .line { width: 60px; height: 4px; background: var(--secondary); margin: 0 auto; }

/* ================= GRIDS & CARDS ================= */
.grid-3 {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.card {
    background: var(--white);
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    transition: transform 0.3s;
    border-bottom: 4px solid var(--secondary);
}
.card:hover { transform: translateY(-5px); }
.card h3 { color: var(--primary); margin-bottom: 15px; }
.card-icon { font-size: 2rem; color: var(--secondary); margin-bottom: 15px; display: block; }

/* FEATURES */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    text-align: center;
}
.feature-item { background: var(--white); padding: 20px; border-radius: 5px; }

/* FORMS */
form {
    background: var(--white);
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    max-width: 600px;
    margin: 0 auto;
}
.form-group { margin-bottom: 20px; }
label { display: block; margin-bottom: 8px; font-weight: 600; }
input, textarea, select {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
}
button[type="submit"] {
    width: 100%;
    background: var(--primary);
    color: var(--white);
    border: none;
    padding: 15px;
    font-size: 1.1rem;
    cursor: pointer;
    border-radius: 4px;
}
button[type="submit"]:hover { background: var(--secondary); }

/* ================= FOOTER ================= */
footer {
    background: var(--primary);
    color: var(--white);
    padding: 60px 20px 20px;
}
.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto;
}
.footer-col h4 { margin-bottom: 20px; color: var(--secondary); }
.footer-col ul li { margin-bottom: 10px; }
.copyright {
    text-align: center;
    margin-top: 60px;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    font-size: 0.9rem;
}

/* ================= RESPONSIVE (MOBILE & TABLETTE) ================= */
/* C'EST ICI QUE LES MODIFICATIONS IMPORTANTES SONT FAITES */
@media (max-width: 768px) {
    
    /* --- NAVIGATION & HEADER --- */
    .nav-container { 
        flex-direction: column; /* Empile le logo et le menu */
        gap: 15px; 
        padding: 15px;
        height: auto; /* Laisse la hauteur s'adapter */
    }
    
    .logo {
        width: 100%; 
        justify-content: center; /* Centre le logo sur mobile */
        margin-bottom: 5px;
    }

    /* FORCE la taille du logo sur mobile, même si défini en HTML */
    .logo img {
        max-height: 150px !important; /* IMPORTANT : Écrase le style "150px" du HTML */
        width: auto;
    }

    nav ul { 
        flex-wrap: wrap; 
        justify-content: center; 
        gap: 15px; 
        width: 100%;
        padding: 0;
    }

    nav a {
        font-size: 1rem; /* Texte un peu plus gros pour le tactile */
        padding: 5px;
    }
    
    /* Bouton DEVIS bien visible sur mobile */
    .btn-cta {
        display: block;
        width: 100%;
        text-align: center;
        margin-top: 10px;
    }

    /* --- HERO & CONTENU --- */
    .hero {
        padding: 60px 20px;
    }
    .hero h1 { 
        font-size: 2rem; /* Titre plus petit */
    }

    /* --- FOOTER OPTIMISÉ --- */
    /* Transforme les 4 colonnes en 1 seule colonne centrée */
    .footer-grid {
        grid-template-columns: 1fr; 
        gap: 40px;
        text-align: center; 
    }

    .footer-col h4 {
        border-bottom: 2px solid var(--secondary);
        display: inline-block;
        padding-bottom: 5px;
        font-size: 1.2rem;
    }

    /* --- PADDING ARTICLES --- */
    .article-container {
        padding: 20px;
    }
}

/* ================= BLOG & ARTICLES ================= */

/* Cartes du blog (Listing) */
.blog-card {
    display: flex;
    flex-direction: column;
    height: 100%;
}

.blog-image {
    height: 200px;
    width: 100%;
    object-fit: cover;
    border-radius: 8px 8px 0 0;
}

.blog-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.blog-meta {
    font-size: 0.85rem;
    color: #666;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.blog-tag {
    background-color: var(--secondary);
    color: white;
    padding: 2px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    text-transform: uppercase;
    font-weight: bold;
}

.blog-title {
    font-size: 1.25rem;
    margin-bottom: 10px;
    color: var(--primary);
    font-weight: bold;
}

.read-more {
    margin-top: auto; /* Pousse le lien vers le bas */
    color: var(--accent);
    font-weight: bold;
    text-decoration: underline;
}

/* Page Article Unique (Lecture) */
.article-container {
    max-width: 800px; /* Plus étroit pour une meilleure lecture */
    margin: 0 auto;
    background: var(--white);
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.article-body {
    font-size: 1.1rem;
    line-height: 1.8;
    color: #444;
}

.article-body h2 {
    color: var(--primary);
    margin-top: 30px;
    margin-bottom: 15px;
    font-size: 1.8rem;
}

.article-body h3 {
    color: var(--secondary);
    margin-top: 25px;
    margin-bottom: 10px;
}

.article-body ul {
    list-style: disc;
    margin-left: 20px;
    margin-bottom: 20px;
}

.article-header-image {
    width: 100%;
    height: 300px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 30px;
}

/* ================= PAGE CONTACT & ZONE ================= */

/* Grille spécifique pour la page contact : 2 colonnes égales */
.grid-contact-layout {
    display: grid;
    grid-template-columns: 1fr 1fr; /* Colonne gauche / Colonne droite */
    gap: 40px;
    align-items: center; /* Centre verticalement */
}

/* Style de la colonne infos */
.contact-info {
    background: var(--white);
    padding: 30px;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

/* Style de l'image */
.img-responsive-map {
    width: 100%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    object-fit: cover;
}

/* RESPONSIVE : Sur mobile, on empile le tout */
@media (max-width: 768px) {
    .grid-contact-layout {
        grid-template-columns: 1fr; /* Une seule colonne */
    }
    
    .contact-info {
        order: 1; /* Infos en premier */
    }
    
    .map-container {
        order: 2; /* Image en dessous */
    }
}
