/* Lamtioui Optique - Fichier de Style Principal - V2 (Design Amélioré) */

/* =================================================================== */
/* =================== 1. FONDATIONS & VARIABLES =================== */
/* =================================================================== */

/* --- Import des nouvelles polices depuis Google Fonts --- */
@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@600;700&family=Lato:wght@400;700&display=swap');
/* --- Nouvelle Palette de Couleurs --- */
:root {
    /* Couleurs de marque */
    --primary-blue: #2563eb;
    --dark-blue:  #1e40af;
    --accent-orange: #f97316;

    /* Palette de l'interface */
    --background-light: #f8f9fa; /* Fond principal doux */
    --background-white: #ffffff;
    --text-dark: #212529; /* Texte principal, plus doux que le noir pur */
    --text-muted: #6c757d; /* Texte secondaire */
    --border-color: #dee2e6; /* Couleur de bordure subtile */
    
    /* Variables de design */
    --border-radius: 12px;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.05);
    --shadow-md: 0 4px 8px rgba(0,0,0,0.07);
    --transition-fast: 0.2s ease-in-out;
}

/* --- Reset & Base --- */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Lato', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif; /* Nouvelle police pour le texte */
    line-height: 1.7;
    color: var(--text-dark);
    background-color: var(--background-light);
        padding-top: 120px; /* Compensation pour le header fixe */
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* =================================================================== */
/* =================== 2. HEADER & NAVIGATION ====================== */
/* =================================================================== */

.header {
    background: var(--background-white);
    color: var(--text-dark);
    padding: 1rem 0;
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    box-shadow: var(--shadow-md);
    border-bottom: 1px solid var(--border-color);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-family: 'Poppins', sans-serif; /* Nouvelle police pour le logo */
    font-size: 1.7rem;
    font-weight: 700;
    color: var(--primary-blue);
    text-decoration: none;
}

.contact-info {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-muted);
}

.nav {
    background: var(--primary-blue);
    padding: 0.5rem 0; /* Hauteur réduite */
    position: fixed;
    top: 77px; /* Ajusté à la nouvelle hauteur du header */
    width: 100%;
    z-index: 999;
    box-shadow: var(--shadow-sm);
}

.nav-list {
    display: flex;
    justify-content: center;
    list-style: none;
    gap: 1.5rem;
}

.nav-link {
    font-family: 'Poppins', sans-serif;
    color: #fff;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: var(--transition-fast);
}

.nav-link:hover, .nav-link.active {
    background: var(--dark-blue);
    transform: translateY(-2px);
}

/* =================================================================== */
/* =================== 3. MISE EN PAGE & SECTIONS ==================== */
/* =================================================================== */

.main-content {
    margin-top: 20px; /* Ajusté */    padding: 2rem 0;
}

.section {
    background: var(--background-white);
    margin: 2.5rem auto;
    max-width: 1200px;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-md);
    overflow: hidden;
}

.section-header {
    background: var(--primary-blue);
    color: #fff;
    text-align: center;
    padding: 2.5rem 2rem;
}

.section-title, .hero h1 {
    font-family: 'Poppins', sans-serif; /* Nouvelle police pour les titres */
    font-weight: 700;
    font-size: 2.8rem;
}

.section-subtitle {
    font-size: 1.2rem;
    opacity: 0.9;
    margin-top: 0.5rem;
}

.section-content {
    padding: 2.5rem;
}

/* =================================================================== */
/* =================== 4. COMPOSANTS (BOUTONS, CARTES) =============== */
/* =================================================================== */

/* --- Hero --- */
.hero {
    background: linear-gradient(135deg, var(--primary-blue), var(--dark-blue));
    color: #fff;
    text-align: center;
    padding: 5rem 2rem;
    border-radius: var(--border-radius);
}
.hero p { font-size: 1.2rem; margin: 1rem auto 2rem; max-width: 700px; }
.hero-buttons { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; }

/* --- Boutons --- */
.btn {
    font-family: 'Poppins', sans-serif;
    display: inline-block;
    padding: 0.9rem 2.2rem;
    font-size: 1rem;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    text-decoration: none;
    transition: var(--transition-fast);
    box-shadow: var(--shadow-sm);
}
.btn-primary { background: var(--accent-orange); color: #fff; }
.btn-secondary { background: var(--background-white); color: var(--primary-blue); border: 2px solid var(--primary-blue); }
.btn:hover { transform: translateY(-3px); box-shadow: 0 6px 12px rgba(0,0,0,0.1); }

/* --- Stats --- */
.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
}
.stat-item {
    text-align: center;
    padding: 2rem;
    background: var(--background-white);
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
}
.stat-number {
    font-family: 'Poppins', sans-serif;
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary-blue);
}
.stat-label { font-size: 1rem; color: var(--text-muted); margin-top: 0.5rem; }

/* --- Cartes de contenu --- */
.content-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 2rem; }
.content-card {
    background: var(--background-white);
    padding: 2rem;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    transition: var(--transition-fast);
}
.content-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); }
.content-card h3 {
    font-family: 'Poppins', sans-serif;
    color: var(--primary-blue);
    font-size: 1.4rem;
    margin-bottom: 1rem;
}
.content-card li { list-style: none; padding: 0.5rem 0; border-bottom: 1px solid #f1f3f5; }
.content-card li:before { content: "✓"; color: var(--primary-blue); font-weight: bold; margin-right: 0.75rem; }

/* =================================================================== */
/* =================== 5. FOOTER ===================================== */
/* =================================================================== */

.footer {
    background: var(--text-dark);
    color: #e9ecef;
    padding: 4rem 2rem;
    margin-top: 4rem;
}
.footer-content {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2.5rem;
    max-width: 1200px;
    margin: 0 auto;
    text-align: left;
}
.footer-section h4 {
    font-family: 'Poppins', sans-serif;
    color: #fff;
    margin-bottom: 1rem;
}
.footer-section p, .footer-section li { color: #adb5bd; }
.footer-section a { color: #ced4da; text-decoration: none; transition: var(--transition-fast); }
.footer-section a:hover { color: var(--accent-orange); }

/* =================================================================== */
/* =================== 6. RESPONSIVE MOBILE ========================== */
/* =================================================================== */

@media (max-width: 768px) {
    .container { padding: 0 1rem; }

    /* --- Header & Nav --- */
    .header { padding: 0.75rem 0; }
    .header-content { flex-direction: column; gap: 8px; }
    .logo { font-size: 1.5rem; }
    .contact-info { display: none; } /* On cache le contact pour simplifier le header mobile */
    .nav { top: 60px; padding: 0.5rem 0; }
    .nav-list { flex-direction: column; align-items: center; gap: 0.5rem; flex-wrap: nowrap; }
    .nav-link { width: 95%; text-align: center; }

    /* --- Contenu Principal --- */
    .main-content { margin-top: 120px; } /* Doit être ajusté en fonction de la hauteur du menu */    /* --- Sections & Titres --- */
    .section-title, .hero h1 { font-size: 2rem; }
    .hero-buttons { flex-direction: column; align-items: center; }
    .section-content { padding: 1.5rem; }
}


/* =================================================================== */
/* ==================== 7. MENU HAMBURGER ========================== */
/* =================================================================== */

/* Bouton hamburger - caché par défaut sur desktop */
.menu-toggle {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 30px;
    height: 25px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 0;
    z-index: 1001;
}

.menu-toggle span {
    width: 100%;
    height: 3px;
    background-color: var(--primary-blue);
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* Animation du bouton hamburger quand le menu est ouvert */
.menu-toggle.active span:nth-child(1) {
    transform: translateY(11px) rotate(45deg);
}

.menu-toggle.active span:nth-child(2) {
    opacity: 0;
}

.menu-toggle.active span:nth-child(3) {
    transform: translateY(-11px) rotate(-45deg);
}

/* Media queries pour mobile et tablettes */
@media (max-width: 992px) {
    /* Afficher le bouton hamburger */
    .menu-toggle {
        display: flex;
    }

    /* Cacher le menu de navigation par défaut */
    .nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: var(--bg-white);
        box-shadow: -2px 0 10px rgba(0,0,0,0.1);
        transition: right 0.3s ease;
        z-index: 1000;
        overflow-y: auto;
    }

    /* Afficher le menu quand il est actif */
    .nav.active {
        right: 0;
    }

    /* Repositionner le conteneur du menu */
    .nav .container {
        padding: 80px 20px 20px;
    }

    /* Liste de navigation en mode vertical */
    .nav-list {
        flex-direction: column;
        align-items: flex-start;
        gap: 0;
    }

    .nav-list li {
        width: 100%;
        border-bottom: 1px solid #e5e7eb;
    }

    .nav-link {
        display: block;
        padding: 15px 10px;
        width: 100%;
    }

    /* Overlay pour fermer le menu en cliquant en dehors */
    body.menu-open::before {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: rgba(0,0,0,0.5);
        z-index: 999;
    }

    /* Empêcher le scroll du body quand le menu est ouvert */
    body.menu-open {
        overflow: hidden;
    }
}

/* Responsive supplémentaire pour petits écrans */
@media (max-width: 576px) {
    .hero h1 {
        font-size: 2rem;
    }

    .hero p {
        font-size: 1rem;
    }

    .container {
        padding: 0 15px;
    }

    .section-title {
        font-size: 1.75rem;
    }
}

/* ================================================================== */
/* ============== 5. ACCESSIBILITÉ & AMÉLIORATIONS =============== */
/* ================================================================== */

/* Focus visible pour navigation clavier */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
.nav-link:focus-visible {
    outline: 2px solid var(--accent-orange);
    outline-offset: 2px;
    border-radius: 4px;
}

/* Respecter les préférences d'animation réduites */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* Amélioration du contraste des ombres */
@media (prefers-color-scheme: dark) {
    .stat-item,
    .content-card,
    .brand-card {
        box-shadow: 0 4px 8px rgba(255, 255, 255, 0.1);
    }
}