/* ========================================
   EDTECHIA - Styles Responsive
   ======================================== */

:root {
    --primary: #6366f1;
    --primary-dark: #4f46e5;
    --secondary: #10b981;
    --accent: #f59e0b;
    --dark: #1e293b;
    --light: #f8fafc;
    --gray: #64748b;
    --white: #ffffff;
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --radius: 12px;
    --radius-sm: 8px;
}

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

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, sans-serif;
    background: var(--light);
    color: var(--dark);
    line-height: 1.6;
}

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

/* ========================================
   HEADER & NAVIGATION
   ======================================== */

.header {
    background: var(--white);
    box-shadow: var(--shadow);
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header .container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 20px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: var(--dark);
}

.logo-icon {
    font-size: 28px;
}

.logo-text {
    font-size: 24px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Menu Toggle (Mobile) */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 10px;
    z-index: 1001;
}

.hamburger {
    display: block;
    width: 28px;
    height: 3px;
    background: var(--dark);
    position: relative;
    border-radius: 2px;
    transition: all 0.3s;
}

.hamburger::before,
.hamburger::after {
    content: '';
    position: absolute;
    width: 28px;
    height: 3px;
    background: var(--dark);
    border-radius: 2px;
    transition: all 0.3s;
}

.hamburger::before {
    top: -8px;
}

.hamburger::after {
    top: 8px;
}

/* Hamburger Animation */
.menu-toggle.active .hamburger {
    background: transparent;
}

.menu-toggle.active .hamburger::before {
    transform: rotate(45deg);
    top: 0;
}

.menu-toggle.active .hamburger::after {
    transform: rotate(-45deg);
    top: 0;
}

/* Navigation */
.nav-list {
    display: flex;
    list-style: none;
    gap: 5px;
}

.nav-link {
    display: block;
    padding: 10px 16px;
    color: var(--dark);
    text-decoration: none;
    font-weight: 500;
    border-radius: var(--radius-sm);
    transition: all 0.3s;
}

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

/* ========================================
   HERO SECTION
   ======================================== */

.hero {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: var(--white);
    padding: 60px 0;
    text-align: center;
}

.hero-title {
    font-size: clamp(28px, 5vw, 48px);
    font-weight: 700;
    margin-bottom: 15px;
}

.highlight {
    background: rgba(255,255,255,0.2);
    padding: 5px 15px;
    border-radius: var(--radius-sm);
}

.hero-subtitle {
    font-size: clamp(16px, 3vw, 20px);
    opacity: 0.9;
    margin-bottom: 30px;
}

.hero-stats {
    display: flex;
    justify-content: center;
    gap: 30px;
    flex-wrap: wrap;
}

.stat {
    text-align: center;
}

.stat-number {
    display: block;
    font-size: clamp(28px, 5vw, 42px);
    font-weight: 700;
}

.stat-label {
    font-size: 14px;
    opacity: 0.8;
}

/* ========================================
   SECTIONS
   ======================================== */

.section {
    padding: 60px 0;
}

.section-alt {
    background: var(--white);
}

.section-title {
    font-size: clamp(24px, 4vw, 32px);
    text-align: center;
    margin-bottom: 10px;
}

.section-desc {
    text-align: center;
    color: var(--gray);
    margin-bottom: 40px;
}

/* ========================================
   GAMES GRID
   ======================================== */

.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.game-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 20px;
    text-align: center;
    text-decoration: none;
    color: var(--dark);
    box-shadow: var(--shadow);
    transition: all 0.3s;
}

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

.game-card.featured {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: var(--white);
}

.game-icon {
    font-size: 40px;
    margin-bottom: 10px;
}

.game-card h3 {
    font-size: 14px;
    font-weight: 600;
}

.btn-more {
    display: inline-block;
    background: var(--primary);
    color: var(--white);
    padding: 12px 30px;
    border-radius: var(--radius);
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s;
}

.btn-more:hover {
    background: var(--primary-dark);
    transform: translateX(5px);
}

/* ========================================
   LEVEL GRID (Educatif)
   ======================================== */

.level-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 25px;
}

.level-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 30px;
    text-align: center;
    text-decoration: none;
    color: var(--dark);
    box-shadow: var(--shadow);
    transition: all 0.3s;
    border-left: 5px solid var(--gray);
}

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

.level-maternelle { border-left-color: #f472b6; }
.level-primaire { border-left-color: #60a5fa; }
.level-college { border-left-color: #34d399; }
.level-lycee { border-left-color: #a78bfa; }

.level-icon {
    font-size: 48px;
    margin-bottom: 15px;
}

.level-card h3 {
    font-size: 20px;
    margin-bottom: 5px;
}

.level-card p {
    color: var(--gray);
    font-size: 14px;
    margin-bottom: 10px;
}

.level-count {
    display: inline-block;
    background: var(--light);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    color: var(--primary);
}

/* ========================================
   PACKS GRID
   ======================================== */

.packs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
    margin-bottom: 30px;
}

.pack-card {
    display: flex;
    align-items: center;
    gap: 10px;
    background: var(--white);
    padding: 15px;
    border-radius: var(--radius-sm);
    text-decoration: none;
    color: var(--dark);
    box-shadow: var(--shadow);
    transition: all 0.3s;
}

.pack-card:hover {
    background: var(--primary);
    color: var(--white);
}

.pack-icon {
    font-size: 24px;
}

.pack-name {
    font-weight: 500;
    font-size: 14px;
}

/* ========================================
   A11Y GRID (Accessibilite)
   ======================================== */

.a11y-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 25px;
}

.a11y-card {
    background: var(--white);
    border-radius: var(--radius);
    padding: 30px;
    text-align: center;
    text-decoration: none;
    color: var(--dark);
    box-shadow: var(--shadow);
    transition: all 0.3s;
}

.a11y-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    background: var(--secondary);
    color: var(--white);
}

.a11y-icon {
    font-size: 48px;
    margin-bottom: 15px;
}

.a11y-card h3 {
    font-size: 18px;
    margin-bottom: 8px;
}

.a11y-card p {
    font-size: 14px;
    opacity: 0.8;
    margin-bottom: 15px;
}

.a11y-count {
    display: inline-block;
    background: rgba(0,0,0,0.1);
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

/* ========================================
   FOOTER
   ======================================== */

.footer {
    background: var(--dark);
    color: var(--white);
    text-align: center;
    padding: 30px 0;
}

.footer p {
    opacity: 0.8;
    font-size: 14px;
}

/* ========================================
   MOBILE RESPONSIVE
   ======================================== */

@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }

    .nav {
        position: fixed;
        top: 0;
        right: -100%;
        width: 280px;
        height: 100vh;
        background: var(--white);
        box-shadow: var(--shadow-lg);
        padding: 80px 30px 30px;
        transition: right 0.3s ease;
        z-index: 1000;
    }

    .nav.active {
        right: 0;
    }

    .nav-list {
        flex-direction: column;
        gap: 10px;
    }

    .nav-link {
        padding: 15px 20px;
        font-size: 18px;
        border-radius: var(--radius-sm);
        background: var(--light);
    }

    .hero {
        padding: 40px 0;
    }

    .hero-stats {
        gap: 20px;
    }

    .stat {
        min-width: 80px;
    }

    .section {
        padding: 40px 0;
    }

    .games-grid {
        grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
        gap: 12px;
    }

    .game-card {
        padding: 15px 10px;
    }

    .game-icon {
        font-size: 32px;
    }

    .game-card h3 {
        font-size: 12px;
    }

    .level-grid {
        grid-template-columns: 1fr 1fr;
        gap: 15px;
    }

    .level-card {
        padding: 20px 15px;
    }

    .level-icon {
        font-size: 36px;
    }

    .packs-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 10px;
    }

    .pack-card {
        padding: 12px;
    }

    .pack-name {
        font-size: 12px;
    }

    .a11y-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .a11y-card {
        padding: 20px;
    }
}

@media (max-width: 480px) {
    .logo-text {
        font-size: 20px;
    }

    .games-grid {
        grid-template-columns: repeat(3, 1fr);
    }

    .level-grid {
        grid-template-columns: 1fr;
    }

    .packs-grid {
        grid-template-columns: 1fr;
    }
}

/* ========================================
   OVERLAY (Mobile Menu)
   ======================================== */

.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s;
    z-index: 999;
}

.overlay.active {
    opacity: 1;
    visibility: visible;
}

/* ========================================
   SMOOTH SCROLL
   ======================================== */

html {
    scroll-behavior: smooth;
}

/* ========================================
   ANIMATIONS
   ======================================== */

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

.game-card,
.level-card,
.pack-card,
.a11y-card {
    animation: fadeInUp 0.5s ease forwards;
}
