:root {
    --bg-color: #000000;
    --card-bg: #111111;
    --text-primary: #f5f5f7;
    --text-secondary: #86868b;
    --border-color: #333333;
    --font-stack: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --terminal-bg: #0a0a0a;
    --terminal-text-subtle: #a1a1a1;
}

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

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: var(--font-stack);
    overflow-x: hidden;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
}

/* --- Navigation --- */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    display: flex;
    justify-content: center; /* Centre le conteneur intérieur */
    padding: 1.2rem 2rem;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    z-index: 100;
    border-bottom: 1px solid rgba(255,255,255,0.05);
}

.nav-inner {
    width: 100%;
    max-width: 1200px; /* Aligné avec le reste du contenu */
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-weight: 800;
    font-size: 1.1rem;
    letter-spacing: -0.02em;
    color: var(--text-primary);
    text-decoration: none;
    transition: opacity 0.3s ease;
}

.logo:hover {
    opacity: 0.8;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    font-weight: 500;
    transition: color 0.3s ease;
}

.nav-links a:hover {
    color: var(--text-primary);
}

/* Bouton Langue */
.btn-lang {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #fff;
    padding: 0.5rem 0.9rem;
    border-radius: 99px; /* Pill shape */
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.2s ease;
    font-family: var(--font-stack);
    display: flex;
    align-items: center;
    gap: 6px;
}

.btn-lang:hover {
    background: rgba(255, 255, 255, 0.25);
    border-color: #fff;
    transform: scale(1.05);
}

/* --- Hero Section --- */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    position: relative;
    padding: 6rem 1rem 0 1rem; /* Padding top pour la navbar fixe */
}

/* Animation d'entrée */
.fade-in-up {
    animation: fadeInUp 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    opacity: 0;
    transform: translateY(20px);
}

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

.badge {
    display: inline-block;
    border: 1px solid #333;
    padding: 0.4rem 1rem;
    border-radius: 99px;
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    background: rgba(255,255,255,0.03);
    backdrop-filter: blur(5px);
}

.hero h1 {
    font-size: 4.5rem;
    line-height: 1.05;
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: 1.5rem;
    background: linear-gradient(180deg, #fff 20%, #777 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.subtitle {
    font-size: 1.35rem;
    color: var(--text-secondary);
    max-width: 650px;
    margin-bottom: 3.5rem;
    font-weight: 400;
    margin-left: auto;
    margin-right: auto;
}

/* --- Boutons Animés --- */
.cta-group {
    display: flex;
    gap: 1.2rem;
    justify-content: center; /* Centrage explicite */
    align-items: center;
}

.btn-primary, .btn-secondary {
    position: relative;
    padding: 1rem 2.2rem;
    border-radius: 99px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

.btn-primary {
    background: #fff;
    color: #000;
    box-shadow: 0 0 20px rgba(255, 255, 255, 0.1);
}

.btn-primary:hover {
    transform: scale(1.05);
    box-shadow: 0 0 30px rgba(255, 255, 255, 0.3);
}

.btn-secondary {
    background: rgba(255,255,255,0.08);
    color: #fff;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.05);
}

.btn-secondary:hover {
    transform: scale(1.05);
    background: rgba(255,255,255,0.15);
    border-color: rgba(255,255,255,0.2);
}

/* Glow Effect Background */
.glow-effect {
    position: absolute;
    width: 80vw;
    height: 80vw;
    max-width: 800px;
    max-height: 800px;
    background: radial-gradient(circle, rgba(255,255,255,0.06) 0%, rgba(0,0,0,0) 70%);
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: -1;
    pointer-events: none;
}

/* --- Terminal Section --- */
.terminal-section {
    padding: 6rem 1rem;
    display: flex;
    justify-content: center;
    background: linear-gradient(to bottom, #000 0%, #0c0c0c 100%);
}

.terminal-window {
    width: 100%;
    max-width: 850px;
    background: var(--terminal-bg);
    border-radius: 14px;
    box-shadow: 0 30px 60px rgba(0,0,0,0.6);
    border: 1px solid #222;
    overflow: hidden;
    font-family: 'Menlo', 'Monaco', 'Courier New', monospace;
    font-size: 0.9rem;
    opacity: 0; /* Pour l'animation au scroll */
    transform: translateY(30px);
    transition: all 0.8s ease-out;
}

.terminal-window.visible {
    opacity: 1;
    transform: translateY(0);
}

.terminal-header {
    background: #141414;
    padding: 0.8rem 1rem;
    display: flex;
    align-items: center;
    position: relative;
    border-bottom: 1px solid #222;
}

.traffic-lights {
    display: flex;
    gap: 8px;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}
.red { background: #ff5f56; }
.yellow { background: #ffbd2e; }
.green { background: #27c93f; }

.terminal-title {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    color: #666;
    font-size: 0.8rem;
    font-weight: 500;
}

.terminal-body {
    padding: 2rem;
    color: var(--terminal-text-subtle);
    min-height: 350px;
    line-height: 1.6;
}

#typewriter { white-space: pre-wrap; }
.keyword { color: #ff79c6; }
.string { color: #f1fa8c; }
.comment { color: #6272a4; }
.success { color: #50fa7b; font-weight: bold; }
.cursor { animation: blink 1s step-end infinite; color: #fff; }
@keyframes blink { 50% { opacity: 0; } }

/* --- Features Bento Grid --- */
.features {
    padding: 8rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
}

/* --- How It Works --- */
.how-it-works {
    padding: 6rem 2rem 8rem 2rem;
    max-width: 1200px;
    margin: 0 auto;
    background: transparent;
}

.steps-container {
    display: flex;
    justify-content: space-between;
    gap: 2rem;
    margin-top: 4rem;
}

.step {
    flex: 1;
    background: rgba(255,255,255,0.02);
    padding: 2.5rem;
    border-radius: 20px;
    border: 1px solid #222;
    transition: transform 0.3s ease;
    opacity: 0;
    transform: translateY(20px);
}

.step.visible {
    opacity: 1;
    transform: translateY(0);
}

.step:hover {
    transform: translateY(-5px);
    background: rgba(255,255,255,0.04);
}

.step-number {
    font-size: 4rem;
    font-weight: 800;
    color: #222;
    line-height: 1;
    margin-bottom: 1.5rem;
}

.step h3 {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: #fff;
}

.step p {
    color: var(--text-secondary);
    line-height: 1.5;
}

@media (max-width: 768px) {
    .steps-container {
        flex-direction: column;
    }
}

.section-header {
    text-align: center;
    margin-bottom: 5rem;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.8s ease-out;
}

.section-header.visible {
    opacity: 1;
    transform: translateY(0);
}

.section-header h2 {
    font-size: 3.5rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.section-header p {
    color: var(--text-secondary);
    font-size: 1.4rem;
}

.bento-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
    grid-auto-rows: minmax(280px, auto);
}

.card {
    background: var(--card-bg);
    border-radius: 24px;
    padding: 2.5rem;
    border: 1px solid #222;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: transform 0.4s ease, border-color 0.4s ease;
    opacity: 0; /* Anim scroll */
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.card.visible {
    opacity: 1;
    transform: translateY(0);
}

.card:hover {
    border-color: #444;
    transform: translateY(-5px);
}

.card-large {
    grid-column: span 2;
    grid-row: span 2;
    background: linear-gradient(145deg, #111 0%, #1a1a1a 100%);
}

.card-wide {
    grid-column: span 3;
}

.card h3 {
    font-size: 1.8rem;
    margin-bottom: 0.8rem;
    font-weight: 600;
}

.card p {
    color: var(--text-secondary);
    font-size: 1.1rem;
    line-height: 1.5;
}

/* --- Stats --- */
.stats-section {
    display: flex;
    justify-content: space-around;
    padding: 6rem 2rem;
    border-top: 1px solid #222;
    border-bottom: 1px solid #222;
    background: #050505;
    opacity: 0;
    transition: opacity 1s ease;
}

.stats-section.visible {
    opacity: 1;
}

.stat-item { text-align: center; }
.stat-number {
    display: block;
    font-size: 3.5rem;
    font-weight: 800;
    color: #fff;
    margin-bottom: 0.5rem;
}
.stat-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}

/* --- Footer --- */
footer {
    padding: 4rem 2rem;
    background: #000;
    text-align: center;
}
.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}
.footer-logo { font-weight: 800; letter-spacing: -0.05em; font-size: 1.2rem; }
.footer-disclaimer { color: #444; font-size: 0.8rem; }
.footer-links { display: flex; gap: 2rem; }
.footer-links a { color: #666; text-decoration: none; font-size: 0.9rem; transition: color 0.2s;}
.footer-links a:hover { color: #fff; }

/* --- Responsiveness (Mobile & Tablet) --- */
@media (max-width: 1024px) {
    .hero h1 { font-size: 3.5rem; }
    .bento-grid { grid-template-columns: repeat(2, 1fr); }
    .card-large { grid-column: span 2; }
    .card-wide { grid-column: span 2; }
}

@media (max-width: 768px) {
    .navbar { padding: 1rem; }
    .nav-links { display: none; } /* On cache les liens sur mobile pour simplifier */
    
    .hero { padding-top: 5rem; }
    .hero h1 { font-size: 2.8rem; }
    .subtitle { font-size: 1.1rem; margin-bottom: 2.5rem; }
    
    .cta-group {
        flex-direction: column;
        width: 100%;
        gap: 1rem;
    }
    
    .btn-primary, .btn-secondary {
        width: 100%;
        text-align: center;
    }

    .bento-grid { grid-template-columns: 1fr; }
    .card-large, .card-wide { grid-column: span 1; }

    .stats-section {
        flex-direction: column;
        gap: 3rem;
    }
}