@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@200;300;400;600&family=JetBrains+Mono:wght@100;400&display=swap');

:root {
    --bg-color: #ffffff;
    --text-color: #222222;
    --border-color: rgba(0, 0, 0, 0.08);
    --font-main: 'Outfit', sans-serif;
}

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

body {
    font-family: var(--font-main);
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.8;
    overflow-x: hidden;
}

#bg-canvas {
    position: fixed;
    top: 0; left: 0; width: 100vw; height: 100vh;
    z-index: -1;
    pointer-events: none;
}

.glass-nav {
    position: fixed; top: 0; width: 100%;
    padding: 1.5rem 5%;
    background: rgba(255, 255, 255, 0.95);
    z-index: 1000;
    border-bottom: 1px solid var(--border-color);
}
.nav-content { display: flex; justify-content: space-between; align-items: center; max-width: 1200px; margin: 0 auto; }
.logo { font-weight: 600; font-size: 1.2rem; letter-spacing: 2px; text-transform: uppercase; }
.nav-links { display: flex; gap: 2rem; list-style: none; }
.nav-links a { color: var(--text-color); text-decoration: none; font-size: 0.9rem; transition: opacity 0.3s; }
.nav-links a:hover { opacity: 0.5; }

@media (max-width: 800px) {
    .nav-links { display: none; }
}

.hero {
    min-height: 100vh;
    display: flex; align-items: center; justify-content: center;
    padding: 0 5%; text-align: center;
}
.hero-content {
    max-width: 900px;
}

.rainbow-title {
    font-size: 4rem;
    font-weight: 300;
    line-height: 1.1;
    margin-bottom: 2rem;
    background: linear-gradient(90deg, #ff0000, #ff7f00, #ddbb00, #00bb00, #0000ff, #4b0082, #8b00ff, #ff0000);
    background-size: 200% auto;
    color: transparent;
    -webkit-background-clip: text;
    background-clip: text;
    animation: rainbowShift 6s linear infinite;
}

@keyframes rainbowShift {
    0% { background-position: 0% 50%; }
    100% { background-position: 200% 50%; }
}

.subtitle {
    font-size: 1.2rem;
    font-weight: 300;
    opacity: 0.8;
}

/* Grille restaurée selon cahier des charges */
.content-section {
    padding: 8rem 5%;
    max-width: 1200px; margin: 0 auto;
    display: grid; grid-template-columns: 1fr 1fr; gap: 4rem; align-items: center;
}
.alt-bg {
    background: rgba(0, 0, 0, 0.02);
    border-radius: 20px;
}
.full-width {
    grid-column: 1 / -1;
}

@media (max-width: 900px) {
    .content-section { grid-template-columns: 1fr; }
    .order-mobile { grid-row: 1; }
}

.section-tag {
    font-family: 'JetBrains Mono', monospace;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    opacity: 0.4;
    display: block; margin-bottom: 1rem;
}
h2 {
    font-size: 2.2rem; font-weight: 300; margin-bottom: 2rem; color: #000; line-height: 1.3;
}
p {
    margin-bottom: 1.5rem;
    font-size: 1.15rem;
    color: #333;
}
.quote-block {
    margin: 3.5rem 0;
    padding: 2.5rem;
    background: rgba(0,0,0,0.012);
    border-left: 2px solid rgba(0,0,0,0.12);
    font-style: italic;
    font-weight: 300;
    font-size: 1.1rem;
}
.quote-source {
    display: block; margin-top: 1rem; font-size: 0.9rem; font-family: 'JetBrains Mono', monospace; opacity: 0.5; font-style: normal;
}

.canvas-container {
    width: 100%; aspect-ratio: 1; position: relative;
    background: transparent;
}
.canvas-container canvas { width: 100%; height: 100%; }

.ia-details {
    background: rgba(0, 0, 0, 0.02);
    border: 1px solid var(--border-color);
    padding: 2.5rem; border-radius: 16px;
    margin-top: 2rem; margin-bottom: 2rem;
}
.ia-details summary { cursor: pointer; font-family: 'JetBrains Mono', monospace; font-size: 1rem; font-weight: 600; outline: none; }
.ia-content { margin-top: 2rem; font-size: 0.95rem; }
.ia-content h4 { margin-top: 1.5rem; margin-bottom: 0.5rem; font-size: 1.1rem; font-weight: 400; color: #000; }

/* Observers classes - Disabled to ensure visibility */
.reveal { opacity: 1; transform: none; transition: none; }
.reveal.visible { opacity: 1; transform: none; }

/* -------------------------------------------
   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;
    }
}
