/* ==========================================
   TX DIGITAL - STYLES
   Design futuriste, professionnel et épuré
   ========================================== */

/* --- Variables CSS --- */
:root {
    --bg-primary: #06080d;
    --bg-secondary: #0c1017;
    --bg-card: #111621;
    --bg-card-hover: #161d2b;
    --border-color: rgba(255, 255, 255, 0.06);
    --border-hover: rgba(255, 255, 255, 0.12);

    --text-primary: #f0f2f5;
    --text-secondary: #8b95a8;
    --text-muted: #5a6478;

    --accent-1: #6c5ce7;
    --accent-2: #00cec9;
    --accent-gradient: linear-gradient(135deg, #6c5ce7, #00cec9);
    --accent-glow: rgba(108, 92, 231, 0.3);

    --font-heading: 'Space Grotesk', sans-serif;
    --font-body: 'Inter', sans-serif;

    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 28px;

    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --- Reset & Base --- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

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

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

/* --- Particules --- */
.particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
    overflow: hidden;
}

.particle {
    position: absolute;
    width: 2px;
    height: 2px;
    background: var(--accent-1);
    border-radius: 50%;
    opacity: 0;
    animation: particleFloat 8s infinite;
}

@keyframes particleFloat {
    0% {
        opacity: 0;
        transform: translateY(100vh) scale(0);
    }
    10% {
        opacity: 0.6;
    }
    90% {
        opacity: 0.2;
    }
    100% {
        opacity: 0;
        transform: translateY(-20vh) scale(1);
    }
}

/* --- Navigation --- */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 20px 0;
    transition: var(--transition);
    background: transparent;
}

.navbar.scrolled {
    padding: 12px 0;
    background: rgba(6, 8, 13, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.logo-tx {
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.logo-digital {
    color: var(--text-primary);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 36px;
}

.nav-links a {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    position: relative;
}

.nav-links a:hover {
    color: var(--text-primary);
}

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

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

.nav-cta {
    padding: 10px 24px !important;
    background: var(--accent-gradient);
    border-radius: var(--radius-sm);
    color: white !important;
    font-weight: 600 !important;
}

.nav-cta::after {
    display: none !important;
}

.nav-cta:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

.nav-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
    z-index: 1001;
}

.nav-toggle span {
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: var(--transition);
}

.nav-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.nav-toggle.active span:nth-child(2) {
    opacity: 0;
}

.nav-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* --- Hero Section --- */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 120px 24px 80px;
    max-width: 1200px;
    margin: 0 auto;
    gap: 60px;
    position: relative;
}

.hero-grid {
    position: absolute;
    inset: 0;
    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;
    mask-image: radial-gradient(ellipse at center, black 30%, transparent 70%);
    -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 70%);
}

.hero-content {
    flex: 1;
    position: relative;
    z-index: 1;
}

.hero-badge {
    display: inline-block;
    padding: 8px 18px;
    background: rgba(108, 92, 231, 0.1);
    border: 1px solid rgba(108, 92, 231, 0.25);
    border-radius: 100px;
    font-size: 0.85rem;
    color: var(--accent-1);
    font-weight: 500;
    margin-bottom: 28px;
    letter-spacing: 0.02em;
}

.hero h1 {
    font-family: var(--font-heading);
    font-size: clamp(2.4rem, 5vw, 3.6rem);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.03em;
    margin-bottom: 24px;
}

.hero-line {
    display: block;
}

.hero-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 500px;
    margin-bottom: 36px;
    line-height: 1.7;
}

.hero-actions {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    margin-bottom: 56px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 14px 30px;
    border-radius: var(--radius-sm);
    font-size: 0.95rem;
    font-weight: 600;
    font-family: var(--font-body);
    cursor: pointer;
    border: none;
    transition: var(--transition);
}

.btn-primary {
    background: var(--accent-gradient);
    color: white;
    box-shadow: 0 4px 20px var(--accent-glow);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px var(--accent-glow);
}

.btn-secondary {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border-hover);
}

.btn-secondary:hover {
    color: var(--text-primary);
    border-color: var(--text-muted);
    background: rgba(255, 255, 255, 0.03);
}

.btn-lg {
    padding: 18px 38px;
    font-size: 1rem;
}

.btn-full {
    width: 100%;
    justify-content: center;
}

/* Hero Stats */
.hero-stats {
    display: flex;
    align-items: center;
    gap: 32px;
}

.stat {
    display: flex;
    flex-direction: column;
}

.stat-number {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 700;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: inline;
}

.stat-suffix {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 700;
    background: var(--accent-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 4px;
    font-weight: 500;
}

.stat-divider {
    width: 1px;
    height: 40px;
    background: var(--border-color);
}

/* Hero Visual / Code Window */
.hero-visual {
    flex: 1;
    position: relative;
    z-index: 1;
    display: flex;
    justify-content: center;
}

.hero-code-window {
    width: 100%;
    max-width: 480px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.4),
        0 0 40px rgba(108, 92, 231, 0.08);
}

.code-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 18px;
    background: rgba(255, 255, 255, 0.02);
    border-bottom: 1px solid var(--border-color);
}

.code-dots {
    display: flex;
    gap: 6px;
}

.code-dots span {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}

.code-dots span:nth-child(1) { background: #ff5f57; }
.code-dots span:nth-child(2) { background: #ffbd2e; }
.code-dots span:nth-child(3) { background: #28ca42; }

.code-title {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-family: 'SF Mono', 'Fira Code', monospace;
}

.code-body {
    padding: 24px;
    font-family: 'SF Mono', 'Fira Code', 'Courier New', monospace;
    font-size: 0.85rem;
    line-height: 1.8;
    overflow-x: auto;
}

.code-body pre {
    margin: 0;
}

.code-keyword { color: #c792ea; }
.code-var { color: #82aaff; }
.code-func { color: #c3e88d; }
.code-string { color: #c3e88d; }
.code-prop { color: #f78c6c; }
.code-bool { color: #ff5370; }
.code-comment { color: #546e7a; }

/* --- Section Styles --- */
section {
    position: relative;
    z-index: 1;
}

.section-header {
    text-align: center;
    margin-bottom: 64px;
}

.section-tag {
    display: inline-block;
    padding: 6px 16px;
    background: rgba(108, 92, 231, 0.08);
    border: 1px solid rgba(108, 92, 231, 0.2);
    border-radius: 100px;
    font-size: 0.8rem;
    color: var(--accent-1);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    margin-bottom: 20px;
}

.section-header h2 {
    font-family: var(--font-heading);
    font-size: clamp(2rem, 4vw, 2.8rem);
    font-weight: 700;
    letter-spacing: -0.03em;
    line-height: 1.2;
    margin-bottom: 16px;
}

.section-header p {
    color: var(--text-secondary);
    font-size: 1.05rem;
    max-width: 550px;
    margin: 0 auto;
}

/* --- Services --- */
.services {
    padding: 120px 0;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.service-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 36px 30px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.service-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--accent-gradient);
    opacity: 0;
    transition: var(--transition);
}

.service-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-hover);
    transform: translateY(-4px);
}

.service-card:hover::before {
    opacity: 1;
}

.service-card.featured {
    border-color: rgba(108, 92, 231, 0.3);
    background: linear-gradient(180deg, rgba(108, 92, 231, 0.06) 0%, var(--bg-card) 100%);
}

.service-badge {
    position: absolute;
    top: 20px;
    right: 20px;
    padding: 4px 12px;
    background: var(--accent-gradient);
    border-radius: 100px;
    font-size: 0.7rem;
    font-weight: 700;
    color: white;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.service-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(108, 92, 231, 0.1);
    border-radius: var(--radius-sm);
    margin-bottom: 22px;
}

.service-icon svg {
    width: 24px;
    height: 24px;
    stroke: var(--accent-1);
}

.service-card h3 {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 12px;
    letter-spacing: -0.01em;
}

.service-card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
    margin-bottom: 20px;
}

.service-features {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.service-features li {
    font-size: 0.85rem;
    color: var(--text-secondary);
    padding-left: 20px;
    position: relative;
}

.service-features li::before {
    content: '';
    position: absolute;
    left: 0;
    top: 8px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--accent-2);
}

/* --- Process --- */
.process {
    padding: 120px 0;
    background: var(--bg-secondary);
}

.process-timeline {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    position: relative;
}

.process-timeline::before {
    content: '';
    position: absolute;
    top: 40px;
    left: 12.5%;
    right: 12.5%;
    height: 2px;
    background: var(--border-color);
}

.process-step {
    text-align: center;
    position: relative;
}

.step-number {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 700;
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 24px;
    background: var(--bg-primary);
    border: 2px solid var(--accent-1);
    border-radius: 50%;
    color: var(--accent-1);
    position: relative;
    z-index: 1;
    transition: var(--transition);
}

.process-step:hover .step-number {
    background: var(--accent-gradient);
    border-color: transparent;
    color: white;
    -webkit-text-fill-color: white;
}

.step-content h3 {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 10px;
    letter-spacing: -0.01em;
}

.step-content p {
    color: var(--text-secondary);
    font-size: 0.88rem;
    line-height: 1.6;
}

/* --- Why Us --- */
.why-us {
    padding: 120px 0;
}

.why-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

.why-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 36px 30px;
    transition: var(--transition);
    text-align: center;
}

.why-card:hover {
    background: var(--bg-card-hover);
    border-color: var(--border-hover);
    transform: translateY(-4px);
}

.why-icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    background: rgba(108, 92, 231, 0.08);
    border-radius: 50%;
}

.why-icon svg {
    width: 26px;
    height: 26px;
    stroke: var(--accent-1);
}

.why-card h3 {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    font-weight: 600;
    margin-bottom: 10px;
}

.why-card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.6;
}

/* --- Technologies Marquee --- */
.technologies {
    padding: 120px 0;
    background: var(--bg-secondary);
}

.tech-marquee {
    overflow: hidden;
    mask-image: linear-gradient(90deg, transparent, black 10%, black 90%, transparent);
    -webkit-mask-image: linear-gradient(90deg, transparent, black 10%, black 90%, transparent);
}

.tech-track {
    display: flex;
    gap: 24px;
    animation: marquee 30s linear infinite;
    width: max-content;
}

@keyframes marquee {
    0% { transform: translateX(0); }
    100% { transform: translateX(-50%); }
}

.tech-item {
    padding: 14px 32px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-secondary);
    white-space: nowrap;
    transition: var(--transition);
}

.tech-item:hover {
    border-color: var(--accent-1);
    color: var(--text-primary);
}

/* --- CTA Section --- */
.cta-section {
    padding: 80px 0;
}

.cta-box {
    position: relative;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-xl);
    padding: 72px 48px;
    text-align: center;
    overflow: hidden;
}

.cta-glow {
    position: absolute;
    top: -50%;
    left: 50%;
    transform: translateX(-50%);
    width: 600px;
    height: 400px;
    background: radial-gradient(ellipse, rgba(108, 92, 231, 0.12) 0%, transparent 70%);
    pointer-events: none;
}

.cta-box h2 {
    font-family: var(--font-heading);
    font-size: clamp(1.8rem, 3vw, 2.4rem);
    font-weight: 700;
    margin-bottom: 16px;
    position: relative;
    letter-spacing: -0.02em;
}

.cta-box p {
    color: var(--text-secondary);
    font-size: 1.05rem;
    margin-bottom: 36px;
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
    position: relative;
}

.cta-box .btn {
    position: relative;
}

/* --- Contact Section --- */
.contact {
    padding: 120px 0;
    background: var(--bg-secondary);
}

.contact-cards-center {
    display: flex;
    justify-content: center;
    gap: 32px;
    flex-wrap: wrap;
}

.contact-card-link {
    cursor: pointer;
}

.contact-card-link:hover {
    border-color: var(--accent-1) !important;
    transform: translateY(-4px);
}

.contact-card {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 24px;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    transition: var(--transition);
}

.contact-card:hover {
    border-color: var(--border-hover);
}

.contact-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(108, 92, 231, 0.1);
    border-radius: var(--radius-sm);
    flex-shrink: 0;
}

.contact-icon svg {
    width: 22px;
    height: 22px;
    stroke: var(--accent-1);
}

.contact-card h4 {
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 4px;
}

.contact-card p {
    color: var(--text-secondary);
    font-size: 0.88rem;
}


/* --- Footer --- */
.footer {
    padding: 80px 0 0;
    border-top: 1px solid var(--border-color);
    position: relative;
    z-index: 1;
}

.footer-content {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 48px;
    padding-bottom: 48px;
}

.footer-brand p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-top: 16px;
    max-width: 300px;
    line-height: 1.6;
}

.footer-links h4 {
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 600;
    margin-bottom: 20px;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: var(--text-secondary);
    font-size: 0.88rem;
}

.footer-links a:hover {
    color: var(--text-primary);
}

.footer-bottom {
    border-top: 1px solid var(--border-color);
    padding: 24px 0;
    text-align: center;
}

.footer-bottom p {
    color: var(--text-muted);
    font-size: 0.82rem;
}

/* --- Animations (AOS alternative) --- */
[data-aos] {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

[data-aos].aos-visible {
    opacity: 1;
    transform: translateY(0);
}

/* --- Responsive --- */
@media (max-width: 1024px) {
    .hero {
        flex-direction: column;
        text-align: center;
        padding-top: 140px;
    }

    .hero-subtitle {
        margin-left: auto;
        margin-right: auto;
    }

    .hero-actions {
        justify-content: center;
    }

    .hero-stats {
        justify-content: center;
    }

    .services-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .process-timeline {
        grid-template-columns: repeat(2, 1fr);
        gap: 40px;
    }

    .process-timeline::before {
        display: none;
    }

    .why-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .footer-content {
        grid-template-columns: 1fr 1fr;
        gap: 32px;
    }
}

@media (max-width: 768px) {
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: var(--bg-secondary);
        flex-direction: column;
        padding: 100px 32px 32px;
        gap: 24px;
        border-left: 1px solid var(--border-color);
        transition: var(--transition-slow);
    }

    .nav-links.open {
        right: 0;
    }

    .nav-toggle {
        display: flex;
    }

    .hero {
        padding-top: 120px;
        min-height: auto;
    }

    .hero h1 {
        font-size: 2rem;
    }

    .hero-visual {
        width: 100%;
    }

    .hero-code-window {
        max-width: 100%;
    }

    .services-grid {
        grid-template-columns: 1fr;
    }

    .process-timeline {
        grid-template-columns: 1fr;
    }

    .why-grid {
        grid-template-columns: 1fr;
    }

    .footer-content {
        grid-template-columns: 1fr;
    }

    .hero-stats {
        flex-wrap: wrap;
        gap: 20px;
    }

    .cta-box {
        padding: 48px 24px;
    }

    .contact-form {
        padding: 28px;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 1.8rem;
    }

    .hero-actions {
        flex-direction: column;
    }

    .btn {
        width: 100%;
        justify-content: center;
    }
}
