/**
 * Intellarys v3 — Minimalist
 * One-screen impact + 3 light sections + collapsible FAQ + presentation modal
 */

/* =========================================================
   TOKENS
   ========================================================= */
:root {
    /* Palette Intellarys */
    --blue:        #2864EA;
    --blue-bright: #5489FF;
    --blue-light:  #A3BFFF;
    --blue-50:     #EFF4FF;

    /* Neutres — dark default */
    --bg:          #020617;
    --bg-raised:   #0F172A;
    --bg-sunken:   #010410;
    --text:        #F8FAFC;
    --text-mid:    #94A3B8;
    --text-dim:    #64748B;
    --border:      rgba(148, 163, 184, 0.10);
    --border-strong: rgba(148, 163, 184, 0.22);

    /* Typography */
    --font:        'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono:   'JetBrains Mono', 'Fira Code', monospace;

    /* Motion */
    --ease:        cubic-bezier(0.16, 1, 0.3, 1);
    --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);
}

[data-theme="light"] {
    --bg:          #F8FAFC;
    --bg-raised:   #FFFFFF;
    --bg-sunken:   #F1F5F9;
    --text:        #0F172A;
    --text-mid:    #475569;
    --text-dim:    #64748B;
    --border:      rgba(15, 23, 42, 0.08);
    --border-strong: rgba(15, 23, 42, 0.18);
    --blue-50:     rgba(40, 100, 234, 0.06);
}

/* =========================================================
   RESET
   ========================================================= */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
    transition: background 0.4s var(--ease), color 0.4s var(--ease);
    position: relative;
}

/* Grille subtile fixe en background — donne de la texture sans saturer */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background-image:
        linear-gradient(rgba(148, 163, 184, 0.025) 1px, transparent 1px),
        linear-gradient(90deg, rgba(148, 163, 184, 0.025) 1px, transparent 1px);
    background-size: 64px 64px;
    pointer-events: none;
    z-index: 0;
}
[data-theme="light"] body::before {
    background-image:
        linear-gradient(rgba(15, 23, 42, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(15, 23, 42, 0.03) 1px, transparent 1px);
}

/* Tech corner markers — accents subtils dans les coins du hero */
.tech-marker {
    position: absolute;
    width: 28px;
    height: 28px;
    pointer-events: none;
    opacity: 0.5;
    z-index: 1;
}
.tech-marker::before,
.tech-marker::after {
    content: '';
    position: absolute;
    background: var(--blue);
}
.tech-marker.tm-tl { top: 100px; left: 32px; }
.tech-marker.tm-tr { top: 100px; right: 32px; }
.tech-marker.tm-bl { bottom: 32px; left: 32px; }
.tech-marker.tm-br { bottom: 32px; right: 32px; }
.tech-marker.tm-tl::before, .tech-marker.tm-tr::before,
.tech-marker.tm-bl::before, .tech-marker.tm-br::before {
    width: 1px; height: 14px; top: 0;
}
.tech-marker.tm-tl::after, .tech-marker.tm-tr::after,
.tech-marker.tm-bl::after, .tech-marker.tm-br::after {
    width: 14px; height: 1px; top: 0;
}
.tech-marker.tm-tl::before { left: 0; }
.tech-marker.tm-tl::after  { left: 0; }
.tech-marker.tm-tr::before { right: 0; }
.tech-marker.tm-tr::after  { right: 0; }
.tech-marker.tm-bl::before { left: 0; bottom: 0; top: auto; }
.tech-marker.tm-bl::after  { left: 0; bottom: 0; top: auto; }
.tech-marker.tm-br::before { right: 0; bottom: 0; top: auto; }
.tech-marker.tm-br::after  { right: 0; bottom: 0; top: auto; }

main, .nav, .footer { position: relative; z-index: 1; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
img { max-width: 100%; height: auto; display: block; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 3px; border-radius: 4px; }
::selection { background: var(--blue); color: white; }

.sr-only {
    position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
    overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* =========================================================
   NAV — ultra-light
   ========================================================= */
.nav {
    position: fixed; top: 0; left: 0; right: 0;
    z-index: 100;
    padding: 1rem 2rem;
    background: rgba(2, 6, 23, 0.6);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    transition: background 0.3s var(--ease);
}
[data-theme="light"] .nav { background: rgba(248, 250, 252, 0.7); }

.nav-inner {
    max-width: 1200px; margin: 0 auto;
    display: flex; justify-content: space-between; align-items: center;
    gap: 1rem;
}
.logo {
    display: flex; align-items: center; gap: 0.5rem;
    font-weight: 700; font-size: 1.05rem; letter-spacing: -0.01em;
}
.logo img { width: 22px; height: 22px; }
.nav-right { display: flex; align-items: center; gap: 1.25rem; }
.nav-link {
    font-size: 0.9rem; color: var(--text-mid); font-weight: 500;
    transition: color 0.2s var(--ease);
    padding: 0;
}
.nav-link:hover { color: var(--text); }
.nav-presentation {
    color: var(--blue-bright);
    font-weight: 600;
}
.nav-presentation:hover { color: var(--blue); }
.theme-toggle {
    width: 32px; height: 32px;
    display: inline-flex; align-items: center; justify-content: center;
    border-radius: 8px;
    color: var(--text-mid);
    transition: background 0.2s, color 0.2s;
}
.theme-toggle:hover { background: var(--bg-raised); color: var(--text); }
.theme-toggle .theme-icon-sun { display: none; }
.theme-toggle .theme-icon-moon { display: block; }
[data-theme="light"] .theme-toggle .theme-icon-sun { display: block; }
[data-theme="light"] .theme-toggle .theme-icon-moon { display: none; }

/* Language switch FR/EN */
.lang-switch {
    display: inline-flex;
    gap: 2px;
    padding: 2px;
    background: var(--bg-raised);
    border: 1px solid var(--border);
    border-radius: 999px;
}
.lang-btn {
    padding: 0.3rem 0.6rem;
    border-radius: 999px;
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 500;
    color: var(--text-dim);
    transition: background 0.2s var(--ease), color 0.2s var(--ease);
    line-height: 1;
}
.lang-btn:hover:not(.active) { color: var(--text); }
.lang-btn.active {
    background: var(--blue);
    color: white;
    font-weight: 600;
}

/* =========================================================
   HERO — full screen impact
   ========================================================= */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 6rem 2rem 4rem;
    position: relative;
    overflow: hidden;
}
.hero::before {
    content: '';
    position: absolute; inset: 0;
    background:
        radial-gradient(ellipse 70% 55% at 50% 30%, rgba(40, 100, 234, 0.18) 0%, transparent 65%),
        radial-gradient(ellipse 45% 40% at 50% 75%, rgba(84, 137, 255, 0.10) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
    animation: heroPulse 10s ease-in-out infinite alternate;
}
.hero::after {
    content: '';
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 800px;
    height: 800px;
    border: 1px solid rgba(40, 100, 234, 0.08);
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
}
[data-theme="light"] .hero::before {
    background:
        radial-gradient(ellipse 70% 55% at 50% 30%, rgba(40, 100, 234, 0.10) 0%, transparent 65%),
        radial-gradient(ellipse 45% 40% at 50% 75%, rgba(40, 100, 234, 0.05) 0%, transparent 70%);
}
[data-theme="light"] .hero::after { border-color: rgba(40, 100, 234, 0.12); }

@keyframes heroPulse {
    0% { opacity: 0.7; }
    100% { opacity: 1; }
}
.hero-content { position: relative; z-index: 1; max-width: 1200px; }

.eyebrow {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--blue-bright);
    text-transform: uppercase;
    letter-spacing: 0.14em;
    padding: 0.55rem 1.25rem;
    border: 1px solid rgba(84, 137, 255, 0.45);
    border-radius: 999px;
    background: rgba(40, 100, 234, 0.10);
    margin-bottom: 2rem;
    opacity: 0;
    transform: translateY(12px);
    animation: fadeUp 0.7s var(--ease) 0.1s forwards;
}
[data-theme="light"] .eyebrow {
    color: var(--blue);
    background: rgba(40, 100, 234, 0.08);
    border-color: rgba(40, 100, 234, 0.35);
}

.hero-title {
    font-size: clamp(2.2rem, 5.5vw, 4.5rem);
    font-weight: 800;
    line-height: 1.08;
    letter-spacing: -0.04em;
    margin-bottom: 1.5rem;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeUp 0.9s var(--ease) 0.25s forwards;
    color: var(--text);
}
.hero-title-line,
.hero-title-accent {
    display: block;
    white-space: nowrap;
}
.hero-title-accent {
    background: linear-gradient(135deg, var(--blue), var(--blue-bright));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
/* Sur mobile, autoriser le retour à la ligne naturel pour éviter le débordement */
@media (max-width: 720px) {
    .hero-title-line,
    .hero-title-accent {
        white-space: normal;
    }
}

.hero-lead {
    font-size: clamp(1.05rem, 1.6vw, 1.25rem);
    color: var(--text-mid);
    max-width: 620px;
    margin: 0 auto 3rem;
    line-height: 1.55;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeUp 0.9s var(--ease) 0.45s forwards;
}

.hero-cta {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.85rem;
    margin-bottom: 4rem;
    opacity: 0;
    transform: translateY(20px);
    animation: fadeUp 0.9s var(--ease) 0.65s forwards;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.9rem 1.75rem;
    border-radius: 999px;
    font-size: 0.95rem;
    font-weight: 600;
    letter-spacing: 0.01em;
    transition: transform 0.3s var(--ease-spring), background 0.25s var(--ease), border-color 0.25s var(--ease), box-shadow 0.25s var(--ease), color 0.25s var(--ease);
    white-space: nowrap;
}
.btn svg { transition: transform 0.3s var(--ease-spring); }
.btn:hover svg { transform: translateX(3px); }

.btn-primary {
    background: var(--blue);
    color: white;
    box-shadow: 0 4px 20px rgba(40, 100, 234, 0.28);
}
.btn-primary:hover {
    background: var(--blue-bright);
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(40, 100, 234, 0.38);
}
.btn-ghost {
    background: transparent;
    color: var(--text);
    border: 1px solid var(--border-strong);
}
.btn-ghost:hover {
    border-color: var(--text);
    background: var(--bg-raised);
    transform: translateY(-1px);
}

.hero-trust {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.4rem 2rem;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    opacity: 0;
    animation: fadeIn 0.9s var(--ease) 0.9s forwards;
}
.hero-trust li {
    position: relative;
    padding-left: 1rem;
}
.hero-trust li::before {
    content: '';
    position: absolute;
    left: 0; top: 50%;
    transform: translateY(-50%);
    width: 6px; height: 6px;
    border-radius: 50%;
    background: var(--blue);
}

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

/* =========================================================
   BLOCS DE CONTENU — minimaliste
   ========================================================= */
.block {
    padding: 6rem 2rem;
    position: relative;
}
.block-alt {
    background: var(--bg-sunken);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
}
.block-inner {
    max-width: 820px;
    margin: 0 auto;
    text-align: center;
}
.block-eyebrow {
    display: inline-block;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--blue);
    text-transform: uppercase;
    letter-spacing: 0.18em;
    margin-bottom: 1.5rem;
}
.block-title {
    font-size: clamp(1.5rem, 3.2vw, 2.2rem);
    font-weight: 700;
    line-height: 1.25;
    letter-spacing: -0.02em;
    color: var(--text);
    margin-bottom: 1.5rem;
}
.block-lead {
    font-size: clamp(1rem, 1.3vw, 1.15rem);
    color: var(--text-mid);
    line-height: 1.65;
    max-width: 680px;
    margin: 0 auto;
}
.block-signoff {
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
    font-size: clamp(1.05rem, 1.4vw, 1.2rem);
    color: var(--text);
    line-height: 1.5;
}
.block-signoff strong { color: var(--text); font-weight: 600; }

.contact-actions {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.85rem;
    margin-top: 2.5rem;
    margin-bottom: 3rem;
}

/* =========================================================
   FAQ — collapsable
   ========================================================= */
.faq-toggle {
    max-width: 680px;
    margin: 0 auto;
    text-align: left;
    border-top: 1px solid var(--border);
    padding-top: 2.5rem;
}
.faq-toggle > summary {
    list-style: none;
    cursor: pointer;
    font-family: var(--font-mono);
    font-size: 0.72rem;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.18em;
    text-align: center;
    user-select: none;
    transition: color 0.2s var(--ease);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-left: 50%;
    transform: translateX(-50%);
}
.faq-toggle > summary::-webkit-details-marker { display: none; }
.faq-toggle > summary::after {
    content: '+';
    color: var(--blue);
    font-size: 1.1rem;
    line-height: 1;
    transition: transform 0.3s var(--ease);
    display: inline-block;
}
.faq-toggle[open] > summary::after {
    content: '−';
}
.faq-toggle > summary:hover { color: var(--text); }

.faq-body {
    margin-top: 2rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}
.faq-item {
    background: var(--bg-raised);
    border: 1px solid var(--border);
    border-radius: 12px;
    transition: border-color 0.2s var(--ease);
}
.faq-item[open] { border-color: rgba(40, 100, 234, 0.3); }
.faq-item summary {
    list-style: none;
    cursor: pointer;
    padding: 1rem 1.25rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text);
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
    content: '';
    width: 9px; height: 9px;
    border-right: 2px solid var(--blue);
    border-bottom: 2px solid var(--blue);
    transform: rotate(45deg);
    transition: transform 0.25s var(--ease);
    flex-shrink: 0;
    margin-top: -3px;
}
.faq-item[open] summary::after {
    transform: rotate(-135deg);
    margin-top: 3px;
}
.faq-item summary:hover { color: var(--blue); }
.faq-item p {
    padding: 0 1.25rem 1.25rem;
    font-size: 0.9rem;
    color: var(--text-mid);
    line-height: 1.65;
}

/* =========================================================
   FOOTER — minimal
   ========================================================= */
.footer {
    padding: 2rem;
    border-top: 1px solid var(--border);
    background: var(--bg-sunken);
}
.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.75rem;
    font-size: 0.85rem;
    color: var(--text-dim);
}
.footer-inner a { transition: color 0.2s var(--ease); }
.footer-inner a:hover { color: var(--text); }
.footer-dot { color: var(--text-dim); }

/* =========================================================
   PRESENTATION MODAL — overlay surimpression
   ========================================================= */
.presentation-modal {
    position: fixed; inset: 0;
    z-index: 9999;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}
.presentation-modal.open {
    display: flex;
    animation: modalFadeIn 0.3s var(--ease);
}
.presentation-modal-backdrop {
    position: absolute; inset: 0;
    background: rgba(2, 6, 23, 0.85);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}
.presentation-modal-content {
    position: relative;
    width: 100%;
    max-width: 1400px;
    height: 90vh;
    max-height: 900px;
    background: var(--bg-raised);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 30px 90px rgba(0, 0, 0, 0.5);
    border: 1px solid var(--border);
    transform: scale(0.95);
    animation: modalScaleIn 0.4s var(--ease) forwards;
}
.presentation-modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 10;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg);
    border: 1px solid var(--border-strong);
    border-radius: 50%;
    color: var(--text);
    transition: background 0.2s, transform 0.2s var(--ease-spring), border-color 0.2s;
}
.presentation-modal-close:hover {
    background: var(--blue);
    color: white;
    border-color: var(--blue);
    transform: rotate(90deg);
}
.presentation-modal-iframe {
    width: 100%;
    height: 100%;
    border: 0;
    background: white;
}

@keyframes modalFadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes modalScaleIn { to { transform: scale(1); } }

/* =========================================================
   RESPONSIVE
   ========================================================= */
@media (max-width: 768px) {
    .nav { padding: 0.75rem 1rem; }
    .nav-right { gap: 0.75rem; }
    .nav-link { font-size: 0.85rem; }

    .hero { padding: 5rem 1.25rem 3rem; }
    .hero-title { font-size: clamp(2rem, 9vw, 3.2rem); }
    .hero-lead { font-size: 1rem; margin-bottom: 2.5rem; }
    .hero-cta { flex-direction: column; width: 100%; max-width: 320px; margin-left: auto; margin-right: auto; margin-bottom: 3rem; }
    .hero-cta .btn { width: 100%; }
    .hero-trust { font-size: 0.65rem; gap: 0.3rem 1rem; }

    .block { padding: 4rem 1.25rem; }
    .block-title { font-size: clamp(1.3rem, 5vw, 1.8rem); }

    .contact-actions { flex-direction: column; max-width: 320px; margin-left: auto; margin-right: auto; }
    .contact-actions .btn { width: 100%; }

    .presentation-modal { padding: 0.5rem; }
    .presentation-modal-content { height: 95vh; border-radius: 12px; }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        transition-duration: 0.01ms !important;
    }
    html { scroll-behavior: auto; }
    .eyebrow, .hero-title, .hero-lead, .hero-cta, .hero-trust {
        opacity: 1;
        transform: none;
    }
}
