/**
 * OptiBFR - Modern Landing Page Styles
 * Inspired by invokap.factor design
 */

/* ===== CSS Variables ===== */
:root {
    --primary: #4f46e5;
    --primary-hover: #4338ca;
    --primary-light: #e0e7ff;
    --secondary: #8b5cf6;
    --accent: #06b6d4;
    --success: #22c55e;
    --success-light: #dcfce7;
    --warning: #f59e0b;
    --warning-light: #fef3c7;
    --danger: #ef4444;
    --info: #0ea5e9;
    --info-light: #e0f2fe;
    
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #64748b;
    --bg-body: #f8fafc;
    --bg-card: #ffffff;
    --border: #e2e8f0;
    --border-light: #f1f5f9;
    
    --gradient-start: #4f46e5;
    --gradient-end: #7c3aed;
    --gradient-primary: linear-gradient(135deg, var(--gradient-start) 0%, var(--gradient-end) 100%);
    
    --radius: 12px;
    --radius-md: 16px;
    --radius-lg: 20px;
    --radius-xl: 24px;
    --radius-full: 9999px;
    
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    
    --font-size-xs: 0.75rem;
    --font-size-sm: 0.875rem;
    --font-size-base: 1rem;
    --font-size-lg: 1.125rem;
    --font-size-xl: 1.25rem;
}

/* ===== Base ===== */
html {
    scroll-behavior: smooth;
    overflow-x: hidden;
}

body {
    font-family: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
    color: var(--text-primary);
    background: var(--bg-body);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

/* ===== NAVBAR ===== */
.site-nav {
    padding: 1rem 0;
    transition: all 0.3s ease;
    background: transparent;
    border: none;
}

.site-nav.scrolled {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-md);
    padding: 0.75rem 0;
}

.site-nav .navbar-brand img {
    height: 42px;
    transition: height 0.3s ease;
}

.site-nav.scrolled .navbar-brand img {
    height: 36px;
}

.site-nav .nav-link {
    color: white !important;
    font-weight: 600;
    padding: 0.5rem 1rem !important;
    transition: color 0.2s ease;
    font-size: 0.95rem;
}

.site-nav .nav-link:hover {
    color: var(--primary-light) !important;
}

.site-nav.scrolled .nav-link {
    color: var(--text-primary) !important;
}

.site-nav.scrolled .nav-link:hover {
    color: var(--primary) !important;
}

.site-nav .nav-link.active {
    text-decoration: underline;
    text-underline-offset: 6px;
    text-decoration-thickness: 2px;
}

/* Navbar buttons */
.btn-nav-ghost {
    color: white !important;
    background: transparent;
    border: none;
    font-weight: 600;
    padding: 0.5rem 1rem;
}

.site-nav.scrolled .btn-nav-ghost {
    color: var(--text-primary) !important;
}

.btn-nav-primary {
    background: var(--gradient-primary);
    color: white !important;
    border: none;
    padding: 0.5rem 1.5rem;
    border-radius: var(--radius-full);
    font-weight: 700;
    box-shadow: 0 4px 15px rgba(79, 70, 229, 0.4);
    transition: all 0.3s ease;
}

.btn-nav-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(79, 70, 229, 0.5);
    color: white !important;
}

/* ===== HERO SECTION ===== */
.hero-modern {
    min-height: 100vh;
    background: var(--gradient-primary);
    position: relative;
    display: flex;
    align-items: center;
    padding-top: 100px;
    padding-bottom: 60px;
    overflow: hidden;
}

.hero-modern::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='60' height='60' viewBox='0 0 60 60' xmlns='http://www.w3.org/2000/svg'%3E%3Cg fill='none' fill-rule='evenodd'%3E%3Cg fill='%23ffffff' fill-opacity='0.05'%3E%3Cpath d='M36 34v-4h-2v4h-4v2h4v4h2v-4h4v-2h-4zm0-30V0h-2v4h-4v2h4v4h2V6h4V4h-4zM6 34v-4H4v4H0v2h4v4h2v-4h4v-2H6zM6 4V0H4v4H0v2h4v4h2V6h4V4H6z'/%3E%3C/g%3E%3C/g%3E%3C/svg%3E");
    opacity: 0.5;
}

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

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-full);
    color: white;
    font-size: var(--font-size-sm);
    margin-bottom: 1.5rem;
    animation: fadeInUp 0.6s ease;
}

.hero-title {
    font-size: clamp(2.25rem, 5vw, 3.25rem);
    font-weight: 800;
    color: white;
    line-height: 1.05;
    margin-bottom: 1.15rem;
    animation: fadeInUp 0.6s ease 0.1s both;
}

.hero-title .highlight {
    background: linear-gradient(90deg, #a5b4fc, #c4b5fd);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: var(--font-size-lg);
    color: rgba(255, 255, 255, 0.9);
    max-width: 540px;
    margin-bottom: 2rem;
    line-height: 1.7;
    animation: fadeInUp 0.6s ease 0.2s both;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    animation: fadeInUp 0.6s ease 0.3s both;
}

.hero-cta .btn-light {
    background: white;
    color: var(--primary);
    font-weight: 700;
    padding: 0.875rem 2rem;
    border: none;
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    transition: all 0.3s ease;
}

.hero-cta .btn-light:hover {
    background: var(--bg-body);
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl);
}

.hero-cta .btn-outline-light {
    border: 2px solid rgba(255, 255, 255, 0.5);
    color: white;
    padding: 0.875rem 2rem;
    font-weight: 600;
    border-radius: var(--radius);
    background: transparent;
    transition: all 0.3s ease;
}

.hero-cta .btn-outline-light:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: white;
    color: white;
}

/* Hero Image — carte dédiée pour agrandir et intégrer l’image */
.hero-image {
    position: relative;
    animation: fadeInUp 0.6s ease 0.4s both;
}

.hero-image img {
    max-width: 100%;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
}

.hero-float-card {
    position: absolute;
    background: white;
    border-radius: var(--radius-md);
    padding: 1rem 1.25rem;
    box-shadow: var(--shadow-lg);
    animation: float 3s ease-in-out infinite;
}

.hero-float-card.card-1 {
    top: 10%;
    right: -20px;
    animation-delay: 0s;
}

.hero-float-card.card-2 {
    bottom: 15%;
    left: -20px;
    animation-delay: 1.5s;
}

/* Hero badges */
.hero-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    margin-top: 2rem;
    animation: fadeInUp 0.6s ease 0.4s both;
}

.hero-badges .badge-item {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(10px);
    border-radius: var(--radius-full);
    color: white;
    font-size: var(--font-size-sm);
    font-weight: 600;
}

/* ERP logos strip */
.erp-strip-modern {
    margin-top: 2rem;
    animation: fadeInUp 0.6s ease 0.5s both;
}

.erp-strip-modern .label {
    color: rgba(255, 255, 255, 0.8);
    font-size: var(--font-size-sm);
    font-weight: 600;
    margin-bottom: 1rem;
    display: block;
}

.erp-logos-modern {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    align-items: center;
}

.erp-logos-modern img {
    height: 28px;
    filter: brightness(0) invert(1);
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.erp-logos-modern img:hover {
    opacity: 1;
}

/* ===== STATS BAR ===== */
.stats-bar {
    background: white;
    box-shadow: var(--shadow-lg);
    border-radius: var(--radius-lg);
    margin-top: -60px;
    position: relative;
    z-index: 10;
    padding: 2rem;
}

.stat-item {
    text-align: center;
    padding: 1rem;
}

.stat-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 1.5rem;
}

.stat-icon.primary { background: var(--primary-light); color: var(--primary); }
.stat-icon.success { background: var(--success-light); color: var(--success); }
.stat-icon.warning { background: var(--warning-light); color: var(--warning); }
.stat-icon.info { background: var(--info-light); color: var(--info); }

.stat-number {
    font-size: 2.25rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: var(--font-size-sm);
    color: var(--text-muted);
    font-weight: 500;
}

/* ===== SECTION STYLES ===== */
.section-modern {
    padding: 5rem 0;
}

.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 3.5rem;
}

.section-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--primary-light);
    color: var(--primary);
    padding: 0.5rem 1rem;
    border-radius: var(--radius-full);
    font-size: var(--font-size-sm);
    font-weight: 600;
    margin-bottom: 1rem;
}

.section-title {
    font-size: clamp(1.75rem, 4vw, 2.5rem);
    font-weight: 800;
    color: var(--text-primary);
    margin-bottom: 1rem;
}

.section-subtitle {
    font-size: var(--font-size-lg);
    color: var(--text-secondary);
    line-height: 1.7;
}

/* ===== FEATURE CARDS ===== */
.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 2rem;
    height: 100%;
    transition: all 0.3s ease;
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

.feature-icon {
    width: 64px;
    height: 64px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.75rem;
    margin-bottom: 1.5rem;
}

.feature-icon.gradient {
    background: var(--gradient-primary);
    color: white;
}

.feature-icon.primary { background: var(--primary-light); color: var(--primary); }
.feature-icon.success { background: var(--success-light); color: var(--success); }
.feature-icon.warning { background: var(--warning-light); color: var(--warning); }

.feature-card h4 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.feature-card p {
    color: var(--text-secondary);
    font-size: var(--font-size-sm);
    line-height: 1.6;
    margin: 0;
}

/* ===== STEP CARDS ===== */
.step-card-modern {
    text-align: center;
    padding: 2rem;
    position: relative;
}

.step-number {
    width: 60px;
    height: 60px;
    background: var(--gradient-primary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 auto 1.5rem;
    position: relative;
    z-index: 2;
}

.step-card-modern::after {
    content: '';
    position: absolute;
    top: 50px;
    left: 60%;
    width: 80%;
    height: 2px;
    background: var(--border);
    z-index: 1;
}

.step-card-modern:last-child::after {
    display: none;
}

.step-icon-modern {
    width: 80px;
    height: 80px;
    background: var(--bg-body);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 2rem;
    color: var(--primary);
}

.step-card-modern h4 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
    color: var(--text-primary);
}

.step-card-modern p {
    color: var(--text-secondary);
    font-size: var(--font-size-sm);
}

/* ===== CTA SECTION ===== */
.cta-section {
    background: var(--gradient-primary);
    padding: 5rem 0;
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url("data:image/svg+xml,%3Csvg width='100' height='100' viewBox='0 0 100 100' xmlns='http://www.w3.org/2000/svg'%3E%3Ccircle cx='50' cy='50' r='40' fill='none' stroke='%23ffffff' stroke-opacity='0.1' stroke-width='1'/%3E%3C/svg%3E");
    opacity: 0.5;
}

.cta-content {
    position: relative;
    z-index: 2;
    text-align: center;
    color: white;
}

.cta-title {
    font-size: clamp(1.75rem, 4vw, 2.75rem);
    font-weight: 800;
    margin-bottom: 1rem;
}

.cta-subtitle {
    font-size: var(--font-size-lg);
    opacity: 0.9;
    margin-bottom: 2rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.cta-btn {
    background: white;
    color: var(--primary);
    font-weight: 700;
    padding: 1rem 2.5rem;
    border-radius: var(--radius);
    font-size: var(--font-size-lg);
    border: none;
    box-shadow: var(--shadow-xl);
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.cta-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    color: var(--primary-hover);
}

/* ===== TESTIMONIALS ===== */
.testimonial-card {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 2rem;
    height: 100%;
}

.testimonial-quote {
    font-size: 1.1rem;
    color: var(--text-primary);
    line-height: 1.7;
    margin-bottom: 1.5rem;
    font-style: italic;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.testimonial-avatar {
    width: 50px;
    height: 50px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 1.25rem;
}

.testimonial-info h6 {
    margin: 0;
    font-weight: 600;
    color: var(--text-primary);
}

.testimonial-info small {
    color: var(--text-muted);
}

/* ===== PRICING CARDS ===== */
.pricing-card-modern {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 2.5rem;
    height: 100%;
    position: relative;
    transition: all 0.3s ease;
}

.pricing-card-modern:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

.pricing-card-modern.featured {
    border-color: var(--primary);
    box-shadow: var(--shadow-lg);
}

.pricing-badge-modern {
    position: absolute;
    top: -12px;
    right: 20px;
    background: var(--gradient-primary);
    color: white;
    font-weight: 700;
    font-size: var(--font-size-sm);
    padding: 0.35rem 1rem;
    border-radius: var(--radius-full);
    box-shadow: var(--shadow);
}

.pricing-card-modern h4 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.pricing-price {
    font-size: 3rem;
    font-weight: 800;
    color: var(--primary);
    margin-bottom: 1.5rem;
}

.pricing-price span {
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-muted);
}

.pricing-features {
    list-style: none;
    padding: 0;
    margin: 0 0 2rem;
}

.pricing-features li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.5rem 0;
    color: var(--text-secondary);
    font-size: var(--font-size-sm);
}

.pricing-features li i {
    color: var(--success);
    font-size: 1rem;
}

/* ===== FOOTER ===== */
.footer-modern {
    background: var(--text-primary);
    color: rgba(255, 255, 255, 0.7);
    padding: 5rem 0 2rem;
}

.footer-logo {
    height: 40px;
    filter: brightness(0) invert(1);
    margin-bottom: 1.5rem;
}

.footer-desc {
    color: rgba(255, 255, 255, 0.6);
    line-height: 1.7;
    margin-bottom: 1.5rem;
    max-width: 300px;
}

.footer-title {
    color: white;
    font-weight: 700;
    margin-bottom: 1.5rem;
    font-size: 1rem;
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

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

.footer-links a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: color 0.2s ease;
}

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

.social-links {
    display: flex;
    gap: 1rem;
}

.social-link {
    width: 40px;
    height: 40px;
    border-radius: var(--radius);
    background: rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    text-decoration: none;
    transition: all 0.2s ease;
}

.social-link:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-2px);
}

.footer-divider {
    border-color: rgba(255, 255, 255, 0.1);
    margin: 3rem 0 2rem;
}

.footer-bottom {
    text-align: center;
    font-size: var(--font-size-sm);
    color: rgba(255, 255, 255, 0.5);
}

/* ===== ANIMATIONS ===== */
@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

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

/* ===== RESPONSIVE ===== */
@media (max-width: 991px) {
    .hero-modern {
        padding-top: 100px;
        text-align: center;
    }

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

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

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

    .hero-image {
        margin-top: 3rem;
    }

    .step-card-modern::after {
        display: none;
    }

    .site-nav .navbar-collapse {
        background: var(--bg-card);
        padding: 1rem;
        border-radius: var(--radius);
        margin-top: 1rem;
        box-shadow: var(--shadow-lg);
    }

    .site-nav .navbar-collapse .nav-link {
        color: var(--text-primary) !important;
    }

    .erp-strip-modern {
        text-align: center;
    }

    .erp-logos-modern {
        justify-content: center;
    }
}

@media (max-width: 767px) {
    .section-modern {
        padding: 3.5rem 0;
    }

    .stats-bar {
        margin-top: -40px;
        padding: 1.5rem;
    }

    .stat-item {
        padding: 0.5rem;
    }

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

    .hero-float-card {
        display: none;
    }

    .pricing-card-modern {
        padding: 1.5rem;
    }
}

/* ===== UTILITIES ===== */
.bg-gradient-primary {
    background: var(--gradient-primary);
}

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

.btn-modern {
    border-radius: var(--radius);
    font-weight: 600;
    padding: 0.75rem 1.5rem;
    transition: all 0.3s ease;
}

.btn-modern-primary {
    background: var(--gradient-primary);
    color: white;
    border: none;
}

.btn-modern-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(79, 70, 229, 0.3);
    color: white;
}

.btn-modern-outline {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}

.btn-modern-outline:hover {
    background: var(--primary);
    color: white;
}

.card-modern {
    background: var(--bg-card);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow);
}
