/* ============================================================================
   Pixel Recall — CSS dédié
   Styles propres au jeu (grille pattern memory, états des cellules)
   Composants partagés .games-* / .gm-* dans games.css
   ============================================================================ */

.pr-board {
    display: grid;
    gap: 6px;
    margin: 1rem auto;
    padding: 12px;
    background: var(--bg-soft, #f1f3f5);
    border-radius: 12px;
    max-width: 520px;
    aspect-ratio: 1 / 1;
    user-select: none;
}

.pr-cell {
    background: #ffffff;
    border: 1px solid #d8dde3;
    border-radius: 8px;
    cursor: pointer;
    transition: background 180ms ease, transform 120ms ease, border-color 180ms ease, box-shadow 180ms ease;
    aspect-ratio: 1 / 1;
    min-height: 32px;
}

.pr-cell:hover:not([disabled]):not(.pr-cell--locked) {
    transform: scale(1.04);
    border-color: #6c63ff;
}

.pr-cell:focus-visible {
    outline: 2px solid #6c63ff;
    outline-offset: 2px;
}

/* Phase SHOWING : pattern affiché */
.pr-cell.pr-cell--lit {
    background: linear-gradient(135deg, #4f7cff 0%, #6c63ff 100%);
    border-color: #4f7cff;
    box-shadow: 0 0 12px rgba(79, 124, 255, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

/* Phase INPUT : case cliquée par le joueur */
.pr-cell.pr-cell--picked {
    background: linear-gradient(135deg, #ffd54f 0%, #ffb300 100%);
    border-color: #ffb300;
    box-shadow: 0 0 8px rgba(255, 179, 0, 0.45);
}

/* RESULT — succès */
.pr-cell.pr-cell--correct {
    background: linear-gradient(135deg, #4caf50 0%, #2e7d32 100%);
    border-color: #2e7d32;
    box-shadow: 0 0 10px rgba(46, 125, 50, 0.55);
}

/* RESULT — manqué (était dans le pattern, pas cliqué) */
.pr-cell.pr-cell--missed {
    background: rgba(244, 67, 54, 0.12);
    border: 2px dashed #f44336;
}

/* RESULT — erreur (cliqué mais pas dans le pattern) */
.pr-cell.pr-cell--wrong {
    background: linear-gradient(135deg, #ef5350 0%, #c62828 100%);
    border-color: #c62828;
    color: #fff;
}

.pr-cell--locked {
    cursor: not-allowed;
}

/* Animation pulse au countdown */
@keyframes pr-pulse-show {
    0%   { transform: scale(1);   opacity: 0.85; }
    50%  { transform: scale(1.02); opacity: 1; }
    100% { transform: scale(1);   opacity: 0.85; }
}

.pr-cell.pr-cell--lit {
    animation: pr-pulse-show 1.2s ease-in-out infinite;
}

/* Dark mode adaptations */
[data-theme="dark"] .pr-board {
    background: #1c1f24;
}

[data-theme="dark"] .pr-cell {
    background: #2a2e35;
    border-color: #3a3f48;
}

[data-theme="dark"] .pr-cell:hover:not([disabled]):not(.pr-cell--locked) {
    border-color: #8b85ff;
}

/* Responsive — grilles plus serrées sur mobile */
@media (max-width: 576px) {
    .pr-board {
        gap: 4px;
        padding: 8px;
        max-width: 100%;
    }
    .pr-cell {
        min-height: 28px;
        border-radius: 6px;
    }
}
