/* ==========================================
   Route Expert - Landing Page CSS
   Mobile-First Responsive Design
   ========================================== */

:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --secondary: #ec4899;
    --accent: #f59e0b;
    --success: #10b981;
    --dark: #1e293b;
    --gray: #64748b;
    --light: #f1f5f9;
    --white: #ffffff;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Sora', sans-serif;
    color: var(--dark);
    background: var(--white);
    overflow-x: hidden;
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
}

/* ==========================================
   NAVIGATION - Mobile First
   ========================================== */

nav.landing-nav {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

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

.logo {
    font-family: 'Poppins', sans-serif;
    font-size: 1.2rem;
    font-weight: 900;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.logo-icon {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.2rem;
    font-weight: 900;
}

.logo-text {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Desktop nav links - hidden on mobile */
.nav-links {
    display: none;
    gap: 2rem;
    list-style: none;
    align-items: center;
}

.nav-links a {
    color: var(--gray);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: color 0.3s;
}

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

/* CTA button - hidden on mobile, visible in mobile menu */
.nav-cta {
    display: none;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    padding: 0.7rem 1.5rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    font-size: 0.9rem;
}

/* Mobile Menu Toggle */
.mobile-menu-toggle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 1001;
}

.mobile-menu-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--dark);
    border-radius: 2px;
    transition: all 0.3s;
}

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

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

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

/* Mobile Menu */
.mobile-menu {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    padding: 100px 2rem 2rem;
    z-index: 998;
    flex-direction: column;
    gap: 1rem;
    overflow-y: auto;
}

.mobile-menu.active {
    display: flex;
}

/* Assurer que le toggle est au-dessus du menu */
.mobile-menu-toggle {
    z-index: 1001;
}

nav {
    z-index: 1000;
}

.mobile-menu ul {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.mobile-menu a {
    display: block;
    color: var(--dark);
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    padding: 1rem;
    border-radius: 12px;
    transition: background 0.3s;
}

.mobile-menu a:hover {
    background: var(--light);
}

.mobile-menu .mobile-cta {
    display: block;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    text-align: center;
    padding: 1rem;
    border-radius: 50px;
    font-weight: 700;
    margin-top: 1rem;
}

/* ==========================================
   HERO SECTION - Mobile First
   ========================================== */

.hero {
    margin-top: 60px;
    min-height: calc(100vh - 60px);
    min-height: calc(100dvh - 60px); /* Dynamic viewport height for mobile */
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    padding: 2rem 1rem;
}

.hero::after {
    content: '';
    position: absolute;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(245, 158, 11, 0.3), transparent 70%);
    border-radius: 50%;
    top: -100px;
    right: -100px;
}

.hero-container {
    max-width: 1400px;
    margin: 0 auto;
    width: 100%;
    position: relative;
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

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

.hero-content h1 {
    font-family: 'Poppins', sans-serif;
    font-size: 2rem;
    font-weight: 900;
    color: white;
    line-height: 1.2;
    margin-bottom: 1rem;
}

.hero-content h1 .highlight {
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: block;
}

.hero-content p {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.hero-buttons {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.btn-hero-primary {
    background: white;
    color: var(--primary);
    padding: 1rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1rem;
    text-align: center;
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s, box-shadow 0.3s;
}

.btn-hero-primary:active {
    transform: scale(0.98);
}

.btn-hero-secondary {
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    color: white;
    padding: 1rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1rem;
    text-align: center;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

/* Hero Card - Simplified on mobile */
.hero-card {
    background: white;
    border-radius: 20px;
    padding: 1.5rem;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
}

.hero-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.hero-card-title {
    font-size: 1rem;
    font-weight: 700;
    color: var(--primary);
}

.badge {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
}

.question-preview {
    background: var(--light);
    padding: 1rem;
    border-radius: 12px;
    margin-bottom: 0.75rem;
    border-left: 4px solid var(--primary);
}

.question-preview:last-child {
    margin-bottom: 0;
}

.question-preview .q-number {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 0.5rem;
}

.question-preview p {
    color: var(--dark);
    font-size: 0.85rem;
    line-height: 1.5;
    margin: 0;
}

/* ==========================================
   STATS SECTION - Mobile First
   ========================================== */

.stats {
    padding: 3rem 1rem;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
}

.stats-container {
    max-width: 1400px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
}

.stat-card {
    text-align: center;
    padding: 1.5rem 1rem;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.stat-number {
    font-family: 'Poppins', sans-serif;
    font-size: 2rem;
    font-weight: 900;
    color: white;
    line-height: 1;
    margin-bottom: 0.3rem;
}

.stat-label {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.9);
    font-weight: 500;
}

/* ==========================================
   FEATURES SECTION - Mobile First
   ========================================== */

.features {
    padding: 3rem 1rem;
    background: var(--white);
}

.section-header {
    text-align: center;
    margin-bottom: 2rem;
}

.section-badge {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    display: inline-block;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.section-title {
    font-family: 'Poppins', sans-serif;
    font-size: 1.75rem;
    font-weight: 900;
    color: var(--dark);
    margin-bottom: 0.75rem;
    line-height: 1.2;
}

.section-subtitle {
    font-size: 1rem;
    color: var(--gray);
}

.features-grid {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.feature-card {
    background: white;
    padding: 1.5rem;
    border-radius: 16px;
    border: 1px solid var(--light);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.feature-icon {
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.feature-card h3 {
    font-family: 'Poppins', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 0.5rem;
}

.feature-card p {
    color: var(--gray);
    line-height: 1.6;
    font-size: 0.9rem;
}

/* ==========================================
   PROCESS SECTION - Mobile First
   ========================================== */

.process {
    padding: 3rem 1rem;
    background: var(--light);
}

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

.process-step {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    align-items: flex-start;
}

.process-step:last-child {
    margin-bottom: 0;
}

.step-number {
    width: 50px;
    height: 50px;
    min-width: 50px;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-family: 'Poppins', sans-serif;
    font-size: 1.25rem;
    font-weight: 900;
}

.step-content h3 {
    font-family: 'Poppins', sans-serif;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--dark);
    margin-bottom: 0.5rem;
}

.step-content p {
    font-size: 0.9rem;
    color: var(--gray);
    line-height: 1.6;
}

/* ==========================================
   CTA SECTION - Mobile First
   ========================================== */

.cta-section {
    padding: 3rem 1rem;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    text-align: center;
}

.cta-content {
    max-width: 600px;
    margin: 0 auto;
}

.cta-content h2 {
    font-family: 'Poppins', sans-serif;
    font-size: 1.75rem;
    font-weight: 900;
    color: white;
    margin-bottom: 1rem;
    line-height: 1.2;
}

.cta-content p {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 2rem;
    line-height: 1.6;
}

.btn-cta-large {
    display: inline-block;
    background: white;
    color: var(--primary);
    padding: 1rem 2rem;
    border-radius: 50px;
    text-decoration: none;
    font-weight: 700;
    font-size: 1rem;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

/* ==========================================
   FOOTER - Mobile First
   ========================================== */

footer {
    background: var(--dark);
    color: white;
    padding: 3rem 1rem 1.5rem;
}

.footer-container {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-brand h3 {
    font-family: 'Poppins', sans-serif;
    font-size: 1.5rem;
    font-weight: 900;
    margin-bottom: 1rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.footer-brand p {
    color: var(--gray);
    line-height: 1.6;
    font-size: 0.9rem;
}

.footer-links-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.footer-links h4 {
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    font-weight: 700;
    margin-bottom: 1rem;
}

.footer-links ul {
    list-style: none;
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: var(--gray);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.3s;
}

.footer-links a:hover {
    color: white;
}

.footer-bottom {
    text-align: center;
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--gray);
    font-size: 0.85rem;
}

/* ==========================================
   TABLET BREAKPOINT (640px+)
   ========================================== */

@media (min-width: 640px) {
    .nav-container {
        padding: 1rem 1.5rem;
    }

    .hero {
        padding: 3rem 1.5rem;
    }

    .hero-content h1 {
        font-size: 2.5rem;
    }

    .hero-buttons {
        flex-direction: row;
        justify-content: center;
    }

    .btn-hero-primary,
    .btn-hero-secondary {
        flex: 0 0 auto;
    }

    .hero-card {
        max-width: 500px;
        margin: 0 auto;
    }

    .stats-container {
        grid-template-columns: repeat(4, 1fr);
        gap: 1.5rem;
    }

    .stat-number {
        font-size: 2.5rem;
    }

    .features-grid {
        display: grid;
        grid-template-columns: repeat(2, 1fr);
        gap: 1.5rem;
    }

    .section-title {
        font-size: 2.25rem;
    }

    .footer-links-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* ==========================================
   DESKTOP BREAKPOINT (968px+)
   ========================================== */

@media (min-width: 968px) {
    .nav-container {
        padding: 1.2rem 2rem;
    }

    .logo {
        font-size: 1.6rem;
    }

    .logo-icon {
        width: 45px;
        height: 45px;
        font-size: 1.5rem;
    }

    /* Show desktop nav, hide mobile toggle */
    .nav-links {
        display: flex;
    }

    .nav-cta {
        display: inline-block;
    }

    .mobile-menu-toggle {
        display: none;
    }

    .mobile-menu {
        display: none !important;
    }

    /* Hero */
    .hero {
        margin-top: 90px;
        min-height: calc(100vh - 90px);
        padding: 4rem 2rem;
    }

    .hero-container {
        display: grid;
        grid-template-columns: 1.2fr 1fr;
        gap: 4rem;
        align-items: center;
    }

    .hero-content {
        text-align: left;
    }

    .hero-content h1 {
        font-size: 3.5rem;
    }

    .hero-content p {
        font-size: 1.2rem;
    }

    .hero-buttons {
        justify-content: flex-start;
    }

    .btn-hero-primary,
    .btn-hero-secondary {
        padding: 1.2rem 2.5rem;
    }

    .btn-hero-primary:hover {
        transform: translateY(-3px);
        box-shadow: 0 12px 35px rgba(0, 0, 0, 0.25);
    }

    .hero-card {
        max-width: none;
        padding: 2rem;
        border-radius: 24px;
        transform: rotate(-2deg);
        transition: transform 0.4s;
    }

    .hero-card:hover {
        transform: rotate(0deg) translateY(-10px);
    }

    /* Stats */
    .stats {
        padding: 5rem 2rem;
    }

    .stat-card {
        padding: 2rem;
        border-radius: 20px;
        transition: transform 0.3s;
    }

    .stat-card:hover {
        transform: translateY(-5px);
    }

    .stat-number {
        font-size: 3.5rem;
    }

    .stat-label {
        font-size: 1rem;
    }

    /* Features */
    .features {
        padding: 6rem 2rem;
    }

    .section-header {
        margin-bottom: 4rem;
    }

    .section-title {
        font-size: 3rem;
    }

    .features-grid {
        grid-template-columns: repeat(3, 1fr);
        gap: 2rem;
    }

    .feature-card {
        padding: 2.5rem;
        border-radius: 20px;
        transition: transform 0.3s, box-shadow 0.3s;
    }

    .feature-card:hover {
        transform: translateY(-10px);
        box-shadow: 0 20px 50px rgba(99, 102, 241, 0.15);
    }

    .feature-icon {
        width: 65px;
        height: 65px;
        font-size: 1.75rem;
        margin-bottom: 1.5rem;
    }

    .feature-card h3 {
        font-size: 1.4rem;
    }

    .feature-card p {
        font-size: 1rem;
    }

    /* Process */
    .process {
        padding: 6rem 2rem;
    }

    .process-step {
        gap: 2rem;
        margin-bottom: 3rem;
    }

    .step-number {
        width: 80px;
        height: 80px;
        min-width: 80px;
        font-size: 2rem;
        border-radius: 20px;
    }

    .step-content h3 {
        font-size: 1.5rem;
    }

    .step-content p {
        font-size: 1.05rem;
    }

    /* CTA */
    .cta-section {
        padding: 6rem 2rem;
    }

    .cta-content h2 {
        font-size: 3rem;
    }

    .cta-content p {
        font-size: 1.2rem;
    }

    .btn-cta-large {
        padding: 1.4rem 3rem;
        font-size: 1.1rem;
        transition: transform 0.3s, box-shadow 0.3s;
    }

    .btn-cta-large:hover {
        transform: translateY(-5px);
        box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3);
    }

    /* Footer */
    footer {
        padding: 5rem 2rem 2rem;
    }

    .footer-container {
        display: grid;
        grid-template-columns: 2fr 1fr 1fr 1fr;
        gap: 3rem;
    }

    .footer-links-grid {
        display: contents;
    }
}

/* ==========================================
   LARGE DESKTOP (1200px+)
   ========================================== */

@media (min-width: 1200px) {
    .hero-content h1 {
        font-size: 4.5rem;
    }

    .hero-container {
        gap: 5rem;
    }

    .hero-card {
        padding: 2.5rem;
    }

    .section-title {
        font-size: 3.5rem;
    }
}
