/**
 * CerveauVirtuel - Main Stylesheet
 * Centre de recherche en Intelligence Artificielle
 */

/* ========== VARIABLES ========== */
:root {
    /* Couleurs principales */
    --primary: #1a365d;
    --primary-dark: #0f1f38;
    --primary-light: #2c5282;
    --secondary: #38b2ac;
    --accent: #6b46c1;
    
    /* États */
    --success: #48bb78;
    --info: #4299e1;
    --warning: #ed8936;
    --danger: #e53e3e;
    
    /* Neutres */
    --gray-100: #f7fafc;
    --gray-200: #edf2f7;
    --gray-300: #e2e8f0;
    --gray-400: #cbd5e0;
    --gray-500: #a0aec0;
    --gray-600: #718096;
    --gray-700: #4a5568;
    --gray-800: #2d3748;
    --gray-900: #1a202c;
    
    /* Typographie */
    --font-heading: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-body: 'Open Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    
    /* Espacement */
    --section-padding: 5rem;
    
    /* Bordures */
    --border-radius: 0.5rem;
    --border-radius-lg: 1rem;
    
    /* Ombres */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    
    /* Transitions */
    --transition: all 0.3s ease;
}

/* ========== BASE ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    color: var(--gray-800);
    line-height: 1.6;
    background-color: #fff;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    font-weight: 600;
    color: var(--gray-900);
}

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

a:hover {
    color: var(--primary-light);
}

/* ========== NAVIGATION ========== */
.navbar {
    padding: 1rem 0;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 100%) !important;
}

.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
}

.navbar-nav .nav-link {
    font-weight: 500;
    padding: 0.5rem 1rem !important;
    border-radius: var(--border-radius);
    transition: var(--transition);
}

.navbar-nav .nav-link:hover,
.navbar-nav .nav-link.active {
    background-color: rgba(255, 255, 255, 0.1);
}

/* ========== HERO SECTION ========== */
.hero-section {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-light) 50%, var(--secondary) 100%);
    color: white;
    position: relative;
    overflow: hidden;
}

.hero-content {
    padding: 4rem 0;
}

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

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

.hero-description {
    font-size: 1.25rem;
    opacity: 0.9;
    margin-bottom: 2rem;
    max-width: 500px;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.hero-actions .btn {
    padding: 0.75rem 1.5rem;
    font-weight: 500;
}

.hero-actions .btn-outline-light:hover {
    background-color: white;
    color: var(--primary);
}

.hero-stats {
    margin-top: 3rem;
}

.stat-item {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: white;
}

.stat-label {
    font-size: 0.875rem;
    opacity: 0.8;
}

/* Neural Network Animation */
.hero-visual {
    position: relative;
    height: 400px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.neural-network {
    position: relative;
    width: 300px;
    height: 300px;
}

.node {
    position: absolute;
    width: 20px;
    height: 20px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
}

.node-1 { top: 20%; left: 30%; animation-delay: 0s; }
.node-2 { top: 20%; left: 70%; animation-delay: 0.3s; }
.node-3 { top: 50%; left: 20%; animation-delay: 0.6s; }
.node-4 { top: 50%; left: 50%; animation-delay: 0.9s; }
.node-5 { top: 50%; left: 80%; animation-delay: 1.2s; }
.node-6 { top: 80%; left: 50%; animation-delay: 1.5s; }

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 0.3; }
    50% { transform: scale(1.2); opacity: 0.8; }
}

.connection {
    position: absolute;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.3), transparent);
    animation: flow 3s ease-in-out infinite;
}

@keyframes flow {
    0%, 100% { opacity: 0; }
    50% { opacity: 1; }
}

.hero-wave {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    line-height: 0;
}

/* ========== BADGES ========== */
.badge.bg-accent {
    background-color: var(--accent) !important;
    color: white;
    font-weight: 500;
    padding: 0.5rem 1rem;
}

/* ========== SECTIONS ========== */
.section-header {
    margin-bottom: 3rem;
}

.section-badge {
    display: inline-block;
    background-color: var(--primary);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 2rem;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 1rem;
}

.section-title {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.section-description {
    font-size: 1.125rem;
    color: var(--gray-600);
    max-width: 600px;
    margin: 0 auto;
}

/* ========== SERVICE CARDS ========== */
.services-section {
    padding: var(--section-padding) 0;
}

.service-card {
    background: white;
    border-radius: var(--border-radius-lg);
    padding: 2rem;
    height: 100%;
    box-shadow: var(--shadow);
    transition: var(--transition);
    border: 1px solid var(--gray-200);
}

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

.service-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.service-icon i {
    font-size: 1.5rem;
    color: white;
}

.service-title {
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
}

.service-description {
    color: var(--gray-600);
    margin-bottom: 1.5rem;
}

.service-link {
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.service-link:hover {
    gap: 0.75rem;
}

/* ========== FEATURES SECTION ========== */
.features-section {
    padding: var(--section-padding) 0;
}

.feature-list {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.feature-item {
    display: flex;
    align-items: flex-start;
    gap: 1rem;
}

.feature-icon {
    width: 48px;
    height: 48px;
    background: var(--gray-100);
    border-radius: var(--border-radius);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.feature-icon i {
    font-size: 1.25rem;
    color: var(--primary);
}

.feature-content h4 {
    font-size: 1.125rem;
    margin-bottom: 0.25rem;
}

.feature-content p {
    color: var(--gray-600);
    margin-bottom: 0;
}

/* ========== CODE PREVIEW ========== */
.code-preview {
    background: var(--gray-900);
    border-radius: var(--border-radius-lg);
    overflow: hidden;
}

.code-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    background: var(--gray-800);
}

.code-dots {
    display: flex;
    gap: 0.5rem;
}

.code-dots span {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.code-dots span:nth-child(1) { background: #ff5f56; }
.code-dots span:nth-child(2) { background: #ffbd2e; }
.code-dots span:nth-child(3) { background: #27c93f; }

.code-title {
    color: var(--gray-400);
    font-size: 0.875rem;
}

.code-content {
    padding: 1.5rem;
    margin: 0;
    color: var(--gray-300);
    font-family: 'Fira Code', monospace;
    font-size: 0.875rem;
    overflow-x: auto;
}

.code-keyword { color: #c678dd; }
.code-string { color: #98c379; }
.code-variable { color: #e06c75; }
.code-comment { color: #5c6370; font-style: italic; }

/* ========== CTA SECTION ========== */
.cta-section {
    padding: var(--section-padding) 0;
}

.cta-card {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    border-radius: var(--border-radius-lg);
    padding: 3rem;
    color: white;
}

.cta-title {
    color: white;
    font-size: 2rem;
    margin-bottom: 0.5rem;
}

.cta-description {
    opacity: 0.9;
    margin-bottom: 0;
}

.cta-card .btn-light {
    color: var(--primary);
    font-weight: 500;
}

.cta-card .btn-light:hover {
    background: white;
}

/* ========== TRUST SECTION ========== */
.trust-section {
    padding: 3rem 0;
}

.trust-logo {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--gray-400);
    letter-spacing: 0.1em;
}

/* ========== FOOTER ========== */
footer {
    margin-top: auto;
}

footer h5, footer h6 {
    color: white;
}

footer a:hover {
    color: white !important;
}

.social-links a {
    opacity: 0.7;
    transition: var(--transition);
}

.social-links a:hover {
    opacity: 1;
}

/* ========== RESPONSIVE ========== */
@media (max-width: 991.98px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .section-title {
        font-size: 2rem;
    }
    
    .cta-card {
        text-align: center;
    }
    
    .cta-card .text-lg-end {
        margin-top: 1.5rem;
    }
}

@media (max-width: 767.98px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .hero-description {
        font-size: 1rem;
    }
    
    .hero-actions {
        flex-direction: column;
    }
    
    .hero-actions .btn {
        width: 100%;
    }
}
