/* -------------------------------------------
   STYLES GLOBALES - TECHNOLOGIES DE RÉSONANCE (LIGHT MODE)
   ------------------------------------------- */

   :root {
    --bg-base: #fafcff;
    --bg-panel: rgba(255, 255, 255, 0.7);
    --border-light: rgba(106, 0, 244, 0.15); /* Indigo clair */
    
    --text-main: #1a0033; /* Violet très sombre */
    --text-secondary: rgba(26, 0, 51, 0.65); 
    
    --accent-1: #6a00f4; /* Violet Magnétique / Onde scalaire */
    --accent-2: #00e5ff; /* Cyan Plasma */
    --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;
    max-width: 100vw;
}

html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

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

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

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

section {
    padding: 8rem 0;
    position: relative;
    max-width: 100vw;
    overflow: hidden;
}

.alt-bg {
    background: linear-gradient(to bottom, transparent, rgba(106, 0, 244, 0.04), transparent);
}

/* -------------------------------------------
   TYPOGRAPHIES
   ------------------------------------------- */

h1, h2, h3, h4 {
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.reveal-text {
    font-size: clamp(2.5rem, 6vw, 5rem);
    margin-bottom: 1.5rem;
    animation: fadeUp 1s ease forwards;
}

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

h2 {
    font-size: clamp(2rem, 4vw, 3.5rem);
    margin-bottom: 1rem;
}

h2 span {
    color: var(--accent-1);
    font-style: italic;
    font-weight: 300;
}

h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--accent-1);
}

.mono-label {
    font-family: var(--font-mono);
    color: var(--accent-1);
    font-size: 0.9rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: 0.5rem;
}

.subtitle {
    font-size: clamp(1rem, 2vw, 1.25rem);
    color: var(--text-secondary);
    max-width: 800px;
    margin: 0 auto 2.5rem;
}

/* -------------------------------------------
   NAVIGATION
   ------------------------------------------- */

.glass-nav {
    position: fixed;
    top: 0;
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    background: rgba(250, 252, 255, 0.7);
    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: 1rem 2rem;
    background: rgba(250, 252, 255, 0.9) !important;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
}

.logo {
    font-weight: 800;
    font-size: 1.25rem;
    letter-spacing: -0.03em;
}

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

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

.nav-links a {
    text-decoration: none;
    color: var(--text-main);
    font-size: 0.95rem;
    font-weight: 500;
    transition: var(--transition);
    position: relative;
    white-space: nowrap;
}

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

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

.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 {
    height: 100vh;
    min-height: 600px;
    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(106, 0, 244, 0.06) 0%, transparent 60%);
}

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

.cta-group {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn {
    padding: 0.8rem 2rem;
    border-radius: 8px;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    white-space: nowrap;
}

.btn-primary {
    background: var(--accent-gradient);
    color: #fff;
    box-shadow: 0 4px 15px rgba(106, 0, 244, 0.2);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(106, 0, 244, 0.3);
}

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

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

.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    animation: bounce 2s infinite;
}

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

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

/* -------------------------------------------
   COMPOSANTS DE SECTIONS
   ------------------------------------------- */

.section-header {
    text-align: center;
    max-width: 800px;
    margin: 0 auto 3rem;
}

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

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

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

.wide {
    max-width: 900px;
    margin: 0 auto;
}

.math-box {
    background: rgba(106, 0, 244, 0.03);
    border-left: 3px solid var(--accent-1);
    padding: 1.5rem;
    margin: 1.5rem 0;
    border-radius: 4px 8px 8px 4px;
    font-size: 1rem;
    overflow-x: auto;
    overflow-y: hidden;
}

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

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

.feature-card {
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    transition: var(--transition);
}

.feature-card:hover {
    transform: translateY(-5px);
    border-color: rgba(106, 0, 244, 0.4);
    box-shadow: 0 10px 30px rgba(106, 0, 244, 0.1);
}

.math-display {
    font-size: 1.05rem; 
    text-align: center;
    margin: 1rem 0;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 0.5rem 0;
}

.huge-math {
    font-size: 1.25rem; 
    color: var(--accent-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(106, 0, 244, 0.05) 0%, transparent 70%);
}

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

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

/* -------------------------------------------
   SECTION IA (DÉPLIANTE) - ADAPTÉE VIOLET/PLASMA
   ------------------------------------------- */

.ia-details {
    padding: 1.5rem 2rem;
    transition: var(--transition);
    cursor: default;
}

.ia-summary {
    cursor: pointer;
    list-style: none; /* Hide default triangle in many browsers */
    outline: none;
    display: flex;
    align-items: center;
}

.ia-summary::-webkit-details-marker {
    display: none; /* Hide default triangle in WebKit */
}

/* Custom triangle/arrow */
.ia-summary::after {
    content: '+';
    margin-left: auto;
    font-size: 1.5rem;
    font-weight: 300;
    color: var(--accent-1);
    transition: transform 0.3s ease;
}

.ia-details[open] .ia-summary::after {
    transform: rotate(45deg); /* Transform into a cross */
}

.ia-content {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px dashed rgba(106, 0, 244, 0.2); /* Pointillés violets */
    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);
}

.ia-content ul, .ia-content ol {
    padding-left: 2rem;
}

.ia-content li {
    margin-bottom: 0.5rem;
}

.ia-quote {
    background: rgba(106, 0, 244, 0.03);
    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); }
}

/* -------------------------------------------
   LISTES TECHNOLOGIQUES
   ------------------------------------------- */

.tech-list li {
    margin-bottom: 2rem;
    padding-left: 1rem;
    border-left: 2px solid rgba(106, 0, 244, 0.3);
}

.tech-list li strong {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 1.15rem;
}

/* -------------------------------------------
   FOOTER
   ------------------------------------------- */

footer {
    background: rgba(240, 248, 245, 0.9);
    padding: 4rem 0 2rem;
    border-top: 1px solid var(--border-light);
    margin-top: 4rem;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1.5rem;
}

.footer-links {
    margin-top: 2rem;
}

.footer-link {
    color: var(--accent-1);
    text-decoration: none;
    font-size: 0.9rem;
    border-bottom: 1px dashed rgba(106, 0, 244, 0.4);
    padding-bottom: 2px;
    transition: var(--transition);
}

.footer-link:hover {
    color: var(--text-main);
    border-color: var(--text-main);
}

.copyright {
    text-align: center;
    margin-top: 3rem;
    font-size: 0.85rem;
    color: rgba(0, 0, 0, 0.4);
}

/* -------------------------------------------
   ANIMATIONS & RESPONSIVE
   ------------------------------------------- */

@keyframes fadeUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% { transform: translateY(0) translateX(-50%); }
    40% { transform: translateY(-10px) translateX(-50%); }
    60% { transform: translateY(-5px) translateX(-50%); }
}

@keyframes scrollMouse {
    0% { opacity: 1; top: 6px; }
    100% { opacity: 0; top: 20px; }
}

.fade-in {
    opacity: 0;
    animation: fadeUp 1s 0.3s ease forwards;
}

.reveal-up {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal-up.in-view {
    opacity: 1;
    transform: translateY(0);
}

@media (max-width: 900px) {
    .grid-2 { grid-template-columns: 1fr; gap: 2rem; }
    .reverse-mobile { display: flex; flex-direction: column-reverse; }
}

@media (max-width: 768px) {
    .menu-btn { display: block; }
    
    .nav-links {
        position: absolute;
        top: 100%;
        left: 0;
        width: 100%;
        background: rgba(250, 255, 252, 0.98);
        flex-direction: column;
        padding: 2rem;
        gap: 1.5rem;
        border-bottom: 1px solid var(--border-light);
        clip-path: polygon(0 0, 100% 0, 100% 0, 0 0);
        transition: clip-path 0.4s ease;
        box-shadow: 0 10px 20px rgba(0,0,0,0.05);
    }
    
    .nav-links.active {
        clip-path: polygon(0 0, 100% 0, 100% 100%, 0 100%);
    }

    /* Réduction globale pour mobile */
    .math-display { font-size: 0.85rem; }
    .huge-math { font-size: 1rem; }
    .math-box { font-size: 0.85rem; }
    .glass-panel { padding: 1.5rem; }
    section { padding: 5rem 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;
    }
}
