/* Sygnex-games/assets/css/style.css */

/* ==========================================================================
   VARIABLES - Noir Premium & Or
   ========================================================================== */
:root {
    --bg-dark: transparent;      /* Transparent pour hériter du fond WebSite X5 */
    --bg-panel: #111111;         /* Noir profond pour les conteneurs */
    --text-main: #f5f5f5;        /* Blanc cassé pour la lisibilité */
    --text-muted: #999999;       /* Gris pour les textes secondaires */
    
    --gold-primary: #d4af37;     /* Or classique */
    --gold-light: #f3e5ab;       /* Or clair / reflet */
    --gold-dark: #997a00;        /* Or sombre / ombre */
    
    --border-radius: 4px;        /* Arrondis plus subtils */
    --transition-speed: 0.3s;
    
    /* Police héritée du site principal par défaut */
    --font-family: inherit;
}

/* ==========================================================================
   RESET & BASE (Limité au conteneur pour ne pas casser WebSite X5)
   ========================================================================== */
#sygnex-games-container {
    margin-top: 50px; /* Dégage le module de la navbar */
    margin-bottom: 50px;
    color: var(--text-main);
    font-family: var(--font-family);
    line-height: 1.6;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
    width: 100%;
    box-sizing: border-box;
}

#sygnex-games-container * {
    box-sizing: border-box;
}

#sygnex-games-container a {
    color: var(--gold-primary);
    text-decoration: none;
    transition: color var(--transition-speed);
}

#sygnex-games-container a:hover {
    color: var(--gold-light);
}

/* ==========================================================================
   ANIMATIONS DE TRANSITION
   ========================================================================== */
.fade-out {
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
}

.fade-in {
    opacity: 1;
    animation: fadeInAnimation 0.8s ease forwards;
}

@keyframes fadeInAnimation {
    0% { opacity: 0; transform: scale(0.98); }
    100% { opacity: 1; transform: scale(1); }
}

/* ==========================================================================
   TYPOGRAPHIE & TITRES
   ========================================================================== */
#sygnex-games-container h1, 
#sygnex-games-container h2 {
    font-weight: 500;
    margin-bottom: 1rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    text-align: center;
}

#sygnex-games-container h1 {
    color: var(--gold-primary);
    font-size: 1.8rem; 
    padding-bottom: 10px;
}

#sygnex-games-container h2 {
    color: var(--gold-primary);
    border-bottom: 1px solid var(--gold-dark);
    padding-bottom: 10px;
    margin-bottom: 20px;
    font-size: 1.2rem; 
}

/* ==========================================================================
   LAYOUT & CONTAINERS
   ========================================================================== */
#sygnex-games-container .panel {
    background-color: var(--bg-panel);
    border: 1px solid var(--gold-dark);
    border-radius: var(--border-radius);
    padding: 25px;
    margin-bottom: 25px;
    box-shadow: 0 4px 10px rgba(0,0,0,0.3);
    transition: opacity 0.5s ease;
}

/* ==========================================================================
   BOUTONS & FORMULAIRES
   ========================================================================== */
#sygnex-games-container .btn {
    display: inline-block;
    background-color: var(--gold-primary);
    color: #000;
    border: 1px solid var(--gold-primary);
    padding: 10px 25px;
    font-size: 0.95rem;
    font-weight: bold;
    text-transform: uppercase;
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: all var(--transition-speed) ease;
    text-align: center;
    width: auto;
}

#sygnex-games-container .btn:hover {
    background-color: var(--gold-light);
    border-color: var(--gold-light);
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.4);
}

/* Style spécifique pour le bouton quitter */
#btn-quit-game {
    background-color: transparent;
    color: var(--text-muted);
    border: 1px solid var(--text-muted);
}

#btn-quit-game:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: var(--text-main);
    border-color: var(--text-main);
    box-shadow: none;
}

#sygnex-games-container input[type="text"],
#sygnex-games-container select {
    width: 100%;
    padding: 12px 15px;
    background-color: #000;
    border: 1px solid var(--gold-dark);
    color: var(--text-main);
    border-radius: var(--border-radius);
    font-size: 1rem;
    margin-bottom: 20px;
    transition: border-color var(--transition-speed);
}

#sygnex-games-container input[type="text"]:focus,
#sygnex-games-container select:focus {
    outline: none;
    border-color: var(--gold-primary);
    box-shadow: 0 0 5px rgba(212, 175, 55, 0.3);
}

/* Style des options du selecteur de difficulté */
#sygnex-games-container select option {
    background-color: var(--bg-panel);
    color: var(--text-main);
}

/* ==========================================================================
   NAVIGATION LANGUES
   ========================================================================== */
#sygnex-games-container .lang-selector {
    text-align: right;
    margin-top: -30px; 
    margin-bottom: 20px;
}

#sygnex-games-container .lang-selector a {
    display: inline-block;
    margin-left: 10px;
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
}

#sygnex-games-container .lang-selector a:hover,
#sygnex-games-container .lang-selector a.active {
    color: var(--gold-primary);
    font-weight: bold;
}

/* ==========================================================================
   TABLEAU DE CLASSEMENT (LEADERBOARD)
   ========================================================================== */
#sygnex-games-container .leaderboard-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
    font-size: 0.95rem;
}

#sygnex-games-container .leaderboard-table th, 
#sygnex-games-container .leaderboard-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #333;
}

#sygnex-games-container .leaderboard-table th {
    background-color: rgba(212, 175, 55, 0.1);
    color: var(--gold-primary);
    font-weight: bold;
    text-transform: uppercase;
    font-size: 0.85rem;
}

#sygnex-games-container .leaderboard-table tr:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

#sygnex-games-container .leaderboard-table tr:nth-child(1) td {
    color: var(--gold-primary);
    font-weight: bold;
}

/* ==========================================================================
   RESPONSIVE DESIGN
   ========================================================================== */
@media (max-width: 768px) {
    #sygnex-games-container h1 {
        font-size: 1.5rem;
    }
    
    #sygnex-games-container .lang-selector {
        text-align: center;
        margin-top: 10px;
    }

    #sygnex-games-container .panel {
        padding: 15px;
    }
    
    #sygnex-games-container .leaderboard-table th, 
    #sygnex-games-container .leaderboard-table td {
        padding: 10px;
        font-size: 0.85rem;
    }

    #game-canvas-container {
        height: 500px !important; /* Ajustement pour mobile */
    }
}