/* ============================================================
   MLF SOLUTIONS — Dark Tech / Glassmorphism Theme
   ============================================================ */

/* --- Variables CSS --- */
:root {
    --bg-primary: #0f172a;      /* Slate 900 - Professional Dark Navy */
    --bg-secondary: #1e293b;    /* Slate 800 - Cards and elevated surfaces */
    --accent-blue: #2563eb;     /* Blue 600 - Trustworthy Enterprise Blue */
    --accent-purple: #4f46e5;   /* Indigo 600 - Secondary corporate accent */
    --accent-cyan: #0284c7;     /* Sky 600 */
    --accent-rose: #e11d48;     /* Danger */
    --accent-green: #059669;    /* Success */
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-border: rgba(255, 255, 255, 0.08);
    --text-primary: #f8fafc;
    --text-secondary: #cbd5e1;
    --text-muted: #94a3b8;
    --navbar-height: 80px;
}



.hero-solutions {
    background: url('https://images.unsplash.com/photo-1451187580459-43490279c0fa?auto=format&fit=crop&q=80&w=1920&h=600') center/cover no-repeat;
}
.hero-overlay {
    background: linear-gradient(135deg, rgba(11,15,25,0.9) 0%, rgba(11,15,25,0.7) 100%);
}

.text-muted { color: var(--text-muted) !important; }
.text-secondary { color: var(--text-secondary) !important; }

/* --- Reset & Base --- */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: 'Inter', 'Segoe UI', sans-serif;
    padding-top: var(--navbar-height);
    min-height: 100vh;
    overflow-x: hidden;
}

/* --- Scrollbar --- */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: var(--bg-primary); }
::-webkit-scrollbar-thumb { background: var(--accent-blue); border-radius: 3px; }

/* ============================================================
   NAVBAR GLASSMORPHISM
   ============================================================ */
.site-header {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 1000;
}

.site-header .navbar {
    background: var(--bg-secondary) !important;
    opacity: 0.95;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
    padding: 1rem 0;
    min-height: var(--navbar-height);
}

.navbar-brand .logo-icon-img {
    width: 42px;
    height: 42px;
    border-radius: 10px;
    object-fit: cover;
    box-shadow: 0 0 16px rgba(6, 182, 212, 0.35);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.navbar-brand:hover .logo-icon-img {
    transform: scale(1.05);
    box-shadow: 0 0 22px rgba(6, 182, 212, 0.6);
}

.navbar-brand .logo-icon {
    width: 40px; height: 40px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-purple));
    display: flex; align-items: center; justify-content: center;
    font-size: 1.1rem; color: white;
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.4);
}

.nav-link {
    color: var(--text-secondary) !important;
    font-weight: 500;
    font-size: 0.9rem;
    padding: 0.5rem 0.75rem !important;
    border-radius: 8px;
    transition: all 0.3s ease;
    position: relative;
}

.nav-link:hover, .nav-link.active {
    color: var(--text-primary) !important;
    background: rgba(255, 255, 255, 0.06);
}

.navbar-toggler {
    border: 1px solid var(--glass-border);
    padding: 0.4rem 0.6rem;
}
.navbar-toggler-icon {
    filter: invert(1);
}

/* Collapse on mobile */
@media (max-width: 991px) {
    .navbar-collapse {
        background: var(--bg-secondary);
        opacity: 0.98;
        backdrop-filter: blur(20px);
        border: 1px solid var(--glass-border);
        border-radius: 12px;
        margin-top: 0.5rem;
        padding: 1rem;
    }
    .nav-link { padding: 0.75rem 1rem !important; }
}

/* ============================================================
   GRADIENT TEXT
   ============================================================ */
.gradient-text {
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-cyan));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

/* ============================================================
   GLASS CARD
   ============================================================ */
.glass-card {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    transition: all 0.3s ease;
}

.glass-card:hover {
    border-color: rgba(99, 102, 241, 0.35);
    box-shadow: 0 20px 60px rgba(99, 102, 241, 0.12);
    transform: translateY(-4px);
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn-glow {
    background: var(--accent-blue);
    color: #fff;
    border: none;
    border-radius: 6px; /* Professional slight curve instead of pill */
    padding: 0.75rem 2rem;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    box-shadow: 0 4px 6px -1px rgba(37, 99, 235, 0.2);
}
.btn-glow:hover {
    color: #fff;
    background: var(--accent-purple);
    box-shadow: 0 10px 15px -3px rgba(37, 99, 235, 0.3);
    transform: translateY(-1px);
}

.btn-ghost {
    background: transparent;
    border: 1px solid var(--text-muted);
    color: var(--text-primary);
    border-radius: 6px;
    padding: 0.75rem 2rem;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}
.btn-ghost:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--text-primary);
    color: var(--text-primary);
}

.btn-cyan {
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-blue));
    color: #fff;
    border: none;
    border-radius: 50px;
    padding: 0.75rem 2rem;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}
.btn-cyan:hover {
    color: #fff;
    box-shadow: 0 0 30px rgba(6, 182, 212, 0.5);
    transform: translateY(-2px) scale(1.02);
}

/* ============================================================
   SECTION BADGE
   ============================================================ */
.section-badge {
    display: inline-block;
    background: rgba(99, 102, 241, 0.12);
    border: 1px solid rgba(99, 102, 241, 0.3);
    color: #a5b4fc;
    border-radius: 50px;
    padding: 0.3rem 1.1rem;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: 1rem;
}

/* ============================================================
   HERO SECTION
   ============================================================ */
.hero-section {
    min-height: calc(100vh - var(--navbar-height));
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 50%, #0f172a 100%);
    position: relative;
    display: flex;
    align-items: center;
    overflow: hidden;
}

.hero-orb {
    position: absolute;
    width: 500px; height: 500px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.25), transparent 70%);
    filter: blur(60px);
    animation: float 8s ease-in-out infinite;
    pointer-events: none;
}

.hero-orb-2 {
    position: absolute;
    width: 400px; height: 400px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(6, 182, 212, 0.2), transparent 70%);
    filter: blur(60px);
    animation: float 6s ease-in-out infinite reverse;
    pointer-events: none;
}

.hero-stat-card {
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 1rem 1.5rem;
    text-align: center;
    min-width: 110px;
}
.hero-stat-card .stat-number {
    font-size: 1.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-cyan));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    display: block;
}
.hero-stat-card .stat-label {
    font-size: 0.72rem;
    color: var(--text-secondary);
    display: block;
    margin-top: 0.2rem;
}

/* ============================================================
   SERVICE CARDS
   ============================================================ */
.service-icon-wrapper {
    width: 60px; height: 60px;
    border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.4rem;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
}

.glass-card:hover .service-icon-wrapper {
    transform: scale(1.1);
}

.icon-indigo  { background: rgba(99, 102, 241, 0.15); border: 1px solid rgba(99, 102, 241, 0.3);  color: #818cf8; }
.icon-purple  { background: rgba(139, 92, 246, 0.15);  border: 1px solid rgba(139, 92, 246, 0.3);  color: #a78bfa; }
.icon-cyan    { background: rgba(6, 182, 212, 0.15);   border: 1px solid rgba(6, 182, 212, 0.3);   color: #22d3ee; }
.icon-rose    { background: rgba(244, 63, 94, 0.15);   border: 1px solid rgba(244, 63, 94, 0.3);   color: #fb7185; }
.icon-green   { background: rgba(16, 185, 129, 0.15);  border: 1px solid rgba(16, 185, 129, 0.3);  color: #34d399; }
.icon-orange  { background: rgba(249, 115, 22, 0.15);  border: 1px solid rgba(249, 115, 22, 0.3);  color: #fb923c; }

.service-link {
    color: var(--accent-blue);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    transition: gap 0.2s ease;
}
.service-link:hover { gap: 0.7rem; color: var(--accent-purple); }

/* ============================================================
   PRODUCT CARDS
   ============================================================ */
.product-card {
    overflow: hidden;
}
.product-card img {
    width: 100%;
    height: 200px;
    object-fit: cover;
    border-radius: 12px 12px 0 0;
    transition: transform 0.4s ease;
    filter: brightness(0.85);
}
.product-card:hover img {
    transform: scale(1.05);
    filter: brightness(1);
}
.product-card .card-body { padding: 1.25rem; }
.product-brand-badge {
    display: inline-block;
    background: rgba(99, 102, 241, 0.15);
    border: 1px solid rgba(99, 102, 241, 0.3);
    color: #a5b4fc;
    border-radius: 6px;
    padding: 0.15rem 0.6rem;
    font-size: 0.75rem;
    font-weight: 600;
    margin-bottom: 0.6rem;
}

/* ============================================================
   FEATURE BOX (Pourquoi nous)
   ============================================================ */
.feature-icon-box {
    text-align: center;
    padding: 2rem 1.5rem;
}
.feature-icon-box .feature-icon {
    width: 70px; height: 70px;
    border-radius: 50%;
    margin: 0 auto 1.25rem;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.6rem;
}

/* ============================================================
   CTA SECTION
   ============================================================ */
.cta-section {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.08), rgba(15, 23, 42, 0.05));
    border-top: 1px solid rgba(255,255,255,0.06);
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

/* ============================================================
   HERO CATALOGUE / CONTACT
   ============================================================ */
.hero-catalogue, .hero-contact {
    min-height: 40vh;
    background: linear-gradient(135deg, #0f172a, #1e293b 60%, #0f172a);
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

/* ============================================================
   FOOTER
   ============================================================ */
.site-footer {
    background: #070710;
    border-top: 1px solid rgba(255, 255, 255, 0.07);
    color: var(--text-secondary);
    padding-top: 4rem;
    padding-bottom: 2rem;
}
.site-footer h5, .site-footer h4 { color: var(--text-primary); }
.footer-link {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s ease;
    display: block;
    margin-bottom: 0.5rem;
}
.footer-link:hover { color: var(--text-primary); }
.footer-divider { border-color: rgba(255, 255, 255, 0.08); margin: 2rem 0; }
.footer-social-btn {
    display: inline-flex; align-items: center; justify-content: center;
    width: 38px; height: 38px;
    border-radius: 10px;
    border: 1px solid var(--glass-border);
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 1rem;
    transition: all 0.3s ease;
}
.footer-social-btn:hover {
    background: rgba(99,102,241,0.15);
    border-color: rgba(99,102,241,0.4);
    color: #a5b4fc;
}

/* ============================================================
   WHATSAPP FLOAT
   ============================================================ */
.whatsapp-float {
    position: fixed;
    bottom: 2rem; right: 2rem;
    width: 56px; height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, #25d366, #128c7e);
    display: flex; align-items: center; justify-content: center;
    color: #fff;
    font-size: 1.5rem;
    text-decoration: none;
    box-shadow: 0 8px 25px rgba(37, 211, 102, 0.4);
    z-index: 999;
    animation: pulse-wa 2s ease-in-out infinite;
}
@keyframes pulse-wa {
    0%, 100% { box-shadow: 0 8px 25px rgba(37,211,102,0.4); }
    50%       { box-shadow: 0 8px 40px rgba(37,211,102,0.7); }
}

/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes float {
    0%, 100% { transform: translateY(0px); }
    50%       { transform: translateY(-24px); }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInLeft {
    from { opacity: 0; transform: translateX(-30px); }
    to   { opacity: 1; transform: translateX(0); }
}

.animate-fadeInUp { animation: fadeInUp 0.7s ease both; }
.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }
.delay-5 { animation-delay: 0.5s; }

/* ============================================================
   FORM INPUTS DARK
   ============================================================ */
.form-control, .form-select {
    background: rgba(255,255,255,0.05) !important;
    border: 1px solid var(--glass-border) !important;
    color: var(--text-primary) !important;
    border-radius: 10px;
    color-scheme: dark;
}
.form-select option {
    background-color: #0f1015 !important;
    color: #ffffff !important;
}
.form-control:focus, .form-select:focus {
    border-color: var(--accent-blue) !important;
    box-shadow: 0 0 0 3px rgba(99,102,241,0.2) !important;
    background: rgba(255,255,255,0.07) !important;
}
.form-control::placeholder { color: var(--text-muted) !important; }
.form-label { color: var(--text-secondary); font-weight: 500; }

/* ============================================================
   CATALOGUE FILTERS
   ============================================================ */
.catalog-sidebar {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 1.5rem;
}

/* ============================================================
   ADMIN DARK
   ============================================================ */
.table-dark-custom {
    color: var(--text-primary);
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 767px) {
    .hero-section { padding: 3rem 0; }
    .hero-orb, .hero-orb-2 { display: none; }
    .hero-stat-card { min-width: 90px; padding: 0.75rem 1rem; }
    .hero-stat-card .stat-number { font-size: 1.2rem; }
    body { padding-top: 70px; }
    --navbar-height: 70px;
}

@media (max-width: 480px) {
    .btn-glow, .btn-ghost, .btn-cyan {
        padding: 0.65rem 1.5rem;
        font-size: 0.88rem;
    }
}

/* Sections alternées */
.section-alt {
    background: rgba(255,255,255,0.02);
}

/* Text helpers */
.text-secondary-custom { color: var(--text-secondary) !important; }
.text-muted-custom     { color: var(--text-muted) !important; }
.letter-spacing-1      { letter-spacing: 1px; }

@media (min-width: 992px) {
    .divide-lg > div:not(:last-child) {
        border-right: 1px solid rgba(255, 255, 255, 0.05);
    }
}

/* ============================================================
   NAV LINK ACTIVE STATE
   ============================================================ */
.nav-link.active {
    color: var(--text-primary) !important;
    background: rgba(37, 99, 235, 0.12); /* More corporate blue tint */
    border-radius: 8px;
    position: relative;
}
.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 16px;
    height: 2px;
    background: var(--accent-blue);
    border-radius: 2px;
}

/* ============================================================
   HOVER LIFT UTILITY (Dashboard cards)
   ============================================================ */
.hover-lift {
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}
.hover-lift:hover {
    transform: translateY(-5px);
    box-shadow: 0 16px 40px rgba(99, 102, 241, 0.15);
}

/* ============================================================
   DARK GLASSMORPHISM MODAL & TECHNICAL DETAILS
   ============================================================ */
.modal-backdrop.show {
    opacity: 0.75;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.dark-modal {
    background: #0f172a !important;
    background: linear-gradient(145deg, #1e293b 0%, #0b0f19 100%) !important;
    border: 1px solid rgba(255, 255, 255, 0.12) !important;
    border-radius: 20px !important;
    color: #f8fafc !important;
    box-shadow: 0 25px 60px -10px rgba(0, 0, 0, 0.85), 0 0 30px rgba(99, 102, 241, 0.15) !important;
}

.dark-modal .modal-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding: 1.5rem 1.75rem;
}

.dark-modal .modal-body {
    padding: 1.75rem;
    max-height: 72vh;
    overflow-y: auto;
}

.dark-modal .modal-footer {
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding: 1.25rem 1.75rem;
}

.tech-spec-box {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: 12px;
    padding: 1.1rem 1.25rem;
    transition: all 0.25s ease;
}

.tech-spec-box:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(99, 102, 241, 0.35);
    transform: translateY(-2px);
}

.tech-badge {
    background: rgba(99, 102, 241, 0.15);
    color: #a5b4fc;
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    padding: 0.3rem 0.65rem;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.tech-badge-cyan {
    background: rgba(6, 182, 212, 0.15);
    color: #67e8f9;
    border: 1px solid rgba(6, 182, 212, 0.3);
}

.tech-badge-purple {
    background: rgba(139, 92, 246, 0.15);
    color: #c4b5fd;
    border: 1px solid rgba(139, 92, 246, 0.3);
}

.tech-badge-green {
    background: rgba(16, 185, 129, 0.15);
    color: #6ee7b7;
    border: 1px solid rgba(16, 185, 129, 0.3);
}

.tech-timeline {
    position: relative;
    padding-left: 28px;
}

.tech-timeline::before {
    content: '';
    position: absolute;
    left: 8px;
    top: 6px;
    bottom: 6px;
    width: 2px;
    background: linear-gradient(180deg, #6366f1 0%, #06b6d4 100%);
    opacity: 0.4;
}

.tech-timeline-step {
    position: relative;
    margin-bottom: 1.4rem;
}

.tech-timeline-step:last-child {
    margin-bottom: 0;
}

.tech-timeline-step::before {
    content: '';
    position: absolute;
    left: -24px;
    top: 4px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #6366f1;
    border: 2px solid #0f172a;
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.8);
}

.metric-pill {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 0.85rem 1rem;
    text-align: center;
}

.metric-pill .metric-val {
    font-size: 1.35rem;
    font-weight: 800;
    line-height: 1.2;
    display: block;
}

.metric-pill .metric-lbl {
    font-size: 0.72rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-top: 0.2rem;
    display: block;
}

/* ============================================================
   CLICKABLE PROJECT CARD
   ============================================================ */
.project-card.clickable-card {
    cursor: pointer;
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.3s ease, box-shadow 0.3s ease;
    outline: none;
}

.project-card.clickable-card:focus-visible {
    border-color: #6366f1;
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.45);
}

.project-card.clickable-card:hover {
    transform: translateY(-8px);
    border-color: rgba(99, 102, 241, 0.45);
    box-shadow: 0 20px 45px -10px rgba(99, 102, 241, 0.22);
}

.project-card.clickable-card .card-cta-badge {
    transition: all 0.25s ease;
}

.project-card.clickable-card:hover .card-cta-badge {
    background: rgba(99, 102, 241, 0.3) !important;
    border-color: rgba(99, 102, 241, 0.7) !important;
    color: #fff !important;
    transform: translateX(2px);
}