:root {
    --bg-color: #050505;
    --gold-primary: #d4af37;
    --gold-dark: #aa8c2c;
    --text-light: #ffffff;
    --text-muted: #cccccc;
    --border-radius: 8px;
    --font-main: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

html {
    width: 100%;
    min-height: 100%;
    margin: 0;
    padding: 0;
    background: var(--bg-color);
}

body {
    background-color: var(--bg-color);
    color: var(--text-light);
    font-family: var(--font-main);
    margin: 0;
    padding: 12px;
    display: flex;
    justify-content: center;
    box-sizing: border-box;
    width: 100%;
    min-height: 100vh;
}

*, *::before, *::after { box-sizing: border-box; }

.game-wrapper {
    width: 100%;
    max-width: 800px;
    min-width: 0;
    background: #0a0a0a;
    border: 1px solid var(--gold-dark);
    border-radius: var(--border-radius);
    padding: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.8);
}

/* Sélecteur de langue */
.language-selector {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 20px;
}
.lang-btn {
    background: transparent;
    color: var(--gold-dark);
    border: 1px solid var(--gold-dark);
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9em;
    transition: all 0.3s;
}
.lang-btn.active, .lang-btn:hover {
    background: var(--gold-dark);
    color: var(--bg-color);
}

/* En-tête */
.game-header {
    text-align: center;
    margin-bottom: 30px;
}
.sygnex-subtitle {
    color: var(--gold-primary);
    font-size: 1.1em;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 5px;
}
.game-title {
    font-size: 2.5em;
    color: var(--text-light);
    margin: 10px 0;
    text-shadow: 0 0 10px rgba(212, 175, 55, 0.3);
}
.game-subtitle {
    color: var(--gold-primary);
    font-size: 1.2em;
}

/* Dashboard Score */
.score-dashboard {
    border: 1px solid var(--gold-dark);
    border-radius: var(--border-radius);
    padding: 15px;
    margin-bottom: 25px;
}
.score-header {
    display: flex;
    justify-content: space-between;
    font-weight: bold;
    color: var(--gold-primary);
    margin-bottom: 10px;
}
.progress-bar-container {
    width: 100%;
    height: 10px;
    background: #222;
    border-radius: 5px;
    overflow: hidden;
    margin-bottom: 15px;
}
.progress-bar {
    height: 100%;
    width: 0%;
    background: var(--gold-primary);
    transition: width 0.3s ease;
}
.controls-container {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
}

/* Commandes : charte noire et or SYGNEX */
.control-btn, .listen-btn, .lang-btn, .mic-btn, .answer-btn, .level-btn {
    font-family: inherit;
    -webkit-appearance: none;
    appearance: none;
    transition: background-color .2s ease, color .2s ease, border-color .2s ease, transform .2s ease;
}

.control-btn, .listen-btn {
    background: #111;
    color: var(--gold-primary);
    border: 1px solid var(--gold-dark);
    border-radius: 5px;
    padding: 7px 12px;
    cursor: pointer;
    font-size: .92rem;
}

.control-btn:hover, .listen-btn:hover {
    background: var(--gold-dark);
    color: #050505;
}

button:focus-visible {
    outline: 2px solid var(--gold-primary);
    outline-offset: 3px;
}

button:disabled {
    cursor: not-allowed;
    opacity: .72;
}

/* Boutons Niveaux */
.level-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
}
.level-btn {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: transparent;
    border: 1px solid var(--gold-dark);
    color: var(--text-light);
    padding: 15px 20px;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-size: 1.1em;
    transition: background 0.3s;
}
.level-btn:not(.locked):hover {
    background: rgba(212, 175, 55, 0.1);
}
.level-btn.locked {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Zone de jeu */
.question-header {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 20px;
}
.question-text {
    font-size: 1.4em;
    color: var(--gold-primary);
    text-align: center;
}
.illustration-container {
    text-align: center;
    margin-bottom: 20px;
    min-height: 200px;
    background: #111;
    border: 1px solid #333;
    border-radius: var(--border-radius);
    padding: 10px;
}
.illustration-container img {
    max-width: 100%;
    max-height: 300px;
    object-fit: contain;
}

/* Boutons de réponse */
.answers-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    justify-content: center;
    margin-bottom: 20px;
}
.answer-btn {
    background: #171717;
    border: 1px solid var(--gold-dark);
    color: var(--gold-primary);
    padding: 12px 25px;
    border-radius: var(--border-radius);
    font-size: 1.2em;
    cursor: pointer;
    flex: 1 1 45%;
}
.answer-btn:hover:not(:disabled) {
    background: var(--gold-dark);
    color: #050505;
    transform: translateY(-1px);
}
.answer-btn.correct { background: #2e7d32; border-color: #4caf50; }
.answer-btn.incorrect { background: #c62828; border-color: #ef5350; }

/* Reconnaissance Vocale */
.voice-answer-container {
    text-align: center;
    margin: 20px 0;
    padding-top: 20px;
    border-top: 1px dashed #333;
}
.mic-btn {
    background: transparent;
    border: 1px solid var(--gold-primary);
    color: var(--gold-primary);
    padding: 10px 30px;
    border-radius: 50px;
    font-size: 1.2em;
    cursor: pointer;
}
.mic-btn.listening {
    background: var(--gold-primary);
    color: var(--bg-color);
    animation: pulse 1.5s infinite;
}
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.feedback-container {
    text-align: center;
    font-size: 1.2em;
    margin-top: 15px;
}

/* Responsive */
@media (max-width: 600px) {
    .answer-btn { flex: 1 1 100%; }
    .game-title { font-size: 1.8em; }
    .level-btn { flex-direction: column; gap: 5px; text-align: center; }
}