:root {
    --primary-dark: #11223F;
    --secondary-blue: #2B6CB0;
    --accent-blue: #63B3ED;
    --light-bg: #F0F4F8;
    --white: #FFFFFF;
    --text-dark: #1A202C;
    --text-muted: #4A5568;
    --whatsapp-green: #25D366;
    --whatsapp-hover: #1EBE5D;
    --font-main: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: var(--font-main);
}

body {
    background-color: var(--light-bg);
    color: var(--text-dark);
    line-height: 1.6;
}

/* Header & Navigation (Version Desktop) */
header {
    background-color: var(--primary-dark);
    padding: 0.8rem 5%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.3);
}

/* Lien entourant le logo */
.logo-link {
    text-decoration: none;
    display: inline-block;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Logo grand sans fond blanc */
.logo-container img {
    height: 85px;
    width: auto;
    object-fit: contain;
    background-color: transparent;
    padding: 0;
    filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.4));
}

/* Texte "BATI CONSEIL" */
.logo-text {
    color: var(--white);
    font-size: 1.25rem;
    font-weight: 700;
    letter-spacing: 0.8px;
}

nav ul {
    display: flex;
    list-style: none;
    gap: 20px;
}

nav a {
    color: var(--white);
    text-decoration: none;
    font-weight: 600;
    transition: color 0.3s ease;
    text-transform: uppercase;
}

nav a:hover, nav a.active {
    color: var(--accent-blue);
}

/* Masquer les émojis du menu sur PC */
.nav-emoji {
    display: none;
}

/* Éléments mobile masqués sur Desktop */
.mobile-actions, .mobile-menu-btn {
    display: none;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary-dark) 0%, #1A365D 100%);
    color: var(--white);
    padding: 80px 5%;
    text-align: center;
}

.hero h1 {
    font-size: 2.8rem;
    margin-bottom: 15px;
    color: var(--white);
}

.hero p {
    font-size: 1.2rem;
    color: var(--accent-blue);
    max-width: 800px;
    margin: 0 auto 30px auto;
}

/* Buttons & Action Links */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 28px;
    background-color: var(--secondary-blue);
    color: var(--white);
    text-decoration: none;
    border-radius: 6px;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s ease;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.btn:hover {
    background-color: var(--accent-blue);
    color: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.15);
}

/* WhatsApp Specific Button */
.btn-whatsapp {
    background-color: var(--whatsapp-green);
    color: var(--white);
}

.btn-whatsapp:hover {
    background-color: var(--whatsapp-hover);
    color: var(--white);
}

.contact-actions {
    display: flex;
    gap: 20px;
    justify-content: center;
    flex-wrap: wrap;
    margin-top: 20px;
}

/* Grid & Layout Conteneur */
.container {
    padding: 60px 5%;
    max-width: 1200px;
    margin: 0 auto;
}

.section-title {
    text-align: center;
    font-size: 2rem;
    color: var(--primary-dark);
    margin-bottom: 40px;
}

/* ===================================================
   GRILLE ET CARTES DES PROJETS (STYLE ATTESTATION/PORTFOLIO)
   =================================================== */
.projects-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 30px;
    padding: 10px 0;
}

.project-card {
    background: var(--white);
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.06);
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #E2E8F0;
}

.project-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.12);
}

/* Image & Badge */
.card-image-wrapper {
    position: relative;
    width: 100%;
    height: 220px;
    background-color: #E2E8F0;
}

.card-image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.card-image-wrapper .no-image {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 100%;
    color: var(--text-muted);
    font-size: 0.9rem;
    font-style: italic;
    background-color: #EDF2F7;
}

.badge-year {
    position: absolute;
    top: 15px;
    right: 15px;
    background-color: #0056b3;
    color: var(--white);
    font-size: 0.8rem;
    font-weight: 700;
    padding: 5px 14px;
    border-radius: 20px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.2);
}

/* Contenu de la Carte */
.card-body {
    padding: 22px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.project-title {
    font-size: 1.1rem;
    font-weight: 800;
    color: #1A202C;
    text-transform: uppercase;
    margin-bottom: 20px;
    line-height: 1.4;
    min-height: 2.8em;
}

.info-box {
    background-color: #F8FAFC;
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 20px;
    border: 1px solid #EDF2F7;
}

.info-item {
    display: flex;
    flex-direction: column;
}

.info-label {
    font-size: 0.75rem;
    color: #718096;
    margin-bottom: 2px;
}

.info-value {
    font-size: 0.95rem;
    font-weight: 700;
    color: #2D3748;
}

.missions-section {
    margin-top: auto;
}

.missions-title {
    display: block;
    font-size: 0.75rem;
    font-weight: 700;
    color: #4A5568;
    letter-spacing: 0.5px;
    margin-bottom: 10px;
    text-transform: uppercase;
}

.tags-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.mission-tag {
    background-color: #EBF8FF;
    color: #2B6CB0;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 6px;
    border: 1px solid #BEE3F8;
}

/* Key Metrics Section & Static Cards */
.stats-bar {
    background-color: var(--primary-dark);
    color: var(--white);
    padding: 40px 5%;
    display: flex;
    justify-content: space-around;
    flex-wrap: wrap;
    text-align: center;
}

.stat-item h2 {
    font-size: 2.5rem;
    color: var(--accent-blue);
}

.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);
    border-top: 4px solid var(--secondary-blue);
}

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

/* Footer */
footer {
    background-color: var(--primary-dark);
    color: var(--white);
    text-align: center;
    padding: 30px 5%;
    margin-top: 60px;
    border-top: 1px solid rgba(255,255,255,0.1);
}

footer p {
    font-size: 0.9rem;
    color: var(--white);
    margin-bottom: 6px;
}

/* Liens du Footer forcés en blanc */
footer a.footer-link,
footer a.footer-link:visited {
    color: var(--white) !important;
    text-decoration: none;
    transition: color 0.3s ease;
}

footer a.footer-link:hover {
    color: var(--accent-blue) !important;
    text-decoration: underline;
}

.footer-linkedin {
    display: inline-block;
    margin-top: 4px;
    font-weight: 600;
}

/* ===================================================
   MOBILE ONLY (Écrans < 768px)
   =================================================== */
@media (max-width: 768px) {
    .nav-emoji {
        display: inline;
    }

    header {
        display: grid;
        grid-template-columns: 40px 1fr 40px;
        align-items: center;
        padding: 0.6rem 5%;
    }

    .mobile-menu-btn {
        display: block;
        grid-column: 1;
        background: none;
        border: none;
        color: var(--white);
        font-size: 1.8rem;
        cursor: pointer;
        text-align: left;
        line-height: 1;
    }

    .logo-link {
        grid-column: 2;
        display: flex;
        justify-content: center;
    }

    .logo-container {
        justify-content: center;
    }

    .logo-text {
        font-size: 1.05rem;
    }

    .logo-container img {
        height: 60px;
        padding: 0;
    }

    .mobile-actions {
        display: flex;
        grid-column: 3;
        justify-content: flex-end;
    }

    .mobile-btn-icon {
        background-color: var(--secondary-blue);
        color: var(--white);
        text-decoration: none;
        width: 36px;
        height: 36px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 6px;
        font-size: 1rem;
    }

    header nav {
        display: block;
        position: absolute;
        top: 100%;
        left: 0;
        width: 75%;
        max-width: 280px;
        background-color: var(--primary-dark);
        padding: 25px 20px;
        box-shadow: 5px 8px 15px rgba(0, 0, 0, 0.3);
        border-right: 2px solid var(--secondary-blue);
        
        transform: translateX(-100%);
        opacity: 0;
        visibility: hidden;
        transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.35s ease, visibility 0.35s;
    }

    header nav.nav-open {
        transform: translateX(0);
        opacity: 1;
        visibility: visible;
    }

    header nav ul {
        flex-direction: column;
        align-items: flex-start;
        gap: 18px;
    }

    header nav a {
        font-size: 1.05rem;
        display: flex;
        align-items: center;
        gap: 10px;
        width: 100%;
        padding: 8px 0;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }

    .projects-grid {
        grid-template-columns: 1fr;
    }
}