/* =========================================
   STYLE.CSS - GLOBAL (NAVBAR, FOOTER, FONTS)
   ========================================= */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600;700;800&display=swap');

html { scroll-behavior: smooth; }

/* --- 1. VARIABLES & RESET --- */
:root {
    --primary-blue: #006AA7;
    --primary-orange: #f36f2b;
    --dark-blue: #001e30;
    --text-grey: #4a4a4a;
    --light-bg: #EEF6FC;
    --white: #ffffff;
    --shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    --transition-smooth: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--light-bg);
    color: var(--text-grey);
    overflow-x: hidden;
}

/* --- 2. NAVIGATION (HEADER) --- */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 5%;
    height: 80px;
    background: rgba(255, 255, 255, 0.97);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 20px rgba(0, 0, 0, 0.07);
    transition: box-shadow 0.35s cubic-bezier(0.4, 0, 0.2, 1),
                background 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.logo-container img {
    height: 50px;
    display: block;
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.logo-container:hover img { transform: scale(1.07); }

/* Liens du menu Desktop */
.nav-links {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 30px;
}

.nav-links a {
    text-decoration: none;
    color: var(--primary-blue);
    font-weight: 600;
    font-size: 16px;
    position: relative;
    padding: 5px 0;
    transition: color 0.3s;
}

/* Animation soulignement */
.nav-links > li > a:not(.btn-contact)::before {
    content: '';
    position: absolute;
    width: 0;
    height: 3px;
    bottom: 0;
    right: 0;
    background: linear-gradient(90deg, var(--primary-blue), var(--primary-orange));
    transition: width 0.4s ease-in-out;
    border-radius: 2px;
}
.nav-links > li > a:not(.btn-contact):hover::before { width: 100%; left: 0; }
.nav-links a:hover { color: var(--primary-orange); }

/* --- MENU DÉROULANT (DROPDOWN) --- */
.dropdown { position: relative; padding-bottom: 10px; margin-bottom: -10px; }
.dropdown .arrow-icon { font-size: 0.8em; margin-left: 5px; transition: transform 0.3s; }
.dropdown:hover .arrow-icon { transform: rotate(180deg); }

.dropdown-menu {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%);
    background-color: white;
    min-width: 230px;
    box-shadow: 0 16px 40px rgba(0,0,0,0.12);
    border-radius: 10px;
    padding: 8px 0;
    list-style: none;
    z-index: 1001;
    border-top: 3px solid var(--primary-orange);
    animation: dropIn 0.25s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}
.dropdown:hover .dropdown-menu { display: block; }

.dropdown-menu li a {
    display: block;
    padding: 11px 20px;
    color: var(--text-grey);
    font-size: 14px;
    border-bottom: 1px solid #f5f5f5;
    transition: background 0.2s ease, color 0.2s ease, padding-left 0.2s ease;
}
.dropdown-menu li a:hover { background-color: #f0f8ff; color: var(--primary-orange); padding-left: 26px; }
.dropdown-menu li a::before { display: none; }
.dropdown-menu li:last-child a { border-bottom: none; }

@keyframes dropIn {
    from { opacity: 0; transform: translateX(-50%) translateY(-8px); }
    to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

/* Bouton Contact */
.btn-contact {
    background: linear-gradient(135deg, var(--primary-blue), #004d82);
    color: white !important;
    padding: 11px 28px !important;
    border-radius: 50px;
    box-shadow: 0 4px 15px rgba(0, 106, 167, 0.28);
    transition: var(--transition-smooth) !important;
    font-weight: 700 !important;
}
.btn-contact:hover {
    transform: translateY(-3px) !important;
    box-shadow: 0 10px 25px rgba(243, 111, 43, 0.38) !important;
    background: linear-gradient(135deg, var(--primary-orange), #d95e16) !important;
}
.btn-contact::before { display: none !important; }

/* Burger Menu (Caché sur Desktop) */
.burger { display: none; cursor: pointer; }
.burger div {
    width: 25px; height: 3px; background-color: var(--primary-blue);
    margin: 5px; transition: all 0.3s ease; border-radius: 2px;
}

/* --- 3. FOOTER --- */
footer {
    background-color: var(--dark-blue);
    color: #e0e0e0;
    margin-top: 80px;
    position: relative;
}
.footer-divider { height: 4px; background: linear-gradient(90deg, var(--primary-blue), var(--primary-orange), var(--primary-blue)); width: 100%; }

.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    padding: 70px 5%;
    max-width: 1200px;
    margin: 0 auto;
}

.footer-logo img { height: 60px; background: white; padding: 10px; border-radius: 8px; margin-bottom: 20px; }
.footer-desc { font-size: 14px; line-height: 1.6; color: #a0bacc; }

.footer-title {
    color: var(--white); font-size: 18px; margin-bottom: 25px; position: relative; padding-bottom: 10px; font-weight: 700; text-transform: uppercase;
}
.footer-title::after { content: ''; position: absolute; left: 0; bottom: 0; width: 50px; height: 3px; background-color: var(--primary-orange); }

.footer-services ul { list-style: none; }
.footer-services li { margin-bottom: 15px; }
.footer-services a { color: #cbd5e1; text-decoration: none; display: flex; align-items: center; gap: 10px; transition: 0.3s; }
.footer-services a:hover { color: var(--primary-orange); transform: translateX(5px); }

.contact-item { display: flex; align-items: center; gap: 15px; color: #cbd5e1; text-decoration: none; font-size: 15px; margin-bottom: 20px; transition: 0.3s; }
.icon-box { width: 35px; height: 35px; background: rgba(255,255,255,0.1); border-radius: 50%; display: flex; justify-content: center; align-items: center; color: var(--primary-orange); }
.contact-item:hover { color: white; }
.contact-item:hover .icon-box { background: var(--primary-orange); color: white; }

.footer-bottom { background-color: #001522; padding: 20px; text-align: center; font-size: 13px; border-top: 1px solid rgba(255,255,255,0.05); }


/* =========================================
   4. RESPONSIVE MOBILE (CORRECTIF FINAL)
   ========================================= */

@media screen and (max-width: 1024px) {
    
    body { overflow-x: hidden; }
    
    /* Classe pour bloquer le scroll quand menu ouvert */
    body.no-scroll { overflow: hidden; }

    .navbar {
        padding: 0 20px;
        justify-content: space-between;
    }

    /* BURGER VISIBLE */
    .burger {
        display: block !important; /* Force l'affichage */
        cursor: pointer;
        z-index: 2000; /* Au-dessus de tout */
    }

    /* MENU LATÉRAL (Caché par défaut) */
    .nav-links {
        position: fixed;
        right: 0;
        top: 0;
        height: 100vh;
        width: 100%; /* Prend tout l'écran */
        max-width: 100%;
        background-color: var(--white);
        
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 30px;
        
        /* Transition fluide */
        transform: translateX(100%); 
        transition: transform 0.4s ease-in-out;
        
        z-index: 1500;
        box-shadow: none;
        padding-top: 60px;
    }

    /* CLASSE ACTIVE (Quand on clique - LIÉE AU JS) */
    .nav-links.nav-mobile-active {
        transform: translateX(0%) !important; /* Force l'ouverture */
    }

    /* Liens (Texte plus gros) */
    .nav-links li {
        opacity: 1 !important; /* Force la visibilité */
        margin: 10px 0;
    }
    .nav-links a {
        font-size: 20px;
        display: block;
    }

    /* Dropdown Mobile (Toujours visible pour simplifier) */
    .dropdown { padding-bottom: 0; margin-bottom: 0; }
    .dropdown-menu {
        position: static;
        display: block; /* Toujours affiché sous "Pôles" sur mobile */
        width: 100%;
        box-shadow: none;
        border: none;
        background-color: #f9f9f9;
        text-align: center;
        transform: none;
        padding: 10px 0;
        margin-top: 10px;
    }
    
    .dropdown-menu li a { font-size: 16px; color: #666; }

    /* Footer Mobile */
    .footer-content { grid-template-columns: 1fr; text-align: center; }
    .footer-title::after { left: 50%; transform: translateX(-50%); }
    .footer-services a, .contact-item { justify-content: center; }
    .footer-logo { align-items: center; }

    /* ANIMATION DU BOUTON BURGER (Croix) */
    .toggle .line1 {
        transform: rotate(-45deg) translate(-5px, 6px);
        background-color: var(--primary-orange);
    }
    .toggle .line2 {
        opacity: 0;
    }
    .toggle .line3 {
        transform: rotate(45deg) translate(-5px, -6px);
        background-color: var(--primary-orange);
    }
}

/* =====================================================
   ✦ GLOBAL PREMIUM 3D POLISH — ALL PAGES
   ===================================================== */

/* Navbar scrolled elevation */
.navbar.scrolled {
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.12),
                0 0 0 1px rgba(0, 106, 167, 0.05);
}

/* Footer — animated gradient divider */
.footer-divider {
    background: linear-gradient(90deg, var(--primary-blue), var(--primary-orange), #ff8547, var(--primary-orange), var(--primary-blue));
    background-size: 300% 100%;
    animation: footerLine 6s linear infinite;
}
@keyframes footerLine {
    0%   { background-position: 0%   50%; }
    100% { background-position: 300% 50%; }
}

/* Footer links — 3D arrow transition */
.footer-services a {
    transform-origin: left center;
}
.footer-services a:hover {
    transform: translateX(6px);
    letter-spacing: 0.02em;
}

/* Contact icon box — premium glow */
.contact-item:hover .icon-box {
    box-shadow: 0 0 22px rgba(243, 111, 43, 0.45);
    transform: scale(1.12);
}
.icon-box {
    transition: background 0.25s ease, color 0.25s ease,
                transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1),
                box-shadow 0.3s ease;
}

/* Burger lines — spring transition */
.burger div {
    transition: all 0.38s cubic-bezier(0.34, 1.56, 0.64, 1);
}

/* Global selection color */
::selection {
    background: rgba(243, 111, 43, 0.2);
    color: #002b45;
}

/* Focus-visible ring — accessibility + style */
a:focus-visible, button:focus-visible {
    outline: 3px solid rgba(243, 111, 43, 0.6);
    outline-offset: 3px;
    border-radius: 4px;
}

/* Scrollbar styling */
::-webkit-scrollbar { width: 8px; }
::-webkit-scrollbar-track { background: #f1f5f9; }
::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--primary-blue), var(--primary-orange));
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, var(--primary-orange), var(--primary-blue));
}