/* ==========================================
   DESIGN SYSTEM & VARIABLES
   ========================================== */
:root {
    /* Colors — palette inspirée du logo WreckPulse (noir + orange) */
    --bg-dark: #0a0a0a;
    --bg-card: #171717;
    --bg-card-hover: #212121;
    --primary: #ff7a1a;
    --primary-glow: rgba(255, 122, 26, 0.35);
    --secondary: #ff3d1a;
    --secondary-glow: rgba(255, 61, 26, 0.35);
    --text-main: #f8fafc;
    --text-muted: #a3a3a3;
    --text-dark: #0a0a0a;
    --border-color: rgba(255, 255, 255, 0.08);
    --border-glow: rgba(255, 122, 26, 0.15);

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #ffae42 0%, #ff5500 100%);
    --gradient-accent: linear-gradient(135deg, #ff5500 0%, #b91c1c 100%);
    --gradient-dark: linear-gradient(180deg, #171717 0%, #0a0a0a 100%);
    --gradient-neon: linear-gradient(90deg, #ffae42 0%, #ff3d1a 100%);

    /* Typography */
    --font-body: 'Inter', sans-serif;
    --font-heading: 'Outfit', sans-serif;

    /* Spacing & Layout */
    --container-width: 1200px;
    --border-radius-sm: 8px;
    --border-radius-md: 16px;
    --border-radius-lg: 24px;
    --transition-fast: 0.2s ease;
    --transition-normal: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ==========================================
   RESET & BASE STYLES
   ========================================== */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

a {
    color: inherit;
    text-decoration: none;
    transition: var(--transition-fast);
}

button {
    font-family: inherit;
    border: none;
    background: none;
    cursor: pointer;
    outline: none;
}

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

.section {
    padding: 100px 0;
}

.section-alt {
    padding: 80px 0;
    background-color: rgba(23, 23, 23, 0.4);
}

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

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

/* ==========================================
   BUTTONS
   ========================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    font-weight: 700;
    font-size: 0.95rem;
    padding: 12px 28px;
    border-radius: var(--border-radius-sm);
    transition: var(--transition-normal);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    cursor: pointer;
    text-decoration: none;
    border: none;
}

.btn-primary {
    background: var(--gradient-primary);
    color: var(--text-dark);
    box-shadow: 0 4px 20px var(--primary-glow);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px var(--primary-glow), 0 0 15px var(--primary);
}

.btn-secondary {
    background: transparent;
    color: var(--text-main);
    border: 2px solid var(--secondary);
    box-shadow: 0 4px 15px var(--secondary-glow);
}

.btn-secondary:hover {
    background: var(--gradient-accent);
    color: var(--text-main);
    transform: translateY(-3px);
    box-shadow: 0 8px 25px var(--secondary-glow), 0 0 15px var(--secondary);
}

.btn-large {
    font-size: 1.1rem;
    padding: 16px 36px;
    border-radius: var(--border-radius-md);
}

.btn-small {
    font-size: 0.8rem;
    padding: 8px 16px;
}

.btn-full {
    width: 100%;
}

/* ==========================================
   HEADER / NAVIGATION
   ========================================== */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    background-color: rgba(10, 10, 10, 0.8);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-color);
    transition: var(--transition-fast);
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 80px;
}

.logo {
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.5rem;
    letter-spacing: 1px;
}

.logo-accent {
    color: var(--primary);
    text-shadow: 0 0 10px var(--primary-glow);
}

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

.nav-link {
    font-weight: 500;
    font-size: 0.95rem;
    color: var(--text-muted);
}

.nav-link:hover {
    color: var(--primary);
    text-shadow: 0 0 8px var(--primary-glow);
}

.btn-nav-mobile {
    display: none;
}

.nav-toggle {
    display: none;
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
    border-radius: var(--border-radius-sm);
    color: var(--text-main);
    font-size: 1.25rem;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
}

/* Mobile Nav Toggle (Hidden on Desktop) */
.btn-nav {
    display: none;
}

@media (min-width: 768px) {
    .btn-nav {
        display: inline-flex;
    }
}

@media (max-width: 767px) {
    .header {
        overflow: visible;
    }

    .header-container {
        height: 64px;
        position: relative;
    }

    .logo {
        font-size: 1.2rem;
        z-index: 2;
    }

    .nav-toggle {
        display: inline-flex;
        z-index: 2;
    }

    .nav {
        display: none;
        position: absolute;
        top: 64px;
        left: 0;
        right: 0;
        flex-direction: column;
        align-items: stretch;
        gap: 4px;
        padding: 12px 16px 20px;
        background-color: rgba(10, 10, 10, 0.97);
        border-bottom: 1px solid var(--border-color);
        box-shadow: 0 16px 30px rgba(0, 0, 0, 0.35);
    }

    .nav.is-open {
        display: flex;
        z-index: 200;
    }

    .nav-link {
        font-size: 1rem;
        padding: 12px 4px;
        color: var(--text-main);
    }

    .btn-nav-mobile {
        display: inline-flex;
        width: 100%;
        margin-top: 8px;
    }

    body.nav-open {
        overflow: hidden;
    }
}

/* ==========================================
   HERO SECTION
   ========================================== */
.hero {
    position: relative;
    padding: 160px 0 100px;
    overflow: hidden;
}

.hero-glow-1 {
    position: absolute;
    top: -10%;
    left: -10%;
    width: 50%;
    height: 60%;
    background: radial-gradient(circle, rgba(255, 122, 26, 0.15) 0%, transparent 70%);
    z-index: -1;
    pointer-events: none;
}

.hero-glow-2 {
    position: absolute;
    bottom: -10%;
    right: -10%;
    width: 50%;
    height: 60%;
    background: radial-gradient(circle, rgba(255, 61, 26, 0.15) 0%, transparent 70%);
    z-index: -1;
    pointer-events: none;
}

.hero-container {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 48px;
    align-items: center;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background-color: rgba(255, 61, 26, 0.1);
    border: 1px solid rgba(255, 61, 26, 0.2);
    color: var(--secondary);
    font-size: 0.85rem;
    font-weight: 700;
    padding: 6px 16px;
    border-radius: 100px;
    margin-bottom: 24px;
    text-transform: uppercase;
    letter-spacing: 1px;
    box-shadow: 0 0 15px rgba(255, 61, 26, 0.05);
}

.hero-title {
    font-family: var(--font-heading);
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 20px;
}

.hero-subtitle {
    font-size: 1.15rem;
    color: var(--text-muted);
    margin-bottom: 36px;
    max-width: 540px;
}

.hero-actions {
    margin-bottom: 48px;
}

.trust-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 24px;
}

.trust-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
}

.trust-badge i {
    color: var(--primary);
    font-size: 1rem;
}

.hero-image-container {
    position: relative;
}

.hero-image-wrapper {
    position: relative;
    border-radius: var(--border-radius-lg);
    overflow: hidden;
    border: 1px solid var(--border-color);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.5), 0 0 30px rgba(255, 122, 26, 0.1);
}

.hero-img {
    width: 100%;
    height: auto;
    object-fit: cover;
    transition: transform var(--transition-normal);
}

.hero-image-wrapper:hover .hero-img {
    transform: scale(1.03);
}

.hero-img-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to top, rgba(10, 10, 10, 0.6) 0%, transparent 50%);
    pointer-events: none;
}

/* ==========================================
   SECTION HEADERS
   ========================================== */
.section-header {
    margin-bottom: 48px;
}

.section-header.text-center {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.section-subtitle {
    display: inline-block;
    color: var(--primary);
    font-size: 0.85rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 8px;
}

.section-title {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 800;
    line-height: 1.2;
}

/* ==========================================
   TRENDING SECTION (SLIDER)
   ========================================== */
.trending {
    position: relative;
}

.trending .section-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.slider-controls {
    display: flex;
    gap: 12px;
}

.slider-arrow {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-main);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
}

.slider-arrow:hover {
    background-color: var(--primary);
    color: var(--text-dark);
    box-shadow: 0 0 15px var(--primary-glow);
}

.trending-slider-container {
    overflow: hidden;
    margin: 0 -24px;
    padding: 10px 24px;
}

.trending-slider {
    display: flex;
    gap: 24px;
    overflow-x: auto;
    scroll-behavior: smooth;
    scrollbar-width: none;
    /* Firefox */
    -webkit-overflow-scrolling: touch;
}

.trending-slider::-webkit-scrollbar {
    display: none;
    /* Chrome/Safari */
}

.trending-card {
    flex: 0 0 280px;
    background-color: var(--bg-card);
    border-radius: var(--border-radius-md);
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: var(--transition-normal);
}

.trending-card:hover {
    transform: translateY(-5px);
    border-color: var(--secondary);
    box-shadow: 0 10px 25px rgba(255, 61, 26, 0.15);
}

.trending-card-img {
    position: relative;
    height: 200px;
    overflow: hidden;
}

.trending-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-normal);
}

.trending-card:hover .trending-card-img img {
    transform: scale(1.05);
}

.trending-badge {
    position: absolute;
    top: 12px;
    left: 12px;
    background: var(--gradient-accent);
    color: var(--text-main);
    font-size: 0.75rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 100px;
    text-transform: uppercase;
}

.trending-card-content {
    padding: 20px;
}

.trending-card-content h3 {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    margin-bottom: 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.trending-card-content p {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.star-color {
    color: #fbbf24;
}

/* ==========================================
   CATEGORIES
   ========================================== */
.category-filters {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin-top: 24px;
}

.category-btn {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    padding: 10px 20px;
    border-radius: 100px;
    font-weight: 600;
    font-size: 0.9rem;
    transition: var(--transition-fast);
}

.category-btn:hover {
    color: var(--text-main);
    border-color: var(--primary);
    box-shadow: 0 0 10px var(--primary-glow);
}

.category-btn.active {
    background: var(--gradient-primary);
    color: var(--text-dark);
    border-color: transparent;
    box-shadow: 0 4px 15px var(--primary-glow);
}

/* ==========================================
   FEATURED GAMES GRID
   ========================================== */
.games-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

@media (min-width: 600px) {
    .games-grid {
        gap: 24px;
    }
}

@media (min-width: 992px) {
    .games-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

.game-card {
    background-color: var(--bg-card);
    border-radius: var(--border-radius-md);
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: var(--transition-normal);
    display: flex;
    flex-direction: column;
}

.game-card:hover {
    transform: translateY(-8px);
    border-color: var(--primary);
    box-shadow: 0 12px 30px rgba(255, 122, 26, 0.15);
}

.game-card-img {
    height: 200px;
    overflow: hidden;
    position: relative;
}

.game-card-img img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform var(--transition-normal);
}

.game-card:hover .game-card-img img {
    transform: scale(1.05);
}

.game-card-info {
    padding: 20px;
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

.game-genre {
    color: var(--primary);
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 6px;
}

.game-card-info h3 {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    margin-bottom: 12px;
}

.game-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 12px;
}

.game-rating i {
    color: #fbbf24;
}

/* ==========================================
   WHY PLAYERS LOVE THESE GAMES
   ========================================== */
.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
}

.feature-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 36px 24px;
    border-radius: var(--border-radius-md);
    text-align: center;
    transition: var(--transition-normal);
}

.feature-card:hover {
    transform: translateY(-5px);
    border-color: var(--secondary);
    box-shadow: 0 10px 25px rgba(255, 61, 26, 0.1);
}

.feature-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background-color: rgba(255, 61, 26, 0.1);
    color: var(--secondary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin: 0 auto 24px;
    border: 1px solid rgba(255, 61, 26, 0.2);
    box-shadow: 0 0 15px rgba(255, 61, 26, 0.1);
}

.feature-card h3 {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    margin-bottom: 12px;
}

.feature-card p {
    font-size: 0.9rem;
    color: var(--text-muted);
}

/* ==========================================
   TESTIMONIALS
   ========================================== */
.testimonials-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
}

.testimonial-card {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    padding: 30px;
    border-radius: var(--border-radius-md);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.testimonial-rating {
    color: #fbbf24;
    font-size: 0.85rem;
    margin-bottom: 16px;
}

.testimonial-text {
    font-style: italic;
    color: var(--text-muted);
    font-size: 0.95rem;
    margin-bottom: 24px;
}

.testimonial-author {
    display: flex;
    align-items: center;
    gap: 12px;
}

.avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    overflow: hidden;
}

.avatar svg {
    width: 100%;
    height: 100%;
}

.testimonial-author h4 {
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 600;
}

.testimonial-author span {
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* ==========================================
   FAQ SECTION
   ========================================== */
.faq-list {
    max-width: 720px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.faq-item {
    background-color: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius-sm);
    overflow: hidden;
    transition: var(--transition-fast);
}

.faq-item:hover {
    border-color: rgba(255, 122, 26, 0.3);
}

.faq-question {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    text-align: left;
    font-weight: 600;
    font-size: 1.05rem;
    color: var(--text-main);
}

.faq-question i {
    color: var(--primary);
    transition: transform var(--transition-fast);
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height var(--transition-normal);
    background-color: rgba(10, 10, 10, 0.2);
}

.faq-answer p {
    padding: 0 24px 20px;
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* FAQ Active State */
.faq-item.active {
    border-color: var(--primary);
    box-shadow: 0 0 15px var(--primary-glow);
}

.faq-item.active .faq-question i {
    transform: rotate(45deg);
}

/* ==========================================
   FINAL CTA SECTION
   ========================================== */
.final-cta {
    position: relative;
    padding: 120px 0;
    overflow: hidden;
    background-color: rgba(23, 23, 23, 0.3);
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.final-cta-glow {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 60%;
    height: 60%;
    background: radial-gradient(circle, rgba(255, 122, 26, 0.1) 0%, transparent 60%);
    z-index: -1;
    pointer-events: none;
}

.final-cta-title {
    font-family: var(--font-heading);
    font-size: 3rem;
    font-weight: 800;
    margin-bottom: 16px;
}

.final-cta-subtitle {
    font-size: 1.15rem;
    color: var(--text-muted);
    margin-bottom: 36px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

/* ==========================================
   FOOTER
   ========================================== */
.footer {
    background-color: #050505;
    border-top: 1px solid var(--border-color);
    padding: 80px 0 0;
}

.footer-container {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr;
    gap: 48px;
    margin-bottom: 60px;
}

.footer-brand p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 16px;
    max-width: 320px;
}

.footer-links,
.footer-legal {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-links h4,
.footer-legal h4 {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.footer-links a,
.footer-legal a {
    color: var(--text-muted);
    font-size: 0.9rem;
}

.footer-links a:hover,
.footer-legal a:hover {
    color: var(--primary);
}

.footer-bottom {
    border-top: 1px solid var(--border-color);
    padding: 30px 0;
    text-align: center;
    font-size: 0.8rem;
    color: var(--text-muted);
}

/* ==========================================
   SCROLL REVEAL ANIMATION
   ========================================== */
.scroll-reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1), transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.scroll-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* ==========================================
   RESPONSIVE MEDIA QUERIES
   ========================================== */
@media (max-width: 992px) {
    .hero-container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 40px;
    }

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

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

    .hero-image-container {
        max-width: 500px;
        margin: 0 auto;
    }

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

@media (max-width: 768px) {
    .section {
        padding: 60px 0;
    }

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

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

    .footer-container {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .container {
        padding: 0 16px;
    }

    .trending-slider-container {
        margin: 0 -16px;
        padding: 10px 16px;
    }

    .trending-slider {
        gap: 12px;
    }

    .trending-card {
        flex: 0 0 calc(50% - 6px);
    }

    .trending-card-img {
        height: 110px;
    }

    .trending-card-content {
        padding: 12px;
    }

    .trending-card-content h3 {
        font-size: 0.85rem;
    }

    .trending-card-content p {
        font-size: 0.75rem;
        margin-bottom: 10px;
    }

    .game-card-img {
        height: 110px;
    }

    .game-card-info {
        padding: 12px;
    }

    .game-card-info h3 {
        font-size: 0.85rem;
        margin-bottom: 8px;
        display: -webkit-box;
        -webkit-line-clamp: 2;
        line-clamp: 2;
        -webkit-box-orient: vertical;
        overflow: hidden;
    }

    .game-genre {
        font-size: 0.65rem;
        margin-bottom: 4px;
    }

    .game-meta {
        font-size: 0.7rem;
        margin-bottom: 12px;
        padding-top: 8px;
        gap: 4px;
        flex-wrap: wrap;
    }

    .game-card .btn-full {
        font-size: 0.7rem;
        padding: 8px 10px;
    }
}

/* Force 2 game cards per row on phones */
@media (max-width: 991px) {
    .games-grid {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 10px !important;
    }

    .game-card {
        min-width: 0 !important;
        width: auto !important;
        max-width: none !important;
    }

    .trending-slider {
        display: grid !important;
        grid-auto-flow: column;
        grid-auto-columns: calc((100% - 10px) / 2);
        gap: 10px;
    }

    .trending-card {
        flex: none !important;
        width: 100% !important;
        min-width: 0 !important;
        max-width: none !important;
    }
}