/* -------------------------------------------
   GLOBAL & VARIABLES (Thème Sombre / Vortex Lumineux)
   ------------------------------------------- */
   :root {
    --bg-base: #0b0c10;      /* Noir spatial, très profond, légèrement bleu/gris */
    --bg-panel: rgba(18, 20, 26, 0.7); /* Verre fumé profond */
    --border-light: rgba(69, 243, 255, 0.15); /* Bordures subtiles Cyan/Bleu */
    
    --text-main: #e0e6ed;    /* Blanc bleuté pour le texte principal */
    --text-secondary: rgba(224, 230, 237, 0.65); 
    
    --accent-1: #f2a900;     /* Or chaud (Lumière, Atomes nobles, Soleil) */
    --accent-2: #45f3ff;     /* Cyan électrique / Bleu quantique (Onde, Tension) */
    --accent-gradient: linear-gradient(135deg, var(--accent-1), var(--accent-2));
    
    --font-sans: 'Inter', system-ui, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    
    --transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --radius-lg: 20px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    background-color: var(--bg-base);
    color: var(--text-main);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
}

/* Background Canvas */
#vortex-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    opacity: 0.8;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 0 2rem;
}

.container.wide {
    max-width: 1200px;
}

.section {
    padding: 8rem 0;
    position: relative;
}

.alt-bg {
    background: linear-gradient(to bottom, transparent, rgba(69, 243, 255, 0.02), transparent);
}

/* -------------------------------------------
   NAVIGATION
   ------------------------------------------- */
.glass-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 1rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(11, 12, 16, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-light);
    z-index: 1000;
    transition: var(--transition);
}

.glass-nav.scrolled {
    padding: 0.8rem 2rem;
    background: rgba(11, 12, 16, 0.9);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.5);
    border-bottom: 1px solid rgba(69, 243, 255, 0.2);
}

.logo {
    font-weight: 800;
    font-size: 1.2rem;
    letter-spacing: -0.5px;
    color: var(--text-main);
}

.logo span {
    color: var(--accent-1);
    font-weight: 400;
}

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

.nav-links a {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.9rem;
    transition: var(--transition);
    position: relative;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.nav-links a:hover, .nav-links a.active {
    color: var(--accent-2);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent-gradient);
    transition: var(--transition);
}

.nav-links a.active::after {
    width: 100%;
}

.menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text-main);
    cursor: pointer;
}

/* -------------------------------------------
   HERO SECTION
   ------------------------------------------- */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 0 1rem;
    position: relative;
    background: radial-gradient(circle at center, rgba(69, 243, 255, 0.05) 0%, transparent 60%);
}

.badge {
    display: inline-block;
    padding: 0.4rem 1rem;
    border-radius: 50px;
    background: rgba(69, 243, 255, 0.05);
    border: 1px solid rgba(69, 243, 255, 0.3);
    color: var(--accent-2);
    font-family: var(--font-mono);
    font-size: 0.85rem;
    margin-bottom: 1.5rem;
    animation: fadeInDown 0.8s ease-out forwards;
}

.hero h1 {
    font-size: clamp(3rem, 6vw, 5rem);
    line-height: 1.1;
    letter-spacing: -1.5px;
    margin-bottom: 1.5rem;
    color: #fff;
}

.gradient-text {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.subtitle {
    max-width: 650px;
    font-size: 1.1rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
}

.btn {
    padding: 0.8rem 1.8rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: var(--transition);
}

.btn-primary {
    background: var(--accent-gradient);
    color: #111;
    box-shadow: 0 4px 15px rgba(242, 169, 0, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(69, 243, 255, 0.4);
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--border-light);
    color: var(--text-main);
}

.btn-outline:hover {
    border-color: var(--accent-1);
    background: rgba(242, 169, 0, 0.05);
}

.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    opacity: 0.6;
}

.mouse {
    width: 24px;
    height: 36px;
    border: 2px solid var(--text-secondary);
    border-radius: 20px;
    position: relative;
}

.mouse::before {
    content: '';
    position: absolute;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    width: 4px;
    height: 4px;
    background: var(--text-secondary);
    border-radius: 50%;
    animation: scroll 1.5s infinite;
}

@keyframes scroll {
    0% { transform: translate(-50%, 0); opacity: 1; }
    100% { transform: translate(-50%, 15px); opacity: 0; }
}

/* -------------------------------------------
   SECTION COMPONENTS
   ------------------------------------------- */
.section-header {
    text-align: center;
    margin-bottom: 4rem;
}

.section-header h2 {
    font-size: 2.5rem;
    letter-spacing: -1px;
    margin-bottom: 1rem;
    color: #fff;
}

.section-header h2 span {
    color: var(--accent-1);
}

.section-header p {
    color: var(--text-secondary);
    max-width: 500px;
    margin: 0 auto;
    font-size: 1.05rem;
}

.grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.glass-panel {
    background: var(--bg-panel);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
}

.text-card h3 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    letter-spacing: -0.5px;
    color: #fff;
}

.text-card p {
    margin-bottom: 1.2rem;
    color: var(--text-secondary);
}

.math-box {
    background: rgba(69, 243, 255, 0.05);
    border-left: 3px solid var(--accent-2);
    padding: 1.5rem;
    margin: 1.5rem 0;
    border-radius: 4px 8px 8px 4px;
    font-size: 1rem;
}

.math-box.glow {
    box-shadow: 0 0 20px rgba(242, 169, 0, 0.1);
    border: 1px solid rgba(242, 169, 0, 0.2);
    border-left: 4px solid var(--accent-1);
}

.mono-label {
    font-family: var(--font-mono);
    color: var(--accent-1);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
    display: block;
}

.cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.feature-card {
    transition: var(--transition);
}

.feature-card:hover {
    transform: translateY(-5px);
    border-color: rgba(69, 243, 255, 0.4);
    box-shadow: 0 10px 40px rgba(69, 243, 255, 0.1);
}

.canvas-wrapper {
    width: 100%;
    aspect-ratio: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    border-radius: 12px;
    overflow: hidden;
    background: radial-gradient(circle, rgba(11, 12, 16, 0.8) 0%, rgba(11, 12, 16, 0) 70%);
}

.caption {
    font-size: 0.9rem;
    color: var(--text-secondary);
    text-align: center;
    margin-top: 1rem;
    font-style: italic;
}

/* -------------------------------------------
   SECTION IA (DÉPLIANTE)
   ------------------------------------------- */
.ia-details {
    padding: 1.5rem 2rem;
    transition: var(--transition);
    cursor: default;
}
.ia-summary {
    cursor: pointer;
    list-style: none;
    outline: none;
    display: flex;
    align-items: center;
}
.ia-summary::-webkit-details-marker { display: none; }
.ia-summary::after {
    content: '+';
    margin-left: auto;
    font-size: 1.5rem;
    font-weight: 300;
    color: var(--accent-2);
    transition: transform 0.3s ease;
}
.ia-details[open] .ia-summary::after { transform: rotate(45deg); }

.ia-content {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px dashed rgba(69, 243, 255, 0.2);
    font-size: 0.95rem;
    color: var(--text-main);
    animation: fadeDown 0.4s ease forwards;
}

.ia-content h4 { color: var(--accent-1); margin: 1.5rem 0 0.5rem; font-size: 1.1rem; }
.ia-content p, .ia-content ul, .ia-content ol { margin-bottom: 1rem; color: var(--text-secondary); padding-left: 2rem; }
.ia-content li { margin-bottom: 0.5rem; }

.ia-quote {
    background: rgba(242, 169, 0, 0.05);
    border-left: 3px solid var(--accent-1);
    padding: 1rem 1.5rem;
    margin: 1.5rem 0;
    font-style: italic;
    border-radius: 0 8px 8px 0;
}

@keyframes fadeDown {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* -------------------------------------------
   FOOTER
   ------------------------------------------- */
.footer-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    border-bottom: 1px dashed rgba(69, 243, 255, 0.4);
    padding-bottom: 2px;
    transition: var(--transition);
    margin: 0 10px;
}
.footer-link:hover {
    color: var(--accent-2);
    border-bottom-color: var(--accent-2);
}

.copyright { text-align: center; color: rgba(224, 230, 237, 0.3); font-size: 0.85rem; margin-top: 2rem; }
.footer-content { display: flex; flex-direction: column; align-items: center; gap: 1rem; text-align: center; }

/* -------------------------------------------
   ANIMATIONS & RESPONSIVE
   ------------------------------------------- */
.reveal-up { opacity: 0; transform: translateY(30px); transition: all 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94); }
.reveal-up.active { opacity: 1; transform: translateY(0); }

@keyframes fadeInDown { from { opacity: 0; transform: translateY(-20px); } to { opacity: 1; transform: translateY(0); } }
.fade-in { opacity: 0; animation: fadeIn 1s ease-out forwards; animation-delay: 0.3s; }
@keyframes fadeIn { to { opacity: 1; } }

@media (max-width: 768px) {
    .glass-nav { padding: 1rem; }
    .nav-links {
        position: absolute; top: 100%; left: 0; width: 100%;
        background: rgba(11, 12, 16, 0.98);
        flex-direction: column; gap: 0; clip-path: polygon(0 0, 100% 0, 100% 0, 0 0);
        border-bottom: 1px solid var(--border-light);
    }
    .nav-links.active { clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%); }
    .nav-links li a { display: block; padding: 1rem 2rem; border-bottom: 1px solid rgba(255,255,255,0.05); }
    .menu-btn { display: block; }
    .hero h1 { font-size: 2.5rem; }
    .grid-2 { grid-template-columns: 1fr; gap: 2rem; }
    .reverse-mobile { display: flex; flex-direction: column-reverse; }
    .section { padding: 4rem 0; }
}

/* -------------------------------------------
   RESPONSIVE TEXT & OVERFLOW FIXES (Mobile)
   ------------------------------------------- */
body {
    word-break: break-word;
    overflow-wrap: break-word;
    -webkit-hyphens: auto;
    hyphens: auto;
}
.math-display, .math-box, .ia-content, pre, code {
    overflow-x: auto;
    overflow-y: hidden;
    max-width: 100%;
}
@media (max-width: 768px) {
    .glass-panel {
        padding: 1.5rem !important;
    }
    .ia-details {
        padding: 1rem 1.2rem !important;
    }
    .hero h1 {
        font-size: 2.2rem !important;
    }
    .section {
        padding: 4rem 0 !important;
    }
    .container {
        padding: 0 1rem !important;
    }
}
