/* =========================================
   HTP Compagnie - Styles Globaux (V2 Corrigée)
   ========================================= */

/* 1. RESET & BASE */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { 
    scroll-behavior: smooth; 
    scroll-padding-top: 85px; /* CORRIGE LES LIENS ANCRE (À propos / Contact) */
}
body {
    font-family: 'Poppins', sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    transition: background 0.4s, color 0.4s;
}

/* Suppression stricte des puces */
ul, ol, li { list-style: none !important; margin: 0; padding: 0; }
a { text-decoration: none !important; color: inherit; outline: none; }

/* 2. VARIABLES & THÈMES */
:root {
    --bg: #f8fafc; --bg2: #ffffff; --bg3: #f1f5f9;
    --text: #1e293b; --text2: #475569;
    --accent: #0ea5e9; --accent2: #06b6d4; --accent3: #10b981;
    --card: #ffffff;
    --shadow: 0 4px 20px rgba(0,0,0,0.08);
    --shadow-lg: 0 10px 40px rgba(0,0,0,0.12);
    --border: #e2e8f0;
    --nav-bg: rgba(255,255,255,0.95);
    --gradient: linear-gradient(135deg, #0ea5e9, #10b981);
}
body.dark-mode {
    --bg: #0f172a; --bg2: #1e293b; --bg3: #1e293b;
    --text: #f1f5f9; --text2: #94a3b8;
    --accent: #38bdf8; --accent2: #22d3ee; --accent3: #34d399;
    --card: #1e293b;
    --shadow: 0 4px 20px rgba(0,0,0,0.3);
    --shadow-lg: 0 10px 40px rgba(0,0,0,0.5);
    --border: #334155;
    --nav-bg: rgba(15,23,42,0.95);
    --gradient: linear-gradient(135deg, #38bdf8, #34d399);
}

/* 3. NAVIGATION */
nav {
    display: flex; justify-content: space-between; align-items: center;
    padding: 12px 5%; background: var(--nav-bg); backdrop-filter: blur(12px);    position: fixed; width: 100%; top: 0; z-index: 1000;
    box-shadow: var(--shadow); border-bottom: 1px solid var(--border);
    transition: all 0.4s;
}
.logo a {
    text-decoration: none; font-size: 1.5rem; font-weight: 800;
    background: var(--gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent;
}
.menu-left { display: flex; align-items: center; gap: 12px; }
.theme-btn, .lang-btn {
    background: var(--bg3); border: 1px solid var(--border);
    padding: 6px 12px; border-radius: 20px; cursor: pointer;
    font-size: 0.85rem; color: var(--text); transition: all 0.3s;
    display: flex; align-items: center; gap: 5px;
}
.theme-btn:hover, .lang-btn:hover { border-color: var(--accent); transform: translateY(-1px); }
.menu-toggle { display: none; flex-direction: column; cursor: pointer; gap: 4px; z-index: 1002; }
.menu-toggle .bar { width: 24px; height: 2.5px; background: var(--accent); border-radius: 2px; transition: all 0.3s; }

.nav-links { display: flex; gap: 1.2rem; align-items: center; }
.nav-links a {
    color: var(--text2); font-weight: 500; font-size: 0.9rem;
    transition: color 0.3s; white-space: nowrap; position: relative;
}
.nav-links a:hover, .nav-links a.active { color: var(--accent); }

.btn-portfolio {
    border: 1px solid var(--accent); padding: 5px 12px !important;
    border-radius: 15px; color: var(--accent) !important; font-size: 0.85rem !important;
    transition: all 0.3s;
}
.btn-portfolio:hover { background: var(--accent); color: white !important; }

/* ===== DROPDOWN DESKTOP ===== */
.dropdown { position: relative; cursor: pointer; }
.dropdown-trigger {
    display: flex; align-items: center; gap: 5px;
    color: var(--text2); font-weight: 500; font-size: 0.9rem;
    transition: color 0.3s; user-select: none;
}
.dropdown-trigger:hover, .dropdown-trigger.active { color: var(--accent); }
.dropdown-trigger i { font-size: 0.75rem; transition: transform 0.3s; }
.dropdown-trigger i.rotated { transform: rotate(180deg); }

.dropdown-menu {
    display: none; position: absolute; top: 100%; left: 0;
    background: var(--card); border: 1px solid var(--border);
    border-radius: 12px; box-shadow: var(--shadow-lg);
    min-width: 200px; z-index: 1001; padding: 8px 0;
    opacity: 0; visibility: hidden; transform: translateY(10px);    transition: all 0.3s ease;
}
.dropdown-menu.active {
    display: block; opacity: 1; visibility: visible; transform: translateY(0);
}
.dropdown-menu a {
    display: block; padding: 10px 20px; color: var(--text2); font-size: 0.9rem;
    transition: all 0.2s;
}
.dropdown-menu a:hover, .dropdown-menu a.active {
    color: var(--accent); background: var(--bg3); padding-left: 24px;
}

/* 4. MENU MOBILE & DROPDOWN CORRIGÉ */
@media (max-width: 1024px) { .menu-left .lang-btn span { display: none; } }

@media (max-width: 868px) {
    .menu-toggle { display: flex; }
    .menu-left { gap: 10px; }
    
    .nav-links {
        position: fixed; top: 60px; left: -100%;
        flex-direction: column; background: var(--bg2);
        width: 100%; height: calc(100vh - 60px);
        padding: 20px 0; gap: 0;
        transition: left 0.4s ease;
        overflow-y: auto; z-index: 999;
        box-shadow: var(--shadow-lg);
    }
    .nav-links.active { left: 0; }
    
    .nav-links li { width: 100%; border-bottom: 1px solid var(--border); }
    .nav-links > li > a { display: block; padding: 16px 24px; font-size: 1rem; }

    /* DROPDOWN MOBILE : DÉCALÉ, SANS LIGNE, ANIMATION CASCADE */
    .dropdown { width: 100%; }
    .dropdown-trigger {
        width: 100%; padding: 16px 24px;
        justify-content: space-between; align-items: center;
        cursor: pointer; border-bottom: 1px solid var(--border);
        font-weight: 600; font-size: 1rem;
    }
    
    .dropdown-menu {
        position: static; opacity: 1; visibility: visible;
        transform: none; box-shadow: none; border: none;
        border-radius: 0; min-width: auto; padding: 0;
        
        /* Décalage visuel sans ligne bleue */
        background: var(--bg3);        margin-left: 25px; 
        padding-left: 15px;
        
        /* Ouverture fluide */
        display: none;
        max-height: 0; overflow: hidden;
        transition: max-height 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    }
    
    .dropdown-menu.active {
        display: block;
        max-height: 600px;
    }
    
    /* Animation séquentielle (cascade) */
    .dropdown-menu.active a {
        display: block;
        opacity: 0;
        transform: translateX(-10px);
        animation: slideIn 0.4s ease forwards;
    }
    .dropdown-menu.active a:nth-child(1) { animation-delay: 0.05s; }
    .dropdown-menu.active a:nth-child(2) { animation-delay: 0.10s; }
    .dropdown-menu.active a:nth-child(3) { animation-delay: 0.15s; }
    .dropdown-menu.active a:nth-child(4) { animation-delay: 0.20s; }
    .dropdown-menu.active a:nth-child(5) { animation-delay: 0.25s; }
    .dropdown-menu.active a:nth-child(6) { animation-delay: 0.30s; }
    
    @keyframes slideIn {
        to { opacity: 1; transform: translateX(0); }
    }
    
    .dropdown-menu a {
        padding: 14px 0; color: var(--text2); font-size: 0.95rem;
        border-bottom: 1px solid rgba(226, 232, 240, 0.5);
        transition: padding-left 0.3s, color 0.3s;
    }
    .dropdown-menu a:last-child { border-bottom: none; }
    .dropdown-menu a:hover { color: var(--accent); padding-left: 8px; }

    /* Animation Burger */
    .menu-toggle.active .bar:nth-child(1) { transform: rotate(45deg) translate(5px, 4px); }
    .menu-toggle.active .bar:nth-child(2) { opacity: 0; }
    .menu-toggle.active .bar:nth-child(3) { transform: rotate(-45deg) translate(5px, -4px); }
}

/* 5. HERO SECTIONS */
.hero, .hero-reseau, .hero-s, .hero-solaire, .hero-voip, .hero-webmobile {
    min-height: 80vh; height: auto;
    background: linear-gradient(rgba(0,0,0,0.6), rgba(0,0,0,0.6)), url('../images/background.png');    background-size: cover; background-position: center; background-repeat: no-repeat;
    display: flex; flex-direction: column; justify-content: center; align-items: center;
    color: white; text-align: center; padding: 120px 5% 60px; position: relative;
}
.hero-reseau { background-image: linear-gradient(rgba(0,0,0,0.6), rgba(0,0,0,0.6)), url('../images/background-reseau.png'); }
.hero-s { background-image: linear-gradient(rgba(0,0,0,0.6), rgba(0,0,0,0.6)), url('../images/background-videosurveillancee.png'); }
.hero-solaire { background-image: linear-gradient(rgba(0,0,0,0.6), rgba(0,0,0,0.6)), url('../images/background-solaire.png'); }
.hero-voip { background-image: linear-gradient(rgba(0,0,0,0.6), rgba(0,0,0,0.6)), url('../images/background-voip.png'); }
.hero-webmobile { background-image: linear-gradient(rgba(0,0,0,0.6), rgba(0,0,0,0.6)), url('../images/background-web.png'); }

.hero-content { max-width: 850px; position: relative; z-index: 2; }
.hero h1, .hero-reseau h1, .hero-s h1, .hero-solaire h1, .hero-voip h1, .hero-webmobile h1 {
    font-size: 2.8rem; font-weight: 800; margin-bottom: 18px;
    background: var(--gradient); -webkit-background-clip: text; -webkit-text-fill-color: transparent;
    text-shadow: 0 2px 10px rgba(0,0,0,0.3); line-height: 1.2;
    display: flex; align-items: center; justify-content: center; gap: 12px; flex-wrap: wrap;
}
.hero p, .hero-reseau p, .hero-s p, .hero-solaire p, .hero-voip p, .hero-webmobile p {
    font-size: 1.15rem; color: rgba(255,255,255,0.9); margin: 0 auto 35px;
    max-width: 650px; text-shadow: 0 1px 5px rgba(0,0,0,0.5);
}
.cta-group { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.cta {
    padding: 13px 28px; background: var(--gradient); color: white; border-radius: 25px;
    font-weight: 600; display: inline-flex; align-items: center; gap: 8px;
    transition: transform 0.3s, box-shadow 0.3s; box-shadow: 0 8px 25px rgba(14,165,233,0.3);
}
.cta:hover { transform: translateY(-2px); box-shadow: 0 12px 30px rgba(14,165,233,0.4); }
.cta.secondary {
    background: rgba(255,255,255,0.15); backdrop-filter: blur(5px); color: white;
    border: 2px solid rgba(255,255,255,0.3); box-shadow: none;
}
.cta.secondary:hover { background: rgba(255,255,255,0.25); border-color: white; transform: translateY(-2px); }

/* 6. STATS & LOGO */
.stats {
    display: flex; justify-content: center; gap: 35px; padding: 45px 5%;
    background: var(--bg2); flex-wrap: wrap; border-top: 1px solid var(--border); border-bottom: 1px solid var(--border);
}
.stat-item { text-align: center; }
.stat-item h3 { font-size: 2rem; font-weight: 800; color: var(--accent); margin-bottom: 4px; }
.stat-item p { font-size: 0.85rem; color: var(--text2); text-transform: uppercase; letter-spacing: 1px; }

.logo-section { display: flex; justify-content: center; align-items: center; padding: 50px 0 20px; animation: fadeUp 1s ease forwards; }
.logo-circle {
    width: 130px; height: 130px; border-radius: 50%; border: 2px solid red;
    display: flex; justify-content: center; align-items: center; background: var(--card);
    overflow: hidden; box-shadow: 0 0 20px rgba(255,0,0,0.4);
    animation: glowPulse 2s infinite alternate; transition: 0.4s;
}.logo-circle:hover { transform: scale(1.08); box-shadow: 0 0 35px rgba(255,0,0,0.6); }
.logo-circle img { width: 100%; height: 100%; object-fit: cover; }

@keyframes glowPulse { from{box-shadow:0 0 10px rgba(255,0,0,0.3);} to{box-shadow:0 0 30px rgba(255,0,0,0.8);} }
@keyframes fadeUp { from{opacity:0;transform:translateY(40px);} to{opacity:1;transform:translateY(0);} }

/* 7. SECTIONS & GRIDS */
section { padding: 70px 5%; }
.section-title { text-align: center; margin-bottom: 45px; }
.section-title h2 { font-size: 2.1rem; font-weight: 700; margin-bottom: 8px; }
.section-title h2 span { color: var(--accent); }
.section-title p { color: var(--text2); max-width: 550px; margin: 0 auto; font-size: 1rem; }

.content { max-width: 900px; margin: 0 auto; }
.content h2 { font-size: 1.8rem; font-weight: 700; margin-bottom: 20px; padding-bottom: 10px; border-bottom: 2px solid var(--accent); color: var(--accent); }
.content p { font-size: 1rem; color: var(--text2); margin-bottom: 12px; line-height: 1.8; }
.hl { color: var(--text); font-weight: 600; }
.about-text { max-width: 800px; margin: 0 auto; color: var(--text2); font-size: 1.05rem; line-height: 1.8; text-align: center; }

.services-grid, .why-grid, .features, .gallery, .tech-grid {
    display: grid; gap: 20px; max-width: 1200px; margin: 0 auto;
}
.services-grid { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.why-grid, .features { grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); max-width: 1100px; }
.gallery { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); margin: 35px 0; }
.tech-grid { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); max-width: 900px; }

/* CARTES */
.service-card, .why-box, .f-box, .g-item, .tech-item {
    background: var(--card); border-radius: 12px; padding: 28px;
    border: 1px solid var(--border); transition: all 0.3s; box-shadow: var(--shadow);
}
.service-card:hover, .why-box:hover, .f-box:hover, .g-item:hover, .tech-item:hover {
    transform: translateY(-5px); border-color: var(--accent); box-shadow: 0 12px 30px rgba(14,165,233,0.15);
}
.service-card i, .why-box i, .f-box i, .tech-item i { font-size: 2.5rem; color: var(--accent); margin-bottom: 12px; transition: transform 0.3s; }
.service-card:hover i, .why-box:hover i, .f-box:hover i, .tech-item:hover i { transform: scale(1.1); }
.service-card h3, .f-box h3, .why-box p, .tech-item span { font-size: 1.1rem; margin-bottom: 8px; color: var(--text); font-weight: 600; }
.service-card .short-desc, .f-box p { font-size: 0.92rem; color: var(--text2); line-height: 1.5; }

.g-item { padding: 0; overflow: hidden; }
.g-item img { width: 100%; height: 180px; object-fit: cover; transition: transform 0.4s; }
.g-item:hover img { transform: scale(1.05); }
.g-item .cap { padding: 15px; }
.g-item .cap h3 { color: var(--accent); margin-bottom: 5px; font-size: 1.05rem; }
.g-item .cap p { color: var(--text2); font-size: 0.88rem; margin: 0; }

.tech-stack { display: flex; flex-wrap: wrap; gap: 10px; justify-content: center; margin: 25px 0; }
.t-badge {
    background: var(--bg3); padding: 7px 16px; border-radius: 18px;    border: 1px solid var(--border); color: var(--accent); font-weight: 600;
    font-size: 0.85rem; transition: all 0.3s;
}
.t-badge:hover { transform: translateY(-2px); border-color: var(--accent); box-shadow: 0 4px 12px rgba(14,165,233,0.2); }

/* 8. CONTACT & FOOTER */
.video-section { text-align: center; background: var(--bg2); }
.video-wrapper { max-width: 850px; margin: 0 auto; border-radius: 12px; overflow: hidden; box-shadow: var(--shadow); border: 1px solid var(--border); }
.video-wrapper video { width: 100%; display: block; }

.contact-info { text-align: center; margin-bottom: 25px; padding: 22px; background: var(--bg3); border-radius: 10px; border: 1px solid var(--border); }
.contact-info p { margin: 8px 0; color: var(--text); display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 0.95rem; flex-wrap: wrap; }
.contact-info i { color: var(--accent); }
.contact-info a { color: var(--accent); font-weight: 500; }

.contact-actions { display: flex; gap: 10px; justify-content: center; flex-wrap: wrap; }
.btn-contact { padding: 11px 22px; border-radius: 20px; font-weight: 600; display: inline-flex; align-items: center; gap: 7px; transition: transform 0.3s; font-size: 0.9rem; }
.btn-contact:hover { transform: translateY(-2px); }
.btn-whatsapp { background: #25d366; color: #fff; }
.btn-email { background: var(--accent); color: #fff; }

.cta-sec { background: var(--bg3); text-align: center; padding: 50px 5%; border-radius: 15px; margin: 40px auto; max-width: 1200px; border: 1px solid var(--border); }
.cta-sec h2 { font-size: 2rem; margin-bottom: 15px; }
.cta-sec p { color: var(--text2); margin: 10px 0 20px; }
.cta-btn {
    padding: 13px 32px; background: var(--gradient); color: #fff; border-radius: 25px;
    font-weight: 700; display: inline-flex; align-items: center; gap: 8px;
    transition: transform 0.3s; box-shadow: 0 8px 20px rgba(14,165,233,0.3);
}
.cta-btn:hover { transform: translateY(-2px); box-shadow: 0 12px 30px rgba(14,165,233,0.4); }

footer { background: var(--gradient); color: #fff; text-align: center; padding: 40px 5%; }
footer a { color: #fff; font-weight: 600; }

.whatsapp-float {
    position: fixed; bottom: 22px; right: 22px; background: #25d366; color: #fff;
    width: 52px; height: 52px; border-radius: 50%; display: flex;
    align-items: center; justify-content: center; font-size: 1.6rem;
    box-shadow: 0 4px 15px rgba(37,211,102,0.4); z-index: 999; transition: transform 0.3s;
}
.whatsapp-float:hover { transform: scale(1.1); box-shadow: 0 6px 20px rgba(37,211,102,0.6); }

@media (max-width: 768px) {
    .hero h1, .hero-reseau h1, .hero-s h1, .hero-solaire h1, .hero-voip h1, .hero-webmobile h1 { font-size: 2rem; }
    .hero p, .hero-reseau p, .hero-s p, .hero-solaire p, .hero-voip p, .hero-webmobile p { font-size: 1rem; }
    nav { padding: 10px 4%; } section { padding: 50px 4%; } .logo-circle { width: 110px; height: 110px; }
}