/* -------------------------------------------
   GLOBAL & VARIABLES (Thème "Fin des Temps" - Crépuscule & Or)
   ------------------------------------------- */
:root {
    --bg-base: #0f111a; /* Nuit profonde */
    --bg-panel: rgba(20, 22, 35, 0.75);
    --border-light: rgba(184, 134, 11, 0.2); /* Or sombre */
    
    --text-main: #e2e8f0; 
    --text-secondary: rgba(226, 232, 240, 0.7); 
    
    --accent-1: #b8860b; /* Goldenrod (L'Heure / Source) */
    --accent-2: #483d8b; /* Dark Slate Blue (Le Crépuscule) */
    --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.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --radius-lg: 16px;
}

* {
    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.7;
    overflow-x: hidden;
    position: relative;
    /* RESPONSIVE TEXT FIXES */
    word-break: break-word;
    overflow-wrap: break-word;
    -webkit-hyphens: auto;
    hyphens: auto;
}

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

.container {
    max-width: 900px;
    margin: 0 auto;
    padding: 0 2.5rem;
}

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

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

.alt-bg {
    background: linear-gradient(to bottom, transparent, rgba(184, 134, 11, 0.03), transparent);
}

/* -------------------------------------------
   NAVIGATION
   ------------------------------------------- */
.glass-nav {
    position: fixed;
    top: 0; left: 0; width: 100%;
    padding: 1.2rem 2.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(15, 17, 26, 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 2.5rem;
    background: rgba(15, 17, 26, 0.9);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

.logo {
    font-weight: 800;
    font-size: 1.1rem;
    letter-spacing: 1px;
    text-transform: uppercase;
}

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

.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.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    transition: var(--transition);
    position: relative;
}

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

.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;
}

.badge {
    display: inline-block;
    padding: 0.4rem 1.2rem;
    border-radius: 50px;
    background: rgba(184, 134, 11, 0.05);
    border: 1px solid rgba(184, 134, 11, 0.3);
    color: var(--accent-1);
    font-family: var(--font-mono);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 1.5rem;
}

.hero h1 {
    font-size: clamp(2.5rem, 6vw, 4.5rem);
    line-height: 1.1;
    letter-spacing: -1px;
    margin-bottom: 1.5rem;
    font-weight: 300;
}

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

.subtitle {
    max-width: 650px;
    font-size: 1.15rem;
    color: var(--text-secondary);
    margin-bottom: 3rem;
    font-style: italic;
}

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

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

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

.section-header p {
    color: var(--text-secondary);
    max-width: 600px;
    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.2);
}

.text-card h3 {
    font-size: 1.6rem;
    margin-bottom: 1.2rem;
    font-weight: 400;
    color: var(--accent-1);
}

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

.math-box {
    background: rgba(184, 134, 11, 0.05);
    border-left: 2px solid var(--accent-1);
    padding: 1.5rem;
    margin: 1.5rem 0;
    font-family: var(--font-mono);
    font-size: 0.95rem;
    color: var(--accent-1);
}

blockquote {
    border-left: 2px solid var(--accent-2);
    padding: 1rem 2rem;
    margin: 2rem 0;
    font-size: 1.1rem;
    font-style: italic;
    color: var(--text-secondary);
    background: rgba(72, 61, 139, 0.05); /* accent-2 très léger */
}

/* -------------------------------------------
   SECTION IA (DÉPLIANTE)
   ------------------------------------------- */
.ia-details {
    padding: 1.5rem;
    background: rgba(15, 17, 26, 0.8);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    transition: var(--transition);
    cursor: pointer;
    outline: none;
}

.ia-summary {
    list-style: none;
    font-family: var(--font-mono);
    color: var(--accent-1);
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    display: flex;
    align-items: center;
}

.ia-summary::-webkit-details-marker { display: none; }

.ia-content {
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 1px dashed var(--border-light);
    font-size: 0.95rem;
    color: var(--text-secondary);
}

.ia-content h4 {
    color: var(--accent-1);
    margin: 1.5rem 0 0.5rem;
    font-weight: 500;
    font-size: 1.1rem;
}

/* -------------------------------------------
   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);
}

.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 { display: none; }
    
    .hero h1 { font-size: 2.2rem !important; }
    
    .grid-2 { grid-template-columns: 1fr; gap: 2rem; }
    .section { padding: 4rem 0 !important; }
    
    .glass-panel { padding: 1.5rem !important; }
    .ia-details { padding: 1rem 1.2rem !important; }
    .container { padding: 0 1rem !important; }
    
    .math-display, .math-box, .ia-content {
        overflow-x: auto;
        overflow-y: hidden;
    }
}
