/* ============================================================
   DLN HI-TECH - STYLES GLOBAUX (Complet & Optimisé)
   ============================================================ */

/* --- 1. VARIABLES & RESET --- */
:root {
    --primary: #0a66c2;
    --primary-dark: #084a8c;
    --accent: #0be290;
    --dark: #0a1929;
    --dark-light: #132f4c;
    --text: #334155;
    --text-light: #64748b;
    --bg: #f8fafc;
    --white: #ffffff;
    --shadow: 0 4px 20px rgba(0,0,0,0.08);
    --radius: 12px;
}

* { 
    margin: 0; 
    padding: 0; 
    box-sizing: border-box; 
    font-family: 'Inter', sans-serif; 
}

body { 
    background: var(--bg); 
    color: var(--text); 
    line-height: 1.6; 
    display: flex; 
    flex-direction: column; 
    min-height: 100vh; 
    overflow-x: hidden;
}

main { flex: 1; }
.container { width: 100%; max-width: 1200px; margin: 0 auto; padding: 0 20px; }
a { text-decoration: none; color: inherit; }
img { max-width: 100%; height: auto; }
.text-center { text-align: center; }
.mt-4 { margin-top: 40px; }
.bg-light { background: var(--bg); }

/* --- 2. HEADER & NAVIGATION --- */
.header { 
    background: var(--dark); 
    padding: 15px 0; 
    position: sticky; 
    top: 0; 
    z-index: 1000; 
    box-shadow: 0 2px 10px rgba(0,0,0,0.2); 
}

.nav-container { 
    display: flex; 
    justify-content: space-between; 
    align-items: center; 
}

.logo-img { 
    max-height: 100px; 
    width: auto; 
    display: block; 
}

.nav { 
    display: flex; 
    align-items: center; 
    gap: 25px; 
}

.nav a { 
    color: var(--white); 
    font-weight: 500; 
    font-size: 0.95rem; 
    transition: color 0.3s; 
}

.nav a:hover, .nav a.active { 
    color: var(--accent); 
}

.btn-nav { 
    background: var(--primary); 
    padding: 10px 20px; 
    border-radius: 8px; 
    font-weight: 600; 
    color: var(--white) !important; 
}

.btn-nav:hover { 
    background: var(--primary-dark); 
}

.admin-link { 
    opacity: 0.6; 
    font-size: 1rem; 
    margin-left: 10px; 
    color: #0c0e0f !important; 
}

.admin-link:hover { 
    opacity: 1; 
    color: var(--accent) !important; 
}

.menu-toggle { 
    display: none; 
    background: none; 
    border: none; 
    color: var(--white); 
    font-size: 1.5rem; 
    cursor: pointer; 
}

/* --- 3. BOUTONS --- */
.btn-primary, .btn-secondary, .btn-outline-primary, .btn-white { 
    display: inline-flex; 
    align-items: center; 
    justify-content: center; 
    gap: 8px; 
    padding: 15px 30px; 
    border-radius: 8px; 
    font-weight: 600; 
    transition: transform 0.2s, background 0.2s; 
    border: none; 
    cursor: pointer; 
}

.btn-primary { background: var(--primary); color: var(--white); }
.btn-primary:hover { background: var(--primary-dark); transform: translateY(-3px); }

.btn-secondary { background: transparent; border: 2px solid var(--white); color: var(--white); }
.btn-secondary:hover { transform: translateY(-3px); }

.btn-outline-primary { background: var(--white); color: var(--primary); border: 1px solid var(--primary); }
.btn-outline-primary:hover { background: var(--primary); color: var(--white); }

.btn-white { background: var(--white); color: var(--primary); }
.btn-white:hover { background: var(--bg); transform: translateY(-3px); }

/* --- 4. SECTIONS GLOBALES (Hero, Titres) --- */
.hero { 
    background: linear-gradient(135deg, var(--dark), var(--dark-light)); 
    padding: 80px 0; 
    text-align: center; 
    color: var(--white); 
}

.hero h1 { font-size: 2.8rem; margin-bottom: 20px; line-height: 1.2; }
.hero h1 span { color: var(--accent); }
.hero p { font-size: 1.1rem; max-width: 700px; margin: 0 auto 30px; color: #cbd5e1; }
.hero-buttons { display: flex; gap: 15px; justify-content: center; flex-wrap: wrap; }
.hero-trust { margin-top: 40px; display: flex; justify-content: center; gap: 30px; font-size: 0.9rem; color: #cbd5e1; flex-wrap: wrap; }
.hero-trust i { color: var(--accent); margin-right: 5px; }

.section-header { text-align: center; margin-bottom: 50px; }
.section-tag { display: inline-block; background: rgba(10,102,194,0.1); color: var(--primary); padding: 5px 15px; border-radius: 50px; font-weight: 600; font-size: 0.85rem; margin-bottom: 10px; text-transform: uppercase; }
.section-title { font-size: 2.2rem; color: var(--dark); margin-bottom: 10px; }

/* --- 5. SERVICES --- */
.services-section { padding: 80px 0; background: var(--white); }
.services-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 30px; }
.service-card { background: var(--bg); padding: 30px; border-radius: var(--radius); border: 1px solid #e2e8f0; transition: 0.3s; }
.service-card:hover { transform: translateY(-5px); box-shadow: var(--shadow); border-color: var(--primary); }
.service-icon { width: 60px; height: 60px; background: rgba(10,102,194,0.1); color: var(--primary); display: flex; align-items: center; justify-content: center; border-radius: 12px; font-size: 1.8rem; margin-bottom: 20px; }
.center-icon { margin: 0 auto 20px; }
.service-card h3 { color: var(--dark); margin-bottom: 15px; font-size: 1.2rem; }
.service-card p { color: var(--text-light); font-size: 0.95rem; }

/* --- 6. TÉMOIGNAGES --- */
.testimonials-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(400px, 1fr)); gap: 30px; }
.testimonial-card { background: var(--white); padding: 30px; border-radius: var(--radius); border-left: 4px solid var(--primary); box-shadow: var(--shadow); }
.stars { color: #fbbf24; margin-bottom: 15px; }
.quote { font-style: italic; margin-bottom: 20px; }
.author strong { color: var(--dark); }
.author small { color: var(--text-light); }

/* --- 7. CTA FINAL --- */
.cta-section { background: linear-gradient(135deg, var(--primary), var(--primary-dark)); padding: 60px 0; text-align: center; color: var(--white); }
.cta-section h2 { font-size: 2rem; margin-bottom: 15px; }
.cta-section p { margin-bottom: 30px; font-size: 1.1rem; }

/* --- 8. PAGE CONTACT --- */
.contact-section { padding: 80px 0; }
.contact-grid { display: grid; grid-template-columns: 1fr 2fr; gap: 40px; align-items: start; }

.contact-info-box { background: var(--white); padding: 30px; border-radius: var(--radius); box-shadow: var(--shadow); }
.contact-info-box h3 { margin-bottom: 20px; color: var(--dark); }
.contact-info-item { display: flex; gap: 15px; margin-bottom: 20px; align-items: center; }
.contact-icon { width: 40px; height: 40px; background: rgba(10,102,194,0.1); color: var(--primary); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 1.2rem; flex-shrink: 0; }

.form-wrapper { background: var(--white); padding: 40px; border-radius: var(--radius); box-shadow: var(--shadow); }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.form-group { margin-bottom: 20px; }
.form-group label { display: block; font-weight: 600; margin-bottom: 8px; color: var(--dark); font-size: 0.9rem; }
.form-control { width: 100%; padding: 12px 15px; border: 1px solid #cbd5e1; border-radius: 8px; font-family: inherit; font-size: 1rem; transition: 0.3s; }
.form-control:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(10,102,194,0.1); }
textarea.form-control { resize: vertical; min-height: 120px; }

.btn-submit { background: var(--primary); color: var(--white); border: none; padding: 15px; border-radius: 8px; font-size: 1rem; font-weight: 600; cursor: pointer; width: 100%; display: flex; justify-content: center; align-items: center; gap: 10px; transition: 0.3s; }
.btn-submit:hover { background: var(--primary-dark); }
.form-message { margin-top: 15px; text-align: center; font-weight: 600; }
.form-note { text-align: center; font-size: 0.85rem; color: var(--text-light); margin-top: 15px; }
.form-note i { color: #10b981; }

/* --- 9. PAGE À PROPOS --- */
.about-grid { display: grid; grid-template-columns: 1fr 1.5fr; gap: 50px; align-items: center; }
.about-image-wrapper { position: relative; max-width: 400px; margin: 0 auto; }
.about-img { width: 100%; border-radius: var(--radius); box-shadow: var(--shadow); object-fit: cover; aspect-ratio: 4/5; border: 4px solid var(--white); }
.about-badge { position: absolute; bottom: 20px; right: -20px; background: var(--white); padding: 15px 20px; border-radius: var(--radius); box-shadow: var(--shadow); display: flex; align-items: center; gap: 15px; }
.about-badge i { font-size: 1.8rem; color: var(--primary); }
.about-badge strong { display: block; color: var(--dark); font-size: 0.95rem; }
.about-badge span { font-size: 0.8rem; color: var(--text-light); }

.about-lead { font-size: 1.2rem; font-weight: 600; color: var(--primary); margin-bottom: 20px; }
.about-content p { margin-bottom: 15px; color: var(--text); line-height: 1.7; }
.about-values { display: grid; grid-template-columns: 1fr 1fr; gap: 15px; margin: 30px 0; }
.value-item { display: flex; align-items: center; gap: 10px; font-weight: 500; color: var(--dark); }
.value-item i { color: #10b981; }
.about-actions { display: flex; gap: 15px; flex-wrap: wrap; }

/* --- 10. BLOG & GRILLE D'ARTICLES --- */
.blog-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr); /* 2 colonnes sur PC */
    gap: 40px;
    margin-top: 40px;
}

.blog-card {
    background: var(--white);
    border-radius: var(--radius);
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    border: 1px solid #e2e8f0;
}

.blog-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow);
    border-color: var(--primary);
}

.blog-img-wrapper {
    width: 100%;
    height: 220px;
    overflow: hidden;
}

.blog-img-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.blog-card:hover .blog-img-wrapper img {
    transform: scale(1.05);
}

.blog-content {
    padding: 25px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.blog-date {
    font-size: 0.85rem;
    color: var(--text-light);
    margin-bottom: 10px;
    display: block;
}

.blog-content h2 {
    font-size: 1.3rem;
    color: var(--dark);
    margin-bottom: 15px;
    line-height: 1.3;
}

.blog-content .excerpt {
    color: var(--text-light);
    font-size: 0.95rem;
    margin-bottom: 20px;
    line-height: 1.6;
}

.blog-content .btn-primary {
    margin-top: auto;
    align-self: flex-start;
}

/* --- 11. FOOTER & LOGO HORIZONTAL --- */
.footer { background: var(--dark); color: #94a3b8; padding: 60px 0 20px; border-top: 4px solid var(--primary); margin-top: auto; }
.footer-content { display: grid; grid-template-columns: 2fr 1fr 1fr 1.5fr; gap: 40px; margin-bottom: 40px; }

.footer-logo { display: block; margin-bottom: 20px; text-decoration: none; }

.footer-logo-img {
    height: 100px;
    width: auto; 
    max-width: 100%;
    object-fit: contain;
}

.footer-col p { line-height: 1.8; font-size: 0.95rem; margin-bottom: 20px; }
.footer-col h3 { color: var(--white); font-size: 1.1rem; margin-bottom: 20px; position: relative; display: inline-block; }
.footer-col h3::after { content: ''; position: absolute; left: 0; bottom: -8px; width: 40px; height: 2px; background-color: var(--accent); }
.footer-links { list-style: none; }
.footer-links li { margin-bottom: 10px; }
.footer-links a { color: #94a3b8; transition: 0.3s; }
.footer-links a:hover { color: var(--accent); padding-left: 5px; }
.contact-links li { display: flex; align-items: center; gap: 10px; }
.contact-links i { color: var(--accent); }
.social-links { display: flex; gap: 15px; }
.social-links a { display: flex; align-items: center; justify-content: center; width: 40px; height: 40px; background: rgba(255,255,255,0.05); color: var(--white); border-radius: 50%; transition: 0.3s; }
.social-links a:hover { background: var(--primary); transform: translateY(-3px); }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); padding-top: 20px; font-size: 0.85rem; display: flex; justify-content: space-between; }

/* --- 12. BOUTONS FLOTTANTS (WhatsApp & Retour en haut) --- */
.whatsapp-float { position: fixed; width: 60px; height: 60px; bottom: 30px; right: 30px; background: #25d366; color: #FFF; border-radius: 50px; font-size: 32px; box-shadow: 0 4px 15px rgba(37,211,102,0.4); z-index: 1000; display: flex; align-items: center; justify-content: center; animation: pulse 2s infinite; transition: 0.3s; }
.whatsapp-float:hover { background: #128c7e; transform: scale(1.1); }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(37,211,102,0.7); } 70% { box-shadow: 0 0 0 15px rgba(37,211,102,0); } 100% { box-shadow: 0 0 0 0 rgba(37,211,102,0); } }

.scroll-top { position: fixed; bottom: 100px; right: 30px; width: 45px; height: 45px; background: var(--primary); color: white; border: none; border-radius: 50%; font-size: 1.2rem; cursor: pointer; z-index: 999; opacity: 0; visibility: hidden; transition: all 0.3s ease; box-shadow: 0 4px 10px rgba(0,0,0,0.2); }
.scroll-top.show { opacity: 1; visibility: visible; }
.scroll-top:hover { background: var(--primary-dark); transform: translateY(-3px); }

/* --- 13. BANNIÈRE COOKIES --- */
.cookie-banner { position: fixed; bottom: 0; left: 0; width: 100%; background: var(--dark); color: white; padding: 15px 20px; z-index: 9999; display: none; box-shadow: 0 -4px 10px rgba(0,0,0,0.1); }
.cookie-content { max-width: 1200px; margin: 0 auto; display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; }
.cookie-content p { font-size: 0.9rem; margin: 0; }
.cookie-content a { color: var(--accent); text-decoration: underline; }
.btn-cookie { background: var(--primary); color: white; border: none; padding: 10px 20px; border-radius: 5px; cursor: pointer; font-weight: 600; transition: 0.3s; }
.btn-cookie:hover { background: var(--primary-dark); }

/* ============================================================
   14. RESPONSIVE DESIGN (MOBILES & TABLETTES)
   ============================================================ */
@media (max-width: 992px) {
    .contact-grid { grid-template-columns: 1fr; }
    .footer-content { grid-template-columns: 1fr 1fr; }
    .about-grid { grid-template-columns: 1fr; text-align: center; }
    .about-values { justify-content: center; }
    .about-actions { justify-content: center; }
    .about-badge { right: 10px; }
}

@media (max-width: 900px) {
    /* Blog sur tablette et mobile */
    .blog-grid {
        grid-template-columns: 1fr; 
        gap: 30px;
    }
    .blog-img-wrapper {
        height: 250px; 
    }
}

@media (max-width: 768px) {
    /* Menu Burger */
    .menu-toggle { display: block; }
    .nav { display: none; flex-direction: column; position: absolute; top: 100%; left: 0; width: 100%; background: var(--dark); padding: 20px 0; box-shadow: 0 10px 15px rgba(0,0,0,0.2); }
    .nav.active { display: flex; }
    .nav a { width: 100%; text-align: center; padding: 12px 0; }
    .btn-nav { width: 80%; margin: 10px auto; }
    .admin-link { margin: 10px auto 0; }
    
    /* Ajustements de mise en page */
    .hero h1 { font-size: 2rem; }
    .section-title { font-size: 1.8rem; }
    .form-row { grid-template-columns: 1fr; gap: 0; }
    
    /* Footer */
    .footer-content { grid-template-columns: 1fr; text-align: center; }
    .footer-col h3::after { left: 50%; transform: translateX(-50%); }
    .social-links { justify-content: center; }
    .contact-links li { justify-content: center; }
    .footer-bottom { flex-direction: column; gap: 10px; text-align: center; }
    
    /* Le logo dans le footer sur mobile */
    .footer-logo { display: flex; justify-content: center; }
    
    /* Boutons flottants */
    .whatsapp-float { width: 50px; height: 50px; font-size: 26px; bottom: 20px; right: 20px; }
    .scroll-top { width: 40px; height: 40px; bottom: 80px; right: 20px; }
    
    /* Cookies */
    .cookie-content { flex-direction: column; text-align: center; }
    .btn-cookie { width: 100%; }
}