:root {
    --orange-ktm: #FF6600;
    --black-matte: #121212;
    --black-surface: #1E1E1E;
    --black-light: #2A2A2A;
    --white: #F5F5F5;
    --gray: #888888;
    --success-glow: #28a745;
    --danger: #dc3545;
    --info: #17a2b8;
}

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

body {
    background-color: var(--black-matte);
    color: var(--white);
    font-family: 'Roboto', sans-serif;
    min-height: 100vh;
    overflow-x: hidden;
}

.font-paint { font-family: 'Permanent Marker', cursive; }
.font-tech { font-family: 'Orbitron', sans-serif; }

.text-orange { color: var(--orange-ktm) !important; }
.bg-orange { background-color: var(--orange-ktm) !important; }
.bg-surface { background-color: var(--black-surface); }
.bg-light-surface { background-color: var(--black-light); }

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

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

::-webkit-scrollbar-thumb {
    background: var(--orange-ktm);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: #ff8533;
}

/* Navigation */
.navbar {
    background-color: rgba(18, 18, 18, 0.98);
    border-bottom: 2px solid var(--orange-ktm);
    display: none;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.navbar.scrolled {
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}

.nav-link {
    color: var(--white) !important;
    font-family: 'Orbitron', sans-serif;
    font-size: 0.9rem;
    margin: 0 10px;
    transition: 0.3s;
    cursor: pointer;
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: 0;
    left: 50%;
    background-color: var(--orange-ktm);
    transition: all 0.3s ease;
}

.nav-link:hover::after, .nav-link.active::after {
    width: 100%;
    left: 0;
}

.nav-link:hover, .nav-link.active {
    color: var(--orange-ktm) !important;
    text-shadow: 0 0 10px rgba(255, 102, 0, 0.5);
}

/* Login Section */
#login-screen {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(45deg, rgba(0,0,0,0.9), rgba(0,0,0,0.6)), url('https://images.unsplash.com/photo-1558981403-c5f9899a28bc?auto=format&fit=crop&q=80&w=1600');
    background-size: cover;
    position: relative;
    overflow: hidden;
}

#login-screen::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, transparent 0%, rgba(0,0,0,0.8) 100%);
    z-index: 1;
}

.login-box {
    background: var(--black-surface);
    padding: 40px;
    border-left: 5px solid var(--orange-ktm);
    box-shadow: 20px 20px 0px rgba(0,0,0,0.5);
    max-width: 450px;
    width: 100%;
    position: relative;
    z-index: 2;
    transform: translateY(0);
    transition: transform 0.3s ease;
}

.login-box:hover {
    transform: translateY(-5px);
}

/* UI Elements */
.btn-ktm {
    background: var(--orange-ktm);
    color: white;
    font-family: 'Permanent Marker';
    border: none;
    padding: 10px 25px;
    text-transform: uppercase;
    transition: 0.3s;
    clip-path: polygon(10% 0, 100% 0, 90% 100%, 0% 100%);
    text-decoration: none;
    display: inline-block;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.btn-ktm::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.2);
    transition: left 0.5s ease;
}

.btn-ktm:hover::before {
    left: 100%;
}

.btn-ktm:hover {
    background: #ff8533;
    transform: skew(-2deg) scale(1.05);
    color: white;
}

.btn-outline-ktm {
    border: 2px solid var(--orange-ktm);
    color: var(--orange-ktm);
    background: transparent;
    font-family: 'Permanent Marker';
    padding: 8px 20px;
    transition: 0.3s;
    clip-path: polygon(10% 0, 100% 0, 90% 100%, 0% 100%);
}

.btn-outline-ktm:hover {
    background: var(--orange-ktm);
    color: white;
}

/* Event Cards */
.event-card {
    background: var(--black-surface);
    border: 1px solid #333;
    margin-bottom: 20px;
    transition: 0.3s;
    position: relative;
    overflow: hidden;
}

.event-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 5px;
    height: 100%;
    background: var(--orange-ktm);
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.event-card:hover::before {
    transform: scaleY(1);
}

.event-card:hover {
    border-color: var(--orange-ktm);
    transform: translateX(5px);
}

.event-status {
    font-size: 0.7rem;
    letter-spacing: 1px;
    padding: 4px 10px;
    background: #333;
    color: white;
    border-radius: 20px;
}

/* Shop Styles */
.shop-card {
    background: var(--black-surface);
    border: 1px solid #333;
    transition: 0.3s;
    position: relative;
    overflow: hidden;
    height: 100%;
}

.shop-card::after {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, transparent 0%, rgba(255, 102, 0, 0.1) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.shop-card:hover::after {
    opacity: 1;
}

.shop-card:hover {
    border-color: var(--orange-ktm);
    transform: translateY(-5px);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5);
}

.shop-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: var(--orange-ktm);
    color: white;
    padding: 5px 10px;
    font-size: 0.7rem;
    font-family: 'Orbitron', sans-serif;
    z-index: 1;
}

/* Cart Sidebar */
#cart-sidebar {
    position: fixed;
    right: -400px;
    top: 0;
    width: 350px;
    height: 100vh;
    background: var(--black-surface);
    z-index: 1050;
    transition: 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border-left: 3px solid var(--orange-ktm);
    padding: 20px;
    display: flex;
    flex-direction: column;
    box-shadow: -5px 0 15px rgba(0, 0, 0, 0.5);
}

#cart-sidebar.open { right: 0; }

.cart-overlay {
    position: fixed;
    top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.7);
    z-index: 1040;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.cart-overlay.show {
    display: block;
    opacity: 1;
}

/* Page Content Animation */
.page-content {
    display: none;
    padding-bottom: 100px;
    opacity: 0;
    transform: translateY(20px);
}

.page-content.active {
    display: block;
    animation: slideUp 0.4s ease-out forwards;
}

@keyframes slideUp {
    to { 
        opacity: 1; 
        transform: translateY(0); 
    }
}

.hidden { display: none !important; }

/* Nouveaux styles pour les sections améliorées */
.section-title {
    position: relative;
    display: inline-block;
    margin-bottom: 2rem;
}

.section-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 50px;
    height: 3px;
    background: var(--orange-ktm);
}

.profile-card {
    background: var(--black-surface);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 20px;
    border: 1px solid #333;
    transition: all 0.3s ease;
}

.profile-card:hover {
    border-color: var(--orange-ktm);
    box-shadow: 0 5px 15px rgba(255, 102, 0, 0.2);
}

.profile-avatar {
    width: 100px;
    height: 100px;
    border-radius: 50%;
    border: 3px solid var(--orange-ktm);
    object-fit: cover;
}

.stat-card {
    background: var(--black-light);
    border-radius: 10px;
    padding: 15px;
    text-align: center;
    transition: all 0.3s ease;
    height: 100%;
}

.stat-card:hover {
    transform: translateY(-5px);
    background: var(--black-surface);
    border: 1px solid var(--orange-ktm);
}

.stat-number {
    font-size: 2rem;
    font-weight: bold;
    color: var(--orange-ktm);
    font-family: 'Orbitron', sans-serif;
}

.forum-card {
    background: var(--black-surface);
    border-radius: 10px;
    padding: 20px;
    margin-bottom: 15px;
    border-left: 3px solid var(--orange-ktm);
    transition: all 0.3s ease;
}

.forum-card:hover {
    transform: translateX(5px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.forum-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.gallery-item {
    position: relative;
    overflow: hidden;
    border-radius: 10px;
    margin-bottom: 20px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.gallery-item:hover {
    transform: scale(1.03);
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.5);
}

.gallery-item img {
    width: 100%;
    height: 250px;
    object-fit: cover;
    transition: all 0.5s ease;
}

.gallery-item:hover img {
    transform: scale(1.1);
}

.gallery-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(to top, rgba(0,0,0,0.8), transparent);
    padding: 20px 15px 15px;
    transform: translateY(100%);
    transition: transform 0.3s ease;
}

.gallery-item:hover .gallery-overlay {
    transform: translateY(0);
}

.map-container {
    height: 400px;
    border-radius: 10px;
    overflow: hidden;
    margin-bottom: 20px;
    border: 2px solid var(--orange-ktm);
}

.message-card {
    background: var(--black-light);
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 15px;
    position: relative;
    transition: all 0.3s ease;
}

.message-card:hover {
    background: var(--black-surface);
    transform: translateX(5px);
}

.message-card.sent {
    background: rgba(255, 102, 0, 0.1);
    border-left: 3px solid var(--orange-ktm);
    margin-left: 20%;
}

.message-card.received {
    background: var(--black-light);
    border-left: 3px solid #333;
    margin-right: 20%;
}

.message-input {
    background: var(--black-light);
    border: 1px solid #333;
    color: white;
    border-radius: 20px;
    padding: 10px 15px;
    width: 100%;
    transition: all 0.3s ease;
}

.message-input:focus {
    background: var(--black-surface);
    border-color: var(--orange-ktm);
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 102, 0, 0.2);
}

.notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: var(--danger);
    color: white;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-family: 'Orbitron', sans-serif;
}

.floating-btn {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: var(--orange-ktm);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
    cursor: pointer;
    transition: all 0.3s ease;
    z-index: 100;
}

.floating-btn:hover {
    transform: scale(1.1);
    background: #ff8533;
}

.lightbox {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.9);
    z-index: 2000;
    display: none;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.lightbox.show {
    display: flex;
    opacity: 1;
}

.lightbox-content {
    width: min(96vw, 1200px);
    max-width: 96vw;
    max-height: 92vh;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
}

.lightbox-content img {
    max-width: 100%;
    max-height: calc(92vh - 88px);
    width: auto;
    height: auto;
    object-fit: contain;
    border-radius: 5px;
    display: block;
    margin: 0 auto;
}

.lightbox-close {
    position: absolute;
    top: 20px;
    right: 40px;
    color: white;
    font-size: 2rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.lightbox-close:hover {
    transform: scale(1.2);
    color: var(--orange-ktm);
}

.lightbox-nav {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    color: white;
    font-size: 2rem;
    cursor: pointer;
    transition: all 0.3s ease;
    padding: 10px;
}

.lightbox-nav:hover {
    color: var(--orange-ktm);
}

.lightbox-prev {
    left: 20px;
}

.lightbox-next {
    right: 20px;
}

.lightbox-info {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9), rgba(0, 0, 0, 0.55), transparent);
    padding: 14px 16px 10px;
    border-radius: 0 0 5px 5px;
}

#lightbox-title {
    margin: 0 0 2px;
    font-size: 1.1rem;
}

#lightbox-author {
    margin: 0;
    color: #d0d0d0;
}

.custom-select {
    background: var(--black-light);
    border: 1px solid #333;
    color: white;
    border-radius: 5px;
    padding: 8px 12px;
    transition: all 0.3s ease;
}

.custom-select:focus {
    border-color: var(--orange-ktm);
    outline: none;
    box-shadow: 0 0 0 3px rgba(255, 102, 0, 0.2);
}

.custom-range {
    width: 100%;
    height: 5px;
    border-radius: 5px;
    background: #333;
    outline: none;
    -webkit-appearance: none;
}

.custom-range::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--orange-ktm);
    cursor: pointer;
}

.custom-range::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--orange-ktm);
    cursor: pointer;
}

.tab-custom {
    border-bottom: 2px solid #333;
    margin-bottom: 20px;
}

.tab-custom .nav-link {
    border: none;
    color: var(--gray);
    padding: 10px 15px;
    margin-right: 5px;
    border-radius: 5px 5px 0 0;
    transition: all 0.3s ease;
}

.tab-custom .nav-link.active {
    background: var(--black-surface);
    color: var(--orange-ktm);
    border-bottom: 2px solid var(--orange-ktm);
}

.tab-custom .nav-link:hover {
    color: var(--white);
    background: var(--black-light);
}

.loader {
    border: 3px solid #333;
    border-top: 3px solid var(--orange-ktm);
    border-radius: 50%;
    width: 30px;
    height: 30px;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.pulse {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        box-shadow: 0 0 0 0 rgba(255, 102, 0, 0.7);
    }
    70% {
        box-shadow: 0 0 0 10px rgba(255, 102, 0, 0);
    }
    100% {
        box-shadow: 0 0 0 0 rgba(255, 102, 0, 0);
    }
}

/* Responsive */
@media (max-width: 768px) {
    .navbar-brand {
        font-size: 1.5rem;
    }
    
    .event-card {
        margin-bottom: 15px;
    }
    
    .shop-card {
        margin-bottom: 20px;
    }
    
    #cart-sidebar {
        width: 100%;
        right: -100%;
    }
    
    .message-card.sent, .message-card.received {
        margin-left: 0;
        margin-right: 0;
    }
}
