/* ==========================================================================
   1. VARIABLES ET RÉINITIALISATION
   ========================================================================== */
:root {
    --primary: #B77E65;
    --accent: #843431;
    --bg-light: #F9F4F2;
    --text-dark: #1A1A1A;
    --white: #ffffff;
}

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

body { 
    font-family: 'Inter', sans-serif; 
    background: var(--white); 
    color: var(--text-dark); 
    overflow-x: hidden; 
}

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

/* ==========================================================================
   2. NAVIGATION (VERSION PC PAR DÉFAUT)
   ========================================================================== */
nav { 
    height: 90px; 
    display: flex; 
    align-items: center; 
    background: var(--white); 
    position: sticky; 
    top: 0; 
    z-index: 1000; 
    box-shadow: 0 2px 15px rgba(0,0,0,0.05); 
}

nav .container { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
    width: 100%; 
}

.nav-logo-link {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.nav-logo-img {
    height: 35px;
    width: auto;
    display: block;
}

.nav-links { 
    display: flex; 
    list-style: none; 
    gap: 25px; 
    align-items: center; 
}

.nav-links a { 
    text-decoration: none; 
    color: var(--text-dark); 
    font-weight: 600; 
    font-size: 15px; 
    transition: 0.3s;
}

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

.menu-toggle { 
    display: none; 
    font-size: 24px; 
    cursor: pointer; 
    color: var(--text-dark);
}

.btn-primary { 
    background: var(--accent); 
    color: white !important; 
    padding: 10px 22px; 
    border-radius: 10px; 
}

/* ==========================================================================
   3. HERO SECTION
   ========================================================================== */
.hero { background: var(--bg-light); padding: 100px 0; }
.hero-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: center; }
.hero-text h1 { font-size: 45px; font-weight: 900; line-height: 1.2; margin-bottom: 25px; }
.hero-text h1 span { color: var(--primary); }
.hero-btns { display: flex; gap: 15px; margin-top: 30px; }

.btn-main { background: var(--text-dark); color: white; padding: 15px 30px; text-decoration: none; border-radius: 12px; font-weight: bold; }
.btn-outline { border: 2px solid var(--text-dark); color: var(--text-dark); padding: 13px 30px; text-decoration: none; border-radius: 12px; font-weight: bold; }

.badge {
    display: inline-block;
    background: rgba(183, 126, 101, 0.1);
    color: var(--primary);
    padding: 8px 16px;
    border-radius: 50px;
    font-weight: bold;
    font-size: 14px;
    margin-bottom: 20px;
}

.hero-trust { margin-top: 40px; display: flex; align-items: center; gap: 15px; }
.avatars img { width: 35px; height: 35px; border-radius: 50%; border: 2px solid white; margin-right: -10px; }

.mockup-container { position: relative; width: 320px; height: 640px; margin: 0 auto; perspective: 1000px; }
.phone-frame { width: 100%; height: 100%; background: #1a1a1a; border: 12px solid #333; border-radius: 45px; overflow: hidden; box-shadow: 0 50px 100px rgba(0,0,0,0.2); transform: rotateY(-10deg) rotateX(5deg); animation: float-app 6s ease-in-out infinite; }
.app-screen { width: 100%; height: 100%; object-fit: cover; }

@keyframes float-app {
    0%, 100% { transform: rotateY(-10deg) rotateX(5deg) translateY(0); }
    50% { transform: rotateY(-5deg) rotateX(2deg) translateY(-20px); }
}

/* ==========================================================================
   4. SECTIONS CONTENU (STATS & CARDS)
   ========================================================================== */
.stats {
    background: var(--text-dark);
    color: #F2D0BD;
    padding: 60px 0;
    margin: -50px auto 0;
    position: relative;
    z-index: 10;
    border-radius: 20px;
    width: 90%;
}

.stats-grid { display: grid; grid-template-columns: repeat(4, 1fr); text-align: center; }
.stat-item h3 { font-size: 32px; color: #F2D0BD; }

.blog-preview { padding: 80px 0; background-color: #ffffff; }
#articles-container { display: flex; flex-wrap: wrap; gap: 25px; margin-top: 40px; }

.standard-card { flex: 1; min-width: 300px; background: #fff; border-radius: 20px; border: 1px solid #eee; overflow: hidden; transition: 0.3s; }
.standard-card:hover { transform: translateY(-10px); box-shadow: 0 20px 40px rgba(0,0,0,0.05); }
.card-image { width: 100%; height: 200px; overflow: hidden; }
.card-image img { width: 100%; height: 100%; object-fit: cover; }
.card-body { padding: 20px; }

/* ==========================================================================
   5. FOOTER
   ========================================================================== */
footer { background: #f4f4f4; padding: 80px 0 40px; margin-top: 80px; }
.footer-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 50px; }
.footer-links h4 { margin-bottom: 20px; font-weight: 900; }
.footer-links a { display: block; text-decoration: none; color: #666; margin-bottom: 10px; transition: 0.3s; }
.footer-links a:hover { color: var(--primary); }
.independence-note { font-size: 13px; margin-top: 15px; color: #aaa; }

.footer-newsletter h4 { margin-bottom: 20px; font-weight: 900; }
.footer-newsletter p { font-size: 14px; color: #666; margin-bottom: 15px; }
.footer-newsletter-form { display: flex; gap: 5px; }
.footer-newsletter-form input { flex: 1; padding: 12px 15px; border: 1px solid #ddd; border-radius: 8px; font-size: 14px; outline: none; }
.footer-newsletter-form button { background: var(--primary); color: white; border: none; padding: 0 15px; border-radius: 8px; cursor: pointer; transition: 0.3s; }

@media (min-width: 992px) {
    .footer-grid { grid-template-columns: 1.5fr 1fr 1fr 1.5fr; }
}

/* ==========================================================================
   6. RESPONSIVE DESIGN (CORRIGÉ & OPTIMISÉ)
   ========================================================================== */

@media (max-width: 992px) {
    .menu-toggle { 
        display: block !important; 
        z-index: 1001;
    }

    /* Le sélecteur 'nav .nav-links' est plus fort que '.nav-links' seul */
    nav .nav-links {
        display: none !important; 
        flex-direction: column;
        position: absolute;
        top: 90px;
        left: 0;
        width: 100%;
        background: var(--white);
        padding: 40px 20px;
        gap: 25px;
        box-shadow: 0 15px 30px rgba(0,0,0,0.1);
        z-index: 1000;
        text-align: center;
    }

    /* On force l'affichage quand .active est présent */
    nav .nav-links.active {
        display: flex !important;
    }

    /* On s'assure que les items à l'intérieur sont bien visibles */
    nav .nav-links.active li {
        width: 100%;
        display: block;
    }

    nav .nav-links.active a {
        font-size: 18px;
        display: block;
        padding: 10px 0;
    }

    .hero-grid { grid-template-columns: 1fr; text-align: center; }
    .hero-btns, .hero-trust { justify-content: center; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 30px; }
}

@media (max-width: 768px) {
    .hero-text h1 { font-size: 32px; }
    .stats-grid { grid-template-columns: 1fr; }
    .footer-grid { text-align: center; }
    .footer-newsletter-form { justify-content: center; }
    .nav-logo-link { margin-left: 0; }
}