/* Variables root avec palette sombre */
:root {
    --primary-color: #2D3436;
    --secondary-color: #1DB954;
    --background-color: #121212;
    --text-color: #FFFFFF;
    --text-secondary: #B3B3B3;
    --card-background: #181818;
    --hover-color: #252525;
    --gradient-dark: linear-gradient(to bottom, rgba(18, 18, 18, 0.3) 0%, rgba(18, 18, 18, 0.8) 100%);
    --transition-smooth: all 0.4s ease-in-out;
}

/* Reset et styles globaux */
body {
    background-color: var(--background-color);
    color: var(--text-color);
    font-family: 'Helvetica', sans-serif;
    line-height: 1.6;
    margin: 0;
    padding: 0;
}

body.no-scroll {
    overflow: hidden;
    position: fixed;
    width: 100%;
    height: 100%;
}

/* Header */
.header {
    background-color: var(--primary-color);
    transition: var(--transition-smooth);
    width: 100%;
    z-index: 50;
}

.header.header-transparent {
    background: transparent;
}

.header.scrolled {
    background: rgba(45, 52, 54, 0.85);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

/* Navigation desktop */
.nav-link {
    color: var(--text-color);
    position: relative;
    transition: var(--transition-smooth);
    padding-bottom: 4px;
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background-color: var(--secondary-color);
    transition: var(--transition-smooth);
    transform: translateX(-50%);
}

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

/* Mobile Menu et Overlay */
#mobile-menu {
    position: fixed;
    right: 0;
    top: 0;
    height: 100vh !important;
    max-width: 360px;
    background: var(--card-background);
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: -4px 0 15px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(10px);
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    z-index: 50;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

#mobile-menu.open {
    transform: translateX(0);
}

#mobile-menu-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 49;
}

#mobile-menu-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

#mobile-menu nav {
    height: 100%;
    overflow-y: auto;
    scrollbar-width: none;
    -ms-overflow-style: none;
}

#mobile-menu nav::-webkit-scrollbar {
    display: none;
}

#mobile-menu a {
    position: relative;
    overflow: hidden;
    display: block;
    padding: 1rem 1.5rem;
    color: var(--text-color);
    transition: var(--transition-smooth);
}

#mobile-menu a:hover {
    color: var(--secondary-color);
    background-color: var(--hover-color);
    padding-left: 2rem;
}

/* Hero Section */
.hero {
    position: relative;
    background-image: url('../../content/home_desktop.jpg');
    background-attachment: fixed;
    background-size: cover;
    background-position: center;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--gradient-dark);
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 800px;
    padding: 0 20px;
}

/* Cards */
.card {
    background: var(--card-background);
    border-radius: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 2rem;
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 32px rgba(29, 185, 84, 0.15);
    border-color: rgba(29, 185, 84, 0.3);
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--secondary-color), transparent);
    transform: scaleX(0);
    transition: var(--transition-smooth);
}

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

/* Boutons */
.btn {
    background: var(--secondary-color);
    color: var(--text-color);
    padding: 1rem 2rem;
    border-radius: 0.5rem;
    border: none;
    font-weight: 600;
    transition: var(--transition-smooth);
    position: relative;
    overflow: hidden;
}

.btn:hover {
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 4px 15px rgba(29, 185, 84, 0.3);
}

/* Formulaires */
.form-input {
    background: var(--card-background);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: var(--text-color);
    padding: 1rem;
    border-radius: 0.5rem;
    transition: var(--transition-smooth);
    width: 100%;
}

.form-input:focus {
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 2px rgba(29, 185, 84, 0.2);
    outline: none;
}

/* Animations de section */
.content-section {
    opacity: 0;
    transform: translateY(20px);
    transition: var(--transition-smooth);
}

.content-section.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Footer */
.footer {
    background: var(--primary-color);
    color: var(--text-secondary);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 3rem 0;
}

.footer a {
    color: var(--text-secondary);
    transition: var(--transition-smooth);
}

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

/* Back to top button */
.back-to-top {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: var(--secondary-color);
    color: white;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition-smooth);
    opacity: 0;
    z-index: 30;
}

.back-to-top.visible {
    opacity: 1;
}

.back-to-top:hover {
    transform: translateY(-5px);
}

/* Scrollbar personnalisée */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: var(--background-color);
}

::-webkit-scrollbar-thumb {
    background: var(--secondary-color);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #1aa34a;
}

/* Media Queries */
@media (max-width: 768px) {
    .hero {
        background-image: url('../../content/home_mobile.jpg');
        background-attachment: scroll;
        background-position: center center;
        background-repeat: no-repeat;
    }
    
    .hero-content {
        padding: 0 1rem;
    }
    
    .card {
        margin-bottom: 1.5rem;
    }
    
    .content-section {
        padding: 3rem 1rem;
    }
    
    .back-to-top {
        bottom: 10px;
        right: 10px;
    }

    #mobile-menu-button {
        display: block;
    }
    
    .nav-desktop {
        display: none;
    }
}

/* Animations */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}