:root {
    --primary-color: #D32F2F;
    --primary-dark: #B71C1C;
    --primary-light: #EF5350;
    --accent-blue: #1E4D8C;
    --accent-indigo: #6366F1;
    --accent-amber: #FFAB40;
    --accent-emerald: #5DB760;
    --slate-900: #0F172A;
    --slate-800: #1E293B;
    --slate-600: #475569;
    --slate-500: #64748B;
    --slate-200: #E2E8F0;
    --slate-100: #F1F5F9;
    --slate-50: #F8FAFC;
    --white: #FFFFFF;

    --radius-xl: 48px;
    --radius-lg: 32px;
    --radius-md: 20px;
    --radius-sm: 12px;

    --shadow-soft: 0 10px 25px -5px rgba(0, 0, 0, 0.05), 0 8px 10px -6px rgba(0, 0, 0, 0.05);
}

@keyframes float {
    0% { transform: translateY(0px); }
    50% { transform: translateY(-20px); }
    100% { transform: translateY(0px); }
}

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

@keyframes spinSlow {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

@keyframes pulseGlow {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 0.9; }
}

/* Scroll-reveal: hidden until in view, then animates in with a stagger */
.bento-card,
.stat-item,
.step-item,
.testimonial-card,
.faq-item,
.hero-content > *,
.hero-image {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}

.bento-card.in-view,
.stat-item.in-view,
.step-item.in-view,
.testimonial-card.in-view,
.faq-item.in-view,
.hero-content > *.in-view,
.hero-image.in-view {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered delays inside grids (nth-child within each row-ish group) */
.bento-grid > *:nth-child(2), .steps-container > *:nth-child(2), .testimonial-grid > *:nth-child(2) { transition-delay: 0.08s; }
.bento-grid > *:nth-child(3), .steps-container > *:nth-child(3), .testimonial-grid > *:nth-child(3) { transition-delay: 0.16s; }
.bento-grid > *:nth-child(4) { transition-delay: 0.24s; }
.bento-grid > *:nth-child(5) { transition-delay: 0.32s; }
.bento-grid > *:nth-child(6) { transition-delay: 0.4s; }
.stat-item:nth-child(2) { transition-delay: 0.1s; }
.stat-item:nth-child(3) { transition-delay: 0.2s; }
.stat-item:nth-child(4) { transition-delay: 0.3s; }
.faq-item:nth-child(2) { transition-delay: 0.08s; }
.faq-item:nth-child(3) { transition-delay: 0.16s; }
.faq-item:nth-child(4) { transition-delay: 0.24s; }
.hero-content > *:nth-child(2) { transition-delay: 0.1s; }
.hero-content > *:nth-child(3) { transition-delay: 0.2s; }
.hero-content > *:nth-child(4) { transition-delay: 0.3s; }
.hero-image { transition-delay: 0.25s; }

@media (prefers-reduced-motion: reduce) {
    .bento-card, .stat-item, .step-item, .testimonial-card, .faq-item,
    .hero-content > *, .hero-image, .phone-mockup {
        opacity: 1 !important;
        transform: none !important;
        animation: none !important;
        transition: none !important;
    }
}

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

html { overflow-x: hidden; width: 100%; }

body {
    background-color: var(--slate-50);
    color: var(--slate-800);
    font-family: 'Inter', sans-serif;
    overflow-x: hidden;
    width: 100%;
    line-height: 1.6;
}

img { max-width: 100%; }

h1, h2, h3, h4, .logo-text {
    font-family: 'Poppins', sans-serif;
}

/* Header */
header {
    height: 90px;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 5%;
    position: sticky;
    top: 0;
    z-index: 1000;
    border-bottom: 1px solid rgba(226, 232, 240, 0.5);
}

.logo-container {
    display: flex;
    align-items: center;
    text-decoration: none;
}

.logo-box {
    width: 44px;
    height: 44px;
    margin-right: 14px;
    filter: drop-shadow(0 6px 12px rgba(211, 47, 47, 0.35));
    transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.logo-container:hover .logo-box { transform: rotate(-8deg) scale(1.05); }
.logo-text { font-size: 24px; font-weight: 900; color: var(--slate-900); letter-spacing: -0.5px; }

nav { display: flex; align-items: center; gap: 35px; }
nav a {
    position: relative;
    text-decoration: none;
    color: var(--slate-600);
    font-weight: 700;
    font-size: 0.95rem;
    transition: color 0.3s ease;
    padding-bottom: 4px;
}
nav a::after {
    content: '';
    position: absolute;
    left: 0;
    bottom: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    border-radius: 2px;
    transition: width 0.3s ease;
}
nav a:hover { color: var(--primary-color); }
nav a:hover::after { width: 100%; }
nav a.nav-active { color: var(--primary-color); font-weight: 800; }
nav a.nav-active::after { width: 100%; }

.header-right { display: flex; align-items: center; gap: 20px; }

.lang-selector {
    background: var(--slate-100);
    border: none;
    padding: 8px 12px;
    border-radius: 10px;
    font-weight: 700;
    cursor: pointer;
}

.btn-header-cta {
    background: var(--primary-color);
    color: white;
    padding: 12px 24px;
    border-radius: 14px;
    font-weight: 800;
    text-decoration: none;
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.25s ease;
    display: inline-block;
}
.btn-header-cta:hover { transform: translateY(-3px) scale(1.03); box-shadow: 0 10px 20px rgba(211, 47, 47, 0.35); }
.btn-header-cta:active { transform: translateY(-1px) scale(0.98); }

/* Mobile nav toggle */
.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    gap: 5px;
    width: 40px;
    height: 40px;
    background: var(--slate-100);
    border: none;
    border-radius: 10px;
    cursor: pointer;
    padding: 0;
}
.nav-toggle span {
    display: block;
    width: 18px;
    height: 2px;
    margin: 0 auto;
    background: var(--slate-800);
    border-radius: 2px;
    transition: transform 0.25s ease, opacity 0.25s ease;
}
.nav-toggle.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.active span:nth-child(2) { opacity: 0; }
.nav-toggle.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* Hero Section */
.hero {
    padding: 100px 5% 80px;
    background: white;
    display: flex;
    align-items: center;
    gap: 60px;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -180px;
    right: -180px;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(211, 47, 47, 0.08) 0%, rgba(211, 47, 47, 0) 70%);
    pointer-events: none;
}

.hero-content { flex: 1; }
.hero-content h1 { font-size: 4rem; font-weight: 900; line-height: 1.1; color: var(--slate-900); margin-bottom: 25px; }
.hero-content h1 span { color: var(--primary-color); }
.hero-content p { font-size: 1.3rem; color: var(--slate-500); margin-bottom: 40px; }

.store-btns { display: flex; gap: 15px; flex-wrap: wrap; }
.store-btn { display: inline-block; line-height: 0; }
.store-btn img { height: 50px; width: auto; transition: transform 0.2s; }
.store-btn:hover img { transform: scale(1.05); }

.hero-image { flex: 1; display: flex; justify-content: center; align-items: center; position: relative; }

.hero-ring {
    position: absolute;
    width: 420px;
    height: 420px;
    border: 2px dashed rgba(211, 47, 47, 0.25);
    border-radius: 50%;
    animation: spinSlow 40s linear infinite;
}
.hero-ring::before {
    content: '';
    position: absolute;
    inset: 40px;
    border: 2px dashed rgba(30, 77, 140, 0.2);
    border-radius: 50%;
}

.phone-mockup {
    width: 280px;
    height: 560px;
    background: #0F172A;
    border: 12px solid #1E293B;
    border-radius: 45px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 50px 100px -20px rgba(0,0,0,0.3);
    animation: float 6s ease-in-out infinite;
    z-index: 2;
}

.phone-screen {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--accent-blue) 100%);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 14px;
    color: white;
}

.phone-logo { width: 90px; height: 90px; filter: drop-shadow(0 10px 20px rgba(0,0,0,0.25)); }

.floating-chip {
    position: absolute;
    background: white;
    padding: 12px 18px;
    border-radius: 16px;
    box-shadow: 0 15px 35px -10px rgba(15, 23, 42, 0.25);
    font-weight: 700;
    font-size: 0.85rem;
    color: var(--slate-800);
    z-index: 3;
    animation: float 6s ease-in-out infinite;
    white-space: nowrap;
}
.chip-1 { top: 8%; left: -5%; animation-delay: 0.5s; }
.chip-2 { bottom: 20%; right: -8%; animation-delay: 1.5s; }
.chip-3 { top: 42%; right: -12%; animation-delay: 2.5s; }

@media (max-width: 1200px) {
    .chip-1, .chip-2, .chip-3 { display: none; }
}

/* Stats Bar */
.stats-bar {
    background: var(--slate-900);
    padding: 60px 5%;
    display: flex;
    justify-content: space-around;
    color: white;
    border-radius: var(--radius-xl);
    margin: -40px 5% 60px;
    position: relative;
    z-index: 10;
}

.stat-item { text-align: center; }
.stat-item h3 { font-size: 2.5rem; font-weight: 900; color: var(--primary-color); }
.stat-item p { font-weight: 600; opacity: 0.8; }

/* Bento Grid System - FIXED */
.bento-container {
    padding: 80px 5% 120px;
    max-width: 1300px;
    margin: 0 auto;
}

.section-tag {
    display: block;
    text-align: center;
    color: var(--primary-color);
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 15px;
}

.section-title {
    text-align: center;
    font-size: 3rem;
    font-weight: 900;
    margin-bottom: 60px;
    color: var(--slate-900);
}

.bento-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    grid-gap: 24px;
    grid-auto-rows: minmax(220px, auto);
}

.bento-card {
    background: white;
    border-radius: var(--radius-lg);
    padding: 40px;
    border: 1px solid rgba(226, 232, 240, 0.8);
    box-shadow: var(--shadow-soft);
    transition: all 0.4s ease;
    display: flex;
    flex-direction: column;
}

.bento-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 30px 60px -12px rgba(0,0,0,0.1);
    border-color: var(--primary-color);
}

/* Tailles des cartes - grille 12 colonnes */
.span-3 { grid-column: span 3; }
.span-4 { grid-column: span 4; }
.span-6 { grid-column: span 6; }
.span-8 { grid-column: span 8; }
.span-12 { grid-column: span 12; }

.card-icon {
    width: 60px;
    height: 60px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    margin-bottom: 25px;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.bento-card:hover .card-icon { transform: scale(1.12) rotate(-6deg); }

.card-title { font-size: 1.5rem; font-weight: 800; margin-bottom: 15px; color: var(--slate-900); }
.card-desc { color: var(--slate-500); font-weight: 500; font-size: 1.05rem; }

/* Premium Card (TCF) */
.premium-card {
    background: linear-gradient(135deg, var(--accent-blue) 0%, #0F172A 100%);
    color: white;
    justify-content: center;
}

.premium-card .card-title { color: white; font-size: 2.2rem; }
.premium-card .card-desc { color: rgba(255,255,255,0.8); }

/* Steps */
.steps-container {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.step-item {
    background: var(--slate-100);
    padding: 40px;
    border-radius: var(--radius-lg);
    text-align: center;
}

.step-num {
    width: 44px;
    height: 44px;
    background: var(--primary-color);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 900;
    margin: 0 auto 20px;
}

/* Testimonials */
.testimonial-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 5% 100px;
}

.testimonial-card {
    background: var(--slate-50);
    border: 1px solid var(--slate-200);
    border-radius: var(--radius-lg);
    padding: 32px;
    display: flex;
    flex-direction: column;
}

.testimonial-stars { color: var(--accent-amber); font-size: 1.1rem; margin-bottom: 16px; letter-spacing: 2px; }
.testimonial-text { color: var(--slate-600); font-weight: 500; margin-bottom: 24px; flex-grow: 1; }

.testimonial-author { display: flex; align-items: center; gap: 14px; }
.testimonial-avatar {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    flex-shrink: 0;
}
.testimonial-author strong { display: block; color: var(--slate-900); font-size: 0.95rem; }
.testimonial-author span { display: block; color: var(--slate-500); font-size: 0.85rem; }

/* FAQ */
.faq-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 5% 100px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.faq-item {
    background: white;
    border: 1px solid var(--slate-200);
    border-radius: var(--radius-md);
    padding: 22px 28px;
}

.faq-item summary {
    font-weight: 800;
    color: var(--slate-900);
    cursor: pointer;
    list-style: none;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
    content: '+';
    font-size: 1.4rem;
    font-weight: 400;
    color: var(--primary-color);
    margin-left: 20px;
    transition: transform 0.25s ease;
}
.faq-item[open] summary::after { transform: rotate(45deg); }
.faq-item p { margin-top: 16px; color: var(--slate-500); font-weight: 500; line-height: 1.7; }

/* Contact form */
.contact-form-card { max-width: 700px; margin: 0 auto; }
.form-group { margin-bottom: 22px; }
.form-group label { display: block; margin-bottom: 8px; font-weight: 700; color: var(--slate-800); }
.form-group input,
.form-group textarea {
    width: 100%;
    padding: 15px 18px;
    border-radius: 14px;
    border: 1.5px solid var(--slate-200);
    font-size: 1rem;
    font-family: inherit;
    color: var(--slate-800);
    background: var(--slate-50);
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
}
.form-group input:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 4px rgba(211, 47, 47, 0.1);
    background: white;
}
.form-submit-btn {
    width: 100%;
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 18px;
    border-radius: 16px;
    font-weight: 800;
    font-size: 1.1rem;
    cursor: pointer;
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.25s ease;
}
.form-submit-btn:hover { transform: translateY(-3px); box-shadow: 0 12px 25px rgba(211, 47, 47, 0.3); }
.form-submit-btn:active { transform: translateY(-1px); }

/* Footer */
footer {
    background: white;
    padding: 80px 5% 40px;
    border-top: 1px solid var(--slate-200);
    overflow: hidden;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 60px;
}

.footer-apps { display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.footer-store-btn { display: inline-block; line-height: 0; }
.footer-store-btn img { height: 44px; width: auto; transition: transform 0.2s; }
.footer-store-btn:hover img { transform: scale(1.05); }

.footer-head { font-weight: 800; margin-bottom: 20px; }
.footer-links-list { list-style: none; }
.footer-links-list li { margin-bottom: 10px; }
.footer-links-list a { text-decoration: none; color: var(--slate-500); font-weight: 600; }

.footer-bottom {
    border-top: 1px solid var(--slate-100);
    padding-top: 30px;
    display: flex;
    justify-content: space-between;
    color: var(--slate-500);
    font-weight: 500;
}

@media (max-width: 1024px) {
    .bento-grid { grid-template-columns: repeat(6, 1fr); }
    .span-3, .span-4 { grid-column: span 3; }
    .span-6, .span-8, .span-12 { grid-column: span 6; }
    .steps-container, .testimonial-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .hero { flex-direction: column; text-align: center; }
    .hero-content h1 { font-size: 2.8rem; }
    .store-btns { justify-content: center; }
    .bento-grid { grid-template-columns: 1fr; }
    .span-3, .span-4, .span-6, .span-8, .span-12 { grid-column: span 1; }
    .steps-container, .footer-grid, .testimonial-grid { grid-template-columns: 1fr; }
    .stats-bar { flex-direction: column; gap: 30px; }

    .nav-toggle { display: flex; }
    .header-right { gap: 12px; }
    .lang-selector { display: none; }
    .btn-header-cta { padding: 10px 16px; font-size: 0.85rem; }

    nav {
        display: none;
        position: absolute;
        top: 90px;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        align-items: flex-start;
        gap: 0;
        padding: 10px 5% 20px;
        box-shadow: 0 20px 30px -15px rgba(0,0,0,0.15);
        border-bottom: 1px solid var(--slate-200);
    }
    nav.nav-open { display: flex; }
    nav a { width: 100%; padding: 14px 0; border-bottom: 1px solid var(--slate-100); }
}

@media (min-width: 769px) {
    nav { display: flex !important; }
}

@media (max-width: 480px) {
    .hero { padding: 80px 6% 60px; gap: 40px; }
    .hero-content h1 { font-size: 2.2rem; }
    .hero-content p { font-size: 1.05rem; margin-bottom: 30px; }
    .section-title { font-size: 2rem; margin-bottom: 40px; }
    .store-btns { flex-direction: column; align-items: center; }
    .store-btn img { height: 44px; }
    .phone-mockup { width: 220px; height: 440px; }
    .hero-ring { width: 300px; height: 300px; }
    .bento-card { padding: 28px; }
    .card-title { font-size: 1.25rem; }
    .stats-bar { padding: 40px 6%; margin: -30px 4% 40px; }
    .stat-item h3 { font-size: 1.9rem; }
    .logo-text { font-size: 20px; }
    header { padding: 0 6%; }
    .btn-header-cta { padding: 8px 12px; font-size: 0.78rem; }
}
