/* --- VARIABLES PREMIUM --- */
:root {
    --primary: #3b82f6;    /* Bleu électrique */
    --primary-dark: #2563eb;
    --secondary: #8b5cf6;  /* Violet profond */
    --accent: #06b6d4;     /* Cyan */
    
    --bg-main: #ffffff;
    --bg-alt: #f8fafc;     /* Gris très léger */
    --text-main: #0f172a;  /* Noir bleuté */
    --text-muted: #64748b;
    
    /* Gradients magiques */
    --grad-main: linear-gradient(135deg, var(--primary), var(--secondary));
    --grad-glow: linear-gradient(135deg, rgba(59, 130, 246, 0.5), rgba(139, 92, 246, 0.5));
    
    /* Ombres Glassmorphism */
    --shadow-sm: 0 4px 6px -1px rgba(0,0,0,0.05), 0 2px 4px -1px rgba(0,0,0,0.03);
    --shadow-xl: 0 25px 50px -12px rgba(0,0,0,0.15);
    --shadow-glow: 0 20px 40px -10px rgba(59, 130, 246, 0.3);
    
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: 1px solid rgba(255, 255, 255, 0.5);
    --blur: blur(20px);
}

/* --- BASE & RESET --- */
* { margin: 0; padding: 0; box-sizing: border-box; scroll-behavior: smooth; }
body {
    font-family: 'Inter', sans-serif;
    background: var(--bg-main);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
}

/* --- TYPOGRAPHIE --- */
h1, h2, h3, h4 { font-weight: 800; letter-spacing: -0.03em; line-height: 1.1; }
h1 { font-size: 4rem; margin-bottom: 24px; }
h2 { font-size: 2.75rem; margin-bottom: 16px; }
h3 { font-size: 1.5rem; margin-bottom: 12px; }
p { color: var(--text-muted); font-size: 1.125rem; margin-bottom: 24px; max-width: 600px; }

.text-gradient {
    background: var(--grad-main);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

/* --- UTILITAIRES --- */
.container { max-width: 1240px; margin: 0 auto; padding: 0 24px; }
.section { padding: 120px 0; }
.bg-alt { background: var(--bg-alt); }
.glass { background: var(--glass-bg); backdrop-filter: var(--blur); border: var(--glass-border); }

/* --- BOUTONS --- */
.btn {
    display: inline-flex; align-items: center; gap: 8px; padding: 14px 28px;
    border-radius: 14px; font-weight: 600; text-decoration: none; transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer; border: none; font-size: 1rem; font-family: inherit;
}
.btn-sm { padding: 10px 20px; font-size: 0.9rem; border-radius: 10px; }
.btn-lg { padding: 18px 36px; font-size: 1.125rem; }
.btn-full { width: 100%; justify-content: center; }

.btn-primary { background: var(--text-main); color: white; }
.btn-primary:hover { background: var(--primary); transform: translateY(-2px); box-shadow: var(--shadow-glow); }

.glow-effect { position: relative; overflow: hidden; }
.glow-effect::after {
    content: ''; position: absolute; inset: 0;
    background: radial-gradient(circle at center, rgba(255,255,255,0.3) 0%, transparent 70%);
    opacity: 0; transition: opacity 0.3s;
}
.glow-effect:hover::after { opacity: 1; }

/* --- NAVBAR --- */
.navbar { position: fixed; top: 0; width: 100%; z-index: 50; padding: 16px 0; border-bottom: var(--glass-border); }
.nav-container { display: flex; justify-content: space-between; align-items: center; }
.logo { font-weight: 900; font-size: 1.5rem; display: flex; align-items: center; gap: 10px; }
.logo-icon { width: 36px; height: 36px; background: var(--grad-main); color: white; border-radius: 10px; display: grid; place-items: center; font-size: 1.2rem; box-shadow: var(--shadow-sm); }
.nav-links { display: flex; align-items: center; gap: 32px; }
.nav-links a:not(.btn) { text-decoration: none; color: var(--text-muted); font-weight: 600; font-size: 0.95rem; transition: color 0.2s; }
.nav-links a:not(.btn):hover { color: var(--text-main); }

/* --- HERO SECTION --- */
.hero { min-height: 100vh; padding-top: 100px; display: flex; align-items: center; position: relative; overflow: hidden; }
.hero-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 80px; align-items: center; position: relative; z-index: 2; }

.badge-pill { display: inline-flex; align-items: center; gap: 8px; padding: 6px 12px; background: white; border-radius: 100px; font-size: 0.875rem; font-weight: 600; color: var(--text-main); box-shadow: var(--shadow-sm); margin-bottom: 24px; border: 1px solid #e2e8f0; }
.dot-live { width: 8px; height: 8px; background: #22c55e; border-radius: 50%; box-shadow: 0 0 0 4px rgba(34, 197, 94, 0.2); }

.cta-wrapper { display: flex; align-items: center; gap: 30px; margin-top: 40px; }
.trust-metrics { display: flex; gap: 20px; color: var(--text-muted); font-weight: 500; font-size: 0.9rem; }
.trust-metrics i { color: var(--primary); font-size: 1.1rem; }

/* Hero Visual (Glass Card) */
.hero-visual { perspective: 1500px; position: relative; }
.glass-card { background: rgba(255,255,255,0.8); backdrop-filter: blur(24px); border: 2px solid rgba(255,255,255,0.7); border-radius: 24px; padding: 24px; box-shadow: var(--shadow-xl), inset 0 0 0 1px rgba(255,255,255,0.5); transform: rotateY(-10deg) rotateX(5deg); transition: 0.6s cubic-bezier(0.23, 1, 0.32, 1); }
.hero-visual:hover .glass-card { transform: rotateY(0) rotateX(0) scale(1.02); box-shadow: var(--shadow-glow); }

.card-topbar { display: flex; align-items: center; gap: 16px; margin-bottom: 24px; background: rgba(0,0,0,0.03); padding: 12px; border-radius: 12px; }
.traffic-lights { display: flex; gap: 6px; }
.traffic-lights span { width: 10px; height: 10px; border-radius: 50%; }
.red { background: #ef4444; } .yellow { background: #fbbf24; } .green { background: #22c55e; }
.address-field { flex: 1; background: white; padding: 6px 12px; border-radius: 8px; font-size: 0.85rem; color: var(--text-muted); display: flex; align-items: center; gap: 8px; box-shadow: var(--shadow-sm); font-family: monospace; }
.address-field i { color: #22c55e; }

.ui-row { display: flex; align-items: center; gap: 16px; padding: 16px; background: white; border-radius: 16px; margin-bottom: 12px; box-shadow: var(--shadow-sm); transition: 0.3s; border: 1px solid transparent; }
.ui-row.active { border-color: var(--primary); background: #f0f9ff; }
.ui-icon { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; font-size: 1.4rem; }
.file-pdf { background: #fee2e2; color: #ef4444; } .file-xls { background: #dcfce7; color: #166534; }
.ui-info { flex: 1; }
.ui-title { font-weight: 600; font-size: 0.95rem; margin-bottom: 6px; }
.ui-bar { height: 6px; background: #e2e8f0; border-radius: 100px; overflow: hidden; }
.fill { height: 100%; border-radius: 100px; }
.w-100 { width: 100%; background: var(--primary); } .w-60 { width: 60%; background: var(--accent); }
.ui-badge { font-size: 0.75rem; font-weight: 700; padding: 4px 10px; border-radius: 100px; }
.success { background: #dcfce7; color: #166534; } .pending { background: #fef3c7; color: #b45309; }

.floating-badge { position: absolute; padding: 12px 20px; border-radius: 100px; font-weight: 700; font-size: 0.9rem; box-shadow: var(--shadow-xl); display: flex; align-items: center; gap: 8px; z-index: 10; color: var(--text-main); }
.floating-badge i { color: var(--primary); }
.b1 { top: -20px; right: -30px; animation: float 6s infinite ease-in-out; }
.b2 { bottom: -20px; left: -30px; animation: float 8s infinite ease-in-out reverse; }

/* Ambient Light */
.ambient-light { position: absolute; width: 600px; height: 600px; border-radius: 50%; filter: blur(120px); opacity: 0.4; z-index: -1; }
.light-1 { top: -20%; right: -10%; background: var(--primary); }
.light-2 { bottom: -20%; left: -10%; background: var(--secondary); }

/* --- FEATURES --- */
.section-header { text-align: center; max-width: 700px; margin: 0 auto 80px; }
.bento-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 30px; }
.bento-card { padding: 40px; border-radius: 24px; box-shadow: var(--shadow-sm); transition: 0.3s; }
.hover-lift:hover { transform: translateY(-10px); box-shadow: var(--shadow-xl); border-color: rgba(59,130,246,0.3); }
.card-icon { width: 64px; height: 64px; border-radius: 16px; display: grid; place-items: center; font-size: 2rem; margin-bottom: 24px; }
.blue { background: #dbeafe; color: var(--primary); } .purple { background: #ede9fe; color: var(--secondary); } .orange { background: #ffedd5; color: #f97316; }

/* --- CONTACT (Redesign) --- */
.contact-layout { display: grid; grid-template-columns: 1fr 1.2fr; border-radius: 30px; overflow: hidden; box-shadow: var(--shadow-xl); position: relative; }
.contact-visual { background: var(--text-main); color: white; padding: 60px; position: relative; overflow: hidden; display: flex; align-items: center; }
.contact-visual h3 { font-size: 2rem; margin-bottom: 20px; }
.contact-visual p { color: #94a3b8; }
.check-points { list-style: none; margin-top: 40px; }
.check-points li { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; font-weight: 600; font-size: 1.1rem; }
.check-points i { color: var(--accent); }
.light-3 { background: var(--accent); bottom: -30%; right: -30%; opacity: 0.3; }

.modern-form { padding: 60px; background: white; }
.modern-form h4 { font-size: 1.5rem; margin-bottom: 30px; }
.input-group { margin-bottom: 24px; }
.input-group label { display: block; font-weight: 600; font-size: 0.9rem; margin-bottom: 8px; color: var(--text-main); }
.input-group input, .input-group textarea { width: 100%; padding: 14px; border: 2px solid #e2e8f0; border-radius: 12px; font-family: inherit; font-size: 1rem; transition: 0.3s; background: #f8fafc; }
.input-group input:focus, .input-group textarea:focus { border-color: var(--primary); background: white; outline: none; box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1); }
#formFeedback { margin-top: 20px; padding: 15px; border-radius: 12px; text-align: center; font-weight: 600; display: none; }
.msg-success { background: #dcfce7; color: #166534; } .msg-error { background: #fee2e2; color: #991b1b; }

/* --- FOOTER --- */
footer { padding: 40px 0; background: white; border-top: 1px solid #e2e8f0; }
.footer-flex { display: flex; justify-content: space-between; align-items: center; }
.footer-brand { font-weight: 900; font-size: 1.2rem; }
.footer-brand span { color: var(--text-muted); font-weight: 400; font-size: 1rem; }
.admin-link { color: var(--text-main); text-decoration: none; font-weight: 600; display: flex; align-items: center; gap: 6px; transition: 0.3s; }
.admin-link:hover { color: var(--primary); }

/* --- CHAT WIDGET (Total Redesign) --- */
#chat-widget { position: fixed; bottom: 30px; right: 30px; z-index: 100; }
.chat-trigger { width: 64px; height: 64px; background: var(--grad-main); border-radius: 50%; display: grid; place-items: center; color: white; font-size: 32px; cursor: pointer; box-shadow: var(--shadow-glow); transition: 0.3s; position: relative; }
.chat-trigger:hover { transform: scale(1.05); }
.notif-dot { position: absolute; top: 2px; right: 2px; width: 14px; height: 14px; background: #ef4444; border: 2px solid white; border-radius: 50%; transform: scale(0); transition: 0.3s; }

.chat-window { position: absolute; bottom: 80px; right: 0; width: 380px; height: 550px; background: white; border-radius: 24px; box-shadow: var(--shadow-xl); display: flex; flex-direction: column; overflow: hidden; transform-origin: bottom right; transform: scale(0); opacity: 0; transition: 0.4s cubic-bezier(0.4, 0, 0.2, 1); pointer-events: none; }
.chat-open .chat-window { transform: scale(1); opacity: 1; pointer-events: all; }
.chat-open .chat-trigger { transform: rotate(90deg) scale(0.9); background: var(--text-main); }

.chat-header { padding: 20px; background: white; border-bottom: 1px solid #e2e8f0; display: flex; justify-content: space-between; align-items: center; }
.agent-profile { display: flex; align-items: center; gap: 12px; }
.avatar-img { width: 44px; height: 44px; background: var(--grad-main); border-radius: 50%; display: grid; place-items: center; color: white; font-size: 20px; }
.agent-details { display: flex; flex-direction: column; }
.agent-details .name { font-weight: 700; font-size: 1rem; }
.agent-details .status { font-size: 0.85rem; color: #22c55e; font-weight: 500; }
.close-chat { background: none; border: none; font-size: 1.2rem; color: var(--text-muted); cursor: pointer; padding: 8px; transition: 0.2s; }
.close-chat:hover { color: var(--text-main); background: #f1f5f9; border-radius: 50%; }

.chat-feed { flex: 1; padding: 20px; overflow-y: auto; background: #f8fafc; display: flex; flex-direction: column; gap: 16px; }
.msg { display: flex; }
.msg.admin { justify-content: flex-start; } .msg.user { justify-content: flex-end; }
.bubble { max-width: 85%; padding: 14px 18px; border-radius: 20px; font-size: 0.95rem; line-height: 1.5; box-shadow: var(--shadow-sm); }
.admin .bubble { background: white; color: var(--text-main); border-bottom-left-radius: 4px; }
.user .bubble { background: var(--grad-main); color: white; border-bottom-right-radius: 4px; }

.chat-composer { padding: 16px; background: white; border-top: 1px solid #e2e8f0; display: flex; gap: 12px; align-items: center; }
#chat-input { flex: 1; padding: 14px; border: 2px solid #e2e8f0; border-radius: 100px; outline: none; font-family: inherit; transition: 0.3s; background: #f8fafc; }
#chat-input:focus { border-color: var(--primary); background: white; }
.btn-send { width: 50px; height: 50px; border-radius: 50%; border: none; background: var(--text-main); color: white; font-size: 1.2rem; display: grid; place-items: center; cursor: pointer; transition: 0.3s; flex-shrink: 0; }
.btn-send:hover { background: var(--primary); transform: scale(1.05); }

/* --- ANIMATIONS --- */
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-20px); } }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: 0.5; } }
.float-animation { animation: float 6s ease-in-out infinite; }
.animate-pulse { animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite; }
.fade-up { opacity: 0; transform: translateY(30px); transition: 0.8s cubic-bezier(0.4, 0, 0.2, 1); }
.fade-up.visible { opacity: 1; transform: translateY(0); }
.delay-1 { transition-delay: 0.1s; } .delay-2 { transition-delay: 0.2s; }

/* --- RESPONSIVE --- */
@media (max-width: 1024px) {
    h1 { font-size: 3rem; } .hero-grid, .contact-layout { grid-template-columns: 1fr; gap: 60px; }
    .hero { padding-top: 120px; text-align: center; } .cta-wrapper { justify-content: center; }
    .hero-visual { order: -1; transform: scale(0.9); }
    .bento-grid { grid-template-columns: 1fr; } .nav-links { display: none; }
    .contact-visual { border-radius: 30px 30px 0 0; padding: 40px; }
    .chat-window { width: calc(100vw - 40px); right: -10px; bottom: 80px; height: 500px; }
}
