/* ===== Variables & Reset ===== */
:root {
    --primary-color: #5D5FEF;
    --primary-dark: #4a4cc7;
    --primary-light: #7375f5;
    --secondary-color: #2C3645;
    --text-dark: #1a202c;
    --text-gray: #4a5568;
    --text-light: #718096;
    --bg-light: #f7fafc;
    --bg-white: #ffffff;
    --success-color: #48bb78;
    --error-color: #f56565;
    --border-color: #e2e8f0;
    --shadow-sm: 0 1px 3px rgba(0,0,0,0.1);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 25px rgba(0,0,0,0.1);
    --shadow-xl: 0 20px 40px rgba(0,0,0,0.15);
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

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

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--text-dark);
    line-height: 1.6;
    overflow-x: hidden;
}

html {
    scroll-behavior: smooth;
}

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

/* ===== Navigation ===== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
    z-index: 1000;
    transition: var(--transition);
}

.navbar.scrolled {
    box-shadow: var(--shadow-md);
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-img {
    width: 40px;
    height: 40px;
    object-fit: contain;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--secondary-color);
}

.ai-badge {
    color: var(--primary-color);
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.nav-link {
    text-decoration: none;
    color: var(--text-gray);
    font-weight: 500;
    transition: var(--transition);
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-color);
    transition: width 0.3s ease;
}

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

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

.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 5px;
}

.mobile-menu-btn span {
    width: 25px;
    height: 3px;
    background: var(--secondary-color);
    transition: var(--transition);
}

/* ===== Hero Section ===== */
.hero {
    padding: 150px 0 100px;
    background: linear-gradient(135deg, #f7fafc 0%, #edf2f7 100%);
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(93, 95, 239, 0.1) 0%, transparent 70%);
    animation: float 20s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translate(0, 0) rotate(0deg); }
    33% { transform: translate(30px, -30px) rotate(120deg); }
    66% { transform: translate(-20px, 20px) rotate(240deg); }
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    color: var(--secondary-color);
}

.hero-title .highlight {
    color: var(--primary-color);
    position: relative;
    display: inline-block;
}

.hero-subtitle {
    font-size: 1.5rem;
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 1rem;
}

.hero-description {
    font-size: 1.125rem;
    color: var(--text-gray);
    max-width: 700px;
    margin-bottom: 2.5rem;
}

.highlight-text {
    color: var(--primary-color);
    font-weight: 700;
}

.hero-cta {
    display: flex;
    gap: 1rem;
    margin-bottom: 4rem;
    flex-wrap: wrap;
}

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2rem;
    border-radius: 12px;
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition);
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
    box-shadow: 0 4px 14px rgba(93, 95, 239, 0.4);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(93, 95, 239, 0.5);
}

.btn-secondary {
    background: white;
    color: var(--primary-color);
    border: 2px solid var(--primary-color);
}

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

/* ===== Stats Grid ===== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    margin-top: 3rem;
}

.stat-card {
    background: white;
    padding: 2rem;
    border-radius: 16px;
    text-align: center;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
}

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

.stat-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.stat-label {
    color: var(--text-gray);
    font-size: 0.9rem;
}

/* ===== Animations ===== */
.fade-in-up {
    opacity: 0;
    animation: fadeInUp 0.6s ease forwards;
}

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

.delay-1 { animation-delay: 0.1s; }
.delay-2 { animation-delay: 0.2s; }
.delay-3 { animation-delay: 0.3s; }
.delay-4 { animation-delay: 0.4s; }

/* ===== Why Section ===== */
.why-section {
    padding: 100px 0;
    background: white;
}

.section-title {
    font-size: 2.5rem;
    font-weight: 800;
    text-align: center;
    margin-bottom: 1rem;
    color: var(--secondary-color);
}

.section-subtitle {
    text-align: center;
    font-size: 1.125rem;
    color: var(--text-gray);
    max-width: 700px;
    margin: 0 auto 4rem;
}

.comparison-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 3rem;
    margin-bottom: 4rem;
}

.comparison-card {
    padding: 3rem 2rem;
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
    transition: var(--transition);
}

.comparison-bad {
    background: linear-gradient(135deg, #fff5f5 0%, #fed7d7 100%);
}

.comparison-good {
    background: linear-gradient(135deg, #f0fff4 0%, #c6f6d5 100%);
    border: 3px solid var(--success-color);
}

.comparison-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-xl);
}

.comparison-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    margin: 0 auto 2rem;
}

.comparison-icon.bad {
    background: #feb2b2;
}

.comparison-icon.good {
    background: #9ae6b4;
}

.comparison-card h3 {
    text-align: center;
    font-size: 1.5rem;
    margin-bottom: 2rem;
    color: var(--secondary-color);
}

.comparison-list {
    list-style: none;
}

.comparison-list li {
    padding: 0.75rem 0;
    font-size: 1.05rem;
    border-bottom: 1px solid rgba(0,0,0,0.1);
}

.comparison-list li:last-child {
    border-bottom: none;
}

/* ===== Mini Stats ===== */
.mini-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    background: white;
    padding: 3rem;
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
}

.mini-stat {
    text-align: center;
}

.mini-stat-value {
    font-size: 3rem;
    font-weight: 800;
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.mini-stat-label {
    color: var(--text-gray);
    line-height: 1.6;
}

/* ===== Solutions Section ===== */
.solutions-section {
    padding: 100px 0;
    background: var(--bg-light);
}

.solutions-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.solution-card {
    background: white;
    padding: 2.5rem;
    border-radius: 20px;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.solution-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, var(--primary-color), var(--primary-light));
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.solution-card:hover::before {
    transform: scaleX(1);
}

.solution-card:hover {
    transform: translateY(-10px);
    box-shadow: var(--shadow-xl);
}

.solution-featured {
    grid-column: 1 / -1;
    background: linear-gradient(135deg, #ffffff 0%, #f0f4ff 100%);
    border: 3px solid var(--primary-color);
}

.solution-icon {
    font-size: 3rem;
    margin-bottom: 1.5rem;
}

.solution-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--secondary-color);
}

.solution-description {
    color: var(--text-gray);
    margin-bottom: 1.5rem;
}

.solution-highlight {
    background: var(--primary-color);
    color: white;
    padding: 1rem;
    border-radius: 12px;
    font-weight: 500;
    text-align: center;
}

.solution-features {
    list-style: none;
    margin-bottom: 2rem;
}

.solution-features li {
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-color);
}

.solution-features li:last-child {
    border-bottom: none;
}

.solution-badge {
    background: linear-gradient(135deg, #ffd700, #ffed4e);
    color: var(--secondary-color);
    padding: 1rem;
    border-radius: 12px;
    text-align: center;
    font-weight: 600;
    margin-bottom: 2rem;
}

/* ===== Devis Example ===== */
.devis-example {
    background: white;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    margin-top: 2rem;
}

.devis-header {
    background: var(--bg-light);
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 2px solid var(--border-color);
}

.devis-number {
    font-weight: 600;
    color: var(--secondary-color);
}

.devis-status {
    background: var(--success-color);
    color: white;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.875rem;
    font-weight: 600;
}

.devis-content {
    padding: 1.5rem;
}

.devis-line {
    display: flex;
    justify-content: space-between;
    padding: 0.5rem 0;
    color: var(--text-gray);
}

.devis-total {
    display: flex;
    justify-content: space-between;
    padding: 1rem 0;
    margin-top: 0.5rem;
    border-top: 2px solid var(--border-color);
    font-weight: 700;
    font-size: 1.125rem;
    color: var(--secondary-color);
}

.devis-footer {
    background: #f0fff4;
    padding: 1rem;
    text-align: center;
    color: var(--success-color);
    font-weight: 600;
    border-top: 2px solid var(--border-color);
}

/* ===== Secteurs Section ===== */
.secteurs-section {
    padding: 100px 0;
    background: white;
}

.secteurs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-bottom: 4rem;
}

.secteur-card {
    background: white;
    padding: 2.5rem;
    border-radius: 20px;
    box-shadow: var(--shadow-md);
    transition: var(--transition);
    border: 2px solid transparent;
}

.secteur-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-10px);
    box-shadow: var(--shadow-xl);
}

.secteur-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    color: var(--secondary-color);
}

.secteur-description {
    color: var(--text-gray);
    margin-bottom: 1.5rem;
}

.secteur-features {
    list-style: none;
}

.secteur-features li {
    padding: 0.75rem 0;
    color: var(--text-gray);
    border-bottom: 1px solid var(--border-color);
}

.secteur-features li:last-child {
    border-bottom: none;
}

/* ===== Benefits Banner ===== */
.benefits-banner {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 2rem;
    background: linear-gradient(135deg, var(--primary-color), var(--primary-light));
    padding: 3rem;
    border-radius: 20px;
    color: white;
}

.benefit-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    text-align: center;
}

.benefit-icon {
    font-size: 3rem;
}

.benefit-text {
    line-height: 1.4;
}

/* ===== Contact Section ===== */
.contact-section {
    padding: 100px 0;
    background: var(--bg-light);
}

.contact-content {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 4rem;
    align-items: start;
}

.contact-info {
    position: sticky;
    top: 100px;
}

.contact-description {
    color: var(--text-gray);
    margin-bottom: 2rem;
    font-size: 1.125rem;
}

.contact-features {
    margin-top: 2rem;
}

.feature-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border-color);
}

.feature-item:last-child {
    border-bottom: none;
}

.feature-icon {
    font-size: 1.5rem;
}

/* ===== Contact Form ===== */
.contact-form-container {
    background: white;
    padding: 3rem;
    border-radius: 20px;
    box-shadow: var(--shadow-lg);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--secondary-color);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 1rem;
    border: 2px solid var(--border-color);
    border-radius: 12px;
    font-family: inherit;
    font-size: 1rem;
    transition: var(--transition);
    background: var(--bg-light);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
    background: white;
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.btn-submit {
    width: 100%;
    position: relative;
    margin-top: 1rem;
}

.btn-submit .btn-loader {
    display: none;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    position: absolute;
    right: 2rem;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.btn-submit.loading .btn-text {
    opacity: 0.7;
}

.btn-submit.loading .btn-loader {
    display: block;
}

.form-message {
    margin-top: 1.5rem;
    padding: 1rem;
    border-radius: 12px;
    text-align: center;
    font-weight: 600;
    display: none;
}

.form-message.success {
    display: block;
    background: #c6f6d5;
    color: #22543d;
}

.form-message.error {
    display: block;
    background: #fed7d7;
    color: #742a2a;
}

/* ===== Footer ===== */
.footer {
    background: var(--secondary-color);
    color: white;
    padding: 4rem 0 2rem;
}

.footer-content {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-brand {
    max-width: 400px;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 1rem;
}

.footer-description {
    color: rgba(255,255,255,0.8);
    line-height: 1.8;
}

.footer-column h4 {
    margin-bottom: 1.5rem;
    font-size: 1.125rem;
}

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

.footer-column a {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    display: block;
    padding: 0.5rem 0;
    transition: var(--transition);
}

.footer-column a:hover {
    color: white;
    padding-left: 0.5rem;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    flex-wrap: wrap;
    gap: 1rem;
}

.footer-legal {
    display: flex;
    gap: 2rem;
}

.footer-legal a {
    color: rgba(255,255,255,0.8);
    text-decoration: none;
    transition: var(--transition);
}

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

/* ===== Chat Button ===== */
.chat-button {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--primary-color);
    color: white;
    border: none;
    cursor: pointer;
    box-shadow: var(--shadow-xl);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    z-index: 999;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(93, 95, 239, 0.7);
    }
    50% {
        transform: scale(1.05);
        box-shadow: 0 0 0 20px rgba(93, 95, 239, 0);
    }
}

.chat-button:hover {
    transform: scale(1.1);
    background: var(--primary-dark);
}

/* ===== Responsive Design ===== */
@media (max-width: 968px) {
    .nav-menu {
        position: fixed;
        top: 70px;
        left: -100%;
        flex-direction: column;
        background: white;
        width: 100%;
        padding: 2rem;
        box-shadow: var(--shadow-md);
        transition: left 0.3s ease;
    }

    .nav-menu.active {
        left: 0;
    }

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

    .hero-title {
        font-size: 2.5rem;
    }

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

    .contact-info {
        position: relative;
        top: 0;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

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

    .footer-bottom {
        flex-direction: column;
        text-align: center;
    }
}

@media (max-width: 640px) {
    .hero-title {
        font-size: 2rem;
    }

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

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

    .mini-stat-value {
        font-size: 2.5rem;
    }

    .contact-form-container {
        padding: 2rem;
    }
}