/* ==========================================================================
   C.S.Y BUSINESS — DESIGN SYSTEM & STYLES GLOBALS (ULTRA PREMIUM)
   ========================================================================== */

/* Fonts Import */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Outfit:wght@300;400;500;600;700;800&display=swap');

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

:root {
    /* Brand Colors (Official Logo Colors) */
    --color-green: #15803d;       /* Vert institutionnel */
    --color-green-rgb: 21, 128, 61;
    --color-red: #dc2626;         /* Rouge dynamique */
    --color-red-rgb: 220, 38, 38;
    --color-black: #080808;       /* Noir luxueux */
    --color-black-rgb: 8, 8, 8;
    --color-white: #ffffff;
    --color-white-rgb: 255, 255, 255;
    
    /* Typography */
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
    
    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    --transition-slow: 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    
    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 20px 50px rgba(0, 0, 0, 0.15);
    --shadow-glow-green: 0 0 25px rgba(var(--color-green-rgb), 0.35);
    --shadow-glow-red: 0 0 25px rgba(var(--color-red-rgb), 0.35);

    /* Theme Variables - Default to DARK MODE (as it is the most premium) */
    --bg-main: #06090c;
    --bg-secondary: #0c1116;
    --bg-tertiary: #131920;
    --text-primary: #f3f4f6;
    --text-secondary: #9ca3af;
    --text-muted: #6b7280;
    --border-color: rgba(255, 255, 255, 0.07);
    --glass-bg: rgba(255, 255, 255, 0.02);
    --glass-border: rgba(255, 255, 255, 0.05);
    --glass-blur: 16px;
    --light-effect-green: radial-gradient(circle at 10% 20%, rgba(var(--color-green-rgb), 0.1) 0%, transparent 40%);
    --light-effect-red: radial-gradient(circle at 90% 80%, rgba(var(--color-red-rgb), 0.08) 0%, transparent 40%);
}

/* Light Mode Variables Override */
.light-mode {
    --bg-main: #f8fafc;
    --bg-secondary: #ffffff;
    --bg-tertiary: #f1f5f9;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --border-color: rgba(15, 23, 42, 0.08);
    --glass-bg: rgba(15, 23, 42, 0.01);
    --glass-border: rgba(15, 23, 42, 0.05);
    --glass-blur: 12px;
    --light-effect-green: radial-gradient(circle at 10% 20%, rgba(var(--color-green-rgb), 0.05) 0%, transparent 45%);
    --light-effect-red: radial-gradient(circle at 90% 80%, rgba(var(--color-red-rgb), 0.04) 0%, transparent 45%);
}

html {
    scroll-behavior: initial; /* Managed by GSAP/ScrollTrigger */
    font-size: 100%;
    -webkit-text-size-adjust: 100%;
    -webkit-font-smoothing: antialiased;
}

body {
    background-color: var(--bg-main);
    color: var(--text-primary);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
    transition: background-color var(--transition-normal), color var(--transition-normal);
}

/* Base Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-main);
}
::-webkit-scrollbar-thumb {
    background: var(--bg-tertiary);
    border-radius: 4px;
    border: 2px solid var(--bg-main);
}
::-webkit-scrollbar-thumb:hover {
    background: var(--color-green);
}

/* Ambient Lighting Effects */
.ambient-glow {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    pointer-events: none;
    z-index: 0;
    opacity: 0.8;
}
.ambient-glow::before {
    content: '';
    position: absolute;
    top: -10%;
    left: -10%;
    width: 50%;
    height: 60%;
    background: var(--light-effect-green);
    filter: blur(100px);
}
.ambient-glow::after {
    content: '';
    position: absolute;
    bottom: -10%;
    right: -10%;
    width: 50%;
    height: 60%;
    background: var(--light-effect-red);
    filter: blur(100px);
}

/* Typography & Headers */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-primary);
}

a {
    color: inherit;
    text-decoration: none;
    transition: color var(--transition-fast);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* Utility Components */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    position: relative;
    z-index: 2;
}

.section-padding {
    padding: 120px 0;
    position: relative;
}

.text-gradient-green {
    background: linear-gradient(135deg, #4ade80 0%, var(--color-green) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.text-gradient-red {
    background: linear-gradient(135deg, #f87171 0%, var(--color-red) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.text-gradient-mixed {
    background: linear-gradient(135deg, var(--color-green) 0%, var(--color-red) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Glassmorphism Panel */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(var(--glass-blur));
    -webkit-backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    transition: border-color var(--transition-normal), background-color var(--transition-normal);
}

/* Preloader */
.preloader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: #05070a;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.preloader-logo-container {
    position: relative;
    margin-bottom: 30px;
    opacity: 0;
    transform: scale(0.9);
}

.preloader-logo {
    width: 120px;
    height: 120px;
    border-radius: 50%;
    border: 3px solid rgba(var(--color-green-rgb), 0.2);
    object-fit: cover;
}

.preloader-gear {
    position: absolute;
    top: -10px;
    left: -10px;
    right: -10px;
    bottom: -10px;
    border: 2px dashed var(--color-green);
    border-radius: 50%;
    animation: rotateGear 15s linear infinite;
    pointer-events: none;
}

.preloader-progress-bg {
    width: 200px;
    height: 3px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    overflow: hidden;
    position: relative;
}

.preloader-progress-bar {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, var(--color-green) 0%, var(--color-red) 100%);
    border-radius: 10px;
    transition: width 0.1s linear;
}

@keyframes rotateGear {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Premium Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 14px 28px;
    border-radius: 50px;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 15px;
    letter-spacing: 0.5px;
    cursor: pointer;
    transition: all var(--transition-normal);
    position: relative;
    overflow: hidden;
    border: none;
    outline: none;
    z-index: 1;
}

.btn-primary {
    background: linear-gradient(135deg, var(--color-green) 0%, #166534 100%);
    color: var(--color-white);
    box-shadow: 0 4px 15px rgba(var(--color-green-rgb), 0.3);
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--color-red) 0%, #991b1b 100%);
    opacity: 0;
    z-index: -1;
    transition: opacity var(--transition-normal);
}

.btn-primary:hover {
    box-shadow: var(--shadow-glow-red);
    transform: translateY(-2px);
}

.btn-primary:hover::before {
    opacity: 1;
}

.btn-secondary {
    background: var(--glass-bg);
    color: var(--text-primary);
    border: 1px solid var(--glass-border);
}

.btn-secondary:hover {
    border-color: var(--color-green);
    background: rgba(var(--color-green-rgb), 0.05);
    color: var(--color-white);
    transform: translateY(-2px);
}

.btn-accent {
    background: linear-gradient(135deg, var(--color-red) 0%, #991b1b 100%);
    color: var(--color-white);
    box-shadow: 0 4px 15px rgba(var(--color-red-rgb), 0.3);
}

.btn-accent:hover {
    box-shadow: var(--shadow-glow-green);
    transform: translateY(-2px);
}

/* Header & Navigation */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    transition: all var(--transition-normal);
    border-bottom: 1px solid transparent;
}

.header.scrolled {
    background-color: rgba(var(--color-black-rgb), 0.8);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-bottom: 1px solid var(--border-color);
    padding: 12px 0;
}

.header:not(.scrolled) {
    padding: 20px 0;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-link {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-img {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: 2px solid var(--color-green);
    transition: transform var(--transition-normal);
}

.logo-link:hover .logo-img {
    transform: rotate(360deg);
}

.logo-text {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 20px;
    letter-spacing: 0.5px;
}

.logo-text span {
    color: var(--color-green);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 32px;
    list-style: none;
}

.nav-link {
    font-family: var(--font-heading);
    font-weight: 500;
    font-size: 15px;
    color: var(--text-secondary);
    position: relative;
    padding: 8px 0;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0%;
    height: 2px;
    background: linear-gradient(90deg, var(--color-green) 0%, var(--color-red) 100%);
    transition: width var(--transition-normal);
}

.nav-link:hover, .nav-link.active {
    color: var(--text-primary);
}

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

.nav-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* Theme Switcher */
.theme-switch {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    width: 44px;
    height: 44px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-primary);
    transition: all var(--transition-fast);
}

.theme-switch:hover {
    border-color: var(--color-green);
    color: var(--color-green);
    transform: scale(1.05);
}

.theme-switch .sun-icon {
    display: none;
}

.light-mode .theme-switch .moon-icon {
    display: none;
}

.light-mode .theme-switch .sun-icon {
    display: block;
}

/* Mobile Navigation Hamburger */
.burger-menu {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 20px;
    cursor: pointer;
    z-index: 1002;
}

.burger-line {
    width: 100%;
    height: 2px;
    background-color: var(--text-primary);
    transition: all var(--transition-normal);
}

.burger-menu.active .burger-line:nth-child(1) {
    transform: translateY(9px) rotate(45deg);
    background-color: var(--color-red);
}

.burger-menu.active .burger-line:nth-child(2) {
    opacity: 0;
}

.burger-menu.active .burger-line:nth-child(3) {
    transform: translateY(-9px) rotate(-45deg);
    background-color: var(--color-green);
}

/* Mobile Nav Drawer */
.mobile-nav {
    position: fixed;
    top: 0;
    left: 100%;
    width: 100%;
    height: 100vh;
    background-color: var(--bg-secondary);
    z-index: 1001;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    transition: left var(--transition-normal);
}

.mobile-nav.active {
    left: 0;
}

.mobile-nav-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 32px;
    align-items: center;
    margin-bottom: 40px;
}

.mobile-nav-link {
    font-family: var(--font-heading);
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
}

/* WhatsApp Floating Button */
.whatsapp-float {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background-color: #25d366;
    color: var(--color-white);
    width: 60px;
    height: 60px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 30px rgba(37, 211, 102, 0.4);
    z-index: 999;
    cursor: pointer;
    animation: pulseWhatsapp 2s infinite;
    transition: all var(--transition-fast);
}

.whatsapp-float:hover {
    transform: scale(1.1) translateY(-5px);
    box-shadow: 0 12px 40px rgba(37, 211, 102, 0.6);
}

.whatsapp-float svg {
    width: 32px;
    height: 32px;
    fill: currentColor;
}

.whatsapp-tooltip {
    position: absolute;
    right: 75px;
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    padding: 8px 16px;
    border-radius: 8px;
    font-size: 13px;
    font-weight: 500;
    box-shadow: var(--shadow-md);
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transform: translateX(10px);
    transition: all var(--transition-fast);
    border: 1px solid var(--border-color);
}

.whatsapp-float:hover .whatsapp-tooltip {
    opacity: 1;
    transform: translateX(0);
}

@keyframes pulseWhatsapp {
    0% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0.5);
    }
    70% {
        box-shadow: 0 0 0 15px rgba(37, 211, 102, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(37, 211, 102, 0);
    }
}

/* Footer Styles */
.footer {
    background-color: var(--bg-secondary);
    border-top: 1px solid var(--border-color);
    padding: 80px 0 30px;
    position: relative;
    overflow: hidden;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 48px;
    margin-bottom: 60px;
}

.footer-info .logo-link {
    margin-bottom: 20px;
}

.footer-desc {
    color: var(--text-secondary);
    margin-bottom: 24px;
    font-size: 14px;
    line-height: 1.7;
}

.footer-socials {
    display: flex;
    gap: 12px;
}

.social-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    font-size: 18px;
    transition: all var(--transition-fast);
}

.social-icon:hover {
    background: var(--color-green);
    color: var(--color-white);
    border-color: var(--color-green);
    transform: scale(1.05);
}

.footer-title {
    font-family: var(--font-heading);
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 24px;
    position: relative;
}

.footer-title::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 0;
    width: 30px;
    height: 2px;
    background: var(--color-green);
}

.footer-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-link {
    color: var(--text-secondary);
    font-size: 14px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.footer-link:hover {
    color: var(--color-green);
    padding-left: 5px;
}

.footer-contact-item {
    display: flex;
    gap: 12px;
    margin-bottom: 16px;
    color: var(--text-secondary);
    font-size: 14px;
}

.footer-contact-item i {
    color: var(--color-green);
    font-size: 16px;
    margin-top: 3px;
}

.footer-bottom {
    border-top: 1px solid var(--border-color);
    padding-top: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: var(--text-muted);
    font-size: 13px;
}

/* Responsive Rules */
@media (max-width: 1024px) {
    .footer-grid {
        grid-template-columns: 1fr 1fr;
        gap: 40px;
    }
}

@media (max-width: 768px) {
    .section-padding {
        padding: 80px 0;
    }
    
    .nav-links, .nav-actions .btn {
        display: none;
    }
    
    .burger-menu {
        display: flex;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }
    
    .footer-bottom {
        flex-direction: column;
        gap: 16px;
        text-align: center;
    }
}

/* Small Smartphone Optimization */
@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }
    
    .logo-img {
        width: 38px;
        height: 38px;
        border-width: 1.5px;
    }
    
    .logo-text {
        font-size: 16px;
    }
    
    .logo-link {
        gap: 8px;
    }
    
    .theme-switch {
        width: 36px;
        height: 36px;
    }
    
    .burger-menu {
        width: 24px;
        height: 16px;
    }
    
    .burger-menu.active .burger-line:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }
    
    .burger-menu.active .burger-line:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }

    .btn {
        padding: 12px 22px;
        font-size: 14px;
    }
    
    .section-padding {
        padding: 60px 0;
    }
    
    .hero-section {
        min-height: 620px;
    }
    
    .stats-hero-overlay {
        padding: 24px 0;
    }
    
    .whatsapp-float {
        bottom: 20px;
        right: 20px;
        width: 50px;
        height: 50px;
    }
    
    .whatsapp-float i {
        font-size: 26px !important;
    }
}

