/**
 * stroop-test-tech.css — Styles dédiés au jeu Stroop Test Tech
 * Préfixe : .stroop-* pour les éléments spécifiques à ce jeu.
 * Règle : Bootstrap 5 + games.css pour les communs, ici uniquement le spécifique.
 */

/* ── Mot affiché (le stimulus Stroop) ───────────────────────────────────────── */
.stroop-word {
    font-size: clamp(2.5rem, 8vw, 5rem);
    font-weight: 900;
    letter-spacing: 0.05em;
    min-height: 110px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.15s ease;
    font-family: 'Arial Black', 'Impact', sans-serif;
    text-transform: uppercase;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.15);
    line-height: 1.1;
}

/* ── Boutons de choix (couleurs ou domaines tech) ───────────────────────────── */
.stroop-choice {
    min-height: 60px;
    border-radius: 12px !important;
    font-size: 0.95rem;
    font-weight: 700;
    transition: transform 0.1s ease, opacity 0.1s ease, box-shadow 0.1s ease;
    cursor: pointer;
    letter-spacing: 0.02em;
}

.stroop-choice:hover {
    transform: scale(1.04);
    opacity: 0.92;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.18);
}

.stroop-choice:active {
    transform: scale(0.97);
}

.stroop-choice:focus-visible {
    outline: 3px solid #6366f1;
    outline-offset: 3px;
}

/* Grille des choix — centrage et espacement */
#gm-choices {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    justify-content: center;
}

/* ── Flash board : succès ────────────────────────────────────────────────────── */
.games-board.stroop-success {
    animation: stroop-ok 0.35s ease;
    border-color: #198754 !important;
    box-shadow: 0 0 20px rgba(25, 135, 84, 0.3) !important;
}

/* ── Flash board : erreur ────────────────────────────────────────────────────── */
.games-board.stroop-error {
    animation: stroop-ko 0.35s ease;
    border-color: #dc3545 !important;
    box-shadow: 0 0 20px rgba(220, 53, 69, 0.3) !important;
}

@keyframes stroop-ok {
    0%, 100% { box-shadow: 0 0 0 rgba(25, 135, 84, 0); }
    50%       { box-shadow: 0 0 28px rgba(25, 135, 84, 0.5); }
}

@keyframes stroop-ko {
    0%   { transform: translateX(0); }
    20%  { transform: translateX(-8px); }
    40%  { transform: translateX(8px); }
    60%  { transform: translateX(-5px); }
    80%  { transform: translateX(5px); }
    100% { transform: translateX(0); }
}

/* ── Couleurs personnalisées non disponibles dans Bootstrap 5 ───────────────── */
.btn-purple {
    background-color: #6f42c1;
    border-color: #6f42c1;
    color: #fff;
}

.btn-purple:hover,
.btn-purple:focus {
    background-color: #5a32a3;
    border-color: #5a32a3;
    color: #fff;
}

.btn-orange {
    background-color: #fd7e14;
    border-color: #fd7e14;
    color: #fff;
}

.btn-orange:hover,
.btn-orange:focus {
    background-color: #e96b00;
    border-color: #e96b00;
    color: #fff;
}

/* ── Plateau principal (board) ───────────────────────────────────────────────── */
#gm-board {
    min-height: 220px;
    border: 2px solid var(--line, #e5e7eb);
    border-radius: 16px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

/* ── Indicateur de contexte (mode tech) ─────────────────────────────────────── */
.stroop-context-hint {
    font-size: 0.82rem;
    color: var(--muted, #6b7280);
    font-style: italic;
    margin-top: 0.5rem;
}

/* ── Section HUD compacte ────────────────────────────────────────────────────── */
.stroop-hud-item {
    text-align: center;
    min-width: 64px;
}

.stroop-hud-value {
    font-size: 1.6rem;
    font-weight: 800;
    line-height: 1;
    color: var(--text, #111);
}

.stroop-hud-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--muted, #6b7280);
    font-weight: 600;
}

/* ── Barre de progression ────────────────────────────────────────────────────── */
#gm-progress {
    transition: width 1s linear, background-color 0.5s ease;
}

/* ── Écran de départ (idle) ──────────────────────────────────────────────────── */
#gm-idle-msg {
    color: var(--muted, #6b7280);
    font-size: 1.1rem;
}

/* ── Dark mode ───────────────────────────────────────────────────────────────── */
[data-theme="dark"] #gm-board {
    background: #1a1d29;
    border-color: #2a2f3e;
}

[data-theme="dark"] .stroop-word {
    text-shadow: 2px 2px 6px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] .btn-outline-secondary {
    color: #adb5bd;
    border-color: #495057;
}

[data-theme="dark"] .btn-outline-secondary:hover {
    background-color: #495057;
    color: #fff;
}

/* ── Responsive mobile ───────────────────────────────────────────────────────── */
@media (max-width: 576px) {
    .stroop-word {
        font-size: 2.2rem;
        min-height: 80px;
    }

    .stroop-choice {
        min-height: 52px;
        font-size: 0.82rem;
        border-radius: 10px !important;
    }

    .stroop-hud-value {
        font-size: 1.3rem;
    }

    #gm-choices {
        gap: 0.5rem;
    }
}

@media (max-width: 380px) {
    .stroop-word {
        font-size: 1.8rem;
        min-height: 65px;
    }
}
