/* --- Variables et Styles Généraux (Palette Bleu & Blanc) --- */
:root {
    --primary-color: #0d2c54;    /* Bleu marine profond pour les textes et fonds */
    --accent-color: #007BFF;     /* Bleu vif pour les boutons et accents */
    --light-bg-color: #f7faff;   /* Bleu très clair, presque blanc, pour les fonds de section */
    --white-color: #ffffff;      /* Blanc pur */
    --dark-text-color: #333333;  /* Couleur de texte standard */
    --border-color: #e0e6f0;     /* Bordure bleu/gris clair */
    --font-family: 'Arial', sans-serif;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-family);
    line-height: 1.6;
    color: var(--dark-text-color);
    background-color: var(--white-color); /* Fond général blanc */
}

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

.bg-light {
    background-color: var(--light-bg-color); /* Utilisation du fond bleu très clair */
}

.bg-dark {
    background-color: var(--primary-color);
    color: var(--white-color);
    text-align: center;
    padding: 20px;
}

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

.section-title h2 {
    font-size: 2.5rem;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.section-title p {
    font-size: 1.1rem;
    color: #555;
}

/* --- Barre de Navigation --- */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 40px;
    background-color: var(--white-color);
    box-shadow: 0 2px 5px rgba(0,0,0,0.08);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
}

.logo {
    font-size: 1.8rem;
    font-weight: bold;
    color: var(--primary-color);
    text-decoration: none;
}

.logo img {
    height: 50px; /* Vous pouvez changer cette valeur pour agrandir ou réduire le logo */
    width: auto;  /* La largeur s'ajuste automatiquement pour ne pas déformer l'image */
    vertical-align: middle; /* Centre l'image verticalement avec les liens du menu */
}

.logo strong {
    color: var(--accent-color); /* Accent en bleu vif */
}

.nav-links {
    display: flex;
    list-style: none;
    flex-grow: 1; /* Permet au conteneur des liens de s'étirer */
    justify-content: center; /* Centre les liens */
    align-items: center;
}

.nav-links li {
    padding: 0 1rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--primary-color);
    font-weight: bold;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: var(--accent-color);
}

.cta-button {
    background-color: var(--accent-color);
    color: var(--white-color);
    padding: 10px 20px;
    border-radius: 5px;
    transition: background-color 0.3s ease;
}

.cta-button:hover {
    background-color: #0056b3; /* Bleu plus sombre au survol */
    color: var(--white-color);
}

.burger {
    display: none; /* Caché par défaut sur grand écran */
    cursor: pointer;
}

.burger div {
    width: 25px;
    height: 3px;
    background-color: var(--primary-color);
    margin: 5px;
    transition: all 0.3s ease;
}

/* --- Section Héros (Accueil) --- */
.hero {
    height: 100vh;
    background: linear-gradient(rgba(13, 44, 84, 0.6), rgba(13, 44, 84, 0.6)), url('background-chantier.png') no-repeat center center/cover;
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: var(--white-color);
    padding: 0 20px;
}

/* Cache l'image par défaut */
#imageInteractive {
    display: none;
    max-width: 100%;
    margin: 0 auto;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

/* Option pour une transition plus douce (optionnel) */
#imageInteractive.is-visible {
    display: block;
    animation: fadeIn 0.5s forwards;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.hero-content h1 {
    font-size: 3.5rem;
    margin-bottom: 20px;
}

.hero-content p {
    font-size: 1.3rem;
    margin-bottom: 30px;
}

.cta-button-main {
    background-color: var(--accent-color);
    color: var(--white-color);
    padding: 15px 30px;
    border-radius: 5px;
    text-decoration: none;
    font-size: 1.1rem;
    font-weight: bold;
    transition: background-color 0.3s ease;
}

.cta-button-main:hover {
    background-color: #0056b3;
}

/* --- Section À Propos & Sécurité --- */
.about-content, .safety-content {
    display: flex;
    align-items: center;
    gap: 50px;
}

.about-text, .safety-text {
    flex: 1;
}

.about-image, .safety-image {
    flex: 1;
}

.about-image img, .safety-image img {
    width: 100%;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.safety-text ul {
    list-style: none;
    margin-top: 20px;
}

.safety-text ul li {
    margin-bottom: 10px;
    display: flex;
    align-items: center;
}

.safety-text .fa-check-circle {
    color: var(--accent-color);
    margin-right: 10px;
}

/* --- Section Services --- */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
    text-align: center;
}

.service-card {
    background: var(--white-color);
    padding: 40px 20px;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    overflow: hidden;
    position: relative; /* Indique que les éléments positionnés à l'intérieur se baseront sur cette carte */
}

.service-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 10px 20px rgba(13, 44, 84, 0.1);
}

.service-card i {
    font-size: 3rem;
    color: var(--accent-color);
    margin-bottom: 20px;
}

/* Style pour les icônes */
.service-card i {
    font-size: 3rem;
    color: var(--accent-color);
    margin-bottom: 20px;
}

/* Style pour l'image en bas des cartes */
.service-card img {
    position: absolute; /* L'image est retirée du flux du document pour ne pas prendre de place */
    bottom: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0; /* L'image est invisible par défaut */
    transition: opacity 0.3s ease; /* L'opacité change en douceur */
}

/* Règle qui montre l'image quand on passe la souris sur la carte */
.service-card:hover img {
    opacity: 1; /* L'image devient visible au survol */
}

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

/* --- Section Réalisations --- */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.gallery-item img {
    width: 100%;
    height: 100%;
    display: block;
    transition: transform 0.4s ease;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: rgba(13, 44, 84, 0.85);
    color: white;
    padding: 15px;
    transform: translateY(100%);
    transition: transform 0.4s ease;
    font-weight: bold;
}

.gallery-item:hover .overlay {
    transform: translateY(0);
}

/* --- Section Contact --- */
.contact-wrapper {
    display: flex;
    gap: 50px;
    background: var(--white-color);
    padding: 50px;
    border-radius: 10px;
    border: 1px solid var(--border-color);
}

.contact-form {
    flex: 2;
}

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

.contact-form input, .contact-form textarea {
    width: 100%;
    padding: 15px;
    margin-bottom: 20px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    font-family: inherit;
    font-size: 1rem;
}

.contact-form input:focus, .contact-form textarea:focus {
    outline: none;
    border-color: var(--accent-color);
}

.contact-info {
    flex: 1;
}

.contact-info p {
    margin-bottom: 15px;
    display: flex;
    align-items: center;
}

.contact-info i {
    color: var(--accent-color);
    margin-right: 15px;
    font-size: 1.2rem;
}

.contact-info a {
    color: var(--dark-text-color);
    text-decoration: none;
}

.social-links a {
    color: var(--primary-color);
    font-size: 1.8rem;
    margin-right: 15px;
    transition: color 0.3s ease;
}

.social-links a:hover {
    color: var(--accent-color);
}

/* --- Footer --- */
footer {
    background-color: var(--primary-color);
    color: var(--white-color);
    text-align: center;
    padding: 20px;
}

/* Centre le contenu de la section Sécurité */
#securite .safety-content {
    justify-content: center; /* Centre le conteneur du texte */
}

#securite .safety-text {
    text-align: center; /* Centre les titres et paragraphes */
    max-width: 800px; /* Limite la largeur pour une meilleure lisibilité */
}

#securite .safety-text ul {
    display: inline-block; /* Permet au bloc de la liste d'être centré */
    text-align: left;      /* Garde le texte et les puces alignés à gauche pour la clarté */
}

/* Centre le contenu de la section À Propos */
#a-propos .about-content {
    justify-content: center; /* Centre le conteneur du texte */
}

#a-propos .about-text {
    text-align: center; /* Centre le texte à l'intérieur du bloc */
    max-width: 800px;   /* Limite la largeur pour une meilleure lisibilité */
}

/* Centre le contenu de la section À Propos */
#a-propos .about-content {
    justify-content: center; 
}

#a-propos .about-text {
    text-align: center; /* <-- C'est cette ligne qui centre le titre */
    max-width: 800px;
}

/* Style pour l'image centrale de la section Sécurité */
.securite-image-centrale {
    margin: 40px auto; /* Ajoute de l'espace vertical et centre le bloc */
    max-width: 800px;  /* Limite la largeur de l'image pour qu'elle ne soit pas trop grande */
}

.securite-image-centrale img {
    width: 30%; /* L'image s'adapte à la taille du conteneur */
    margin: 0 auto; /* <-- Ajoutez cette ligne pour centrer l'élément */
    display: block; /* Assure un bon comportement du margin */
    border-radius: 10px; /* Ajoute des bords arrondis */
    box-shadow: 0 5px 15px rgba(0,0,0,0.1); /* Ajoute une ombre discrète */
}

/* --- Responsive (pour tablettes et mobiles) --- */
@media (max-width: 768px) {
    .nav-links {
        position: absolute;
        right: 0px;
        height: 92vh;
        top: 8vh;
        background-color: var(--primary-color);
        display: flex;
        flex-direction: column;
        align-items: center;
        width: 60%;
        transform: translateX(100%);
        transition: transform 0.5s ease-in;
    }

    /* CORRECTION : On enlève "opacity: 0" pour que les liens soient visibles */
    .nav-links li {
        padding: 20px 0;
    }
    
    /* CORRECTION : On rend le texte des liens blanc sur mobile */
    .nav-links a {
        color: var(--white-color);
    }

    .burger {
        display: block; /* Affiche l'icône burger sur mobile */
    }

    .nav-active {
        transform: translateX(0%);
    }
    
    .toggle .line1 {
        transform: rotate(-45deg) translate(-5px, 6px);
    }
    .toggle .line2 {
        opacity: 0;
    }
    .toggle .line3 {
        transform: rotate(45deg) translate(-5px, -6px);
    }
    
    .hero-content h1 {
        font-size: 2.5rem;
    }

    .about-content, .safety-content, .contact-wrapper {
        flex-direction: column;
        padding: 30px;
    }
    
    .about-image, .safety-image {
        margin-top: 30px;
    }
}