/* ========================================
   MyRetroTV Landing Page - Styles (V2.0 Clean)
   ======================================== */

/* CSS Variables - Color Palette from Logo */
:root {
    /* Primary Colors */
    --orange-primary: #FF6B00;
    --orange-light: #FF8C42;
    --orange-dark: #E55D00;
    --yellow-primary: #FFD93D;
    --yellow-light: #FFE566;
    
    /* Secondary Colors */
    --blue-primary: #1E88E5;
    --blue-dark: #1565C0;
    --teal-accent: #26C6DA;
    --green-accent: #4CAF50;
    --purple-accent: #9C27B0;
    --red-accent: #E53935;
    
    /* Neutrals */
    --dark-bg: #0D0D0D;
    --dark-surface: #1A1A1A;
    --dark-elevated: #252525;
    --dark-border: #333333;
    --light-text: #FFFFFF;
    --muted-text: #A0A0A0;
    --subtle-text: #666666;
    
    /* Gradients */
    --gradient-primary: linear-gradient(135deg, var(--orange-primary), var(--yellow-primary));
    --gradient-hero: linear-gradient(180deg, var(--dark-bg) 0%, #1a0a00 50%, var(--dark-bg) 100%);
    --gradient-card: linear-gradient(145deg, rgba(255,107,0,0.1), rgba(255,217,61,0.05));
    --gradient-glow: radial-gradient(ellipse at center, rgba(255,107,0,0.3) 0%, transparent 70%);
    
    /* Typography */
    --font-display: 'Righteous', cursive;
    --font-body: 'Outfit', sans-serif;
    --font-arabic: 'Cairo', sans-serif;
    
    /* Spacing */
    --space-xs: 0.25rem;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 1.5rem;
    --space-xl: 2rem;
    --space-2xl: 3rem;
    --space-3xl: 4rem;
    --space-4xl: 6rem;
    
    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 30px;
    --radius-full: 9999px;
    
    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-base: 0.3s ease;
    --transition-slow: 0.5s ease;
    --transition-bounce: 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    
    /* Shadows */
    --shadow-sm: 0 2px 8px rgba(0,0,0,0.3);
    --shadow-md: 0 4px 20px rgba(0,0,0,0.4);
    --shadow-lg: 0 10px 40px rgba(0,0,0,0.5);
    --shadow-glow: 0 0 30px rgba(255,107,0,0.3);
    --shadow-glow-intense: 0 0 60px rgba(255,107,0,0.5);
}

/* RTL Support */
html[dir="rtl"] {
    --font-body: 'Cairo', sans-serif;
    --font-display: 'Cairo', sans-serif;
}

/* ========================================
   Reset & Base Styles
   ======================================== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-body);
    background-color: var(--dark-bg);
    color: var(--light-text);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Arabic Font Override */
html[lang="ar"] body,
html[lang="ar"] * {
    font-family: var(--font-arabic) !important;
}

.lang-selector,
.lang-selector * {
    font-family: var(--font-arabic) !important;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-fast);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

input {
    font-family: inherit;
}

.container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--space-lg);
}

/* ========================================
   Noise Overlay & Background Effects
   ======================================== */
.noise-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.03;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
}

/* Floating Elements */
.floating-elements {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

.float-element {
    position: absolute;
    font-size: 2rem;
    opacity: 0.1;
    animation: float 20s infinite ease-in-out;
}

.float-element.vinyl {
    top: 20%;
    left: 5%;
    animation-delay: 0s;
}

.float-element.star {
    top: 40%;
    right: 10%;
    animation-delay: -5s;
    color: var(--orange-primary);
}

.float-element.cassette {
    top: 70%;
    left: 15%;
    animation-delay: -10s;
}

.float-element.star-2 {
    top: 15%;
    right: 20%;
    animation-delay: -3s;
    color: var(--yellow-primary);
}

.float-element.tv {
    top: 60%;
    right: 5%;
    animation-delay: -7s;
}

.float-element.star-3 {
    top: 85%;
    left: 40%;
    animation-delay: -12s;
    color: var(--teal-accent);
}

@keyframes float {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    25% {
        transform: translateY(-30px) rotate(5deg);
    }
    50% {
        transform: translateY(-15px) rotate(-3deg);
    }
    75% {
        transform: translateY(-40px) rotate(3deg);
    }
}

/* ========================================
   Navigation
   ======================================== */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: var(--space-md) 0;
    transition: var(--transition-base);
}

.navbar.scrolled {
    background: rgba(13, 13, 13, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--dark-border);
    padding: var(--space-sm) 0;
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 var(--space-lg);
}

.nav-logo img {
    height: 50px;
    width: auto;
    transition: var(--transition-base);
}

.navbar.scrolled .nav-logo img {
    height: 40px;
}

.nav-menu {
    display: flex;
    gap: var(--space-xl);
}

.nav-menu a {
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--muted-text);
    position: relative;
    padding: var(--space-sm) 0;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: var(--transition-base);
}

.nav-menu a:hover {
    color: var(--light-text);
}

.nav-menu a:hover::after {
    width: 100%;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: var(--space-md);
}

/* Language Selector */
.lang-selector {
    position: relative;
}

.lang-btn {
    display: flex;
    align-items: center;
    gap: var(--space-xs);
    padding: var(--space-sm) var(--space-md);
    background: var(--dark-elevated);
    border-radius: var(--radius-full);
    color: var(--light-text);
    font-size: 0.85rem;
    font-weight: 600;
    transition: var(--transition-base);
    border: 1px solid var(--dark-border);
}

.lang-btn:hover {
    background: var(--dark-border);
    border-color: var(--orange-primary);
}

.lang-icon {
    font-size: 1rem;
}

.lang-arrow {
    font-size: 0.6rem;
    transition: var(--transition-base);
}

.lang-selector.active .lang-arrow {
    transform: rotate(180deg);
}

.lang-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: var(--dark-elevated);
    border: 1px solid var(--dark-border);
    border-radius: var(--radius-md);
    padding: var(--space-sm);
    min-width: 160px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: var(--transition-base);
    box-shadow: var(--shadow-lg);
}

html[dir="rtl"] .lang-dropdown {
    right: auto;
    left: 0;
}

.lang-selector.active .lang-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.lang-option {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    width: 100%;
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-sm);
    color: var(--muted-text);
    font-size: 0.9rem;
    transition: var(--transition-fast);
}

.lang-option:hover {
    background: var(--dark-border);
    color: var(--light-text);
}

.lang-option.active {
    background: rgba(255, 107, 0, 0.2);
    color: var(--orange-primary);
}

.flag {
    font-size: 1.2rem;
}

/* CTA Button */
.cta-btn {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-lg);
    background: var(--gradient-primary);
    border-radius: var(--radius-full);
    color: var(--dark-bg);
    font-weight: 700;
    font-size: 0.9rem;
    transition: var(--transition-base);
    box-shadow: var(--shadow-glow);
}

.cta-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-glow-intense);
}

.btn-icon {
    font-size: 1.1rem;
}

/* Mobile Menu Button */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: var(--space-sm);
}

.mobile-menu-btn span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--light-text);
    transition: var(--transition-base);
}

.mobile-menu-btn.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-btn.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-btn.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* ========================================
   Hero Section (Consolidated & Fixed)
   ======================================== */
/* ========================================
   Hero Section (Centered & Optimized)
   ======================================== */
.hero {
    position: relative;
    min-height: 100vh; /* Force la pleine hauteur */
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding-top: 80px;
    padding-bottom: 60px;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gradient-hero);
    z-index: -1;
}

.hero-bg::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 120%;
    height: 120%;
    background: radial-gradient(circle at center, rgba(255, 107, 0, 0.15) 0%, transparent 60%);
    filter: blur(60px);
}

.scanlines {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: repeating-linear-gradient(0deg, transparent, transparent 2px, rgba(0, 0, 0, 0.1) 2px, rgba(0, 0, 0, 0.1) 4px);
    pointer-events: none;
    opacity: 0.3;
}

.color-bars {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #fff 14.28%, #ff0 14.28% 28.56%, #0ff 28.56% 42.84%, #0f0 42.84% 57.12%, #f0f 57.12% 71.4%, #f00 71.4% 85.68%, #00f 85.68%);
}

.hero-container {
    width: 100%;
    max-width: 1000px; /* Largeur contenue pour la lecture */
    margin: 0 auto;
    padding: 0 var(--space-lg);
    position: relative;
    z-index: 5;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* Centered Content Styling */
.hero-content.centered {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

/* Logo Management */
.hero-main-logo {
    margin-bottom: var(--space-lg);
    max-width: 500px; /* Taille max du logo sur PC */
    width: 100%;
    filter: drop-shadow(0 0 30px rgba(255, 107, 0, 0.2));
    animation: logo-float 6s ease-in-out infinite;
}

@keyframes logo-float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-lg);
    background: rgba(255, 107, 0, 0.1);
    border: 1px solid rgba(255, 107, 0, 0.3);
    border-radius: var(--radius-full);
    font-size: 0.9rem;
    color: var(--orange-light);
    margin-bottom: var(--space-lg);
    backdrop-filter: blur(5px);
}

.hero-title {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 6vw, 4.5rem); /* Responsive font size */
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: var(--space-md);
    color: var(--light-text);
    text-shadow: 0 5px 20px rgba(0,0,0,0.8);
}

.title-highlight {
    display: inline-block;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: var(--orange-primary);
}

.hero-subtitle {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.85);
    max-width: 700px;
    margin-bottom: var(--space-xl);
    line-height: 1.6;
    text-shadow: 0 2px 4px rgba(0,0,0,0.8);
}

/* ========================================
   FIX: BOUTONS HERO & SCROLL
   ======================================== */

/* 1. Zone des boutons : Espacement */
.hero-actions {
    display: flex;
    gap: 20px;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    margin-top: 10px;
    margin-bottom: 40px; /* Espace avant les stats */
    width: 100%;
    position: relative;
    z-index: 10;
}

/* 2. Style de base des boutons (Taille & Forme) */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 16px 32px; /* Donne du volume */
    border-radius: 50px; /* Forme pilule */
    font-family: 'Outfit', sans-serif;
    font-weight: 700;
    font-size: 1rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
    line-height: 1;
}

/* 3. Bouton Principal (Orange avec dégradé) */
.btn-primary {
    background: linear-gradient(135deg, #FF6B00 0%, #FFD93D 100%);
    color: #1a0a00; /* Texte foncé pour contraste */
    border: none;
    box-shadow: 0 0 20px rgba(255, 107, 0, 0.4);
    position: relative;
    overflow: hidden;
}

.btn-primary:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 0 30px rgba(255, 107, 0, 0.6);
}

/* 4. Bouton Secondaire (Transparent avec bordure) */
.btn-secondary {
    background: transparent;
    color: #FFFFFF;
    border: 2px solid rgba(255, 255, 255, 0.3);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: #FFFFFF;
    transform: translateY(-3px);
}

/* 5. CORRECTION STATISTIQUES (Éviter le conflit) */
.hero-stats {
    /* Garde vos styles existants de glassmorphism */
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 40px;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    padding: 20px 50px;
    border-radius: 50px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    
    /* LE FIX EST ICI : Marge en bas pour ne pas toucher le scroll */
    margin-bottom: 80px; 
}

/* 6. CORRECTION SCROLL INDICATOR */
.hero-scroll {
    position: absolute;
    bottom: 20px; /* Collé en bas de l'écran */
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    z-index: 20;
    pointer-events: none; /* Pour cliquer au travers si besoin */
}

/* Responsive Mobile */
@media (max-width: 768px) {
    .btn {
        width: 100%; /* Boutons pleine largeur sur mobile */
        padding: 14px 20px;
    }
    
    .hero-stats {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 15px;
        padding: 15px 20px;
        width: 90%;
        margin-bottom: 100px; /* Plus d'espace sur mobile car le scroll est plus gros */
    }
    
    .stat-divider {
        display: none; /* Cache les lignes verticales sur mobile */
    }
    
    .stat-item {
        flex: 1; /* Distribue l'espace équitablement */
    }
}

.stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 100px;
}

.stat-number {
    font-family: var(--font-display);
    font-size: 2rem;
    font-weight: 700;
    color: var(--yellow-primary);
    line-height: 1;
    margin-bottom: 5px;
    text-shadow: 0 0 15px rgba(255, 217, 61, 0.3);
}

.stat-label {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    font-weight: 500;
}

.stat-divider {
    width: 1px;
    height: 40px;
    background: linear-gradient(180deg, transparent, rgba(255, 255, 255, 0.3), transparent);
}

//* ========================================
   CSS ANIMATION SCROLL (SOURIS)
   ======================================== */

/* 1. Conteneur global (Texte + Souris) */
.hero-scroll {
    position: absolute;
    bottom: 15px;          /* Positionné tout en bas */
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;              /* Espace entre le texte et la souris */
    z-index: 20;
    cursor: pointer;
    transition: opacity 0.3s;
    opacity: 0.7;
}

.hero-scroll:hover {
    opacity: 1;
}

/* 2. Style du texte "DÉFILER" */
.hero-scroll span {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.6);
    text-transform: uppercase;
    letter-spacing: 2px;
    font-weight: 600;
}

/* 3. La forme de la souris (Cadre) */
.scroll-mouse {
    width: 26px;
    height: 40px;
    border: 2px solid rgba(255, 255, 255, 0.8); /* Bordure blanche */
    border-radius: 20px;      /* Arrondi complet */
    position: relative;
    box-shadow: 0 0 10px rgba(0,0,0,0.3);
}

/* 4. La petite roulette (Point à l'intérieur) */
.scroll-wheel {
    width: 4px;
    height: 8px;
    background: #FF6B00;      /* Orange (couleur de votre marque) */
    border-radius: 2px;
    position: absolute;
    top: 6px;
    left: 50%;
    transform: translateX(-50%);
    animation: scrollAnim 2s infinite; /* Lancement de l'animation */
}

/* 5. L'animation de la roulette qui descend */
@keyframes scrollAnim {
    0% {
        top: 6px;
        opacity: 1;
    }
    100% {
        top: 22px;            /* La roulette descend */
        opacity: 0;           /* Et disparaît */
    }
}

/* Responsive Adjustments */
@media (max-width: 992px) {
    .hero-main-logo { max-width: 400px; }
    .hero-title { font-size: 3.5rem; }
}

@media (max-width: 768px) {
    .hero { padding-top: 100px; } /* Plus d'espace pour la nav mobile */
    
    .hero-main-logo { max-width: 280px; margin-bottom: var(--space-md); }
    
    .hero-title { font-size: 2.5rem; }
    .hero-subtitle { font-size: 1rem; padding: 0 10px; }
    
    /* Stats en grille sur mobile */
    .hero-stats {
        flex-wrap: wrap;
        padding: 20px;
        border-radius: 20px;
        gap: 20px;
        width: 100%;
        max-width: 340px;
    }
    
    .stat-item { flex: 1 1 40%; } /* 2 par ligne */
    
    .stat-divider { display: none; } /* On cache les lignes verticales sur mobile */
    
    .stat-number { font-size: 1.5rem; }
}

/* ========================================
   Section Styles
   ======================================== */
section {
    position: relative;
    padding: var(--space-4xl) 0;
}

.section-header {
    text-align: center;
    margin-bottom: var(--space-3xl);
}

.section-tag {
    display: inline-block;
    padding: var(--space-xs) var(--space-md);
    background: rgba(255, 107, 0, 0.15);
    border: 1px solid rgba(255, 107, 0, 0.3);
    border-radius: var(--radius-full);
    font-size: 0.85rem;
    color: var(--orange-light);
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: var(--space-md);
}

.section-title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    margin-bottom: var(--space-md);
}

.section-subtitle {
    font-size: 1.1rem;
    color: var(--muted-text);
    max-width: 600px;
    margin: 0 auto;
}

/* ========================================
   Features Section
   ======================================== */
.features {
    background: linear-gradient(180deg, var(--dark-bg) 0%, var(--dark-surface) 100%);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: var(--space-xl);
}

.feature-card {
    position: relative;
    padding: var(--space-2xl);
    background: var(--gradient-card);
    border: 1px solid var(--dark-border);
    border-radius: var(--radius-lg);
    transition: var(--transition-base);
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(255,107,0,0.1) 0%, transparent 50%);
    opacity: 0;
    transition: var(--transition-base);
}

.feature-card:hover {
    transform: translateY(-8px);
    border-color: rgba(255, 107, 0, 0.5);
    box-shadow: var(--shadow-glow);
}

.feature-card:hover::before {
    opacity: 1;
}

.feature-icon {
    position: relative;
    width: 70px;
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--dark-elevated);
    border-radius: var(--radius-md);
    margin-bottom: var(--space-lg);
    font-size: 2rem;
}

.icon-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    background: var(--gradient-glow);
    filter: blur(20px);
    opacity: 0;
    transition: var(--transition-base);
}

.feature-card:hover .icon-glow {
    opacity: 1;
}

.feature-card h3 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: var(--space-sm);
}

.feature-card p {
    color: var(--muted-text);
    font-size: 0.95rem;
    line-height: 1.7;
}

/* ========================================
   Eras Section
   ======================================== */
.eras {
    position: relative;
    overflow: hidden;
}

.eras-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: 
        radial-gradient(ellipse at 20% 30%, rgba(255, 107, 0, 0.1) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 70%, rgba(38, 198, 218, 0.1) 0%, transparent 50%);
}

.eras-timeline {
    position: relative;
    max-width: 1000px;
    margin: 0 auto;
}

.timeline-line {
    position: absolute;
    left: 50%;
    top: 0;
    bottom: 0;
    width: 4px;
    background: var(--dark-border);
    transform: translateX(-50%);
}

.timeline-line::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 0;
    background: var(--gradient-primary);
    animation: timeline-fill 2s ease-out forwards;
    animation-play-state: paused;
}

.eras.animated .timeline-line::before {
    animation-play-state: running;
}

@keyframes timeline-fill {
    to {
        height: 100%;
    }
}

.era-item {
    display: flex;
    align-items: center;
    margin-bottom: var(--space-3xl);
    position: relative;
}

.era-item:nth-child(even) {
    flex-direction: row-reverse;
}

.era-marker {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 60px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-size: 1rem;
    font-weight: 700;
    color: var(--dark-bg);
    z-index: 10;
    box-shadow: var(--shadow-glow);
}

.era-card {
    width: calc(50% - 60px);
    display: flex;
    align-items: center;
    gap: var(--space-lg);
    padding: var(--space-lg);
    background: var(--dark-elevated);
    border: 1px solid var(--dark-border);
    border-radius: var(--radius-lg);
    transition: var(--transition-base);
}

.era-item:nth-child(odd) .era-card {
    margin-right: auto;
    flex-direction: row-reverse;
    text-align: right;
}

html[dir="rtl"] .era-item:nth-child(odd) .era-card {
    text-align: left;
}

.era-item:nth-child(even) .era-card {
    margin-left: auto;
}

.era-card:hover {
    transform: scale(1.02);
    border-color: var(--orange-primary);
    box-shadow: var(--shadow-glow);
}

.era-image {
    flex-shrink: 0;
}

.era-tv {
    width: 80px;
    height: 70px;
    border-radius: 10px;
    position: relative;
    overflow: hidden;
}

.tv-50s {
    background: linear-gradient(145deg, #654321 0%, #3d2817 100%);
    border-radius: 15px;
}

.tv-50s::before {
    content: '';
    position: absolute;
    top: 10px;
    left: 10px;
    right: 10px;
    bottom: 20px;
    background: #333;
    border-radius: 50%;
}

.tv-60s {
    background: linear-gradient(145deg, #8B4513 0%, #654321 100%);
}

.tv-60s::before {
    content: '';
    position: absolute;
    top: 8px;
    left: 8px;
    right: 25px;
    bottom: 15px;
    background: linear-gradient(135deg, #4a90a4, #2d5a6b);
    border-radius: 8px;
}

.tv-70s {
    background: linear-gradient(145deg, #D2691E 0%, #8B4513 100%);
}

.tv-70s::before {
    content: '';
    position: absolute;
    top: 5px;
    left: 5px;
    right: 20px;
    bottom: 10px;
    background: linear-gradient(135deg, #ffd93d, #ff6b00);
    border-radius: 5px;
}

.tv-80s {
    background: linear-gradient(145deg, #2f2f2f 0%, #1a1a1a 100%);
}

.tv-80s::before {
    content: '';
    position: absolute;
    top: 5px;
    left: 5px;
    right: 15px;
    bottom: 8px;
    background: linear-gradient(135deg, #ff00ff, #00ffff);
    border-radius: 3px;
}

.tv-90s {
    background: linear-gradient(145deg, #4a4a4a 0%, #2d2d2d 100%);
}

.tv-90s::before {
    content: '';
    position: absolute;
    top: 3px;
    left: 3px;
    right: 3px;
    bottom: 10px;
    background: linear-gradient(135deg, #26c6da, #9c27b0);
    border-radius: 2px;
}

.tv-2000s {
    background: linear-gradient(145deg, #1a1a1a 0%, #0d0d0d 100%);
    border-radius: 5px;
}

.tv-2000s::before {
    content: '';
    position: absolute;
    top: 2px;
    left: 2px;
    right: 2px;
    bottom: 2px;
    background: linear-gradient(135deg, #4CAF50, #2196F3);
    border-radius: 3px;
}

.era-info h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: var(--space-xs);
}

.era-info p {
    font-size: 0.9rem;
    color: var(--muted-text);
}

/* ========================================
   Screenshots Section
   ======================================== */
.screenshots {
    background: var(--dark-surface);
}

.screenshots-gallery {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: var(--space-xl);
    align-items: start;
}

.screenshot-frame {
    background: var(--dark-elevated);
    border: 1px solid var(--dark-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: var(--transition-base);
}

.screenshot-frame:hover {
    border-color: var(--orange-primary);
    box-shadow: var(--shadow-glow);
}

.frame-header {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md);
    background: var(--dark-bg);
    border-bottom: 1px solid var(--dark-border);
}

.frame-dots {
    display: flex;
    gap: 6px;
}

.frame-dots span {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.frame-dots span:nth-child(1) { background: #ff5f57; }
.frame-dots span:nth-child(2) { background: #ffbd2e; }
.frame-dots span:nth-child(3) { background: #28ca42; }

.frame-title {
    font-size: 0.85rem;
    color: var(--muted-text);
}


.frame-content {
    position: relative;
    width: 100%;
    height: auto; 
    overflow: hidden;
    background: #000;
}

.screen-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block; 
}

.screenshot-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 400px;
    background: 
        linear-gradient(45deg, var(--dark-bg) 25%, transparent 25%),
        linear-gradient(-45deg, var(--dark-bg) 25%, transparent 25%),
        linear-gradient(45deg, transparent 75%, var(--dark-bg) 75%),
        linear-gradient(-45deg, transparent 75%, var(--dark-bg) 75%);
    background-size: 20px 20px;
    background-position: 0 0, 0 10px, 10px -10px, -10px 0px;
    border: 2px dashed var(--dark-border);
    border-radius: var(--radius-md);
    color: var(--muted-text);
}

.screenshot-placeholder.small {
    min-height: 120px;
}

.placeholder-icon {
    font-size: 3rem;
    margin-bottom: var(--space-md);
    opacity: 0.5;
}

.screenshot-placeholder.small .placeholder-icon {
    font-size: 2rem;
    margin-bottom: 0;
}

.screenshots-side {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

/* ========================================
   Community Section
   ======================================== */
.community {
    background: linear-gradient(180deg, var(--dark-surface) 0%, var(--dark-bg) 100%);
}

.community-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-4xl);
    align-items: center;
}

.community-content .section-tag {
    margin-bottom: var(--space-md);
}

.community-content .section-title {
    text-align: left;
    margin-bottom: var(--space-lg);
}

html[dir="rtl"] .community-content .section-title {
    text-align: right;
}

.community-desc {
    color: var(--muted-text);
    font-size: 1.05rem;
    line-height: 1.8;
    margin-bottom: var(--space-2xl);
}

.community-features {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

.community-features li {
    display: flex;
    align-items: flex-start;
    gap: var(--space-md);
    padding: var(--space-md);
    background: var(--dark-elevated);
    border-radius: var(--radius-md);
    border: 1px solid var(--dark-border);
    transition: var(--transition-base);
}

.community-features li:hover {
    border-color: var(--orange-primary);
    transform: translateX(8px);
}

html[dir="rtl"] .community-features li:hover {
    transform: translateX(-8px);
}

.cf-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.cf-content {
    display: flex;
    flex-direction: column;
    gap: var(--space-xs);
}

.cf-content strong {
    font-size: 1rem;
}

.cf-content span {
    font-size: 0.9rem;
    color: var(--muted-text);
}

/* Social Preview */
.community-visual {
    display: flex;
    justify-content: center;
}

.social-preview {
    perspective: 1000px;
}

.social-card {
    width: 100%;
    max-width: 380px;
    background: var(--dark-elevated);
    border: 1px solid var(--dark-border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transform: rotateY(-5deg) rotateX(5deg);
    transition: var(--transition-base);
    box-shadow: var(--shadow-lg);
}

.social-card:hover {
    transform: rotateY(0) rotateX(0);
    box-shadow: var(--shadow-glow);
}

.social-header {
    display: flex;
    align-items: center;
    gap: var(--space-md);
    padding: var(--space-md);
    border-bottom: 1px solid var(--dark-border);
}

.social-avatar {
    width: 50px;
    height: 50px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.social-user {
    display: flex;
    flex-direction: column;
}

.username {
    font-weight: 700;
}

.badge {
    font-size: 0.8rem;
    color: var(--yellow-primary);
}

.social-content {
    padding: var(--space-lg);
}

.social-content p {
    margin-bottom: var(--space-md);
}

.social-media {
    height: 150px;
    background: linear-gradient(135deg, var(--dark-bg), var(--dark-border));
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
}

.social-media::before {
    content: '▶';
    font-size: 2rem;
    color: var(--orange-primary);
    opacity: 0.5;
}

.social-actions {
    display: flex;
    gap: var(--space-xl);
    padding: var(--space-md) var(--space-lg);
    border-top: 1px solid var(--dark-border);
    color: var(--muted-text);
    font-size: 0.9rem;
}

/* ========================================
   CTA Section
   ======================================== */
.cta-section {
    position: relative;
    padding: var(--space-4xl) 0;
    overflow: hidden;
}

.cta-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--dark-bg);
}

.cta-gradient {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 200%;
    height: 200%;
    background: 
        radial-gradient(ellipse at 30% 50%, rgba(255, 107, 0, 0.2) 0%, transparent 50%),
        radial-gradient(ellipse at 70% 50%, rgba(255, 217, 61, 0.15) 0%, transparent 50%);
    animation: cta-pulse 6s ease-in-out infinite;
}

@keyframes cta-pulse {
    0%, 100% { opacity: 0.5; transform: translate(-50%, -50%) scale(1); }
    50% { opacity: 1; transform: translate(-50%, -50%) scale(1.1); }
}

.cta-content {
    position: relative;
    z-index: 10;
    text-align: center;
    max-width: 700px;
    margin: 0 auto;
}

.cta-content h2 {
    font-family: var(--font-display);
    font-size: clamp(2rem, 5vw, 3.5rem);
    margin-bottom: var(--space-md);
}

.cta-content p {
    font-size: 1.15rem;
    color: var(--muted-text);
    margin-bottom: var(--space-2xl);
}

.cta-actions {
    margin-bottom: var(--space-xl);
}

.cta-note {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) var(--space-lg);
    background: var(--dark-elevated);
    border-radius: var(--radius-full);
    font-size: 0.85rem;
    color: var(--muted-text);
}

/* ========================================
   Footer
   ======================================== */
.footer {
    background: var(--dark-surface);
    border-top: 1px solid var(--dark-border);
    padding: var(--space-4xl) 0 var(--space-xl);
}

.footer-main {
    display: grid;
    grid-template-columns: 1.5fr 2fr;
    gap: var(--space-4xl);
    margin-bottom: var(--space-3xl);
}

.footer-brand {
    max-width: 300px;
}

.footer-logo {
    height: 60px;
    width: auto;
    margin-bottom: var(--space-md);
}

.footer-brand p {
    color: var(--muted-text);
    margin-bottom: var(--space-lg);
}

.footer-social {
    display: flex;
    gap: var(--space-md);
}

.social-link {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--dark-elevated);
    border: 1px solid var(--dark-border);
    border-radius: 50%;
    color: var(--muted-text);
    font-size: 1rem;
    transition: var(--transition-base);
}

.social-link:hover {
    background: var(--orange-primary);
    border-color: var(--orange-primary);
    color: var(--dark-bg);
    transform: translateY(-3px);
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-xl);
}

.footer-col h4 {
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: var(--space-lg);
    color: var(--light-text);
}

.footer-col ul {
    display: flex;
    flex-direction: column;
    gap: var(--space-sm);
}

.footer-col a {
    color: var(--muted-text);
    font-size: 0.95rem;
    transition: var(--transition-fast);
}

.footer-col a:hover {
    color: var(--orange-primary);
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: var(--space-xl);
    border-top: 1px solid var(--dark-border);
    font-size: 0.85rem;
    color: var(--muted-text);
}

.footer-note {
    font-size: 0.8rem;
    color: var(--subtle-text);
}

/* ========================================
   Modal
   ======================================== */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-base);
}

.modal.active {
    opacity: 1;
    visibility: visible;
}

.modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(10px);
}

.modal-content {
    position: relative;
    width: 90%;
    max-width: 450px;
    background: var(--dark-elevated);
    border: 1px solid var(--dark-border);
    border-radius: var(--radius-xl);
    padding: var(--space-3xl);
    text-align: center;
    transform: scale(0.9) translateY(20px);
    transition: var(--transition-base);
}

.modal.active .modal-content {
    transform: scale(1) translateY(0);
}

.modal-close {
    position: absolute;
    top: var(--space-md);
    right: var(--space-md);
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--dark-bg);
    border-radius: 50%;
    color: var(--muted-text);
    font-size: 1.5rem;
    transition: var(--transition-fast);
}

html[dir="rtl"] .modal-close {
    right: auto;
    left: var(--space-md);
}

.modal-close:hover {
    background: var(--orange-primary);
    color: var(--dark-bg);
}

.modal-icon {
    font-size: 4rem;
    margin-bottom: var(--space-lg);
    animation: bounce 2s ease-in-out infinite;
}

@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-15px); }
}

.modal-content h3 {
    font-family: var(--font-display);
    font-size: 1.8rem;
    margin-bottom: var(--space-md);
}

.modal-content p {
    color: var(--muted-text);
    margin-bottom: var(--space-xl);
    line-height: 1.7;
}

.modal-form {
    display: flex;
    gap: var(--space-sm);
}

.modal-form input {
    flex: 1;
    padding: var(--space-md) var(--space-lg);
    background: var(--dark-bg);
    border: 1px solid var(--dark-border);
    border-radius: var(--radius-full);
    color: var(--light-text);
    font-size: 0.95rem;
    transition: var(--transition-fast);
}

.modal-form input:focus {
    outline: none;
    border-color: var(--orange-primary);
}

.modal-form input::placeholder {
    color: var(--subtle-text);
}

.modal-form .btn {
    white-space: nowrap;
}

/* ========================================
   Animations (AOS-like)
   ======================================== */
[data-aos] {
    opacity: 0;
    transition: opacity 0.6s ease, transform 0.6s ease;
}

[data-aos="fade-up"] { transform: translateY(30px); }
[data-aos="fade-down"] { transform: translateY(-30px); }
[data-aos="fade-left"] { transform: translateX(30px); }
html[dir="rtl"] [data-aos="fade-left"] { transform: translateX(-30px); }
[data-aos="fade-right"] { transform: translateX(-30px); }
html[dir="rtl"] [data-aos="fade-right"] { transform: translateX(30px); }
[data-aos="zoom-in"] { transform: scale(0.9); }

[data-aos].aos-animate {
    opacity: 1;
    transform: translate(0) scale(1);
}

/* Animation Delays */
[data-aos-delay="100"] { transition-delay: 0.1s; }
[data-aos-delay="200"] { transition-delay: 0.2s; }
[data-aos-delay="300"] { transition-delay: 0.3s; }
[data-aos-delay="400"] { transition-delay: 0.4s; }
[data-aos-delay="500"] { transition-delay: 0.5s; }

/* ========================================
   Responsive Design
   ======================================== */

/* Desktop / Tablet Landscape */
@media (max-width: 1200px) {
    .timeline-line { left: 30px; }
    .era-marker { left: 30px; width: 50px; height: 50px; font-size: 0.9rem; }
    
    .era-card {
        width: calc(100% - 80px);
        margin-left: 80px !important;
        margin-right: 0 !important;
        flex-direction: row !important;
        text-align: left !important;
    }
    
    html[dir="rtl"] .era-card {
        text-align: right !important;
        margin-left: 0 !important;
        margin-right: 80px !important;
    }
    
    html[dir="rtl"] .timeline-line { left: auto; right: 30px; }
    html[dir="rtl"] .era-marker { left: auto; right: 30px; transform: translateX(50%); }
}

/* Tablet Portrait / Small Desktop */
@media (max-width: 992px) {
    /* Hero Responsiveness */
    .hero-container {
        flex-direction: column;
        justify-content: center;
        text-align: center;
        padding-top: 20px;
    }

    .hero-content {
        flex: 1;
        align-items: center;
        text-align: center;
        max-width: 100%;
        margin-bottom: var(--space-xl);
    }
    
    html[dir="rtl"] .hero-content {
        text-align: center;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .hero-tv-wrapper {
        display: none; /* Hide TV on mobile to save space */
    }
    
    .hero-stats {
        margin: 0 auto var(--space-3xl);
    }

    /* Other Sections */
    .screenshots-gallery { grid-template-columns: 1fr; }
    
    .screenshots-side {
        flex-direction: row;
        flex-wrap: wrap;
    }
    
    .screenshots-side .screenshot-frame { flex: 1; min-width: 200px; }
    
    .community-wrapper { grid-template-columns: 1fr; gap: var(--space-3xl); }
    .community-visual { order: -1; }
    
    .footer-main { grid-template-columns: 1fr; gap: var(--space-3xl); }
    .footer-brand { max-width: 100%; text-align: center; }
    .footer-social { justify-content: center; }
}

/* Mobile */
@media (max-width: 768px) {
    :root { --space-4xl: 4rem; }
    
    .nav-menu {
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: var(--dark-bg);
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: var(--space-2xl);
        opacity: 0;
        visibility: hidden;
        transition: var(--transition-base);
    }
    
    .nav-menu.active { opacity: 1; visibility: visible; }
    .nav-menu a { font-size: 1.5rem; }
    
    .mobile-menu-btn { display: flex; z-index: 1001; }
    .cta-btn .btn-text { display: none; }
    
    .hero-logo-mobile { display: block; max-width: 280px; margin: 0 auto var(--space-lg); }
    
    .hero-stats { gap: var(--space-lg); padding: 10px 20px; }
    .stat-number { font-size: 1.5rem; }
    .stat-divider { height: 25px; }
    
    .features-grid { grid-template-columns: 1fr; }
    .era-card { flex-direction: column !important; text-align: center !important; }
    
    .footer-links { grid-template-columns: repeat(2, 1fr); }
    .footer-bottom { flex-direction: column; gap: var(--space-md); text-align: center; }
    .modal-form { flex-direction: column; }
}

/* Small Mobile */
@media (max-width: 480px) {
    .hero-badge { font-size: 0.8rem; padding: var(--space-xs) var(--space-md); }
    
    .hero-actions { flex-direction: column; width: 100%; }
    .btn { width: 100%; justify-content: center; }
    
    .hero-stats { flex-direction: column; gap: var(--space-md); width: 100%; }
    .stat-divider { width: 60px; height: 1px; }
    
    .screenshot-placeholder { min-height: 250px; }
    .screenshots-side { flex-direction: column; }
    .screenshots-side .screenshot-frame { min-width: 100%; }
    
    .footer-links { grid-template-columns: 1fr; text-align: center; }
}


/* ========================================
   FIX FINAL : ARABE (CAIRO) & ICÔNES
   ======================================== */

/* 1. Configuration des variables pour l'Arabe */
html[lang="ar"] {
    --font-display: 'Cairo', sans-serif;
    --font-body: 'Cairo', sans-serif;
    direction: rtl;
}

/* 2. Application de la police (Sans casser les icônes) */
html[lang="ar"] body,
html[lang="ar"] h1, html[lang="ar"] h2, html[lang="ar"] h3, 
html[lang="ar"] h4, html[lang="ar"] h5, html[lang="ar"] h6,
html[lang="ar"] p, html[lang="ar"] span, html[lang="ar"] a, 
html[lang="ar"] button, html[lang="ar"] input, 
html[lang="ar"] textarea, html[lang="ar"] label,
html[lang="ar"] .btn, html[lang="ar"] .nav-menu a {
    font-family: 'Cairo', sans-serif !important;
}

/* 3. PROTECTION DES ICÔNES (C'est la partie la plus importante) */
/* On force le navigateur à utiliser FontAwesome pour les classes d'icônes */
html[lang="ar"] .fa,
html[lang="ar"] .fas,
html[lang="ar"] .fa-solid,
html[lang="ar"] .fa-regular,
html[lang="ar"] .fa-brands,
html[lang="ar"] .badge-icon i,
html[lang="ar"] .btn-icon i {
    font-family: "Font Awesome 6 Free", "Font Awesome 6 Brands" !important;
    font-weight: 900; /* Solid nécessite souvent weight 900 */
}

/* 4. Miroir des flèches en RTL (Pour qu'elles pointent vers la gauche) */
html[dir="rtl"] .fa-arrow-right,
html[dir="rtl"] .fa-chevron-right,
html[dir="rtl"] .fa-long-arrow-alt-right,
html[dir="rtl"] .btn-arrow {
    transform: rotate(180deg);
    display: inline-block;
}

/* 5. Correction des espacements dans les boutons en RTL */
html[dir="rtl"] .btn {
    flex-direction: row; /* On garde l'ordre naturel qui sera inversé par dir=rtl */
}

/* En RTL, le gap de flexbox gère l'espace, mais si des marges traînent : */
html[dir="rtl"] .btn-content {
    direction: rtl;
    gap: 10px;
}

/* Correction spécifique pour le Hero Badge */
html[dir="rtl"] .hero-badge {
    padding-right: 15px; /* Ajustement visuel */
    padding-left: 15px;
}