/* =========================================
   BASE STYLESHEET 
   To be used and extended by all pages
   ========================================= */


   @font-face {
    font-family: "Formula1";
    src: url("../assets/fonts/Formula1-Regular-1.ttf") format("truetype");
    font-weight: 400;
    font-style: normal;
}

@font-face {
    font-family: "Formula1";
    src: url("/assets/fonts/Formula1-Bold-4.ttf") format("truetype");
    font-weight: 700;
    font-style: normal;
}

@font-face {
    font-family: "Formula1";
    src: url("/assets/fonts/Formula1-Italic.ttf") format("truetype");
    font-weight: 400;
    font-style: italic;
}

@font-face {
    font-family: "Formula1";
    src: url("/assets/fonts/Formula1-Black.ttf") format("truetype");
    font-weight: 900;
    font-style: normal;
}


/* 1. CSS Variables & Theme */
/* 1. CSS Variables & Theme */
:root {
    --dark-bg: #0C0A10; 
    --surface-bg: #1A1625; 
    --text-main: #F4F4F9;
    --text-muted: #A09EAB;
    
    --accent-kart: #6B4596; 
    --accent-sim: #2A56FF;  

    --accent-sim-glow: rgba(42, 86, 255, 0.15); 
    --accent-sim-dark: #122880; 
    
    --font-heading: 'Formula1', 'Montserrat', sans-serif;
    --font-body: 'Inter', 'Segoe UI', Tahoma, sans-serif;
}

/* 2. Global Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    background-color: var(--dark-bg);
    color: var(--text-main);
    font-family: var(--font-body);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow-x: hidden;

    -webkit-user-select: none; /* Safari */
    -moz-user-select: none;    /* Firefox */
    -ms-user-select: none;     /* Edge/IE */
    user-select: none;         /* Standard */
}

/* Container stays invisible until JS finishes populating it */
.content-loading {
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease-in-out;
}

.content-ready {
    opacity: 1;
    visibility: visible;
}

/* 3. Utility Classes */
.hidden { display: none !important; }

.fixed-img-cover {
    width: 100%;
    height: 100%;
    object-fit: cover; 
    display: block;
}

.fixed-img-contain {
    width: 100%;
    height: 100%;
    object-fit: contain; 
    display: block;
}

button {
    font-family: var(--font-heading);
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.3s ease;
    text-transform: uppercase;
    font-size: 0.9rem;
    letter-spacing: 1px;
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--text-main);
    color: var(--text-main);
    padding: 0.6rem 1.5rem;
}

.btn-outline:hover {
    background: var(--text-main);
    color: var(--dark-bg);
}

.btn-solid {
    padding: 1rem 2.5rem;
    border: none;
    color: #FFF;
    font-weight: bold;
}

.btn-kart { background-color: var(--accent-kart); }
.btn-kart:hover {
    background-color: #835ab5;
    box-shadow: 0 0 15px rgba(107, 69, 150, 0.5);
}

.btn-sim { background-color: var(--accent-sim); }
.btn-sim:hover {
    background-color: #4b6fff;
    box-shadow: 0 0 15px rgba(42, 86, 255, 0.5);
}

/* =========================================
   LAYOUT COMPONENTS (Header, Footer)
   ========================================= */

/* Header - Translucent rectangle with blur */
#main-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 3rem;
    background: rgba(12, 10, 16, 0.65); /* Solid translucent color */
    backdrop-filter: blur(12px); /* Glass effect */
    position: fixed; 
    width: 100%;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
}

#logo-container {
    width: 120px;
    height: 50px;
}

/* Main Layout Offset - Let hero go behind header */
#home-main-content {
    flex: 1;
}
/* =========================================
   FOOTER STYLES
   ========================================= */
#main-footer {
    background-color: #050505;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding: 3rem 2rem 2rem 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

/* Container for links and socials */
.footer-top-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

/* Links */
#footer-nav {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.footer-link {
    color: #888;
    text-decoration: none;
    font-size: 0.9rem;
    text-transform: uppercase;
    font-weight: bold;
    letter-spacing: 1px;
    transition: color 0.2s;
}

.footer-link:hover {
    color: #fff;
}

/* Socials */
.footer-socials {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.social-icon {
    color: #888;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.2s, transform 0.2s;
}

.social-icon:hover {
    color: #fff;
    transform: translateY(-2px); /* Slight lift effect */
}

/* Legal text */
#footer-legal {
    color: #555;
    font-size: 0.8rem;
    text-align: center;
    width: 100%;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 1.5rem;
}

#footer-legal p {
    margin: 0;
}

/* =========================================
   LAYOUT COMPONENTS (Header)
   ========================================= */

/* Header - Translucent rectangle with blur */
#main-header {
    display: flex;
    justify-content: space-between; /* Espacement entre Logo, Menu et Bouton */
    align-items: center;
    padding: 1.5rem 3rem;
    background: rgba(12, 10, 16, 0.65); 
    backdrop-filter: blur(12px); 
    position: fixed; 
    width: 100%;
    top: 0;
    z-index: 1000;
}

#logo-container {
    width: 120px;
    height: 50px;
    display: flex;
    align-items: center;
}

#logo-container a {
    display: block;
    width: 100%;
    height: 100%;
}

/* Central Navigation */
#center-nav {
    display: flex;
    gap: 2.5rem;
}

.nav-link {
    color: var(--text-main);
    text-decoration: none;
    font-family: var(--font-heading);
    font-size: 0.9rem;
    letter-spacing: 1px;
    text-transform: uppercase;
    position: relative;
    padding-bottom: 5px;
    transition: color 0.3s ease;
}

/* Animated underline effect on hover */
.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0%;
    height: 2px;
    background-color: var(--text-main);
    transition: width 0.3s ease;
}

.nav-link:hover {
    color: #FFF;
}

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

/* Right Navigation (Buttons) */
#right-nav {
    display: flex;
    align-items: center;
}

/* =========================================
   RESPONSIVE (Mobile First / Adjustments)
   ========================================= */
/* Ajoute ces règles dans ta media query mobile existante @media (max-width: 899px) */

@media (max-width: 899px) {
    #main-header {
        flex-wrap: wrap; /* Allows the menu to wrap to the next line */
        padding: 1rem 1rem;
        gap: 1rem;
    }
    
    #logo-container {
        width: 90px;
        height: 40px;
    }
    
    /* Move the nav below the logo and login button */
    #center-nav {
        order: 3; /* Forces nav to the bottom */
        width: 100%;
        justify-content: center;
        gap: 1.5rem;
    }
    
    .nav-link {
        font-size: 0.8rem;
    }
}

/* =========================================
   HIDE SCROLLBAR COMPLETELY (PC & MOBILE)
   ========================================= */

/* Hide scrollbar for Firefox, IE and Edge */
html, body {
    scrollbar-width: none; 
    -ms-overflow-style: none; 
}

/* Hide scrollbar for Chrome, Safari and Opera */
html::-webkit-scrollbar, body::-webkit-scrollbar {
    display: none;
}

/* --- Toasts --- */
.toast-container { position: fixed; bottom: 2rem; right: 2rem; display: flex; flex-direction: column; gap: 1rem; z-index: 9999; }
.toast { background: #111; border-left: 4px solid #2ecc71; color: #fff; padding: 1rem 1.5rem; border-radius: 4px; box-shadow: 0 5px 15px rgba(0,0,0,0.5); animation: slideIn 0.3s, fadeOut 0.3s 3s forwards; }
.toast.error { border-left-color: #e74c3c; }
@keyframes slideIn { from { transform: translateX(100%); } to { transform: translateX(0); } }
@keyframes fadeOut { to { opacity: 0; } }