/* ========================================================================
   0. VARIABLES & THÈMES (UI/UX Premium)
   ======================================================================== */
:root {
    /* Mode Sombre Premium */
    --bg-color: #09090b;
    --bg-overlay: rgba(9, 9, 11, 0.85);
    /* Overlay assombrissant pour lisibilité */
    /* Zinc 950 ultra foncé pour profondeur */
    --card-bg: #18181b;
    /* Zinc 900 */
    --card-bg-alt: #27272a;
    /* Zinc 800 */
    --header-bg: rgba(9, 9, 11, 0.7);
    --glass-bg: rgba(24, 24, 27, 0.6);
    --glass-border: rgba(255, 255, 255, 0.08);

    --text-primary: #f8fafc;
    --text-secondary: #a1a1aa;
    /* Zinc 400 */

    /* Couleurs sémantiques & Accents */
    --accent: #6366f1;
    /* Indigo 500 */
    --accent-hover: #4f46e5;
    /* Indigo 600 */
    --accent-glow: rgba(99, 102, 241, 0.25);
    --accent-cyan: #06b6d4;
    --success: #10b981;
    /* Emerald 500 */
    --error: #ef4444;
    /* Red 500 */
    --warning: #f59e0b;
    /* Amber 500 */

    --border: #27272a;
    --radius: 16px;
    /* Arrondi plus généreux */
    --btn-radius: 10px;
    --btn-height: 42px;
    /* Hauteur plus confortable (touch target) */

    /* Animation & Effets */
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-bounce: all 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);

    /* Ombres Portées Premium */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.3), 0 2px 4px -2px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.3), 0 4px 6px -4px rgba(0, 0, 0, 0.3);
    --shadow-glow: 0 0 20px -5px var(--accent-glow);

    --cell-alt: rgba(255, 255, 255, 0.03);
}

body.light-mode {
    /* Mode Clair Premium */
    --bg-color: #f8fafc;
    --bg-overlay: rgba(248, 250, 252, 0.85);
    /* Slate 50 */
    --card-bg: #ffffff;
    --card-bg-alt: #f1f5f9;
    /* Slate 100 */
    --header-bg: rgba(248, 250, 252, 0.7);
    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(0, 0, 0, 0.05);

    --text-primary: #0f172a;
    /* Slate 900 */
    --text-secondary: #475569;
    /* Slate 600 */

    --border: #e2e8f0;
    /* Slate 200 */

    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.05), 0 4px 6px -4px rgba(0, 0, 0, 0.05);

    --cell-alt: rgba(0, 0, 0, 0.03);
}

body.neon-mode {
    /* Thème Synthwave / Cyberpunk */
    --bg-color: #0b0914;
    --bg-overlay: rgba(11, 9, 20, 0.85);
    --card-bg: #151125;
    --card-bg-alt: #1e1835;
    --header-bg: rgba(11, 9, 20, 0.7);
    --glass-bg: rgba(21, 17, 37, 0.6);
    --glass-border: rgba(217, 70, 239, 0.2);

    --text-primary: #f8fafc;
    --text-secondary: #a78bfa;

    --accent: #d946ef;
    --accent-hover: #c026d3;
    --accent-glow: rgba(217, 70, 239, 0.5);
    --border: #3b0764;
    --btn-radius: 4px;
}

body.ocean-mode {
    /* Thème Océan / Profondeurs */
    --bg-color: #082f49;
    --bg-overlay: rgba(8, 47, 73, 0.85);
    --card-bg: #0c4a6e;
    --card-bg-alt: #0369a1;
    --header-bg: rgba(8, 47, 73, 0.7);
    --glass-bg: rgba(12, 74, 110, 0.6);
    --glass-border: rgba(56, 189, 248, 0.15);

    --text-primary: #e0f2fe;
    --text-secondary: #7dd3fc;

    --accent: #38bdf8;
    --accent-hover: #0ea5e9;
    --accent-glow: rgba(56, 189, 248, 0.4);
    --border: #0284c7;
    --btn-radius: 100px;
}

/* ========================================================================
   1. RESET & BASE
   ======================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scrollbar-width: thin;
    scrollbar-color: var(--border) transparent;
}

/* Scrollbar Personnalisée - Style Premium & Discret */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 10px;
    transition: var(--transition);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-secondary);
}


.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 1;
}

/* Fond d'écran dynamique (Unsplash) et son overlay */
#dynamic-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    z-index: -2;
    opacity: 0;
    transition: opacity 1s ease-in-out;
}

#dynamic-bg.loaded {
    opacity: 1;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: var(--bg-overlay, var(--bg-color));
    z-index: -1;
    transition: background-color 0.5s ease;
}

/* ========================================================================
   2. LAYOUT (Header, Main, Footer, Game Hub)
   ======================================================================== */
/* En-tête & Statistiques */
header {
    padding: 2rem 1rem;
    border-bottom: 1px solid var(--glass-border);
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-content {
    max-width: 1000px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

h1 {
    font-weight: 600;
    font-size: 1.5rem;
    letter-spacing: -0.02em;
}

.user-stats {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: var(--card-bg);
    padding: 0.5rem 1rem;
    border-radius: 100px;
    border: 1px solid var(--border);
}

.stats-divider {
    width: 1px;
    height: 20px;
    background: var(--border);
    margin: 0 0.5rem;
}

.xp-label {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

.xp-value {
    color: var(--accent);
    font-weight: 600;
}

.level-badge {
    background: var(--accent);
    color: white;
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 600;
}

/* Contenu Principal */
main {
    flex: 1;
    max-width: 1000px;
    margin: 0 auto;
    padding: 3rem 1.5rem;
    width: 100%;
}

.hero {
    text-align: center;
    margin-bottom: 4rem;
}

.subtitle {
    color: var(--text-secondary);
    font-size: 1.1rem;
    font-weight: 300;
}

/* Grille des Jeux */
.games-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
}

.game-card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    padding: 2rem;
    border-radius: var(--radius);
    cursor: pointer;
    transition: var(--transition-bounce);
    position: relative;
    overflow: hidden;
    box-shadow: var(--shadow-md);
}

.game-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05) 0%, rgba(255, 255, 255, 0) 100%);
    opacity: 0;
    transition: var(--transition);
    pointer-events: none;
}

.game-card:not(.locked):not(.disabled):hover {
    transform: translateY(-6px) scale(1.02);
    border-color: var(--accent);
    box-shadow: var(--shadow-lg), var(--shadow-glow);
}

.game-card:not(.locked):not(.disabled):hover::before {
    opacity: 1;
}

.game-card:not(.locked):not(.disabled):hover .game-icon {
    transform: scale(1.15) rotate(5deg);
}

.game-icon {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    display: inline-block;
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.game-card h3 {
    margin-bottom: 0.5rem;
    font-size: 1.25rem;
}

.game-card p {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 1.5rem;
}

.difficulty {
    display: inline-block;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--accent);
    font-weight: 600;
}

.hs-badge {
    position: absolute;
    top: 10px;
    right: 10px;
    background: linear-gradient(135deg, #fbbf24, #f59e0b);
    color: #fff;
    padding: 0.2rem 0.6rem;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 700;
    box-shadow: 0 4px 10px rgba(245, 158, 11, 0.4);
    z-index: 2;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.game-card:hover .hs-badge {
    transform: scale(1.05);
}

.game-card.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.game-card.disabled:hover {
    transform: none;
    border-color: var(--border);
    box-shadow: none;
}

/* Pied de page */
footer {
    text-align: center;
    padding: 2rem;
    color: var(--text-secondary);
    font-size: 0.85rem;
    border-top: 1px solid var(--border);
}

/* Vue de Jeu & Boutons */
.game-view {
    animation: fadeIn 0.4s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========================================================================
   3. COMPOSANTS COMMUNS (Boutons, Modales, Toast, Formulaires)
   ======================================================================== */

/* --- Socle commun pour tous les boutons interactifs --- */
.btn-primary,
.btn-secondary,
.control-btn {
    font-family: inherit;
    font-weight: 600;
    border-radius: var(--btn-radius);
    cursor: pointer;
    transition: var(--transition);
    outline: none;
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: var(--btn-height);
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent), var(--accent-hover));
    color: #fff;
    box-shadow: var(--shadow-sm);
    padding: 0.5rem 1.5rem;
}

.btn-primary:hover {
    box-shadow: var(--shadow-md), var(--shadow-glow);
    transform: translateY(-2px);
}

.btn-primary:active,
.btn-secondary:active,
.control-btn:active {
    transform: scale(0.96);
}

.btn-secondary {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border);
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    height: var(--btn-height);
}

.game-view>.btn-secondary {
    margin-bottom: 2rem;
}

.btn-secondary:hover {
    color: var(--text-primary);
    border-color: var(--text-secondary);
    background: rgba(255, 255, 255, 0.05);
}

select option {
    background-color: var(--bg-color);
    color: var(--text-primary);
}

/* Notification Toast */
.toast {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: var(--accent);
    color: white;
    padding: 0.8rem 1.5rem;
    border-radius: 100px;
    font-weight: 600;
    font-size: 0.9rem;
    box-shadow: 0 10px 20px rgba(99, 102, 241, 0.3);
    pointer-events: none;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    z-index: 1000;
}

.toast.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.loading-state {
    text-align: center;
    padding: 4rem 0;
}

/* ========================================================================
   4. JEU : SUDOKU
   ======================================================================== */
/* Styles Sudoku */
.sudoku-container {
    max-width: 500px;
    margin: 0 auto;
}

.sudoku-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

#sudoku-timer {
    font-variant-numeric: tabular-nums;
    font-weight: 600;
    font-size: 1.2rem;
    color: var(--accent);
}

#diff-select,
.diff-select {
    background: var(--card-bg);
    color: var(--text-primary);
    border: 1px solid var(--border);
    padding: 0 0.8rem;
    border-radius: 6px;
    font-family: inherit;
    cursor: pointer;
    height: var(--btn-height);
    font-size: 0.9rem;
    outline: none;
    transition: var(--transition);
}

#diff-select:hover,
.diff-select:hover {
    border-color: var(--accent);
}

.grid-9x9 {
    display: grid;
    grid-template-columns: repeat(9, 1fr);
    grid-template-rows: repeat(9, 1fr);
    background: var(--border);
    gap: 1px;
    border: 2px solid var(--border);
    margin-bottom: 2rem;
    aspect-ratio: 1;
}

.grid-cell {
    background: var(--bg-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: clamp(1rem, 4vw, 1.5rem);
    font-weight: 400;
    cursor: pointer;
    transition: var(--transition);
    user-select: none;
    position: relative;
}

.grid-cell.alt-block {
    background: var(--cell-alt);
}

.grid-cell:hover {
    background: rgba(99, 102, 241, 0.1);
}

.grid-cell.selected {
    background: var(--accent);
    color: white;
}

.grid-cell.highlight {
    background: var(--cell-alt);
    /* Plus clair */
}

.grid-cell.same-num {
    background: rgba(99, 102, 241, 0.2);
}

.grid-cell.fixed {
    font-weight: 600;
    color: var(--text-secondary);
}

.grid-cell.error {
    color: var(--error);
}

.grid-cell.selected.error {
    color: white;
    background: var(--error);
}

/* Grille de notes dans la cellule */
.notes-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    grid-template-rows: repeat(3, 1fr);
    width: 100%;
    height: 100%;
    padding: 2px;
}

.notes-grid span {
    font-size: 0.5rem;
    text-align: center;
    color: var(--text-secondary);
}

/* Contrôles & Pavé numérique */
.sudoku-controls {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.control-btn {
    flex: 1;
    background: var(--card-bg);
    border: 1px solid var(--border);
    color: var(--text-primary);
    padding: 0.75rem;
    font-size: 0.85rem;
}

.control-btn.active {
    background: var(--accent);
    border-color: var(--accent);
}

.number-pad {
    display: grid;
    grid-template-columns: repeat(9, 1fr);
    gap: 0.5rem;
}

.num-btn {
    aspect-ratio: 1;
    background: var(--card-bg);
    border: 1px solid var(--border);
    color: var(--text-primary);
    border-radius: 8px;
    font-size: 1.25rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.num-btn:hover {
    border-color: var(--accent);
    color: var(--accent);
}

.num-btn.completed {
    opacity: 0.2;
    cursor: default;
    pointer-events: none;
    border-color: var(--border);
}

/* Modale de fin de jeu */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    animation: fadeIn 0.3s ease-out;
}

.modal-content {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    padding: 3rem;
    border-radius: var(--radius);
    text-align: center;
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow-lg);
    max-width: 400px;
    width: 90%;
}

.modal-content h2 {
    font-size: 2rem;
    margin-bottom: 1rem;
}

/* --- Modale Changelog & Suggestions --- */

.changelog-modal-content {
    text-align: left;
    max-width: 460px;
    padding: 2.5rem;
}

/* Onglets de navigation */
.changelog-tabs {
    display: flex;
    gap: 0.25rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--border);
    padding-bottom: 0;
}

.tab-btn {
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--text-secondary);
    padding: 0.6rem 1rem;
    font-family: inherit;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    margin-bottom: -1px;
}

.tab-btn:hover {
    color: var(--text-primary);
}

.tab-btn.active {
    color: var(--accent);
    border-bottom-color: var(--accent);
}

/* Panneaux d'onglets */
.tab-panel {
    display: none;
}

.tab-panel.active {
    display: block;
    animation: fadeIn 0.25s ease-out;
}

/* Formulaire de suggestion */
.suggestion-intro {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 1.25rem;
}

.suggestion-form {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 0.4rem;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    background: var(--bg-color);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 0.9rem;
    padding: 0.65rem 0.85rem;
    transition: var(--transition);
    outline: none;
    resize: none;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-secondary);
    opacity: 0.6;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

/* Message de succès */
.form-success {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1.25rem;
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.3);
    border-radius: 8px;
    color: var(--success);
    font-weight: 600;
    font-size: 0.95rem;
    animation: fadeIn 0.3s ease-out;
    text-align: left;
    margin-bottom: 0.5rem;
}

/* Bouton Fermer de la modale Changelog */
.changelog-close-btn {
    width: 100%;
    margin-top: 1.25rem;
    justify-content: center;
}

.xp-bonus {
    font-size: 1.5rem;
    color: var(--accent);
    font-weight: 600;
    margin-bottom: 2rem;
}

.modal-actions {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

/* --- Composants de modale de jeu standardisée --- */

.modal-game-icon {
    font-size: 3.5rem;
    margin-bottom: 0.5rem;
    line-height: 1;
}

.modal-description {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 1rem;
}

.modal-section-label {
    display: block;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-secondary);
    margin-bottom: 0.5rem;
    font-weight: 600;
}

.modal-controls-section {
    text-align: left;
    margin-bottom: 1.25rem;
}

.modal-controls-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.modal-controls-list li {
    font-size: 0.9rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.modal-ctrl-icon {
    font-size: 1.1rem;
}

.modal-difficulty-section {
    margin-bottom: 1.25rem;
}

.modal-difficulty-selector {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

.modal-diff-btn {
    background: var(--card-bg);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    padding: 0.45rem 1rem;
    border-radius: var(--btn-radius);
    font-family: inherit;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
}

.modal-diff-btn:hover {
    border-color: var(--accent);
    color: var(--text-primary);
}

.modal-diff-btn.active {
    background: var(--accent);
    border-color: var(--accent);
    color: white;
}

.modal-stats-grid {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.modal-stat-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.4rem 0;
    border-bottom: 1px solid var(--border);
}

.modal-stat-row:last-child {
    border-bottom: none;
}

.modal-stat-label {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.modal-stat-value {
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
}

.btn-primary {
    background: var(--accent);
    color: white;
    border: none;
    padding: 1rem;
    font-size: 0.9rem;
}

.btn-primary:hover {
    filter: brightness(1.1);
    transform: translateY(-2px);
}

/* ========================================================================
   5. JEU : MOTS MÊLÉS
   ======================================================================== */
/* Styles Mots Mêlés */
.ws-game-container {
    max-width: 600px;
    margin: 0 auto;
}

.ws-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.ws-controls {
    display: flex;
    gap: 1rem;
    align-items: center;
}

.ws-grid {
    display: grid;
    gap: 4px;
    background: var(--border);
    border: 4px solid var(--border);
    margin-bottom: 2rem;
    aspect-ratio: 1;
    touch-action: none;
    /* Empêche le scroll pendant la sélection */
}

.ws-cell {
    background: var(--bg-color);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: clamp(0.8rem, 2.5vw, 1.2rem);
    font-weight: 600;
    cursor: pointer;
    user-select: none;
    transition: background 0.2s ease;
}

.ws-cell.selected {
    background: var(--accent);
    color: white;
}

.ws-cell.permanently-found {
    background: rgba(99, 102, 241, 0.15);
    color: var(--accent);
}

.ws-words-container {
    background: var(--card-bg);
    padding: 1.5rem;
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

.ws-words-container h3 {
    margin-bottom: 1rem;
    font-size: 1rem;
    color: var(--text-secondary);
}

.ws-word-list {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.ws-word {
    padding: 0.4rem 0.8rem;
    background: transparent;
    border: 1px solid var(--border);
    border-radius: 6px;
    font-size: 0.9rem;
    transition: var(--transition);
}

.ws-word.found {
    text-decoration: line-through;
    opacity: 0.3;
    border-color: transparent;
}

/* Responsive */
@media (max-width: 600px) {
    .header-content {
        flex-direction: column;
        gap: 1rem;
    }

    .hero {
        margin-bottom: 2rem;
    }

    .games-grid {
        grid-template-columns: 1fr;
    }

    .number-pad {
        grid-template-columns: repeat(5, 1fr);
    }

    .sudoku-controls {
        flex-direction: column;
    }
}

/* Basculement de Thème */
.theme-toggle {
    background: var(--card-bg);
    border: 1px solid var(--border);
    color: var(--text-primary);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: var(--transition);
    font-size: 1.1rem;
}

.theme-toggle:hover {
    border-color: var(--accent);
    transform: scale(1.05);
}

/* Flèche de scroll vers la grille de jeux */
.scroll-arrow {
    display: block;
    margin: 12px auto 0;
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-secondary);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.3rem;
    cursor: pointer;
    transition: var(--transition);
    animation: bounce-arrow 2s ease-in-out infinite;
}

.scroll-arrow:hover {
    border-color: var(--accent);
    color: var(--accent);
    transform: scale(1.1);
}

@keyframes bounce-arrow {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(5px);
    }
}

/* Flèche de scroll vers la grille de jeux */
.scroll-arrow {
    display: block;
    margin: 12px auto 0;
    background: transparent;
    border: 1px solid var(--border);
    color: var(--text-secondary);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    font-size: 1.3rem;
    cursor: pointer;
    transition: var(--transition);
    animation: bounce-arrow 2s ease-in-out infinite;
}

.scroll-arrow:hover {
    border-color: var(--accent);
    color: var(--accent);
    transform: scale(1.1);
}

@keyframes bounce-arrow {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(5px);
    }
}

/* Jeux Verrouillés */
.game-card.locked {
    cursor: not-allowed;
    position: relative;
}

.game-card.locked .game-icon,
.game-card.locked h3,
.game-card.locked p {
    filter: blur(2px);
    opacity: 0.5;
}

.lock-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: rgba(0, 0, 0, 0.1);
    z-index: 5;
    transition: var(--transition);
}

.lock-badge {
    background: var(--accent);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 100px;
    font-size: 0.8rem;
    font-weight: 600;
    box-shadow: 0 4px 12px var(--accent-glow);
}

.lock-icon {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
}

/* ========================================================================
   6. JEU : JEWEL BLITZ (MATCH-3)
   ======================================================================== */
/* Styles Jewel Blitz */
.jb-game-container {
    max-width: 500px;
    margin: 0 auto;
}

.jb-header {
    margin-bottom: 2rem;
}

.jb-stats {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 1.5rem;
    background: var(--card-bg);
    padding: 1rem;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    flex-wrap: wrap;
}

@media (max-width: 480px) {
    .jb-stats {
        gap: 0.8rem;
        padding: 0.75rem;
    }

    .jb-stat-value {
        font-size: 1.2rem;
    }

    .jb-combos-mini {
        gap: 0.4rem;
    }

    .combo-count {
        padding: 2px 6px;
        font-size: 0.8rem;
    }

    .stats-divider {
        display: none;
        /* Cache le diviseur sur très petits écrans si ça wrap */
    }
}

.jb-stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.jb-stat-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--text-secondary);
    letter-spacing: 0.05em;
}

.jb-stat-value {
    font-size: 1.5rem;
    font-weight: 600;
    color: var(--accent);
}

.jb-grid {
    display: grid;
    gap: 4px;
    background: var(--border);
    border: 4px solid var(--border);
    margin: 0 auto 2rem auto;
    width: 100%;
    max-width: min(480px, 70vh);
    aspect-ratio: 1 / 1;
    border-radius: 8px;
    overflow: hidden;
}

.jb-cell {
    background: var(--bg-color);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    user-select: none;
    transition: background 0.2s ease;
    width: 100%;
    height: 100%;
    min-height: 0;
    min-width: 0;
    overflow: hidden;
}

.jb-cell:hover {
    background: rgba(255, 255, 255, 0.05);
}

.jb-cell.selected {
    background: var(--accent-glow);
    outline: 2px solid var(--accent);
    outline-offset: -2px;
}

.jb-gem {
    font-size: clamp(1.2rem, 6vw, 2.2rem);
    line-height: 1;
    display: block;
    animation: gemSpawn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes gemSpawn {
    from {
        transform: scale(0);
        opacity: 0;
    }

    to {
        transform: scale(1);
        opacity: 1;
    }
}

.jb-gem.is-horizontal,
.jb-gem.is-vertical {
    filter: drop-shadow(0 0 8px var(--accent));
}

.jb-gem.is-cross {
    filter: drop-shadow(0 0 12px var(--warning));
}

.jb-gem.is-color {
    animation: rainbowPulse 1.5s infinite linear;
}

@keyframes rainbowPulse {
    0% {
        filter: drop-shadow(0 0 5px red);
    }

    25% {
        filter: drop-shadow(0 0 8px yellow);
    }

    50% {
        filter: drop-shadow(0 0 10px lime);
    }

    75% {
        filter: drop-shadow(0 0 8px cyan);
    }

    100% {
        filter: drop-shadow(0 0 5px red);
    }
}

/* Marqueurs d'effets spéciaux */
.special-fx {
    position: absolute;
    bottom: 2px;
    right: 2px;
    font-size: 0.7rem;
    background: rgba(0, 0, 0, 0.5);
    width: 16px;
    height: 16px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    z-index: 2;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.h-line::after {
    content: '↔️';
}

.v-line::after {
    content: '↕️';
}

.cross-fx {
    border-color: var(--warning);
    background: rgba(245, 158, 11, 0.2);
}

.cross-fx::after {
    content: '✴️';
}

.color-fx {
    background: linear-gradient(45deg, red, blue);
}

.color-fx::after {
    content: '🌈';
}

/* Légende & Tremblement */

.shake {
    animation: jbShake 0.3s ease-in-out;
}

@keyframes jbShake {

    0%,
    100% {
        transform: translate(0, 0);
    }

    25% {
        transform: translate(-4px, 2px);
    }

    50% {
        transform: translate(4px, -2px);
    }

    75% {
        transform: translate(-2px, -4px);
    }
}

.jb-combos-mini {
    display: flex;
    gap: 0.8rem;
    align-items: center;
}

.combo-count {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    font-size: 0.9rem;
    background: rgba(255, 255, 255, 0.05);
    padding: 2px 8px;
    border-radius: 20px;
    border: 1px solid var(--border);
}

.combo-count span {
    font-weight: bold;
    color: var(--accent);
}

.jb-controls {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
}

.jb-diff-select {
    background: var(--card-bg-alt);
    border: 1px solid var(--border);
    color: var(--text-primary);
    padding: 2px 8px;
    border-radius: var(--btn-radius);
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
    outline: none;
}

.jb-diff-select:hover {
    border-color: var(--accent);
}

.stats-divider {
    width: 1px;
    height: 30px;
    background: var(--border);
    margin: 0 0.5rem;
}

/* ========================================================================
   7. JEU : SCRABBLE
   ======================================================================== */
/* Styles Scrabble */
.scr-game-container {
    max-width: 600px;
    margin: 0 auto;
}

.scr-board {
    display: grid;
    grid-template-columns: repeat(15, minmax(0, 1fr));
    grid-template-rows: repeat(15, minmax(0, 1fr));
    gap: 2px;
    background: var(--border);
    border: 4px solid var(--border);
    aspect-ratio: 1/1;
    border-radius: 4px;
    margin-bottom: 1.5rem;
}

.scr-cell {
    background: var(--card-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.6rem;
    font-weight: bold;
    text-transform: uppercase;
    position: relative;
    cursor: pointer;
    user-select: none;
    transition: var(--transition);
    overflow: hidden;
}

.scr-cell:hover {
    filter: brightness(1.2);
}

/* Couleurs des bonus Scrabble */
.scr-cell.mt {
    background: var(--error);
    color: white;
}

/* Mot Triple */
.scr-cell.md {
    background: #f87171;
    color: white;
}

/* Mot Double */
.scr-cell.lt {
    background: #3b82f6;
    color: white;
}

/* Lettre Triple */
.scr-cell.ld {
    background: #93c5fd;
    color: white;
}

/* Lettre Double */
.scr-cell.star {
    background: #fbbf24;
    color: white;
}

/* Étoile Centrale */

.scr-tile {
    width: 90%;
    height: 90%;
    max-width: 100%;
    max-height: 100%;
    background: #fef3c7;
    color: #1e293b;
    border-radius: 3px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: clamp(0.7rem, 2.8vw, 1.1rem);
    font-weight: 800;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    position: relative;
    overflow: hidden;
}

.scr-tile-val {
    position: absolute;
    bottom: 2px;
    right: 2px;
    font-size: 0.5rem;
    font-weight: normal;
}

.scr-rack {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    background: var(--card-bg);
    padding: 1rem;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    margin-bottom: 1rem;
    min-height: 60px;
}

.scr-rack .scr-tile {
    width: 45px;
    height: 45px;
    cursor: grab;
}

.scr-rack .scr-tile.selected {
    outline: 3px solid var(--accent);
    transform: translateY(-5px);
}

.scr-controls {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 1rem;
}

.scr-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    background: var(--card-bg);
    padding: 1rem;
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

.scr-score-box {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.scr-score-label {
    font-size: 0.7rem;
    color: var(--text-secondary);
    text-transform: uppercase;
}

.scr-score-value {
    font-size: 1.5rem;
    font-weight: bold;
    color: var(--accent);
}

.scr-turn-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.3rem;
}

.scr-bag-info {
    font-size: 0.75rem;
    color: var(--text-secondary);
    font-weight: 400;
}

#scr-bag-count {
    font-weight: 700;
    color: var(--accent);
}

/* ========================================================================
   8. JEU : LE PENDU
   ======================================================================== */
/* Styles Le Pendu */
.hg-game-container {
    max-width: 500px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.hg-drawing-container {
    width: 200px;
    height: 250px;
    margin-bottom: 2rem;
    position: relative;
    border-bottom: 4px solid var(--text-secondary);
}

.hg-part {
    position: absolute;
    background: var(--text-primary);
    display: none;
    transition: var(--transition);
}

.hg-part.visible {
    display: block;
}

.hg-gallows-v {
    width: 4px;
    height: 100%;
    left: 40px;
}

.hg-gallows-h {
    width: 100px;
    height: 4px;
    left: 40px;
    top: 0;
}

.hg-rope {
    width: 2px;
    height: 30px;
    left: 140px;
    top: 0;
}

.hg-head {
    width: 40px;
    height: 40px;
    border: 4px solid var(--text-primary);
    border-radius: 50%;
    left: 121px;
    top: 30px;
    background: none;
}

.hg-body {
    width: 4px;
    height: 80px;
    left: 139px;
    top: 68px;
}

.hg-arm-l {
    width: 50px;
    height: 4px;
    left: 90px;
    top: 90px;
    transform: rotate(-30deg);
}

.hg-arm-r {
    width: 50px;
    height: 4px;
    left: 142px;
    top: 90px;
    transform: rotate(30deg);
}

.hg-leg-l {
    width: 50px;
    height: 4px;
    left: 95px;
    top: 175px;
    transform: rotate(-45deg);
}

.hg-leg-r {
    width: 50px;
    height: 4px;
    left: 137px;
    top: 175px;
    transform: rotate(45deg);
}

.hg-word-display {
    display: flex;
    gap: 0.8rem;
    margin-bottom: 2.5rem;
    flex-wrap: wrap;
    justify-content: center;
}

.hg-letter-slot {
    width: 30px;
    border-bottom: 4px solid var(--accent);
    font-size: 2rem;
    font-weight: 600;
    text-align: center;
    height: 40px;
    text-transform: uppercase;
}

.hg-keyboard {
    display: grid;
    grid-template-columns: repeat(9, 1fr);
    gap: 0.5rem;
    width: 100%;
}

.hg-key {
    background: var(--card-bg);
    border: 1px solid var(--border);
    color: var(--text-primary);
    padding: 0.8rem 0;
    border-radius: 8px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-transform: uppercase;
}

.hg-key:hover:not(:disabled) {
    border-color: var(--accent);
    background: var(--accent-glow);
}

.hg-key:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.hg-key.correct {
    background: var(--success);
    border-color: var(--success);
    color: white;
}

.hg-key.wrong {
    background: var(--error);
    border-color: var(--error);
    color: white;
}

@media (max-width: 480px) {
    .hg-keyboard {
        grid-template-columns: repeat(7, 1fr);
    }

    .hg-letter-slot {
        width: 20px;
        font-size: 1.5rem;
    }
}

@media (max-width: 600px) {
    .scr-cell {
        font-size: 0.4rem;
    }

    .scr-tile {
        font-size: 0.8rem;
    }

    .scr-rack .scr-tile {
        width: 35px;
        height: 35px;
    }
}

/* ========================================================================
   9. JEU : PAIRES
   ======================================================================== */
/* Jeu de Paires Styles */
.pa-game-container {
    max-width: 600px;
    margin: 0 auto;
}

.pa-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.pa-stats {
    display: flex;
    gap: 1.5rem;
}

.pa-stat-item {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.pa-stat-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
}

.pa-stat-value {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--accent);
}

.pa-grid {
    display: grid;
    gap: 12px;
    perspective: 1000px;
    margin-bottom: 2rem;
    max-width: 100%;
}

.pa-card {
    width: 100%;
    aspect-ratio: 1;
    cursor: pointer;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.pa-card.flipped {
    transform: rotateY(180deg);
}

.pa-card-inner {
    position: relative;
    width: 100%;
    height: 100%;
    transform-style: preserve-3d;
}

.pa-card-front,
.pa-card-back {
    position: absolute;
    width: 100%;
    height: 100%;
    backface-visibility: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

.pa-card-front {
    background: var(--card-bg);
    color: var(--text-secondary);
}

.pa-card-back {
    background: var(--accent);
    color: white;
    transform: rotateY(180deg);
}

.pa-card.matched .pa-card-back {
    background: var(--success);
    border-color: var(--success);
}

.pa-card-small .pa-card-front,
.pa-card-small .pa-card-back {
    font-size: 1.25rem;
}

.pa-controls {
    display: flex;
    gap: 0.8rem;
}

/* ========================================================================
   12. LAYOUT IN-GAME & RESPONSIVE
   ======================================================================== */
/* =========================================
   Ajustements globaux de mise en page en jeu 
   ========================================= */
body.in-game header {
    padding: 0.5rem 1rem;
}

body.in-game header h1 {
    font-size: 1.2rem;
}

body.in-game footer {
    padding: 0.5rem;
    font-size: 0.75rem;
}

body.in-game main {
    padding: 1rem 1.5rem;
    display: flex;
    flex-direction: column;
    max-width: 1200px;
}

body.in-game .game-view {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    position: relative;
}

#game-mount {
    width: 100%;
    display: flex;
    justify-content: center;
}

/* Extension de base */
.scr-game-container,
.ws-game-container,
.sudoku-container,
.jb-game-container,
.hg-game-container,
.pa-game-container {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.scr-board,
.grid-9x9,
.ws-grid,
.jb-grid,
.pa-grid,
.hg-drawing-container {
    width: 100%;
}

/* =========================================
   Affichage PC (Desktop & Grandes résolutions)
   ========================================= */
@media (min-width: 1200px) {

    body.in-game main {
        max-width: 1800px;
    }

    body.in-game .game-view>.btn-secondary {
        position: absolute;
        top: 1rem;
        left: 1.5rem;
        z-index: 100;
    }

    .scr-game-container,
    .ws-game-container,
    .sudoku-container,
    .jb-game-container,
    .hg-game-container,
    .pa-game-container {
        display: grid;
        grid-template-columns: minmax(0, 1fr) 400px;
        /* Force l'espace du menu à 400px */
        grid-auto-flow: dense;
        gap: 2.5rem;
        align-items: start;
        justify-content: center;
        max-width: 1600px;
        margin-top: 1rem;
    }


    .scr-board,
    .grid-9x9,
    .ws-grid,
    .jb-grid {
        grid-column: 1;
        grid-row: 1 / 20;
        height: min(80vh, 900px);
        width: auto !important;
        max-width: 100%;
        margin: 0;
    }

    .pa-grid {
        grid-column: 1;
        grid-row: 1 / 20;
        height: min(70vh, 600px);
        width: auto !important;
        max-width: 100%;
        margin: 0 auto;
    }

    /* Spécifique Pendu 4K : dessin en haut de la colonne gauche */
    .hg-drawing-container {
        grid-column: 1;
        grid-row: 1 / 20;
        width: 400px !important;
        height: 500px !important;
        position: relative;
        border-bottom: 8px solid var(--text-secondary);
        transform: none;
        margin: 0 auto;
        align-self: start;
    }

    /* Redimensionner les parties du pendu pour la grande taille */
    .hg-game-container .hg-gallows-v {
        width: 8px;
        height: 100%;
        left: 80px;
    }

    .hg-game-container .hg-gallows-h {
        width: 200px;
        height: 8px;
        left: 80px;
        top: 0;
    }

    .hg-game-container .hg-rope {
        width: 4px;
        height: 60px;
        left: 280px;
        top: 0;
    }

    .hg-game-container .hg-head {
        width: 80px;
        height: 80px;
        border: 8px solid var(--text-primary);
        left: 242px;
        top: 60px;
    }

    .hg-game-container .hg-body {
        width: 8px;
        height: 160px;
        left: 279px;
        top: 138px;
    }

    .hg-game-container .hg-arm-l {
        width: 100px;
        height: 8px;
        left: 180px;
        top: 178px;
    }

    .hg-game-container .hg-arm-r {
        width: 100px;
        height: 8px;
        left: 284px;
        top: 178px;
    }

    .hg-game-container .hg-leg-l {
        width: 100px;
        height: 8px;
        left: 190px;
        top: 350px;
    }

    .hg-game-container .hg-leg-r {
        width: 100px;
        height: 8px;
        left: 274px;
        top: 350px;
    }

    .scr-header,
    .sudoku-header,
    .ws-header,
    .jb-header,
    .pa-header,
    .hg-word-display {
        grid-column: 2;
        grid-row: auto;
        margin-bottom: 2rem;
        width: 100%;
    }

    .scr-rack,
    .ws-words-container,
    .jb-stats,
    .pa-stats {
        grid-column: 2;
        grid-row: auto;
        width: 100%;
        margin-bottom: 2rem;
    }

    .scr-controls,
    .sudoku-controls,
    .ws-controls,
    .jb-controls,
    .pa-controls {
        grid-column: 2;
        grid-row: auto;
        display: flex;
        flex-direction: column;
        width: 100%;
        gap: 1rem;
    }

    /* Spécifique Pendu pour restaurer la grille du clavier en sidebar */
    .hg-keyboard {
        grid-column: 2;
        grid-row: 3;
        display: grid;
        grid-template-columns: repeat(7, 1fr);
        /* Plus compact pour la sidebar */
        gap: 0.5rem;
        width: 100%;
    }

    .hg-game-container .scr-controls {
        grid-column: 2;
        grid-row: 4;
        margin-top: 1rem;
    }

    .number-pad {
        grid-column: 2;
        grid-row: auto;
        margin-top: 2rem;
    }

    .scr-rack {
        flex-wrap: wrap;
        justify-content: center;
        grid-column: 2;
        grid-row: auto;
        margin-top: 0;
    }
}


/* =========================================
   Affichage Mobile Paysage
   ========================================= */
@media (max-width: 950px) and (orientation: landscape) {
    body.in-game header {
        padding: 0.2rem 1rem;
    }

    body.in-game header h1 {
        font-size: 1rem;
    }

    body.in-game footer {
        display: none;
    }

    body.in-game main {
        padding: 0.5rem;
    }

    body.in-game .game-view>.btn-secondary {
        position: absolute;
        top: 0;
        left: 0;
        z-index: 10;
        padding: 0.3rem 0.5rem;
        font-size: 0.8rem;
    }

    .scr-game-container,
    .ws-game-container,
    .sudoku-container,
    .jb-game-container,
    .hg-game-container,
    .pa-game-container {
        display: grid;
        grid-template-columns: auto 220px;
        gap: 1rem;
        align-items: start;
        justify-content: center;
        height: 100%;
        margin-top: 5px;
    }

    .scr-board,
    .grid-9x9,
    .ws-grid,
    .jb-grid,
    .hg-drawing-container {
        grid-column: 1;
        grid-row: 1 / 10;
        height: 85vh;
        width: auto !important;
        max-width: 100%;
        margin: 0;
    }

    .pa-grid {
        grid-column: 1;
        grid-row: 1 / 10;
        height: auto;
        width: 100%;
        max-width: min(100%, 75vh);
        margin: 0 auto;
    }

    .scr-header,
    .sudoku-header,
    .ws-header,
    .jb-header,
    .pa-header {
        grid-column: 2;
        grid-row: 1;
        margin-bottom: 0;
        padding: 0.5rem;
        font-size: 0.8rem;
    }

    .scr-rack,
    .ws-words-container,
    .jb-stats,
    .pa-stats,
    .hg-word-display {
        grid-column: 2;
        grid-row: 2;
    }

    .scr-controls,
    .sudoku-controls,
    .ws-controls,
    .jb-controls,
    .pa-controls,
    .hg-keyboard {
        grid-column: 2;
        grid-row: 3;
        flex-direction: column;
        gap: 0.5rem;
    }

    .number-pad {
        grid-column: 2;
        grid-row: 4;
    }

    .scr-rack .scr-tile {
        width: 30px;
        height: 30px;
        font-size: 0.9rem;
    }

    .btn-secondary,
    .btn-primary {
        padding: 0.4rem;
        font-size: 0.85rem;
    }

    .hg-keyboard {
        grid-template-columns: repeat(5, 1fr);
    }
}

/* =========================================
   Corrections Scrabble & Thème IA
   ========================================= */
@media (max-width: 450px) and (orientation: portrait) {
    .scr-rack {
        gap: 0.3rem;
        padding: 0.5rem;
    }

    .scr-rack .scr-tile {
        width: 36px;
        height: 36px;
        font-size: 1rem;
    }

    .scr-controls {
        flex-wrap: wrap;
        gap: 0.5rem;
        justify-content: center;
    }

    .scr-controls .btn-secondary,
    .scr-controls .btn-primary {
        flex: 1;
        min-width: 100px;
    }
}

.scr-tile-ai {
    outline: 2px solid var(--accent-cyan);
    box-shadow: 0 0 10px var(--accent-cyan), inset 0 0 5px rgba(6, 182, 212, 0.5);
    animation: pulse-cyan 2.5s infinite alternate;
}

@keyframes pulse-cyan {
    0% {
        box-shadow: 0 0 5px var(--accent-cyan), inset 0 0 2px rgba(6, 182, 212, 0.5);
    }

    100% {
        box-shadow: 0 0 20px var(--accent-cyan), inset 0 0 8px rgba(6, 182, 212, 0.8);
    }
}

.scr-tile-hint {
    background: #fef08a !important;
    color: #713f12 !important;
    outline: 2px dashed var(--warning);
    box-shadow: 0 0 8px rgba(245, 158, 11, 0.6);
    animation: pulse-hint 1.5s ease-in-out infinite alternate;
}

@keyframes pulse-hint {
    0% {
        box-shadow: 0 0 4px rgba(245, 158, 11, 0.4);
    }

    100% {
        box-shadow: 0 0 14px rgba(245, 158, 11, 0.9);
    }
}

.scr-btn-hint {
    background: linear-gradient(135deg, #fbbf24, var(--warning)) !important;
    color: #1e293b !important;
    border-color: var(--warning) !important;
    font-weight: 700;
}

.scr-btn-hint:hover {
    transform: scale(1.05);
    box-shadow: 0 0 12px rgba(245, 158, 11, 0.6);
}

/* ========================================================================
   11. AVATAR & CHANGELOG / SUGGESTIONS
   ======================================================================== */
/* --- Styles Avatar & Changelog --- */
#avatar-changelog {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    cursor: pointer;
    z-index: 90;
    transition: var(--transition);
    background: transparent;
    border: none;
    outline: none;
    filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.5));
    animation: bounce 2s infinite ease-in-out alternate;
}

#avatar-changelog:hover {
    transform: scale(1.1) translateY(-10px);
    filter: drop-shadow(0 10px 20px var(--accent-glow));
    animation-play-state: paused;
}

#avatar-changelog video,
#avatar-changelog img {
    border-radius: 50%;
    border: 3px solid var(--accent);
    box-shadow: 0 0 15px var(--accent-glow);
    object-fit: cover;
}

@keyframes bounce {
    0% {
        transform: translateY(0);
    }

    100% {
        transform: translateY(-8px);
    }
}

.changelog-list {
    text-align: left;
    max-height: 50vh;
    overflow-y: auto;
    margin-bottom: 2rem;
    padding-right: 1rem;
}

.changelog-list::-webkit-scrollbar {
    width: 6px;
}

.changelog-list::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 4px;
}

.changelog-list ul {
    list-style-type: none;
    padding: 0;
}

.changelog-list li {
    padding: 1rem 0;
    border-bottom: 1px solid var(--border);
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.changelog-list li:last-child {
    border-bottom: none;
}

.changelog-list li strong {
    color: var(--accent);
    display: inline-block;
    margin-bottom: 0.3rem;
}

/* ========================================================================
   10. JEU : CAPITALES
   ======================================================================== */
.capitales-container {
    width: 100%;
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 30px;
}

.capitales-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: var(--card-bg);
    padding: 15px 25px;
    border-radius: 15px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border);
}

.capitales-header h2 {
    margin: 0;
    font-size: 1.5rem;
    color: var(--text-primary);
}

.score-board {
    font-size: 1.2rem;
    font-weight: 600;
    color: var(--accent);
    background: rgba(0, 0, 0, 0.2);
    padding: 8px 15px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    /* Ajout d'une bordure subtile */
}

.light-mode .score-board {
    background: rgba(255, 255, 255, 0.5);
    color: var(--accent);
}

.cap-menu {
    text-align: center;
    background: var(--card-bg-alt);
    padding: 40px 20px;
    border-radius: 20px;
    border: 1px solid var(--border);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.4);
}

.light-mode .cap-menu {
    background: var(--card-bg);
}

.cap-menu h3 {
    margin-bottom: 30px;
    font-size: 1.8rem;
    color: var(--text-primary);
}

.mode-buttons {
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-width: 400px;
    margin: 0 auto;
}

.cap-mode-btn {
    font-size: 1.2rem;
    padding: 15px 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

/* Zone de jeu */
.cap-game {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 25px;
    width: 100%;
}

.cap-flag-container {
    padding: 30px;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 200px;
    background: var(--card-bg-alt);
    border: 1px solid var(--border);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.4);
    border-radius: 20px;
    width: 100%;
    max-width: 500px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.light-mode .cap-flag-container {
    background: var(--card-bg);
}

.cap-flag-img {
    max-width: 100%;
    height: 120px;
    object-fit: contain;
    filter: drop-shadow(0 5px 15px rgba(0, 0, 0, 0.2));
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.cap-flag-img:hover {
    transform: scale(1.05);
}

/* Animation lors de la réponse */
#cap-flag-pic.answered .cap-flag-img {
    filter: drop-shadow(0 2px 5px rgba(0, 0, 0, 0.5));
}

.cap-question {
    font-size: 1.5rem;
    font-weight: 600;
    text-align: center;
    color: var(--text-primary);
    margin: 10px 0;
}

.cap-options-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
    width: 100%;
}

.cap-option-btn {
    background: var(--card-bg);
    border: 2px solid var(--border);
    color: var(--text-primary);
    padding: 15px 20px;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
    font-family: inherit;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

body:not(.light-mode) .cap-option-btn {
    background: var(--card-bg-alt);
}

.cap-option-btn:hover:not(:disabled) {
    background: var(--accent);
    color: white;
    border-color: #818cf8;
    /* Lighter version of accent */
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(99, 102, 241, 0.4);
}

.cap-option-btn:disabled {
    cursor: default;
    opacity: 0.7;
}

.cap-option-btn.correct {
    background: var(--success) !important;
    border-color: #34D399 !important;
    color: white !important;
    box-shadow: 0 0 25px rgba(16, 185, 129, 0.7), 0 0 45px rgba(16, 185, 129, 0.3);
    transform: scale(1.05);
    z-index: 2;
    text-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
}

.cap-option-btn.wrong {
    background: var(--error) !important;
    border-color: #FCA5A5 !important;
    color: white !important;
    box-shadow: 0 0 25px rgba(239, 68, 68, 0.7), 0 0 45px rgba(239, 68, 68, 0.3);
    animation: shake 0.4s cubic-bezier(.36, .07, .19, .97) both;
    text-shadow: 0 0 5px rgba(0, 0, 0, 0.5);
}

/* Écran de fin */
.cap-end {
    text-align: center;
    background: var(--card-bg-alt);
    padding: 40px;
    border-radius: 20px;
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
}

.light-mode .cap-end {
    background: var(--card-bg);
}

.cap-end h3 {
    font-size: 2rem;
    color: var(--accent);
    margin: 0;
}

.final-score {
    font-size: 3rem;
    font-weight: bold;
    color: var(--text-primary);
    margin: 20px 0;
}

.xp-reward {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.cap-next {
    font-size: 1.2rem;
    height: 55px;
    /* Hauteur fixe pour un alignement parfait */
    padding: 0 35px;
    margin-top: 15px;
    animation: fadeIn 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    line-height: 1;
    /* Supprime l'espace par défaut */
}

@keyframes shake {

    10%,
    90% {
        transform: translate3d(-1px, 0, 0);
    }

    20%,
    80% {
        transform: translate3d(2px, 0, 0);
    }

    30%,
    50%,
    70% {
        transform: translate3d(-4px, 0, 0);
    }

    40%,
    60% {
        transform: translate3d(4px, 0, 0);
    }
}

/* Reponsive */
@media (max-width: 600px) {
    .cap-options-grid {
        grid-template-columns: 1fr;
    }

    .cap-header {
        flex-direction: column;
        gap: 10px;
    }
}

/* ========================================================================
   10. JEU : TETRIS
   ======================================================================== */
.tetris-game-container {
    max-width: 600px;
    margin: 0 auto;
}

.tetris-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    background: var(--card-bg);
    padding: 1rem;
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

.tetris-stat-box {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.tetris-stat-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--text-secondary);
    letter-spacing: 0.05em;
}

.tetris-stat-value {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--accent);
}

.tetris-main-area {
    display: flex;
    justify-content: center;
    gap: 2rem;
    align-items: flex-start;
    margin-bottom: 2rem;
}

.tetris-grid {
    display: grid;
    grid-template-columns: repeat(10, 1fr);
    grid-template-rows: repeat(20, 1fr);
    width: min(300px, 60vw);
    aspect-ratio: 10 / 20;
    background: var(--border);
    gap: 1.5px;
    border: 4px solid var(--border);
    border-radius: 4px;
}

.tetris-next-piece {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-template-rows: repeat(4, 1fr);
    width: 80px;
    aspect-ratio: 1;
    background: var(--card-bg-alt);
    gap: 1.5px;
    border: 1px solid var(--border);
    border-radius: 4px;
    margin-top: 1rem;
}

.tetris-cell {
    background: var(--bg-color);
    width: 100%;
    height: 100%;
    transition: background-color 0.1s ease;
}

/* Styles Glassmorphism des Tétrominos */
.tetris-block {
    box-shadow: inset 0 0 8px rgba(255, 255, 255, 0.4), inset 2px 2px 4px rgba(255, 255, 255, 0.6), inset -2px -2px 6px rgba(0, 0, 0, 0.4);
    border-radius: 3px;
    /* Base color classes */
}

.tetris-I {
    background-color: rgba(6, 182, 212, 0.85);
    /* Cyan */
}

.tetris-J {
    background-color: rgba(59, 130, 246, 0.85);
    /* Blue */
}

.tetris-L {
    background-color: rgba(245, 158, 11, 0.85);
    /* Orange */
}

.tetris-O {
    background-color: rgba(250, 204, 21, 0.85);
    /* Yellow */
}

.tetris-S {
    background-color: rgba(16, 185, 129, 0.85);
    /* Emerald */
}

.tetris-T {
    background-color: rgba(168, 85, 247, 0.85);
    /* Purple */
}

.tetris-Z {
    background-color: rgba(239, 68, 68, 0.85);
    /* Red */
}

/* Contrôles tactiles Optionnels */
.tetris-controls-mobile {
    display: none;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.5rem;
    margin-top: 1.5rem;
    width: 100%;
}

.tetris-controls-mobile button {
    height: 50px;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
    padding: 0;
}

@media (max-width: 950px) {
    .tetris-controls-mobile {
        display: grid;
    }

    .tetris-main-area {
        gap: 1rem;
    }

    .tetris-grid {
        width: min(280px, 55vw);
    }

    .tetris-side-panel {
        flex: 1;
        display: flex;
        flex-direction: column;
        align-items: center;
    }
}

@media (max-width: 500px) {
    .tetris-header {
        padding: 0.5rem;
        margin-bottom: 1rem;
    }

    .tetris-stat-value {
        font-size: 1rem;
    }
}

/* ========================================================================
   8. JEU : OBJETS CACHÉS
   ======================================================================== */

.oc-game-container {
    max-width: 1200px;
    width: 100%;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.oc-landscape-prompt {
    display: none;
    background: var(--accent);
    color: white;
    padding: 1rem;
    text-align: center;
    border-radius: var(--radius);
    font-weight: bold;
    box-shadow: 0 4px 15px var(--accent-glow);
}

@media (max-width: 950px) and (orientation: portrait) {
    .oc-landscape-prompt {
        display: block;
    }
}

.oc-header {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    padding: 1rem;
    background: var(--card-bg);
}

.oc-infos {
    display: flex;
    justify-content: space-between;
    font-weight: 600;
}

.oc-stat-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.oc-stat-label span {
    color: var(--accent);
}

.oc-timer-container {
    width: 100%;
    height: 12px;
    background: var(--border);
    border-radius: 6px;
    overflow: hidden;
}

.oc-timer-bar {
    height: 100%;
    width: 100%;
    background: var(--success);
    transition: width 0.1s linear, background-color 0.3s;
}

.oc-targets-list {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    font-size: 2rem;
}

.oc-target-item {
    transition: opacity 0.3s, transform 0.3s;
    background: transparent;
}

.oc-target-item.found-target {
    opacity: 0.3;
    transform: scale(0.8);
    filter: grayscale(1);
}

.oc-scene {
    position: relative;
    width: 100%;
    aspect-ratio: 16/9;
    background: var(--card-bg-alt);
    border: 4px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    touch-action: none;
    transition: background 0.5s ease;
}

/* Thèmes de la scène */
.oc-scene.bg-cuisine {
    background-image: url('images/objets-caches/cuisine/bg-cuisine.png');
    background-size: cover;
    background-position: center;
}

.dark-mode .oc-scene.bg-cuisine {
    background-image: url('images/objets-caches/cuisine/bg-cuisine.png');
    background-size: cover;
    background-position: center;
    box-shadow: inset 0 0 0 2000px rgba(0, 0, 0, 0.4);
    /* Assombrit via un pseudo overlay interne */
}

.oc-scene.bg-nature {
    background-image: url('images/objets-caches/nature/bg-nature.png');
    background-size: cover;
    background-position: center;
}

.dark-mode .oc-scene.bg-nature {
    background-image: url('images/objets-caches/nature/bg-nature.png');
    background-size: cover;
    background-position: center;
    box-shadow: inset 0 0 0 2000px rgba(0, 0, 0, 0.4);
}

.oc-scene.bg-espace {
    background-image: url('images/objets-caches/espace/bg-espace.png');
    background-size: cover;
    background-position: center;
}

.dark-mode .oc-scene.bg-espace {
    background-image: url('images/objets-caches/espace/bg-espace.png');
    background-size: cover;
    background-position: center;
    box-shadow: inset 0 0 0 2000px rgba(0, 0, 0, 0.4);
}

.oc-item {
    position: absolute;
    font-size: 3rem;
    cursor: pointer;
    user-select: none;
    transition: transform 0.2s;
    /* Pour l'effet "tas", un text-shadow donne du volume */
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.3);
}

.oc-item-img {
    text-shadow: none;
    /* Inactif pour les images */
}

/* Styles pour les images transparentes PNG */
.oc-item-img img {
    -webkit-user-drag: none;
    /* Léger filtre pour bien détacher l'objet du fond */
    filter: drop-shadow(2px 2px 4px rgba(0, 0, 0, 0.4));
}

.oc-item:hover {
    transform: translate(-50%, -50%) scale(1.2) !important;
    z-index: 1000 !important;
}

.oc-item.found {
    animation: oc-pop 0.3s forwards;
    pointer-events: none;
}

@keyframes oc-pop {
    0% {
        transform: scale(1);
        opacity: 1;
    }

    50% {
        transform: scale(1.5);
        opacity: 0.8;
    }

    100% {
        transform: scale(0);
        opacity: 0;
    }
}

.oc-shake {
    animation: oc-shake-anim 0.3s cubic-bezier(.36, .07, .19, .97) both;
    border-color: var(--error) !important;
}

@keyframes oc-shake-anim {

    10%,
    90% {
        transform: translate3d(-1px, 0, 0);
    }

    20%,
    80% {
        transform: translate3d(2px, 0, 0);
    }

    30%,
    50%,
    70% {
        transform: translate3d(-4px, 0, 0);
    }

    40%,
    60% {
        transform: translate3d(4px, 0, 0);
    }
}

.oc-time-feedback {
    position: absolute;
    font-size: 2.5rem;
    font-weight: bold;
    pointer-events: none;
    animation: oc-float-up 1s forwards;
    z-index: 2000;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.oc-time-feedback.pos {
    color: var(--success);
}

.oc-time-feedback.neg {
    color: var(--error);
}

@keyframes oc-float-up {
    0% {
        transform: translate(-50%, -50%) scale(0.5);
        opacity: 0;
    }

    20% {
        transform: translate(-50%, -100%) scale(1.2);
        opacity: 1;
    }

    100% {
        transform: translate(-50%, -200%) scale(1);
        opacity: 0;
    }
}

@media (max-width: 950px) {
    .oc-item {
        font-size: 2rem;
    }

    .oc-scene {
        aspect-ratio: 4/3;
        /* Un peu plus carré sur petit écran paysage */
    }
}

@media (max-width: 600px) and (orientation: portrait) {
    .oc-scene {
        aspect-ratio: 1;
    }
}

/* ========================================================================
   22. JEU : BLIND TEST
   ======================================================================== */

.blindtest-container {
    max-width: 800px;
    margin: 0 auto;
}

.blindtest-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    background: var(--card-bg);
    padding: 1rem;
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

.bt-game {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
}

.bt-player-container {
    background: var(--card-bg);
    width: 100%;
    max-width: 400px;
    padding: 3rem 1rem;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 200px;
}

.bt-status {
    margin-top: 1.5rem;
    color: var(--text-secondary);
    font-size: 1.1rem;
    text-align: center;
}

/* Animation des ondes audio (Equalyzer) */
.audio-waves {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 6px;
    height: 60px;
}

.audio-waves span {
    display: block;
    width: 12px;
    height: 10px;
    background: var(--accent);
    border-radius: 6px;
    transition: height 0.2s ease;
}

/* État actif quand la musique joue */
.audio-waves.playing span {
    animation: bounce-wave 1.2s infinite ease-in-out alternate;
}

.audio-waves.playing span:nth-child(1) {
    animation-delay: 0.1s;
    animation-duration: 0.8s;
}

.audio-waves.playing span:nth-child(2) {
    animation-delay: 0.3s;
    animation-duration: 1.1s;
}

.audio-waves.playing span:nth-child(3) {
    animation-delay: 0.0s;
    animation-duration: 0.9s;
}

.audio-waves.playing span:nth-child(4) {
    animation-delay: 0.2s;
    animation-duration: 1.2s;
}

.audio-waves.playing span:nth-child(5) {
    animation-delay: 0.4s;
    animation-duration: 0.7s;
}

@keyframes bounce-wave {
    0% {
        height: 10px;
    }

    100% {
        height: 60px;
    }
}

.bt-question {
    font-size: 1.5rem;
    font-weight: 600;
    text-align: center;
}

.bt-options-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    width: 100%;
    max-width: 600px;
}

@media (min-width: 600px) {
    .bt-options-grid {
        grid-template-columns: 1fr 1fr;
    }
}

.bt-option-btn {
    background: var(--card-bg);
    border: 2px solid var(--border);
    color: var(--text-primary);
    padding: 1.25rem 1rem;
    font-size: 1.1rem;
    border-radius: var(--btn-radius);
    cursor: pointer;
    transition: all 0.2s ease;
    width: 100%;
    font-family: inherit;
    font-weight: 500;
}

.bt-option-btn:hover:not(:disabled) {
    background: var(--card-bg-alt);
    border-color: var(--accent);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.bt-option-btn:active:not(:disabled) {
    transform: translateY(0);
}

.bt-option-btn:disabled {
    cursor: default;
    opacity: 0.7;
}

/* Couleurs de réponse */
.bt-option-btn.correct {
    background: var(--success) !important;
    border-color: var(--success) !important;
    color: white !important;
}

.bt-option-btn.wrong {
    background: var(--error) !important;
    border-color: var(--error) !important;
    color: white !important;
    animation: shake 0.4s cubic-bezier(.36, .07, .19, .97) both;
}

.bt-next {
    padding: 1rem 3rem;
    font-size: 1.2rem;
}

.bt-replay {
    padding: 0.8rem 1.5rem;
    font-size: 1rem;
    display: none;
    /* Affiché uniquement si musique terminée sans réponse */
}

/* ========================================================================
   14. CLASSEMENT DES FAVORIS (DRAG & DROP)
   ======================================================================== */
.game-card {
    position: relative;
}

.drag-handle {
    position: absolute;
    top: 10px;
    left: 15px;
    font-size: 1.5rem;
    color: var(--text-secondary);
    cursor: grab;
    padding: 5px;
    border-radius: 5px;
    background: transparent;
    transition: all var(--transition);
    z-index: 10;
    line-height: 1;
}

.drag-handle:active {
    cursor: grabbing;
}

.drag-handle:hover {
    color: var(--accent);
    transform: scale(1.1);
}

.game-card.sortable-ghost {
    opacity: 0.4;
    border: 2px dashed var(--accent);
    background: transparent;
}

.game-card.sortable-drag {
    cursor: grabbing;
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.4);
    transform: scale(1.05);
}