/* 1. VARIABLES ET RESET */
:root {
    --primary: #0a192f;
    --secondary: #ff8c00;
    --text: #ffffff;
    --light-bg: #f4f4f4;
    --header-height: 80px;
}

* { 
    margin: 0; 
    padding: 0; 
    box-sizing: border-box; 
    font-family: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif; 
}

html {
    scroll-behavior: smooth;
}

body { 
    background: var(--primary); 
    color: var(--text); 
    line-height: 1.6; 
    padding-top: var(--header-height); /* Évite que le contenu passe sous le header fixe */
}

/* 2. HEADER & NAVIGATION */
header { 
    height: var(--header-height);
    padding: 0 5%; 
    background: rgba(10, 25, 47, 0.95); 
    position: fixed; 
    top: 0; 
    width: 100%; 
    z-index: 1000;
    display: flex; 
    align-items: center;
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

nav { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    width: 100%; 
    max-width: 1200px;
    margin: 0 auto;
}

.logo { 
    font-size: 1.8rem; 
    font-weight: bold; 
    color: var(--secondary); 
}

nav ul { 
    display: flex; 
    list-style: none; 
    align-items: center;
}

nav ul li { margin-left: 25px; }

nav ul li a { 
    text-decoration: none; 
    color: white; 
    font-weight: 500;
    transition: 0.3s;
}

nav ul li a:hover { color: var(--secondary); }

.btn-nav { 
    background: var(--secondary); 
    padding: 10px 20px; 
    border-radius: 5px; 
    color: white !important;
}

/* 3. HERO SECTION */
#hero { 
    height: calc(100vh - var(--header-height)); 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    text-align: center;
    background: linear-gradient(rgba(10,25,47,0.7), rgba(10,25,47,0.7)), 
                url('https://images.unsplash.com/photo-1451187580459-43490279c0fa?auto=format&fit=crop&w=1350&q=80');
    background-size: cover; 
    background-position: center;
    padding: 0 20px;
}

h1 { 
    font-size: clamp(2rem, 5vw, 3.5rem); 
    margin-bottom: 20px; 
}

h1 span { color: var(--secondary); }

/* BOUTONS HERO (CORRECTION CHEVAUCHEMENT) */
.hero-btns { 
    margin-top: 35px; 
    display: flex; 
    gap: 20px; /* Espace constant entre les boutons */
    justify-content: center; 
    flex-wrap: wrap; /* Passage à la ligne auto sur petit écran */
}

.btn-primary, .btn-secondary { 
    padding: 15px 35px; 
    border-radius: 5px; 
    text-decoration: none;
    font-weight: bold;
    font-size: 1rem;
    transition: all 0.3s ease;
    min-width: 200px;
    display: inline-block;
}

.btn-primary { 
    background: var(--secondary); 
    color: white; 
    border: none;
}

.btn-secondary { 
    background: transparent; 
    color: white; 
    border: 2px solid white;
}

.btn-primary:hover { background: #e67e00; transform: translateY(-3px); }
.btn-secondary:hover { background: white; color: var(--primary); }

/* 4. STATS SECTION */
#stats { 
    background: white; 
    color: var(--primary); 
    padding: 60px 20px; 
    display: flex; 
    justify-content: space-around; 
    flex-wrap: wrap;
    gap: 30px;
    text-align: center; 
}

.stat-item h3 { 
    font-size: 2.8rem; 
    color: var(--secondary); 
    margin-bottom: 5px;
}

/* 5. SERVICES SECTION */
#services { 
    padding: 100px 5% 100px 5%; 
    text-align: center; 
    max-width: 1200px;
    margin: 0 auto;
}

.service-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); 
    gap: 30px; 
    margin-top: 50px; 
}

.card { 
    background: rgba(255,255,255,0.05); 
    padding: 40px; 
    border-radius: 15px; 
    border: 1px solid var(--secondary); 
    transition: 0.4s;
    opacity: 1; /* Mis à 1 par défaut pour éviter les soucis JS au début */
}

.card i {
    font-size: 2.5rem;
    color: var(--secondary);
    margin-bottom: 20px;
}

.card:hover { 
    transform: translateY(-10px); 
    background: rgba(255,255,255,0.1); 
}

/* 6. CONTACT SECTION */
#contact { 
    padding: 100px 20px; 
    background: var(--light-bg); 
    color: var(--primary); 
}

.contact-container {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

form { 
    display: flex; 
    flex-direction: column; 
    max-width: 600px; 
    margin: 40px auto 0 auto; 
}

input, textarea { 
    margin-bottom: 20px; 
    padding: 15px; 
    border: 1px solid #ccc; 
    border-radius: 5px; 
    font-size: 1rem;
}

/* 7. FOOTER */
footer { 
    text-align: center; 
    padding: 40px; 
    font-size: 0.9rem; 
    border-top: 1px solid rgba(255,255,255,0.1); 
}

/* 8. RESPONSIVE DESIGN */
@media (max-width: 768px) {
    header { padding: 0 20px; }
    nav ul { display: none; } /* On cache la nav simple sur mobile pour l'instant */
    
    .hero-btns {
        flex-direction: column;
        align-items: center;
    }
    
    .btn-primary, .btn-secondary {
        width: 100%;
        max-width: 320px;
    }
}
