/* ===== LANDING PAGE STYLES ===== */

/* Root Colors */
:root {
    --black: #000000;
    --black-soft: #0a0a0a;
    --grey-darkest: #0d0d0d;
    --grey-darker: #161616;
    --grey-dark: #222222;
    --grey-mid: #333333;
    --grey: #555555;
    --grey-light: #777777;
    --grey-lighter: #999999;
    --grey-lightest: #bbbbbb;
    --white: #ffffff;
    --accent: #7a8a7a;
    --accent-dim: #4a5a4a;

    --font-sans: 'Inter', -apple-system, sans-serif;
    --font-serif: 'Cormorant Garamond', Georgia, serif;
    --font-mono: 'JetBrains Mono', 'SF Mono', monospace;

    --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ===== GLOBAL STYLES ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-sans);
    background-color: var(--black);
    color: var(--white);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Grid background */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
    background-size: 60px 60px;
    pointer-events: none;
    z-index: 0;
}

::selection {
    background: var(--grey-mid);
    color: var(--white);
}

/* ===== TYPOGRAPHY ===== */
h1, h2, h3, h4 {
    font-family: var(--font-sans);
    font-weight: 500;
}

/* ===== NAVIGATION ===== */
nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 1.25rem 3rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(0,0,0,0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--grey-darker);
    animation: fadeIn 0.8s var(--ease-out-expo) 0.2s both;
}

.logo {
    font-family: var(--font-mono);
    font-size: 0.875rem;
    font-weight: 500;
    letter-spacing: -0.02em;
    color: var(--white);
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.logo-mark {
    width: 40px;
    height: 40px;
    border-radius: 8px;
    object-fit: contain;
    transition: all 0.3s ease;
}

.logo:hover .logo-mark {
    opacity: 0.8;
}

.logo-text {
    display: inline-block;
    white-space: nowrap;
    overflow: hidden;
    max-width: 150px;
    opacity: 1;
    transform: translateX(0);
    transition: max-width 1s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.8s ease,
                transform 1s cubic-bezier(0.4, 0, 0.2, 1);
}

nav.scrolled .logo-text {
    max-width: 0;
    opacity: 0;
    transform: translateX(-20px);
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    transition: transform 1s cubic-bezier(0.4, 0, 0.2, 1);
    transform: translateX(140px);
}

nav.scrolled .nav-right {
    transform: translateX(0);
}

.nav-links {
    display: flex;
    gap: 0.5rem;
    list-style: none;
}

.nav-links a {
    font-size: 0.8rem;
    font-weight: 400;
    color: var(--grey-lighter);
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.nav-links a:hover {
    color: var(--white);
}

.nav-cta {
    font-family: var(--font-sans);
    font-size: 0.8rem;
    font-weight: 500;
    padding: 0.6rem 1.25rem;
    background: var(--white);
    color: var(--black);
    border-radius: 6px;
    text-decoration: none;
    opacity: 0;
    transform: translateX(20px);
    transition: all 0.4s ease;
    pointer-events: none;
}

nav.scrolled .nav-cta {
    opacity: 1;
    transform: translateX(0);
    pointer-events: auto;
}

.nav-cta:hover {
    background: var(--grey-lightest);
}

/* ===== HERO SECTION ===== */
.hero {
    min-height: auto;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 8rem 3rem 3rem;
    position: relative;
}

.hero-content {
    max-width: 1600px;
    width: 100%;
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 6rem;
    align-items: center;
    margin-left: auto;
    margin-right: auto;
}

.hero-text {
    position: relative;
    z-index: 2;
}

.hero-eyebrow {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    font-weight: 400;
    letter-spacing: 0.05em;
    color: var(--accent);
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    animation: slideUp 0.8s var(--ease-out-expo) 0.4s both;
}

.hero-eyebrow::before {
    content: '';
    width: 24px;
    height: 1px;
    background: var(--accent);
}

.hero h1 {
    font-family: var(--font-serif);
    font-size: clamp(3rem, 7vw, 5.5rem);
    font-weight: 300;
    line-height: 1.05;
    letter-spacing: -0.02em;
    margin-bottom: 1.5rem;
    animation: slideUp 0.8s var(--ease-out-expo) 0.5s both;
}

.hero h1 span {
    font-style: italic;
    color: var(--accent);
    text-decoration: underline;
    text-decoration-color: var(--accent);
    text-decoration-thickness: 2px;
    text-underline-offset: 8px;
}

.hero-description {
    font-size: 1.0625rem;
    font-weight: 400;
    color: var(--grey-lighter);
    max-width: 480px;
    line-height: 1.7;
    animation: slideUp 0.8s var(--ease-out-expo) 0.6s both;
}

.hero-cta {
    margin-top: 2.5rem;
    display: flex;
    gap: 1rem;
    animation: slideUp 0.8s var(--ease-out-expo) 0.7s both;
}

.btn {
    font-family: var(--font-sans);
    font-size: 0.8125rem;
    font-weight: 500;
    padding: 0.875rem 1.75rem;
    border: 1px solid var(--grey-mid);
    border-radius: 6px;
    background: transparent;
    color: var(--white);
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    display: inline-block;
}

.btn:hover {
    background: var(--white);
    color: var(--black);
    border-color: var(--white);
}

.btn-primary {
    background: var(--white);
    color: var(--black);
    border-color: var(--white);
}

.btn-primary:hover {
    background: var(--grey-lightest);
    border-color: var(--grey-lightest);
}

/* Hero Visual */
.hero-visual {
    position: relative;
    animation: fadeIn 1s var(--ease-out-expo) 0.4s both;
    transform: translateX(2rem);
}

.dashboard-preview {
    background: var(--grey-darkest);
    border: 1px solid var(--grey-darker);
    border-radius: 12px;
    padding: 1.75rem;
    position: relative;
    overflow: hidden;
    transform: scale(1.05);
    transform-origin: center right;
}

.dashboard-preview::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 40px;
    background: var(--grey-darker);
    border-bottom: 1px solid var(--grey-dark);
}

.preview-dots {
    position: absolute;
    top: 14px;
    left: 16px;
    display: flex;
    gap: 6px;
    z-index: 1;
}

.preview-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--grey-mid);
}

.preview-content {
    margin-top: 2.5rem;
}

.preview-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.preview-stat {
    background: var(--grey-darker);
    border-radius: 8px;
    padding: 1rem;
    animation: statSlideUp 0.8s var(--ease-out-expo) both;
}

.preview-stat:nth-child(1) { animation-delay: 0.7s; }
.preview-stat:nth-child(2) { animation-delay: 0.8s; }
.preview-stat:nth-child(3) { animation-delay: 0.9s; }

.preview-stat-label {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    color: var(--grey-light);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 0.5rem;
}

.preview-stat-value {
    font-family: var(--font-mono);
    font-size: 1.5rem;
    font-weight: 500;
    color: var(--white);
}

.preview-stat-value.positive {
    color: var(--accent);
}

.preview-stat-value.rating {
    color: #c9a227;
}

.preview-chart {
    background: var(--grey-darker);
    border-radius: 8px;
    padding: 1rem;
    height: 140px;
}

.preview-chart svg {
    width: 100%;
    height: 100%;
    overflow: visible;
}

.chart-line {
    fill: none;
    stroke: #ffffff;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-dasharray: 2000;
    stroke-dashoffset: 2000;
    animation: drawLine 2.5s cubic-bezier(0.4, 0, 0.2, 1) 0.8s both;
}

/* Fallback for Safari/Webkit if needed */
@media screen and (-webkit-min-device-pixel-ratio:0) {
    .chart-line {
        stroke-dasharray: 2000px;
        stroke-dashoffset: 2000px;
    }
}

.chart-area {
    fill: url(#heroGradient);
    animation: fadeIn 1.5s ease-out 1.4s both;
}

.chart-grid {
    stroke: var(--grey-dark);
    stroke-width: 1;
}

/* ===== SECTIONS ===== */
section {
    padding: 6rem 3rem;
    position: relative;
    z-index: 1;
}

.section-header {
    max-width: 600px;
    margin-bottom: 4rem;
}

.section-number {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--accent);
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.section-number::after {
    content: '';
    width: 24px;
    height: 1px;
    background: var(--grey-mid);
}

.section-title {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 500;
    line-height: 1.2;
    letter-spacing: -0.02em;
    margin-bottom: 1rem;
}

.section-description {
    font-size: 1rem;
    font-weight: 400;
    color: var(--grey-lighter);
    line-height: 1.7;
}

/* ===== SERVICES SECTION ===== */
.services {
    background: var(--grey-darkest);
    border-top: 1px solid var(--grey-darker);
    border-bottom: 1px solid var(--grey-darker);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}

.service-card {
    background: var(--grey-darker);
    border: 1px solid var(--grey-dark);
    border-radius: 8px;
    padding: 2rem;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.service-card:hover {
    border-color: var(--grey-mid);
    transform: translateY(-2px);
}

.service-card:hover::before {
    opacity: 1;
}

.service-icon {
    width: 40px;
    height: 40px;
    background: var(--grey-dark);
    border: 1px solid var(--grey-mid);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    color: var(--grey-lighter);
}

.service-icon svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.5;
}

.service-card h3 {
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 0.75rem;
}

.service-card p {
    font-size: 0.875rem;
    font-weight: 400;
    color: var(--grey-light);
    line-height: 1.6;
}

/* ===== APPROACH SECTION ===== */
.approach {
    background: var(--black);
}

.ai-features-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.ai-feature {
    background: var(--grey-darkest);
    border: 1px solid var(--grey-darker);
    border-radius: 8px;
    padding: 2rem;
    transition: all 0.3s ease;
    position: relative;
}

.ai-feature:hover {
    border-color: var(--grey-mid);
}

.ai-feature-number {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    color: var(--grey);
    margin-bottom: 1rem;
}

.ai-feature h4 {
    font-size: 1rem;
    font-weight: 500;
    margin-bottom: 0.75rem;
}

.ai-feature p {
    font-size: 0.875rem;
    font-weight: 400;
    color: var(--grey-light);
    line-height: 1.6;
}

/* ===== TESTIMONIAL ===== */
.testimonial {
    background: var(--black);
    padding: 6rem 3rem;
    text-align: center;
    border-top: 1px solid var(--grey-darker);
}

.testimonial-content {
    max-width: 700px;
    margin: 0 auto;
}

.testimonial-quote {
    font-family: var(--font-serif);
    font-size: 1.5rem;
    font-weight: 400;
    font-style: italic;
    line-height: 1.7;
    color: var(--white);
    margin-bottom: 2rem;
}

.testimonial-quote::before {
    content: '"';
    display: block;
    font-size: 5rem;
    line-height: 1;
    color: var(--grey-mid);
    margin-bottom: 1rem;
    font-style: normal;
}

.testimonial-author {
    font-size: 0.875rem;
    color: var(--grey);
}

.testimonial-author span {
    color: var(--grey-lighter);
}

/* ===== CONTACT SECTION ===== */
.contact-section {
    background: var(--black);
    border-top: 1px solid var(--grey-darker);
}

.contact {
    background: var(--grey-darkest);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    border-top: 1px solid var(--grey-darker);
    padding: 4rem;
    border-radius: 12px;
}

.contact-content h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 500;
    line-height: 1.2;
    letter-spacing: -0.02em;
    margin-bottom: 1rem;
}

.contact-content p {
    font-size: 1rem;
    font-weight: 400;
    color: var(--grey-lighter);
    line-height: 1.7;
    margin-bottom: 2rem;
}

.contact-info {
    display: grid;
    gap: 2rem;
    padding: 2rem;
    background: var(--grey-darker);
    border-radius: 8px;
    border: 1px solid var(--grey-dark);
}

.contact-block {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.contact-label {
    font-family: var(--font-mono);
    font-size: 0.65rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--grey);
}

.contact-value {
    font-size: 1rem;
    color: var(--white);
}

.contact-value a {
    color: inherit;
    text-decoration: none;
    transition: color 0.2s ease;
}

.contact-value a:hover {
    color: var(--accent);
}

/* ===== SCROLL ANIMATIONS ===== */
section {
    scroll-margin-top: 80px;
}

section.scroll-target-active {
    animation: fadeInUp 0.6s var(--ease-out-expo) both;
}

section.in-view h2,
section.in-view h3 {
    animation: fadeInUp 0.6s var(--ease-out-expo) both;
}

section.in-view .service-card,
section.in-view .feature-item,
section.in-view .contact-info {
    animation: fadeInUp 0.6s var(--ease-out-expo) both;
}

/* Délai progressif pour les enfants */
section.in-view .service-card:nth-child(1),
section.in-view .feature-item:nth-child(1),
section.in-view .contact-info:nth-child(1) {
    animation-delay: 0.1s;
}

section.in-view .service-card:nth-child(2),
section.in-view .feature-item:nth-child(2),
section.in-view .contact-info:nth-child(2) {
    animation-delay: 0.2s;
}

section.in-view .service-card:nth-child(3),
section.in-view .feature-item:nth-child(3),
section.in-view .contact-info:nth-child(3) {
    animation-delay: 0.3s;
}

/* ===== FOOTER ===== */
footer {
    background: var(--black);
    border-top: 2px solid var(--accent);
    padding: 2rem 3rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.footer-left {
    font-family: var(--font-mono);
    font-size: 0.75rem;
    color: var(--grey);
}

.footer-links {
    display: flex;
    gap: 1.5rem;
    list-style: none;
}

.footer-links a {
    font-size: 0.75rem;
    color: var(--grey);
    text-decoration: none;
    transition: color 0.2s ease;
}

.footer-links a:hover {
    color: var(--accent);
}

/* ===== ANIMATIONS ===== */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes scrollPulse {
    0%, 100% { left: -100%; }
    50% { left: 100%; }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes glow {
    0% {
        box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.4);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(99, 102, 241, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(99, 102, 241, 0);
    }
}

@keyframes drawChart {
    to {
        stroke-dashoffset: 0;
    }
}

@keyframes statSlideUp {
    0% {
        opacity: 0;
        transform: translateY(20px);
    }
    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes drawLine {
    0% {
        stroke-dashoffset: 2000;
        opacity: 0;
    }
    1% {
        opacity: 0.8;
    }
    100% {
        stroke-dashoffset: 0;
        opacity: 0.8;
    }
}

/* ===== RESPONSIVE ===== */
@media (max-width: 1200px) {
    .hero-content {
        grid-template-columns: 1fr 1fr;
        gap: 4rem;
    }

    .hero-visual {
        transform: translateX(0);
    }

    .dashboard-preview {
        transform: scale(1);
    }
}

@media (max-width: 1024px) {
    .hero-content {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .hero-visual {
        max-width: 550px;
        margin: 0 auto;
    }

    .dashboard-preview {
        transform: scale(1);
    }

    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .ai-features-grid {
        grid-template-columns: 1fr;
    }

    .contact {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    nav {
        padding: 1rem 1.5rem;
    }

    .nav-links {
        display: none;
    }

    .nav-cta {
        display: none;
    }

    .logo-text {
        font-size: 0.8rem;
    }

    nav.scrolled .logo-text {
        opacity: 1;
        width: auto;
        transform: none;
    }

    .hero {
        padding: 6rem 1.5rem 3rem;
    }

    .hero-visual {
        max-width: 100%;
    }

    .preview-stats {
        grid-template-columns: repeat(3, 1fr);
    }

    .preview-stat {
        padding: 0.75rem;
    }

    .preview-stat-value {
        font-size: 1.25rem;
    }

    section {
        padding: 4rem 1.5rem;
    }

    .services-grid {
        grid-template-columns: 1fr;
    }

    footer {
        flex-direction: column;
        gap: 1.5rem;
        text-align: center;
        padding: 2rem 1.5rem;
    }
}

@media (max-width: 480px) {
    .preview-stats {
        grid-template-columns: 1fr;
    }

    .contact {
        padding: 2rem;
    }
}
