/*
    *** CSS - Mobile First Approach ***
*/

/* --- Variables CSS (Custom Properties) --- */
:root {
    --primary-color: #072A48; /* Bleu foncé de votre logo */
    --primary-color-dark: #052038; /* Assombrissement léger pour les hover */
    --secondary-color: #E74C3C; /* Rouge de votre logo */
    --text-color: #333;
    --text-color-light: #666;
    --background-color: #F9F9F9;
    --card-background: #FFF;
    --card-background-hover: #F0F0F0;
    --light-border: #DDD;
    --shadow-color: rgba(0, 0, 0, 0.1);
    --shadow-color-hover: rgba(0, 0, 0, 0.2);
}

/* --- Style de base (pour mobile) --- */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    line-height: 1.6;
    background-color: var(--background-color);
    color: var(--text-color);
}

/* --- Typographie --- */
h2 {
    color: var(--primary-color);
    margin-bottom: 15px;
}

p {
    margin-bottom: 15px;
}

/* --- Liens --- */
a {
    color: var(--secondary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--primary-color);
}

/* --- En-tête --- */
.header {
    background-color: var(--primary-color);
    color: #fff;
    padding: 10px 0;
    position: relative;
    z-index: 1000;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.logo {
    color: #fff;
    text-decoration: none;
    font-size: 1.5em;
    font-weight: bold;
}

/* --- Navigation --- */
.nav {
    display: flex;
    align-items: center;
}

.nav-menu {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: var(--primary-color);
    width: 100%;
    align-items: center;
    padding: 10px 0;
    font-weight: 600;
    animation: fadeIn 0.2s ease-in-out forwards;
}

.nav-menu.active {
    display: flex;
}

.nav-menu li {
    margin: 10px 0;
}

.nav-menu a {
    color: #fff;
    text-decoration: none;
    padding: 10px;
    display: block;
}

/* --- Icône Hamburger --- */
.nav-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    margin-right: 15px;
}

.nav-toggle svg {
    width: 30px;
    height: 30px;
    fill: #fff;
    transition: fill 0.3s ease;
    margin-right: 5px;
}

.nav-toggle:hover svg,
.nav-toggle:focus svg {
    fill: #151515;
}

.hamburger {
    display: block;
    width: 25px;
    height: 3px;
    background-color: #fff;
    margin: 6px 0;
    transition: 0.3s;
}

.hamburger:nth-child(1) {
    transform-origin: left center;
}

.hamburger:nth-child(3) {
    transform-origin: left center;
}

.nav-toggle.active .hamburger:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.nav-toggle.active .hamburger:nth-child(2) {
    opacity: 0;
}

.nav-toggle.active .hamburger:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* --- Contenu Principal --- */
.main-content {
    max-width: 1200px;
    margin: 20px auto;
    padding: 0 20px;
}

/* --- Section Hero --- */
.hero {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background-color: #D3DFB8;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    animation: fadeIn 1s ease-in-out;
}

.hero-content {
    flex: 1;
    text-align: center;
    margin-bottom: 20px;
}

.hero-image {
    flex: 1;
    text-align: center;
}

.hero-image img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    transition: transform 0.3s ease;
}

.hero-image img:hover {
    transform: scale(1.05);
}

/* --- Sections Générales --- */
.section {
    background-color: var(--card-background);
    padding: 20px;
    margin-bottom: 20px;
    border-radius: 8px;
    box-shadow: 0 2px 4px var(--shadow-color);
    transition: box-shadow 0.3s ease;
}

.section:hover {
    box-shadow: 0 4px 8px var(--shadow-color-hover);
}

/* --- Formulaire --- */
.form-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}

form input,
form textarea {
    width: 100%;
    padding: 10px;
    margin-bottom: 10px;
    border: 1px solid var(--light-border);
    border-radius: 4px;
    transition: border-color 0.3s ease;
}

form input:focus,
form textarea:focus {
    border-color: var(--secondary-color);
    outline: none;
}

input {
    max-width: 100%;
}

textarea {
    max-width: 100%;
    max-height: 100%;
    min-height: 20%;
}

/* --- Boutons --- */
.btn {
    display: inline-block;
    background-color: var(--secondary-color);
    color: #fff;
    padding: 10px 20px;
    text-decoration: none;
    border-radius: 4px;
    margin-top: 20px;
    transition: background-color 0.3s ease, transform 0.2s ease;
}

.btn:hover {
    background-color: #C6382B; /* Assombrissement léger du rouge */
    transform: scale(1.05);
}

/* --- Grille des Services --- */
.services-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 20px;
}

.service {
    text-align: center;
    border: 1px solid var(--light-border);
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    transition: border-color 0.3s ease;
}

.service:last-child {
    margin-bottom: 0;
}

.service img {
    max-width: 100%;
    height: auto;
    margin-bottom: 15px;
    border-radius: 8px;
    transition: opacity 0.3s ease;
}

.service img:hover {
    opacity: 0.8;
}

/* --- Section Contact --- */
.contact-wrapper {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin-top: 2rem;
}

.contact-wrapper form,
.contact-wrapper #contact-info {
    flex: 1 1 100%;
}

#contact-info {
    display: flex;
    flex-direction: column;
    margin-top: 20px;
}

/* --- Pied de Page --- */
.footer {
    text-align: center;
    padding: 20px;
    background-color: var(--primary-color);
    color: #fff;
    font-weight: 600;
    transition: background-color 0.3s ease;
}

.footer:hover {
    background-color: var(--primary-color-dark);
}

/* --- Liste --- */
ul {
    margin-top: 0px;
    padding-left: 20px;
}

/* --- Images à propos --- */
.image-propos {
    max-width: 49%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease-in-out;
    cursor: pointer;
}

.image-propos:hover {
    transform: scale(1.05);
}

/* --- Animations --- */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Scroll Smooth --- */
html {
    scroll-behavior: smooth;
}

/* --- Utilitaires --- */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

/* --- Menu Mobile --- */
.nav-menu.active {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    background-color: var(--primary-color);
    width: 100%;
    align-items: center;
    padding: 10px 0;
    z-index: 999;
    animation: fadeIn 0.2s ease-in-out forwards;
}

/* --- Media Queries (pour les écrans plus grands) --- */
@media screen and (min-width: 768px) {
    .header-container {
        padding: 0 40px;
    }

    .nav-menu {
        display: flex;
        flex-direction: row;
        position: static;
        width: auto;
        align-items: center;
        padding: 0;
    }

    .nav-menu li {
        margin: 0 15px;
    }

    .nav-toggle {
        display: none;
    }

    .main-content,
    .header-container {
        padding-left: 5%;
        padding-right: 5%;
    }

    .hero {
        flex-direction: row;
        align-items: center;
        padding: 40px;
    }

    .hero-content {
        text-align: left;
        margin-bottom: 0;
    }

    .services-grid {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
        gap: 20px;
    }

    .service {
        margin-bottom: 20px;
    }

    .contact-wrapper {
        flex-direction: row;
        gap: 2rem;
    }

    .contact-wrapper form,
    .contact-wrapper #contact-info {
        flex: 1 1 300px;
    }

    #contact-info {
        display: flex;
        flex-direction: column;
        margin-top: 0;
    }

    .form-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    ul {
        margin-top: 0px;
    }

    .image-propos {
        max-width: 45%;
    }
}

.about-section {
    position: relative;
}

.about-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.about-card {
    background-color: #f0f0f0;
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.about-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

/* Modifier pour cibler les icônes Font Awesome */
.about-card-icon {
    font-size: 40px; /* Taille des icônes */
    margin-bottom: 10px;
    color: #072a48; /* Couleur des icônes */
}

.about-card h3 {
    color: #072a48;
    margin-bottom: 10px;
    font-size: 1.2em;
}

.about-card p {
    font-size: 0.9em;
    color: #666;
}

.about-images {
    display: flex;
    justify-content: space-around;
    gap: 20px;
    flex-wrap: wrap;
}

.image-propos {
    max-width: 45%;
    height: auto;
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease-in-out;
    cursor: pointer;
}

.image-propos:hover {
    transform: scale(1.05);
}