/* ===== VARIABLES & CORRECTIFS GLOBAUX ===== */
:root { color-scheme: dark; }


/* ===== MENU BURGER ===== */
#burger-btn {
    position: fixed;
    top: 20px;
    left: 20px;
    width: 32px;
    height: 24px;
    cursor: pointer;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}
#burger-btn span {
    display: block;
    height: 4px;
    width: 100%;
    background: #fff;
    border-radius: 2px;
    transition: background-color 0.2s;
}


/* ===== VOLET LATÉRAL & DÉFILEMENT ===== */
#side-menu {
    position: fixed;
    top: 0;
    left: -320px;
    width: 300px;
    height: 100vh;
    height: 100dvh;
    background: linear-gradient(145deg, #1e1e1e, #151515);
    border-right: 1px solid #333;
    z-index: 1001;
    transition: left 0.3s ease, visibility 0s linear 0.3s;
    display: flex;
    flex-direction: column;
    padding: 24px 20px;
    box-sizing: border-box;
    box-shadow: 10px 0 30px rgba(0, 0, 0, 0.5);

    overflow-y: auto;
    overflow-x: hidden;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
}

#side-menu.open {
    left: 0;
    visibility: visible;
    transition: left 0.3s ease, visibility 0s;
}

#side-menu:not(.open) {
    box-shadow: none;
    visibility: hidden;
}

#side-menu::-webkit-scrollbar {
    width: 6px;
}
#side-menu::-webkit-scrollbar-track {
    background: transparent;
}
#side-menu::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.25);
    border-radius: 10px;
}


/* ===== EN-TÊTE DU MENU ===== */
.menu-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #333;
    padding-bottom: 12px;
    margin-bottom: 20px;
}
.menu-header h2 {
    margin: 0;
    font-size: 20px;
    font-weight: 800;
    background: linear-gradient(90deg, #fff, #aaa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-transform: uppercase;
    letter-spacing: 1px;
}
#close-menu {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    order: 2;
}


/* ===== ACTIONS PRINCIPALES ===== */
.main-actions {
    margin-bottom: 25px;
}
.menu-link.home-btn {
    background: #ff4757;
    color: white;
    border: none;
    padding: 12px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 900;
    font-size: 16px;
    width: 100%;
    box-sizing: border-box;
    text-align: center;
    transition: background-color 0.2s;
    text-decoration: none;
    display: block;
}
.menu-link.home-btn:hover { background-color: #ff2e43; }


/* ===== AUTHENTIFICATION ===== */
#auth-section {
    margin-bottom: 30px;
}
#login-section p.auth-text {
    margin: 0 0 10px 0;
    font-size: 14px;
    color: #aaa;
    text-transform: uppercase;
    letter-spacing: 1px;
}


/* ===== INFOS JOUEUR ===== */
#player-info .player-header {
    margin-bottom: 15px;
    border-bottom: 1px solid #333;
    padding-bottom: 10px;
}
#player-info .player-header p {
    margin: 0;
    font-size: 14px;
    color: #888;
}
#player-info .player-header strong {
    font-size: 20px;
    color: white;
    font-weight: 700;
    display: block;
    margin-top: 2px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}


/* ===== BOUTONS DE NAVIGATION ===== */
#player-info .game-links {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.menu-link {
    background: #2a2a2a;
    color: white;
    border: 1px solid #444;
    padding: 12px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s ease;
    text-decoration: none;
    width: 100%;
    box-sizing: border-box;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.menu-link:hover {
    background: #ff4757;
    border-color: #ff4757;
    transform: scale(1.02);
    color: white;
}

.disabled-link {
    color: #666;
    cursor: default;
    background-color: transparent;
    border: 1px solid transparent;
}
.disabled-link:hover {
    background-color: transparent;
    border: 1px solid transparent;
    transform: scale(1);
}
.disabled-link::after {
    content: '(Bientôt)';
    font-size: 11px;
    color: #aaa;
    margin-left: 10px;
}


/* ===== RÉSEAUX SOCIAUX (Instagram + YouTube) ===== */
.social-links {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 22px;
    margin-top: 22px;
    padding-top: 18px;
    border-top: 1px solid #2a2a2a;
}

.social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: transparent;
    border: none;
    text-decoration: none;
    transition: transform 0.15s ease, opacity 0.2s;
    opacity: 0.9;
    /* Forcer le blanc sur toute la chaîne de style */
    color: #ffffff;
}
.social-link svg {
    width: 24px;
    height: 24px;
    /* La couleur est FORCÉE en blanc, jamais changée */
    fill: #ffffff !important;
    color: #ffffff !important;
    stroke: none;
}
.social-link:hover {
    transform: scale(1.15);
    opacity: 1;
}
.social-link:active {
    transform: scale(1.05);
}


/* ===== BARRE D'XP & NIVEAU ===== */
.level-container {
    margin-top: 10px;
    text-align: left;
    background: rgba(0, 0, 0, 0.3);
    padding: 10px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.level-badge {
    background: #ffaa00;
    color: black;
    font-weight: 900;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.9rem;
    display: inline-block;
    margin-bottom: 8px;
    box-shadow: 0 0 8px rgba(255, 170, 0, 0.5);
}

.xp-bar-bg {
    width: 100%;
    height: 10px;
    background: #222;
    border-radius: 5px;
    overflow: hidden;
}

.xp-bar-fill {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, #3498db, #2ecc71);
    transition: width 0.3s ease-out;
}

.xp-text {
    font-size: 0.8rem;
    color: #aaa;
    margin: 5px 0 0 0;
    text-align: right;
}

a.level-link {
    display: block;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s, transform 0.2s;
}
a.level-link:hover {
    border-color: #ffaa00;
    box-shadow: 0 0 14px rgba(255, 170, 0, 0.35);
    transform: scale(1.02);
}
.level-cta {
    display: block;
    margin-top: 6px;
    font-size: 0.75rem;
    font-weight: bold;
    letter-spacing: 0.5px;
    color: #ffaa00;
    text-align: center;
}


/* ===== DÉCONNEXION ===== */
#logout-btn {
    margin-top: auto;
    background: #2a2a2a;
    color: white;
    border: 1px solid #ff4757;
    padding: 12px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    font-size: 14px;
    width: 100%;
    box-sizing: border-box;
    transition: all 0.2s;
}
#logout-btn:hover {
    background: #ff4757;
    border-color: #ff4757;
}


/* ===== MODALE DE CONFIRMATION DE DÉCONNEXION ===== */
#logout-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.75);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}
.modal-content {
    background: #202020;
    padding: 24px 30px;
    border-radius: 8px;
    text-align: center;
    border: 1px solid #ff4757;
}
.modal-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: 20px;
}
.modal-actions button {
    padding: 10px 18px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
}
#confirm-logout { background: #333; color: #fff; }
#cancel-logout { background: #ff4757; color: #fff; }


/* ===== RESPONSIVITÉ MOBILE ===== */
@media screen and (max-width: 600px) {
    #side-menu {
        width: 100vw;
        left: -100vw;
    }
    #side-menu.open {
        left: 0;
    }
    .social-links {
        gap: 18px;
    }
    .social-link {
        width: 36px;
        height: 36px;
    }
    .social-link svg {
        width: 22px;
        height: 22px;
    }
}

/* ===== LIENS LÉGAUX ===== */
.legal-note { margin: 10px 0 0; font-size: 11px; color: #888; line-height: 1.4; }
.legal-note a, .legal-links a { color: #aaa; }
.legal-links { display: flex; flex-wrap: wrap; gap: 6px 14px; justify-content: center; margin: 18px 0 14px; font-size: 12px; }