/* ==========================================================================
   0. ANIMATIONS
   ========================================================================== */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-on-scroll {
    opacity: 0;
    animation: fadeInUp 0.8s ease-out forwards;
}

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

/* ==========================================================================
   1. VARIABLES & RESET
   ========================================================================== */
:root {
    --primary: #050953;
    --primary-light: #0b1075;  
    --accent: #8bc800;
    --accent-hover: #7ab300;
    --bg-light: #F8F9FA;
    --text-main: #1A1A1A;
    --text-muted: #555555;
    --white: #FFFFFF;
    --font-main: 'Outfit', sans-serif;
    --max-width: 1200px;
    --transition: all 0.3s ease;
}

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

html {
    scroll-behavior: smooth;
    scroll-padding-top: 90px;
}

body {
    font-family: var(--font-main);
    color: var(--text-main);
    background-color: var(--white);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
    color: var(--primary);
    line-height: 1.2;
}

a {
    text-decoration: none;
    color: inherit;
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
}

section {
    padding: 80px 0;
}

/* ==========================================================================
   2. BADGES DE SECTION
   ========================================================================== */
.badge {
    display: inline-block;
    padding: 6px 14px;
    background-color: rgba(139, 200, 0, 0.1);
    color: var(--primary);
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-radius: 20px;
    margin-bottom: 15px;
    border: 1px solid rgba(139, 200, 0, 0.3);
}

.section-dark .badge {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--accent);
    border-color: rgba(139, 200, 0, 0.5);
}

.cta-section .badge {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--accent);
    border-color: rgba(139, 200, 0, 0.5);
}

.section-dark, .section-light, .section-gray, .cta-section {
    text-align: center;
}

/* ==========================================================================
   3. BOUTONS
   ========================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
    border: 2px solid transparent;
    font-size: 16px;
}

.btn-primary {
    background-color: var(--accent);
    color: var(--white);
    box-shadow: 0 8px 20px rgba(139, 200, 0, 0.2);
}

.btn-primary:hover {
    background-color: var(--accent-hover);
    transform: translateY(-2px);
    box-shadow: 0 12px 26px rgba(139, 200, 0, 0.3);
}

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

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

/* ==========================================================================
   4. NAVBAR
   ========================================================================== */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 20px 0;
    transition: var(--transition);
    z-index: 1000;
    border-bottom: 1px solid transparent;
}

nav.scrolled {
    padding: 15px 0;
    box-shadow: 0 4px 20px rgba(5, 9, 83, 0.08);
    border-bottom: 1px solid #EAEAEA;
}

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

.logo img {
    height: 38px;
    width: auto;
    display: block;
}

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

.nav-links {
    display: none;
    gap: 30px;
}

.nav-links a {
    font-weight: 500;
    color: var(--primary);
    transition: var(--transition);
}

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

.nav-cta {
    display: none;
}

/* ==========================================================================
   5. SÉLECTEUR DE LANGUE
   ========================================================================== */
.lang-selector {
    position: relative;
    display: inline-block;
}

.lang-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    background: transparent;
    border: 1px solid #EAEAEA;
    padding: 8px 12px;
    border-radius: 6px;
    font-family: var(--font-main);
    font-size: 14px;
    font-weight: 600;
    color: var(--primary);
    cursor: pointer;
    transition: var(--transition);
}

.lang-btn:hover {
    border-color: var(--primary);
}

.lang-btn svg {
    width: 14px;
    height: 14px;
}

.lang-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    background: var(--white);
    border: 1px solid #EAEAEA;
    border-radius: 8px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.08);
    min-width: 120px;
    overflow: hidden;
    z-index: 1002;
}

.lang-dropdown.active {
    display: block;
}

.lang-dropdown a {
    display: block;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-main);
    transition: var(--transition);
}

.lang-dropdown a:hover {
    background-color: var(--bg-light);
    color: var(--accent);
}

.lang-dropdown a.active {
    color: var(--accent);
    font-weight: 700;
    background-color: rgba(139, 200, 0, 0.05);
}

/* ==========================================================================
   6. MENU MOBILE (BURGER)
   ========================================================================== */
.menu-toggle {
    display: flex;
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
    border: 1px solid #EAEAEA;
    border-radius: 8px;
    color: var(--primary);
    background: white;
    cursor: pointer;
    z-index: 1001;
}

.menu-toggle svg {
    width: 24px;
    height: 24px;
}

.mobile-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: white;
    padding: 20px;
    box-shadow: 0 10px 20px rgba(0,0,0,0.05);
    border-top: 1px solid #EAEAEA;
    flex-direction: column;
    gap: 15px;
}

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

.mobile-menu a {
    font-weight: 500;
    color: var(--primary);
    padding: 10px 0;
    border-bottom: 1px solid #F0F0F0;
}

/* ==========================================================================
   7. HERO SECTION
   ========================================================================== */
.hero {
    padding-top: 150px;
    padding-bottom: 80px;
    background: radial-gradient(ellipse at 85% 35%, rgba(139,200,0,.10), transparent 35%), linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    text-align: left;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr;
    gap: 40px;
    align-items: center;
}

.hero h1 {
    font-size: 42px;
    font-weight: 900;
    margin-bottom: 20px;
    letter-spacing: -1px;
}

.hero h1 span {
    color: var(--accent);
}

.hero p {
    font-size: 18px;
    color: var(--text-muted);
    margin-bottom: 30px;
}

.hero-buttons {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
}

/* --- Mockup CSS Téléphone --- */
.mockup-wrap {
    position: relative;
    display: grid;
    place-items: center;
    min-height: 400px;
}

.mockup-glow {
    position: absolute;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: rgba(139, 200, 0, 0.15);
    filter: blur(50px);
}

.mockup {
    position: relative;
    display: grid;
    width: 100%;
    max-width: 420px;
    min-height: 380px;
    place-items: center;
    padding: 30px;
    border: 1px solid #E7EAF0;
    border-radius: 24px;
    background: linear-gradient(145deg, #f5f7fa, #ffffff);
    box-shadow: 0 28px 70px rgba(5, 9, 83, 0.12);
}

.mockup-phone {
    width: 160px;
    min-height: 270px;
    padding: 12px;
    border: 6px solid #17172f;
    border-radius: 28px;
    background: white;
    box-shadow: 0 15px 35px rgba(5, 9, 83, 0.18);
    transform: rotate(5deg);
    transition: var(--transition);
}

.mockup:hover .mockup-phone {
    transform: rotate(0deg) scale(1.02);
}

.phone-top {
    width: 50px;
    height: 5px;
    margin: 0 auto 15px;
    border-radius: 10px;
    background: #20203b;
}

.phone-brand {
    margin-bottom: 15px;
    color: var(--primary);
    font-size: 16px;
    font-weight: 900;
    text-align: center;
}

.phone-banner {
    height: 60px;
    margin-bottom: 15px;
    border-radius: 8px;
    background: linear-gradient(135deg, #eaf4dc, #d8e8c4);
}

.phone-line {
    height: 8px;
    margin: 8px 0;
    border-radius: 8px;
    background: #edf0f4;
}

.phone-line.short { width: 60%; }

.phone-product {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 12px 0;
}

.phone-product i {
    width: 30px;
    height: 30px;
    border-radius: 6px;
    background: #eef3e8;
}

.phone-product span {
    flex: 1;
    height: 8px;
    border-radius: 8px;
    background: #e9ecf2;
}

.mockup-caption {
    margin-top: 20px;
    color: #777d8d;
    font-size: 13px;
    font-weight: 500;
    text-align: center;
}

/* ==========================================================================
   8. SECTION PROBLÈME
   ========================================================================== */
.section-dark {
    background-color: var(--primary);
    color: var(--white);
}

.section-dark h2 {
    color: var(--white);
    font-size: 32px;
    margin-bottom: 50px;
}

.grid-4 {
    display: grid;
    grid-template-columns: 1fr;
    gap: 25px;
}

.card-dark {
    background-color: rgba(255, 255, 255, 0.05);
    padding: 30px;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    transition: var(--transition);
    text-align: left;
}

.card-dark:hover {
    background-color: rgba(255, 255, 255, 0.08);
}

.card-dark h3 {
    color: var(--white);
    font-size: 20px;
    margin-bottom: 10px;
}

.card-dark p {
    color: rgba(255,255,255,0.75);
    font-size: 15px;
}

/* ==========================================================================
   9. SECTION SOLUTION
   ========================================================================== */
.section-light {
    background-color: var(--white);
}

.section-light h2 {
    font-size: 32px;
    margin-bottom: 50px;
}

.card-light {
    padding: 30px;
    border-radius: 12px;
    border: 1px solid #EAEAEA;
    transition: var(--transition);
    background: var(--white);
    text-align: left;
}

.card-light:hover {
    box-shadow: 0 10px 30px rgba(0,0,0,0.06);
    transform: translateY(-5px);
    border-color: var(--accent);
}

.card-light h3 {
    font-size: 20px;
    margin-bottom: 10px;
}

.card-light p {
    color: var(--text-muted);
    font-size: 15px;
}

/* ==========================================================================
   10. STYLE UNIFIÉ DES ICÔNES
   ========================================================================== */
.icon-box {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background-color: rgba(139, 200, 0, 0.15);
    border-radius: 10px;
    color: var(--accent);
    margin-bottom: 20px;
    flex-shrink: 0;
}

.icon-box svg {
    width: 24px;
    height: 24px;
}

/* ==========================================================================
   11. SECTION COMMENT ÇA MARCHE
   ========================================================================== */
.section-gray {
    background-color: var(--bg-light);
}

.timeline {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
    margin-top: 40px;
}

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

.step-number {
    width: 50px;
    height: 50px;
    background-color: #EEF7E3;
    border: 1px solid rgba(139, 200, 0, 0.4);
    color: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: 900;
    margin: 0 auto 20px auto;
}

.step h3 {
    margin-bottom: 10px;
}

.step p {
    color: var(--text-muted);
    font-size: 15px;
}

/* ==========================================================================
   12. SECTION SECTEURS
   ========================================================================== */
.grid-3 {
    display: grid;
    grid-template-columns: 1fr;
    gap: 25px;
}

.sector-card {
    padding: 40px 30px;
    border-radius: 12px;
    background: var(--white);
    border: 1px solid #EAEAEA;
    text-align: center;
    transition: var(--transition);
}

.sector-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.05);
}

.sector-card h3 {
    margin-bottom: 15px;
    font-size: 22px;
}

.sector-card p {
    color: var(--text-muted);
}

/* ==========================================================================
   13. SECTION TARIFS
   ========================================================================== */
.pricing-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
    max-width: 900px;
    margin: 0 auto 50px;
    align-items: center;
}

.pricing-card {
    background: var(--white);
    border: 1px solid #EAEAEA;
    border-radius: 16px;
    padding: 40px 30px;
    position: relative;
    transition: var(--transition);
    text-align: left;
}

.pricing-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 40px rgba(0,0,0,0.08);
}

.pricing-card.featured {
    border: 2px solid var(--accent);
    box-shadow: 0 20px 50px rgba(139, 200, 0, 0.15);
    transform: scale(1.02);
}

.pricing-card.featured:hover {
    transform: scale(1.02) translateY(-5px);
}

.popular-tag {
    position: absolute;
    top: -15px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--accent);
    color: var(--white);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.pricing-header h3 {
    font-size: 22px;
    margin-bottom: 5px;
}

.pricing-header p {
    color: var(--text-muted);
    font-size: 14px;
    margin-bottom: 20px;
}

.pricing-price {
    font-size: 42px;
    font-weight: 900;
    color: var(--primary);
    margin-bottom: 25px;
    display: flex;
    align-items: baseline;
    gap: 5px;
}

.pricing-price .currency {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-muted);
}

.pricing-price .period {
    font-size: 16px;
    font-weight: 500;
    color: var(--text-muted);
}

.pricing-features {
    list-style: none;
    margin-bottom: 30px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.pricing-features li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 15px;
    color: var(--text-main);
}

.pricing-features li svg {
    width: 18px;
    height: 18px;
    color: var(--accent);
    flex-shrink: 0;
}

/* Options à la carte */
.pricing-options {
    max-width: 600px;
    margin: 0 auto;
    background: var(--white);
    border: 1px solid #EAEAEA;
    border-radius: 12px;
    padding: 30px;
    text-align: left;
}

.pricing-options h4 {
    font-size: 18px;
    margin-bottom: 20px;
    color: var(--primary);
    text-align: center;
}

.options-list {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.option-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 15px;
    border-bottom: 1px solid #F0F0F0;
    font-size: 15px;
}

.option-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
}

.option-item strong {
    color: var(--primary);
}

/* ==========================================================================
   14. SECTION FAQ (ACCORDÉON)
   ========================================================================== */
.faq-container {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
    text-align: left;
}

.faq-item {
    background: var(--white);
    border: 1px solid #EAEAEA;
    border-radius: 12px;
    overflow: hidden;
    transition: var(--transition);
}

.faq-item.active {
    border-color: var(--accent);
    box-shadow: 0 5px 20px rgba(139, 200, 0, 0.1);
}

.faq-question {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 25px;
    background: transparent;
    border: none;
    cursor: pointer;
    font-family: var(--font-main);
    font-size: 17px;
    font-weight: 600;
    color: var(--primary);
    text-align: left;
    transition: var(--transition);
}

.faq-question:hover {
    color: var(--accent);
}

.faq-icon {
    width: 20px;
    height: 20px;
    color: var(--primary);
    transition: transform 0.3s ease;
    flex-shrink: 0;
}

.faq-item.active .faq-icon {
    transform: rotate(180deg);
    color: var(--accent);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease, padding 0.3s ease;
}

.faq-answer p {
    padding: 0 25px 20px 25px;
    color: var(--text-muted);
    font-size: 15px;
    line-height: 1.7;
    margin: 0;
}

.faq-item.active .faq-answer {
    max-height: 200px;
}

/* ==========================================================================
   15. CTA FINAL & FORMULAIRE
   ========================================================================== */
.cta-section {
    background-color: var(--primary);
    color: var(--white);
}

.cta-section h2 {
    color: var(--white);
    font-size: 36px;
    margin-bottom: 20px;
}

.cta-section p {
    color: rgba(255,255,255,0.8);
    margin-bottom: 40px;
    font-size: 18px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.form-container {
    max-width: 600px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 15px;
    background: rgba(255, 255, 255, 0.05);
    padding: 30px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    text-align: left;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr;
    gap: 15px;
}

.form-field label {
    display: block;
    margin-bottom: 8px;
    color: rgba(255, 255, 255, 0.9);
    font-size: 14px;
    font-weight: 500;
}

.form-container input {
    width: 100%;
    padding: 14px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    font-family: var(--font-main);
    font-size: 16px;
    background: rgba(255, 255, 255, 0.1);
    color: var(--white);
    outline: none;
    transition: var(--transition);
}

.form-container input::placeholder {
    color: rgba(255, 255, 255, 0.4);
}

.form-container input:focus {
    border-color: var(--accent);
    background: rgba(255, 255, 255, 0.15);
}

.form-container .btn {
    width: 100%;
    margin-top: 10px;
}

.form-feedback {
    display: none;
    padding: 12px;
    border-radius: 8px;
    font-size: 14px;
    margin-top: 10px;
    font-weight: 500;
}

.form-feedback.visible {
    display: block;
}

.form-feedback.success {
    background: rgba(139, 200, 0, 0.2);
    color: #EAF8D9;
}

.form-feedback.error {
    background: rgba(255, 77, 77, 0.2);
    color: #FFD9D9;
}

/* ==========================================================================
   16. FOOTER
   ========================================================================== */
footer {
    background-color: var(--white);
    padding: 60px 0 30px;
    border-top: 1px solid #EAEAEA;
    text-align: left;
}

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

.footer-brand p {
    margin-top: 15px;
    color: var(--text-muted);
    font-size: 14px;
    max-width: 300px;
}

.footer-col h4 {
    color: var(--primary);
    font-size: 16px;
    margin-bottom: 20px;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-links a, .footer-links span {
    color: var(--text-muted);
    font-size: 14px;
    transition: var(--transition);
}

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

.footer-bottom {
    padding-top: 20px;
    border-top: 1px solid #EAEAEA;
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
    color: #888;
    font-size: 13px;
}

/* ==========================================================================
   17. RÉSEAUX SOCIAUX (FOOTER)
   ========================================================================== */
.social-links {
    display: flex;
    gap: 12px;
    margin-top: 15px;
}

.social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background-color: var(--bg-light);
    color: var(--text-muted);
    transition: var(--transition);
}

.social-links a:hover {
    background-color: var(--accent);
    color: var(--white);
    transform: translateY(-2px);
}

.social-links a svg {
    width: 18px;
    height: 18px;
}

/* ==========================================================================
   18. RESPONSIVE (TABLETTE & DESKTOP)
   ========================================================================== */
@media (min-width: 768px) {
    .hero h1 { font-size: 52px; }
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .timeline { grid-template-columns: repeat(4, 1fr); }
    .grid-3 { grid-template-columns: repeat(3, 1fr); }
    .pricing-grid { grid-template-columns: 1fr 1fr; }
    .form-row { grid-template-columns: 1fr 1fr; }
    .footer-grid { grid-template-columns: 2fr 1fr 1fr; }
    .footer-bottom { flex-direction: row; justify-content: space-between; }
}

@media (min-width: 1024px) {
    .nav-links, .nav-cta { display: flex; }
    .menu-toggle, .mobile-menu { display: none !important; }
    .hero-content { grid-template-columns: 1.1fr 0.9fr; }
    .grid-4 { grid-template-columns: repeat(4, 1fr); }
    .hero h1 { font-size: 56px; }
}

/* ==========================================================================
   19. ACCESSIBILITÉ
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        scroll-behavior: auto !important;
        transition-duration: 0.01ms !important;
    }
}

/* ==========================================================================
   20. SUPPORT RTL (ARABE CORRIGÉ)
   ========================================================================== */
[dir="rtl"] body {
    text-align: right;
}

[dir="rtl"] .nav-right {
    flex-direction: row-reverse;
}

[dir="rtl"] .hero-text {
    text-align: right;
}

[dir="rtl"] .hero-buttons {
    flex-direction: row-reverse;
    justify-content: flex-end;
}

[dir="rtl"] .card-dark,
[dir="rtl"] .card-light,
[dir="rtl"] .pricing-card,
[dir="rtl"] .faq-question,
[dir="rtl"] .option-item {
    text-align: right;
}

[dir="rtl"] .footer-grid {
    direction: rtl;
}

[dir="rtl"] .footer-links {
    align-items: flex-start;
}

[dir="rtl"] .footer-brand p {
    margin-left: auto;
    margin-right: 0;
}

[dir="rtl"] .social-links {
    justify-content: flex-start;
}

[dir="rtl"] .lang-dropdown {
    right: auto;
    left: 0;
}

[dir="rtl"] .faq-icon {
    transform: rotate(180deg);
}
[dir="rtl"] .faq-item.active .faq-icon {
    transform: rotate(0deg); 
}