/* ========================================
   ELECTRIC PLUS - STYLES AVANCÉS
   Version professionnelle avec animations
   ======================================== */

/* Variables CSS */
:root {
    /* Brand palette from logo */
    --brand-blue-dark: #0D448C; /* deep blue */
    --brand-blue: #0785F2;      /* bright blue */
    --brand-green: #437314;     /* green */
    --brand-gold: #F2A03D;      /* gold */
    --brand-orange: #F27405;    /* orange */

    --primary-green: var(--brand-green);
    --primary-dark: var(--brand-blue-dark);
    --primary-light: var(--brand-blue);
    --secondary-gold: var(--brand-gold);
    --secondary-dark: var(--brand-orange);
    --dark-bg: var(--brand-blue-dark);
    --light-bg: #f7fbff;
    --gray-bg: #f0f5f8;
    --text-dark: #0b2433;
    --text-gray: #4a5a66;
    --white: #ffffff;
    --shadow-sm: 0 10px 30px rgba(0,0,0,0.05);
    --shadow-md: 0 20px 40px rgba(0,0,0,0.08);
    --shadow-lg: 0 30px 60px rgba(0,0,0,0.12);
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s ease;
    --transition-slow: 0.5s ease;
}

/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    scroll-padding-top: 80px;
}

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

/* Typographie avancée */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
}

.gradient-text {
    background: linear-gradient(135deg, var(--primary-green), var(--primary-light));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

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

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

@keyframes fadeInRight {
    from {
        opacity: 0;
        transform: translateX(40px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-10px); }
    100% { transform: translateY(0px); }
}

@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

@keyframes shine {
    0% { background-position: -100% 0; }
    100% { background-position: 200% 0; }
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Classes d'animation */
.animate-fadeUp {
    animation: fadeInUp 0.8s ease forwards;
}

.animate-fadeLeft {
    animation: fadeInLeft 0.8s ease forwards;
}

.animate-fadeRight {
    animation: fadeInRight 0.8s ease forwards;
}

.animate-scale {
    animation: scaleIn 0.6s ease forwards;
}

.animate-float {
    animation: float 4s ease-in-out infinite;
}

/* Scroll Reveal */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* ========== NAVIGATION ========== */
.navbar {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
    padding: 0.8rem 0;
    transition: all 0.3s ease;
}

.navbar.scrolled {
    padding: 0.5rem 0;
    background: rgba(255, 255, 255, 0.98);
    box-shadow: var(--shadow-md);
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.navbar-brand img {
    max-width: 180px;
    width: 100%;
    height: auto;
    display: block;
}

@media (max-width: 576px) {
    .navbar-brand img {
        max-width: 140px;
    }
}

.logo-icon {
    width: 45px;
    height: 45px;
    background: linear-gradient(135deg, var(--primary-green), var(--primary-dark));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.3s ease;
}

.logo-icon:hover {
    transform: scale(1.05);
}

.logo-icon span {
    font-size: 24px;
    color: white;
}

.brand-text {
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.brand-text span:first-child {
    background: linear-gradient(135deg, var(--primary-green), var(--primary-light));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.brand-text span:last-child {
    color: var(--secondary-gold);
}

.nav-link {
    font-weight: 500;
    margin: 0 0.2rem;
    color: var(--text-dark) !important;
    position: relative;
    transition: color 0.3s ease;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary-green), var(--secondary-gold));
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-link:hover::after,
.nav-link.active::after {
    width: 80%;
}

.nav-link:hover {
    color: var(--primary-green) !important;
}

.btn-primary-custom {
    background: linear-gradient(135deg, var(--primary-green), var(--primary-light));
    border: none;
    padding: 10px 28px;
    font-weight: 600;
    border-radius: 40px;
    color: white;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-primary-custom::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255,255,255,0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-primary-custom:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary-custom:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(7,133,242,0.16);
}

.btn-outline-custom {
    border: 2px solid var(--primary-green);
    background: transparent;
    color: var(--primary-green);
    border-radius: 40px;
    padding: 8px 24px;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-outline-custom:hover {
    background: var(--secondary-gold);
    color: var(--dark-bg);
    transform: translateY(-2px);
}

/* ========== HERO SECTION ========== */
.hero {
    position: relative;
    min-height: 90vh;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, rgba(7,133,242,0.08) 0%, rgba(67,115,20,0.06) 45%, rgba(242,160,61,0.06) 100%);
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 80%;
    height: 150%;
    background: radial-gradient(circle, rgba(7,133,242,0.05) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(7,133,242,0.10);
    padding: 8px 18px;
    border-radius: 40px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--primary-dark);
    margin-bottom: 1.5rem;
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1.2;
    margin-bottom: 1.5rem;
}

.floating-shape {
    position: absolute;
    background: linear-gradient(135deg, var(--primary-light), var(--primary-green));
    opacity: 0.10;
    border-radius: 50%;
    pointer-events: none;
}

.shape-1 {
    width: 300px;
    height: 300px;
    top: 10%;
    right: 5%;
    animation: float 8s ease-in-out infinite;
}

.shape-2 {
    width: 150px;
    height: 150px;
    bottom: 15%;
    left: 5%;
    animation: float 6s ease-in-out infinite reverse;
}

/* ========== CARDS ========== */
.service-card, .project-card, .team-card {
    background: var(--white);
    border-radius: 24px;
    padding: 2rem;
    transition: all 0.4s ease;
    box-shadow: var(--shadow-sm);
    height: 100%;
    position: relative;
    overflow: hidden;
}

.service-card::before, .project-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-green), var(--secondary-gold));
    transform: scaleX(0);
    transition: transform 0.4s ease;
}

.service-card:hover::before, .project-card:hover::before {
    transform: scaleX(1);
}

.service-card:hover, .project-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-lg);
}

.service-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, rgba(7,133,242,0.08), rgba(242,160,61,0.08));
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    transition: all 0.3s ease;
}

.service-card:hover .service-icon {
    background: linear-gradient(135deg, var(--primary-green), var(--secondary-gold));
}

.service-card:hover .service-icon i {
    color: white !important;
}

.service-icon i {
    font-size: 2rem;
    color: var(--primary-green);
    transition: all 0.3s ease;
}

/* ========== STATS SECTION ========== */
.stats-section {
    background: linear-gradient(135deg, var(--dark-bg), var(--primary-green));
    color: white;
    padding: 60px 0;
}

.stat-number {
    font-size: 3rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 1rem;
    opacity: 0.9;
}

/* ========== FORMULAIRES ========== */
.form-group {
    margin-bottom: 1.5rem;
}

.form-control, .form-select {
    border: 2px solid #e0e4e8;
    border-radius: 12px;
    padding: 12px 18px;
    transition: all 0.3s ease;
}

.form-control:focus, .form-select:focus {
    border-color: var(--primary-green);
    box-shadow: 0 0 0 3px rgba(7,133,242,0.08);
}

/* ========== FOOTER ========== */
.footer {
    background: linear-gradient(135deg, var(--dark-bg), #051a0f);
    color: #d8d2b4;
    padding: 60px 0 30px;
}

.footer h5 {
    color: white;
    margin-bottom: 1.5rem;
    position: relative;
    display: inline-block;
}

.footer h5::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 0;
    width: 40px;
    height: 2px;
    background: var(--secondary-gold);
}

.footer-links {
    list-style: none;
    padding: 0;
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: #cbd5e1;
    text-decoration: none;
    transition: all 0.3s ease;
}

.footer-links a:hover {
    color: var(--secondary-gold);
    transform: translateX(5px);
    display: inline-block;
}

/* ========== WHATSAPP BUTTON ========== */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: #25D366;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 30px;
    box-shadow: 0 5px 20px rgba(37,211,102,0.4);
    transition: all 0.3s ease;
    z-index: 1000;
}

.whatsapp-float:hover {
    transform: scale(1.1);
    background: #20b859;
    color: white;
}

/* ========== PRELOADER ========== */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--white);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s ease;
}

.preloader.hide {
    opacity: 0;
    pointer-events: none;
}

.loader {
    width: 60px;
    height: 60px;
    border: 3px solid #e0e4e8;
    border-top: 3px solid var(--primary-green);
    border-radius: 50%;
    animation: rotate 1s linear infinite;
}

/* ========== BACK TO TOP ========== */
.back-to-top {
    position: fixed;
    bottom: 100px;
    right: 30px;
    width: 45px;
    height: 45px;
    background: var(--primary-green);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 999;
}

.back-to-top.show {
    opacity: 1;
    visibility: visible;
}

.back-to-top:hover {
    background: var(--primary-dark);
    transform: translateY(-3px);
}

/* ========== RESPONSIVE ========== */
@media (max-width: 768px) {
    .hero h1 {
        font-size: 2.2rem;
    }
    
    .service-card, .project-card {
        padding: 1.5rem;
    }
    
    .stat-number {
        font-size: 2rem;
    }
    
    .whatsapp-float {
        width: 50px;
        height: 50px;
        font-size: 25px;
        bottom: 20px;
        right: 20px;
    }
    
    .back-to-top {
        bottom: 90px;
        right: 20px;
    }
}

/* ========== GLASS MORPHISM ========== */
.glass-card {
    background: rgba(255,255,255,0.9);
    backdrop-filter: blur(10px);
    border-radius: 24px;
    border: 1px solid rgba(255,255,255,0.2);
}

/* ========== SWIPER / CAROUSEL ========== */
.swiper {
    padding: 20px 0;
}

.swiper-pagination-bullet-active {
    background: var(--primary-green) !important;
}

/* ========== UTILITIES ========== */
.text-gold {
    color: var(--secondary-gold);
}

.bg-gradient-primary {
    background: linear-gradient(135deg, var(--primary-green), var(--primary-light));
}

.cursor-pointer {
    cursor: pointer;
}

.transition-all {
    transition: all 0.3s ease;
}