:root {
    --board-bg: #f0d9b5;
    --board-dark: #b58863;
    --bg-color: #121212;
    --card-bg: rgba(24, 24, 24, 0.95);
    --accent: #6366f1;
    --accent-hover: #4f46e5;
    --accent-glow: rgba(99, 102, 241, 0.3);
    --text-color: #f8f8f8;
    --muted: #b0b0b0;
    --border: rgba(255, 255, 255, 0.1);
    --gradient-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --gradient-accent: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    --shadow-lg: 0 20px 40px rgba(0, 0, 0, 0.4);
    --shadow-md: 0 10px 20px rgba(0, 0, 0, 0.3);
    --shadow-sm: 0 4px 12px rgba(0, 0, 0, 0.2);
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: radial-gradient(circle at top, #1c2838, #0b1018 55%, #050609 100%);
    color: var(--text-color);
    min-height: 100vh;
}

h1, h2, h3 {
    margin: 0;
}

a {
    color: inherit;
}

.container {
    width: 100%;
    max-width: 1600px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Layout 3 colonnes moderne */
.game-container {
    display: grid;
    grid-template-columns: minmax(280px, 16%) 1fr minmax(300px, 18%);
    gap: 0.5rem;
    max-width: 98vw;
    width: 100%;
    margin: 0 auto;
    padding: 0.5rem;
    align-items: start;
    position: relative;
    z-index: 1;
}

@media (max-width: 1200px) {
    .game-container {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .sidebar {
        display: none;
    }
}

.app-header {
    position: relative;
    padding: 2rem 0 1rem;
    text-align: center;
    overflow: hidden;
}

.header-gradient {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 100%;
    background: var(--gradient-primary);
    opacity: 0.15;
    filter: blur(40px);
    transform: translateY(-50%);
}

.header-content {
    position: relative;
    z-index: 1;
}

.logo-section {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 0.8rem;
}

.chess-icon {
    font-size: 3.5rem;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.app-header h1 {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 700;
    letter-spacing: 0.02em;
    background: linear-gradient(135deg, #fff 0%, #a0a0ff 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.header-subtitle {
    margin-top: 0.8rem;
    opacity: 0.7;
    font-size: clamp(0.95rem, 2vw, 1.1rem);
    line-height: 1.6;
}

/* Sidebars */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    position: sticky;
    top: 1rem;
    z-index: 2;
}

.sidebar-left {
    order: 1;
}

.sidebar-right {
    order: 3;
}

/* Cards élévées */
.card-elevated {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: var(--shadow-lg);
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.card-elevated:hover {
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-2px);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
}

.card-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 1.2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.card-icon {
    font-size: 1.5rem;
}

.card-header h2 {
    font-size: 1.1rem;
    font-weight: 600;
    letter-spacing: 0.02em;
}

.card-body {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
}

/* Zone centrale - Échiquier */
.board-area {
    order: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    position: relative;
    z-index: 2;
}

/* Pièces d'échecs - z-index élevé pour le drag & drop */
.chessboard img,
.chessboard .piece,
img[data-piece],
img[src*="chesspieces"] {
    position: relative;
    z-index: 100 !important;
}

.board-controls-top {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    width: 100%;
}

.icon-btn {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--card-bg);
    border: 1px solid var(--border);
    color: var(--text-color);
    font-size: 1.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-sm);
}

.icon-btn:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: scale(1.1);
    box-shadow: var(--shadow-md);
}

.board-wrapper {
    width: 100%;
    max-width: min(80vh, 700px);
    position: relative;
}

.board-wrapper .chessboard {
    width: 100%;
    max-width: min(80vh, 700px);
    border-radius: 16px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    aspect-ratio: 1;
}

.board-actions {
    display: flex;
    gap: 1rem;
    width: 100%;
    max-width: min(80vh, 700px);
}

.controls-card {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Status card dans sidebar gauche */
.status-text {
    font-size: 0.95rem;
    line-height: 1.6;
    color: var(--text-color);
}

.turn-indicator {
    font-size: 0.9rem;
    color: var(--accent);
    font-weight: 600;
}

.last-move {
    font-size: 0.85rem;
    color: var(--muted);
    font-style: italic;
}

/* History card dans sidebar gauche */
.history-list {
    list-style: none;
    padding: 0;
    margin: 0;
    max-height: 400px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

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

.history-list::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
    border-radius: 3px;
}

.history-list::-webkit-scrollbar-thumb {
    background: var(--accent);
    border-radius: 3px;
}

.history-list li {
    padding: 0.5rem 0.8rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.history-list li:hover {
    background: rgba(255, 255, 255, 0.08);
    transform: translateX(4px);
}

/* Guide collapsible */
.guide-collapsible {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: 12px;
    overflow: hidden;
    transition: all 0.3s ease;
}

.guide-collapsible[open] {
    background: rgba(255, 255, 255, 0.05);
}

.guide-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.2rem;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.95rem;
    list-style: none;
    transition: all 0.3s ease;
}

.guide-header:hover {
    background: rgba(255, 255, 255, 0.05);
}

.guide-header::marker {
    content: '';
}

.guide-icon {
    font-size: 1.2rem;
}

.guide-content {
    padding: 0 1.2rem 1.2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.guide-section {
    padding: 0.8rem;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 8px;
    border-left: 3px solid var(--accent);
}

.guide-section h4 {
    margin: 0 0 0.5rem 0;
    font-size: 0.95rem;
    color: var(--accent);
}

.guide-section p {
    margin: 0;
    font-size: 0.85rem;
    line-height: 1.5;
    color: var(--muted);
}

.control-group {
    display: grid;
    gap: 0.4rem;
}

.control-group label {
    font-weight: 600;
    letter-spacing: 0.02em;
    font-size: 0.9rem;
}

.control-value {
    font-size: 0.85rem;
    color: var(--muted);
}

.mode-selector,
.color-selector,
.theme-selector {
    width: 100%;
    padding: 0.7rem 1rem;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-color);
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.3s ease;
    cursor: pointer;
}

.mode-selector:hover,
.color-selector:hover,
.theme-selector:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
}

.mode-selector:focus,
.color-selector:focus,
.theme-selector:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
    background: rgba(255, 255, 255, 0.1);
}

.mode-selector:disabled,
.color-selector:disabled,
.theme-selector:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

input[type="range"] {
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.1);
    outline: none;
    transition: all 0.3s ease;
}

input[type="range"]:hover {
    background: rgba(255, 255, 255, 0.15);
}

input[type="range"]::-webkit-slider-thumb {
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--accent);
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.4);
    transition: all 0.3s ease;
}

input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.2);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.6);
}

input[type="email"],
input[type="text"] {
    padding: 0.7rem 1rem;
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-color);
    font-size: 0.95rem;
    transition: all 0.3s ease;
}

input[type="email"]:focus,
input[type="text"]:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-glow);
    background: rgba(255, 255, 255, 0.1);
}

.how-to-play {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 0.8rem;
    margin-top: 0.5rem;
}

.how-to-play h3 {
    color: var(--primary);
    margin: 0;
    padding-left: 1.2rem;
    font-size: 0.9rem;
    font-weight: 600;
}

.how-to-play ol {
    margin: 0;
    padding-left: 1.2rem;
}

.how-to-play li {
    margin: 0.5rem 0;
    font-size: 0.85rem;
    line-height: 1.5;
}

.how-to-play p {
    margin: 0.6rem 0 0 0;
    font-size: 0.75rem;
    color: var(--muted);
    font-style: italic;
}

.instructions h4 {
    color: var(--accent);
    font-size: 1.1rem;
    margin: 1.5rem 0 0.8rem 0;
    font-weight: 600;
}

.instructions h4:first-child {
    margin-top: 0;
}

.instructions ol {
    margin: 0;
    padding-left: 1.5rem;
    list-style: none;
    counter-reset: step-counter;
}

.instructions li {
    margin: 0.8rem 0;
    font-size: 0.95rem;
    line-height: 1.6;
    counter-increment: step-counter;
    position: relative;
    padding-left: 0.5rem;
}

.instructions li::before {
    content: counter(step-counter) ".";
    position: absolute;
    left: -1.5rem;
    color: var(--accent);
    font-weight: 700;
    font-size: 1rem;
}

.instructions strong {
    color: var(--accent);
    font-weight: 600;
}

/* Sections de mode avec contours colorés */
.mode-section {
    background: rgba(255, 255, 255, 0.03);
    padding: 1rem 1.2rem;
    border-radius: 10px;
    margin-bottom: 1.2rem;
    border-left: 4px solid;
}

.mode-solo {
    border-left-color: #6fd3ff; /* Bleu pour Solo */
    background: rgba(111, 211, 255, 0.05);
}

.mode-solo h4 {
    color: #6fd3ff;
}

.mode-multi {
    border-left-color: #6fd3ff; /* Bleu pour Multijoueur */
    background: rgba(111, 211, 255, 0.05);
}

.mode-multi h4 {
    color: #6fd3ff;
}

.mode-section h4 {
    margin-top: 0;
    margin-bottom: 1rem;
}

.mode-section ol {
    margin-bottom: 0;
}

/* Astuce avec style similaire */
.tip-box {
    margin: 0 !important;
}

.tip-box em {
    background: rgba(255, 206, 84, 0.1);
    padding: 0.8rem 1.2rem;
    border-radius: 10px;
    display: block;
    border-left: 4px solid var(--accent);
    font-style: normal;
    color: #f0e6d2;
}

.btn {
    background: var(--accent);
    color: #fff;
    border: none;
    padding: 0.85rem 1.6rem;
    border-radius: 12px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    flex: 1;
}

.btn-icon {
    font-size: 1.1rem;
}

.btn-primary {
    background: var(--gradient-primary);
    font-size: 1rem;
}

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    background: var(--accent-hover);
}

.btn:active {
    transform: translateY(0);
    box-shadow: var(--shadow-sm);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-color);
    box-shadow: none;
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.25);
}

.btn-accent {
    background: var(--gradient-accent);
    color: #fff;
}

.btn-accent:hover {
    background: linear-gradient(135deg, #f5576c 0%, #f093fb 100%);
}

.btn-danger {
    background: rgba(239, 68, 68, 0.2);
    color: #fca5a5;
    border: 1px solid rgba(239, 68, 68, 0.3);
}

.btn-danger:hover {
    background: rgba(239, 68, 68, 0.3);
    box-shadow: 0 12px 25px rgba(239, 68, 68, 0.3);
}

.btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

.buttons {
    display: flex;
    gap: 1rem;
    margin: 1.5rem 0;
    flex-wrap: wrap;
}

.buttons .btn {
    flex: 1;
    min-width: 180px;
}

.hidden {
    display: none !important;
}

.join-hint {
    background: linear-gradient(135deg, rgba(106, 211, 255, 0.15), rgba(42, 167, 255, 0.1));
    border: 2px solid rgba(106, 211, 255, 0.3);
    border-radius: 12px;
    padding: 1rem;
    margin-bottom: 1rem;
    text-align: center;
}

.join-hint p {
    margin: 0.3rem 0;
    color: #6fd3ff;
}

.join-hint strong {
    color: #fff;
}

.multiplayer-panel {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 1rem;
    display: grid;
    gap: 1rem;
}

.multiplayer-section {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 0.9rem;
    display: grid;
    gap: 0.6rem;
}

.multiplayer-section h3 {
    font-size: 0.95rem;
    margin: 0;
    font-weight: 600;
    color: var(--accent);
}

.multi-field-row {
    display: flex;
    gap: 0.6rem;
    align-items: center;
}

.multi-field-row input[type="email"],
.multi-field-row input[type="text"] {
    flex: 1;
    padding: 0.55rem 0.75rem;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-color);
    font-size: 0.9rem;
}

.multi-field-row input:focus {
    outline: none;
    border-color: var(--accent);
}

.multi-hint {
    margin: 0;
    font-size: 0.8rem;
    color: var(--muted);
}

.session-status {
    font-size: 0.85rem;
    color: var(--muted);
}

.multi-actions {
    display: flex;
    gap: 0.6rem;
    flex-wrap: wrap;
}

.multi-actions .btn {
    flex: 1;
    min-width: 140px;
}

.controls .disabled-control {
    opacity: 0.5;
}

/* Ancien .board-section supprimé - utiliser .board-area */

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   🎯 MODE FULLSCREEN - COPIÉ DU VPS (QUI FONCTIONNE)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

body.focus-mode .app-header,
body.focus-mode .sidebar,
body.focus-mode .board-actions,
body.focus-mode .app-footer {
    display: none !important;
}

body.focus-mode {
    /* Garder le background du thème actif */
    overflow: hidden;
}

/* Désactiver toutes les animations CSS */
body.focus-mode,
body.focus-mode * {
    animation: none !important;
    transition: none !important;
}

body.focus-mode * {
    border: none !important;
    border-color: transparent !important;
    outline: none !important;
    box-shadow: none !important;
}

/* Désactiver TOUTES les animations en fullscreen */
body.focus-mode::before,
body.focus-mode::after {
    display: none !important;
    content: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
}

body.focus-mode *::before,
body.focus-mode *::after {
    display: none !important;
    content: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
}

body.focus-mode .game-container::before,
body.focus-mode .game-container::after {
    display: none !important;
}

body.focus-mode .container,
body.focus-mode .game-container {
    max-width: 100%;
    padding: 0;
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
}

body.focus-mode .board-area {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
}

body.focus-mode .chessboard {
    max-width: 90vh;
    max-height: 90vh;
    width: 90vh !important;
    height: 90vh !important;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    border-radius: 0 !important;
}

/* Retirer le border-radius de toutes les cases */
body.focus-mode .chessboard * {
    border-radius: 0 !important;
}

body.focus-mode .board-wrapper {
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
}

body.focus-mode .board-controls-top {
    display: none;
}

body.focus-mode #fullscreen-btn {
    position: fixed !important;
    top: 20px !important;
    right: 20px !important;
    z-index: 10000 !important;
    display: flex !important;
}

/* Bouton audio en mode focus */
.focus-audio-btn {
    position: absolute;
    top: 80px;
    right: 10px;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.6);
    border: 2px solid rgba(0, 243, 255, 0.3);
    border-radius: 50%;
    width: 48px;
    height: 48px;
    cursor: pointer;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
    display: none;
    align-items: center;
    justify-content: center;
}

.focus-audio-btn:hover {
    background: rgba(0, 243, 255, 0.2);
    border-color: var(--neon-cyan);
    transform: scale(1.1);
}

.focus-audio-icon {
    font-size: 1.5rem;
    display: block;
    line-height: 1;
}

body.focus-mode .focus-audio-btn {
    display: flex !important;
    position: fixed !important;
    top: 80px !important;
    right: 20px !important;
}

/* Anciens styles supprimés - utiliser les nouveaux styles de sidebar */

.app-footer {
    text-align: center;
    padding: 2.5rem 0;
    opacity: 0.6;
}

/* Responsive breakpoints */
@media (max-width: 768px) {
    .board-wrapper {
        max-width: 100%;
    }

    .app-header {
        padding: 2rem 0 1.5rem;
    }

    .board-actions {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .board-wrapper {
        max-width: 100%;
    }

    .app-header {
        padding: 1.5rem 0 1rem;
    }

    .card-elevated {
        padding: 1rem;
    }
}

/* Media queries pour grandes tailles supprimées - utiliser le nouveau layout grid */

/* ============================================
   Personnalisation des Couleurs de l'Échiquier
   Palettes Harmonisées par Thème de Pièces
   ============================================ */

/* PALETTE PAR DÉFAUT - Classique (Beige/Marron) */
/* Les couleurs sont maintenant appliquées dynamiquement par JavaScript */
/* selon le thème de pièces sélectionné */

/* ============================================
   PALETTES PAR THÈME DE PIÈCES
   Décommentez la palette correspondant au thème choisi
   ============================================ */

/* PALETTE MERIDA - Élégant (Crème/Brun) */
/* Harmonisée avec le thème Merida (pièces élégantes) */
/*
.white-1e1d7 {
    background-color: #f5e6d3 !important;
    color: #a67c52 !important;
}
.black-3c85d {
    background-color: #a67c52 !important;
    color: #f5e6d3 !important;
}
*/

/* PALETTE CBURNETT - Lichess Classique (Vert/Beige) */
/* Harmonisée avec le thème Cburnett (style Lichess) */
/*
.white-1e1d7 {
    background-color: #eeeed2 !important;
    color: #769656 !important;
}
.black-3c85d {
    background-color: #769656 !important;
    color: #eeeed2 !important;
}
*/

/* PALETTE ALPHA - Moderne (Gris Bleu) */
/* Harmonisée avec le thème Alpha (design moderne) */
/*
.white-1e1d7 {
    background-color: #e8ecf0 !important;
    color: #7fa3b0 !important;
}
.black-3c85d {
    background-color: #7fa3b0 !important;
    color: #e8ecf0 !important;
}
*/

/* PALETTE PIROUETTI - Minimaliste (Blanc/Gris) */
/* Harmonisée avec le thème Pirouetti (formes simples) */
/*
.white-1e1d7 {
    background-color: #ffffff !important;
    color: #999999 !important;
}
.black-3c85d {
    background-color: #d0d0d0 !important;
    color: #ffffff !important;
}
*/

/* PALETTE CHESSNUT - Bois (Bois Clair/Bois Foncé) */
/* Harmonisée avec le thème Chessnut (effet bois naturel) */
/*
.white-1e1d7 {
    background-color: #f4e4c1 !important;
    color: #8b6f47 !important;
}
.black-3c85d {
    background-color: #8b6f47 !important;
    color: #f4e4c1 !important;
}
*/

/* ============================================
   PALETTES ALTERNATIVES UNIVERSELLES
   ============================================ */

/* PALETTE VERTE CLASSIQUE - Style Chess.com */
/*
.white-1e1d7 {
    background-color: #eeeed2 !important;
    color: #769656 !important;
}
.black-3c85d {
    background-color: #769656 !important;
    color: #eeeed2 !important;
}
*/

/* PALETTE BLEUE OCÉAN */
/*
.white-1e1d7 {
    background-color: #e3f2fd !important;
    color: #1976d2 !important;
}
.black-3c85d {
    background-color: #1976d2 !important;
    color: #e3f2fd !important;
}
*/

/* PALETTE VIOLETTE ROYALE */
/*
.white-1e1d7 {
    background-color: #f3e5f5 !important;
    color: #7b1fa2 !important;
}
.black-3c85d {
    background-color: #7b1fa2 !important;
    color: #f3e5f5 !important;
}
*/

/* PALETTE ROUGE BORDEAUX */
/*
.white-1e1d7 {
    background-color: #fce4ec !important;
    color: #ad1457 !important;
}
.black-3c85d {
    background-color: #ad1457 !important;
    color: #fce4ec !important;
}
*/

/* PALETTE NOIRE ÉLÉGANTE - High Contrast */
/*
.white-1e1d7 {
    background-color: #2c2c2c !important;
    color: #ffffff !important;
}
.black-3c85d {
    background-color: #0a0a0a !important;
    color: #ffffff !important;
}
*/

/* ============================================
   CONTRÔLES AUDIO
   ============================================ */

.audio-controls {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin-top: 0.5rem;
}

.audio-toggle-btn {
    min-width: 60px;
    padding: 0.4rem 0.8rem;
    font-weight: 600;
    transition: all 0.2s;
}

.audio-toggle-btn.active {
    background: var(--accent);
    color: #000;
}

.audio-toggle-btn.inactive {
    background: #444;
    color: #999;
}

.volume-slider {
    flex: 1;
    height: 6px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.1);
    outline: none;
    appearance: none;
    -webkit-appearance: none;
}

.volume-slider::-webkit-slider-thumb {
    appearance: none;
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--accent);
    cursor: pointer;
    transition: all 0.2s;
}

.volume-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

.volume-slider::-moz-range-thumb {
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: var(--accent);
    cursor: pointer;
    border: none;
    transition: all 0.2s;
}

.volume-slider::-moz-range-thumb:hover {
    transform: scale(1.2);
}

.volume-value {
    min-width: 45px;
    text-align: right;
    font-size: 0.9rem;
    color: var(--muted);
    font-weight: 500;
}

.audio-indicator {
    font-size: 1.2rem;
    margin-left: 0.5rem;
    transition: all 0.2s;
}

.audio-indicator.muted {
    opacity: 0.3;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   🎨 v8 - DESIGN CYBERPUNK PANNEAUX (CSS UNIQUEMENT)
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

/* Variables cyberpunk */
:root {
    --neon-cyan: #00f3ff;
    --neon-magenta: #ff00ff;
    --glass-bg: rgba(15, 5, 30, 0.7);
    --glass-border: rgba(0, 243, 255, 0.3);
}

/* Panneaux Statut & Paramètres - Glassmorphism */
.sidebar {
    background: var(--glass-bg) !important;
    backdrop-filter: blur(20px) !important;
    border-radius: 24px !important;
    border: 2px solid var(--glass-border) !important;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.4),
        0 0 40px rgba(0, 243, 255, 0.1) !important;
    padding: 1.5rem !important;
    transition: all 0.3s ease !important;
}

.sidebar:hover {
    border-color: var(--neon-cyan) !important;
    box-shadow: 
        0 8px 32px rgba(0, 0, 0, 0.4),
        0 0 60px rgba(0, 243, 255, 0.3) !important;
    transform: translateY(-2px) !important;
}

/* Titres des panneaux */
.sidebar h2 {
    color: var(--neon-cyan) !important;
    font-size: 1.2rem !important;
    font-weight: 700 !important;
    margin-bottom: 1.5rem !important;
    text-transform: uppercase !important;
    letter-spacing: 1px !important;
    text-shadow: 0 0 10px rgba(0, 243, 255, 0.5) !important;
}

/* Labels */
.sidebar label {
    color: rgba(255, 255, 255, 0.9) !important;
    font-size: 0.9rem !important;
    font-weight: 500 !important;
    margin-bottom: 0.5rem !important;
    display: block !important;
}

/* Select & Input - Style cyberpunk */
.sidebar select:not(#theme),
.sidebar input[type="range"]:not(#audio-volume):not(.volume-slider) {
    width: 100% !important;
    padding: 0.75rem !important;
    background: rgba(0, 0, 0, 0.4) !important;
    border: 1px solid rgba(0, 243, 255, 0.3) !important;
    border-radius: 12px !important;
    color: var(--text-color) !important;
    font-size: 0.95rem !important;
    transition: all 0.3s ease !important;
    cursor: pointer !important;
}

/* Thème des pièces - Style spécifique */
.sidebar select#theme {
    width: 100% !important;
    padding: 0.75rem !important;
    background: rgba(0, 0, 0, 0.4) !important;
    border: 1px solid rgba(0, 243, 255, 0.3) !important;
    border-radius: 12px !important;
    color: var(--text-color) !important;
    font-size: 0.95rem !important;
    transition: all 0.3s ease !important;
    cursor: pointer !important;
}

.sidebar select:hover,
.sidebar select:focus {
    border-color: var(--neon-cyan) !important;
    background: rgba(0, 0, 0, 0.6) !important;
    box-shadow: 0 0 20px rgba(0, 243, 255, 0.3) !important;
    outline: none !important;
}

/* Range slider - Style néon */
.sidebar input[type="range"] {
    -webkit-appearance: none !important;
    height: 8px !important;
    background: linear-gradient(90deg, 
        rgba(0, 243, 255, 0.2) 0%, 
        rgba(0, 243, 255, 0.6) 100%) !important;
    border-radius: 10px !important;
    padding: 0 !important;
}

.sidebar input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none !important;
    width: 20px !important;
    height: 20px !important;
    background: var(--neon-cyan) !important;
    border-radius: 50% !important;
    cursor: pointer !important;
    box-shadow: 0 0 15px rgba(0, 243, 255, 0.8) !important;
    transition: all 0.2s ease !important;
}

.sidebar input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.2) !important;
    box-shadow: 0 0 25px rgba(0, 243, 255, 1) !important;
}

/* Toggle button (Sons rétro) - NE PAS écraser le bouton audio */
.sidebar button:not(#audio-toggle):not(.audio-toggle-btn) {
    padding: 0.75rem 1.5rem !important;
    background: linear-gradient(135deg, var(--neon-cyan), var(--neon-magenta)) !important;
    border: none !important;
    border-radius: 12px !important;
    color: white !important;
    font-weight: 600 !important;
    font-size: 0.95rem !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
    box-shadow: 0 4px 15px rgba(0, 243, 255, 0.4) !important;
}

/* Bouton audio ON/OFF - Style préservé */
.sidebar #audio-toggle,
.sidebar .audio-toggle-btn {
    /* Garder le style original du bouton audio */
}

.sidebar button:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 6px 25px rgba(0, 243, 255, 0.6) !important;
}

.sidebar button:active {
    transform: translateY(0) !important;
}

/* Statut du jeu */
.sidebar p {
    color: rgba(255, 255, 255, 0.8) !important;
    font-size: 0.95rem !important;
    line-height: 1.6 !important;
    margin: 0.5rem 0 !important;
}

/* Historique */
.sidebar .history-item {
    background: rgba(0, 0, 0, 0.3) !important;
    padding: 0.5rem !important;
    border-radius: 8px !important;
    margin: 0.5rem 0 !important;
    border-left: 3px solid var(--neon-cyan) !important;
}

/* Guide rapide */
.sidebar .guide-item {
    display: flex !important;
    align-items: center !important;
    gap: 0.5rem !important;
    padding: 0.5rem !important;
    background: rgba(0, 0, 0, 0.2) !important;
    border-radius: 8px !important;
    margin: 0.5rem 0 !important;
}

.sidebar .guide-item::before {
    content: "💡" !important;
    font-size: 1.2rem !important;
}

/* Responsive - Garder les panneaux fonctionnels */
@media (max-width: 1200px) {
    .sidebar {
        border-radius: 16px !important;
        padding: 1rem !important;
    }
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   🔧 FIX - BOUTON FULLSCREEN VISIBLE
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

/* Bouton fullscreen - Style cyberpunk */
#fullscreen-btn {
    width: 48px !important;
    height: 48px !important;
    border-radius: 50% !important;
    background: rgba(0, 0, 0, 0.6) !important;
    border: 2px solid rgba(0, 243, 255, 0.4) !important;
    color: var(--neon-cyan) !important;
    font-size: 1.5rem !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    backdrop-filter: blur(10px) !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3) !important;
}

#fullscreen-btn:hover {
    background: rgba(0, 243, 255, 0.2) !important;
    border-color: var(--neon-cyan) !important;
    transform: scale(1.1) !important;
    box-shadow: 0 0 20px rgba(0, 243, 255, 0.6) !important;
}

#fullscreen-btn:active {
    transform: scale(0.95) !important;
}

/* Board controls top - Visible */
.board-controls-top {
    display: flex !important;
    gap: 1rem !important;
    justify-content: flex-end !important;
    margin-bottom: 1rem !important;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   🔊 BOUTON AUDIO FULLSCREEN
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

/* Bouton audio en mode fullscreen - Toujours visible */
#focus-audio-btn {
    width: 48px !important;
    height: 48px !important;
    border-radius: 50% !important;
    background: rgba(0, 0, 0, 0.6) !important;
    border: 2px solid rgba(0, 243, 255, 0.4) !important;
    color: var(--neon-cyan) !important;
    font-size: 1.5rem !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    backdrop-filter: blur(10px) !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3) !important;
}

#focus-audio-btn:hover {
    background: rgba(0, 243, 255, 0.2) !important;
    border-color: var(--neon-cyan) !important;
    transform: scale(1.1) !important;
    box-shadow: 0 0 20px rgba(0, 243, 255, 0.6) !important;
}

#focus-audio-btn:active {
    transform: scale(0.95) !important;
}

/* En mode fullscreen - Les 2 boutons visibles */
body.focus-mode #focus-audio-btn {
    display: flex !important;
    position: fixed !important;
    top: 80px !important;
    right: 20px !important;
    z-index: 10000 !important;
}

body.focus-mode #fullscreen-btn {
    position: fixed !important;
    top: 20px !important;
    right: 20px !important;
    z-index: 10000 !important;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   🔧 FIX FULLSCREEN - ICÔNE CROIX + CENTRAGE
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

/* Changer l'icône en mode fullscreen */
body.focus-mode #fullscreen-btn span::before {
    content: "✕" !important;
    font-size: 2rem !important;
    font-weight: 300 !important;
}

body.focus-mode #fullscreen-btn span {
    display: none !important;
}

body.focus-mode #fullscreen-btn::after {
    content: "✕" !important;
    font-size: 2rem !important;
    font-weight: 300 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

/* Bouton audio - Icône haut-parleur */
#focus-audio-btn span::before {
    content: "🔊" !important;
}

body.focus-mode #focus-audio-btn.muted span::before {
    content: "🔇" !important;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   🔊 FIX BOUTON AUDIO - CLASSE CORRECTE
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

/* Bouton audio avec la bonne classe */
.focus-audio-btn {
    width: 48px !important;
    height: 48px !important;
    border-radius: 50% !important;
    background: rgba(0, 0, 0, 0.6) !important;
    border: 2px solid rgba(0, 243, 255, 0.4) !important;
    color: var(--neon-cyan) !important;
    font-size: 1.5rem !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    display: none !important;
    align-items: center !important;
    justify-content: center !important;
    backdrop-filter: blur(10px) !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3) !important;
}

.focus-audio-btn:hover {
    background: rgba(0, 243, 255, 0.2) !important;
    border-color: var(--neon-cyan) !important;
    transform: scale(1.1) !important;
    box-shadow: 0 0 20px rgba(0, 243, 255, 0.6) !important;
}

.focus-audio-btn:active {
    transform: scale(0.95) !important;
}

/* En mode fullscreen - Bouton audio visible */
body.focus-mode .focus-audio-btn {
    display: flex !important;
    position: fixed !important;
    top: 80px !important;
    right: 20px !important;
    z-index: 10000 !important;
}

/* Icône audio */
.focus-audio-icon {
    font-size: 1.5rem !important;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   🔊 BOUTON AUDIO VISIBLE EN MODE NORMAL
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

/* Bouton audio visible en mode normal (override .hidden) */
.board-controls-top .focus-audio-btn {
    display: flex !important;
    position: relative !important;
    top: auto !important;
    right: auto !important;
}

/* Layout vertical des boutons en mode normal */
.board-controls-top {
    display: flex !important;
    flex-direction: column !important;
    gap: 0.5rem !important;
    align-items: flex-end !important;
    position: absolute !important;
    top: 1rem !important;
    right: 1rem !important;
    z-index: 100 !important;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   �� V9 - OPTIMISATION PANEL MULTIJOUEUR
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

/* Compacter les sections multijoueur */
.multiplayer-section {
    margin-bottom: 1rem !important; /* Réduit de 1.5rem à 1rem */
    padding: 1rem !important; /* Réduit de 1.5rem à 1rem */
}

.multiplayer-section h3 {
    font-size: 0.95rem !important; /* Réduit de 1.1rem */
    margin-bottom: 0.6rem !important; /* Réduit de 0.8rem */
    font-weight: 600 !important;
}

/* Optimiser les champs de saisie */
.multi-field-row {
    gap: 0.5rem !important; /* Réduit de 0.75rem */
    margin-bottom: 0.4rem !important; /* Réduit de 0.6rem */
}

.multi-field-row input {
    font-size: 0.85rem !important; /* Réduit */
    padding: 0.5rem 0.75rem !important; /* Réduit */
}

/* Réduire la taille des boutons */
.multi-field-row .btn {
    padding: 0.5rem 1rem !important; /* Réduit de 0.75rem 1.5rem */
    font-size: 0.85rem !important; /* Réduit de 0.95rem */
    white-space: nowrap !important;
}

/* Compacter les hints */
.multi-hint {
    font-size: 0.75rem !important; /* Réduit de 0.85rem */
    margin-top: 0.3rem !important; /* Réduit de 0.5rem */
    line-height: 1.3 !important;
    opacity: 0.7 !important;
}

/* Optimiser les actions multijoueur */
.multi-actions {
    gap: 0.5rem !important; /* Réduit de 0.75rem */
    margin-top: 0.6rem !important; /* Réduit de 1rem */
}

.multi-actions .btn {
    padding: 0.5rem 1rem !important; /* Réduit */
    font-size: 0.85rem !important; /* Réduit */
}

/* Session status plus compact */
.session-status {
    font-size: 0.85rem !important; /* Réduit de 0.95rem */
    padding: 0.6rem !important; /* Réduit de 0.8rem */
    margin-bottom: 0.6rem !important; /* Réduit de 1rem */
}

/* Réduire l'espacement du panel global */
.multiplayer-panel {
    padding: 0.75rem !important; /* Réduit de 1rem */
}

/* Optimiser le guide rapide */
.guide-collapsible {
    margin-top: 1rem !important; /* Réduit de 1.5rem */
}

.guide-section {
    padding: 0.6rem 0 !important; /* Réduit de 0.8rem */
}

.guide-section h4 {
    font-size: 0.9rem !important; /* Réduit */
    margin-bottom: 0.3rem !important; /* Réduit */
}

.guide-section p {
    font-size: 0.8rem !important; /* Réduit */
    line-height: 1.4 !important;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   �� V9 - OPTIMISATION SUPPLÉMENTAIRE PANEL MULTIJOUEUR
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

/* Réduire encore plus les espacements */
.multiplayer-section {
    margin-bottom: 0.75rem !important; /* Réduit de 1rem à 0.75rem */
    padding: 0.75rem !important; /* Réduit de 1rem à 0.75rem */
    border-radius: 8px !important;
}

.multiplayer-section:last-child {
    margin-bottom: 0 !important;
}

/* Titres encore plus compacts */
.multiplayer-section h3 {
    font-size: 0.9rem !important; /* Réduit de 0.95rem */
    margin-bottom: 0.5rem !important; /* Réduit de 0.6rem */
}

/* Supprimer les hints en mode compact */
.multi-hint {
    display: none !important; /* Masquer les textes explicatifs */
}

/* Réduire le padding du panel global */
.multiplayer-panel {
    padding: 0.5rem !important; /* Réduit de 0.75rem */
}

/* Optimiser les boutons d'action */
.multi-actions {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 0.4rem !important;
}

/* Session status plus discret */
.session-status {
    font-size: 0.8rem !important;
    padding: 0.5rem !important;
    margin-bottom: 0.5rem !important;
}

/* Guide rapide plus compact */
.guide-collapsible {
    margin-top: 0.75rem !important;
}

.guide-content {
    padding: 0.5rem !important;
}

.guide-section {
    padding: 0.4rem 0 !important;
}

.guide-section:last-child {
    padding-bottom: 0 !important;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   �� GUIDE RAPIDE DANS PANEL GAUCHE
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

/* Guide rapide dans le panel gauche */
.sidebar-left .guide-collapsible {
    margin-top: 1.5rem !important;
    background: var(--card-bg) !important;
    border: 1px solid var(--border) !important;
    border-radius: 18px !important;
    overflow: hidden !important;
}

.sidebar-left .guide-header {
    padding: 1rem 1.2rem !important;
    cursor: pointer !important;
    display: flex !important;
    align-items: center !important;
    gap: 0.75rem !important;
    background: var(--card-bg) !important;
    border: none !important;
    font-weight: 600 !important;
    font-size: 1.1rem !important;
    color: var(--neon-cyan) !important;
    transition: all 0.3s ease !important;
}

.sidebar-left .guide-header:hover {
    background: rgba(0, 243, 255, 0.05) !important;
}

.sidebar-left .guide-icon {
    font-size: 1.3rem !important;
}

.sidebar-left .guide-content {
    padding: 0 1.2rem 1.2rem !important;
}

.sidebar-left .guide-section {
    padding: 0.8rem 0 !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05) !important;
}

.sidebar-left .guide-section:last-child {
    border-bottom: none !important;
    padding-bottom: 0 !important;
}

.sidebar-left .guide-section h4 {
    font-size: 0.95rem !important;
    margin-bottom: 0.4rem !important;
    color: var(--text-primary) !important;
}

.sidebar-left .guide-section p {
    font-size: 0.85rem !important;
    line-height: 1.5 !important;
    color: var(--text-secondary) !important;
}

.sidebar-left .tip-box {
    background: rgba(0, 243, 255, 0.1) !important;
    border-left: 3px solid var(--neon-cyan) !important;
    padding: 0.6rem 0.8rem !important;
    border-radius: 6px !important;
    font-size: 0.85rem !important;
}

/* ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   �� BOUTONS TOUJOURS VISIBLES EN HAUT À DROITE
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ */

/* Positionner les boutons en absolute en haut à droite de l'échiquier */
.board-area {
    position: relative !important;
}

.board-controls-top {
    position: absolute !important;
    top: 1rem !important;
    right: 1rem !important;
    z-index: 100 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 0.75rem !important;
    align-items: flex-end !important;
}

/* Style des boutons (fullscreen et audio) */
.board-controls-top .icon-btn,
.board-controls-top .focus-audio-btn {
    width: 48px !important;
    height: 48px !important;
    border-radius: 50% !important;
    background: rgba(0, 0, 0, 0.7) !important;
    border: 2px solid rgba(0, 243, 255, 0.4) !important;
    color: var(--neon-cyan) !important;
    font-size: 1.5rem !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    backdrop-filter: blur(10px) !important;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.3) !important;
}

.board-controls-top .icon-btn:hover,
.board-controls-top .focus-audio-btn:hover {
    background: rgba(0, 243, 255, 0.2) !important;
    border-color: var(--neon-cyan) !important;
    transform: scale(1.1) !important;
    box-shadow: 0 0 20px rgba(0, 243, 255, 0.6) !important;
}

.board-controls-top .icon-btn:active,
.board-controls-top .focus-audio-btn:active {
    transform: scale(0.95) !important;
}

/* En mode fullscreen, positionner les boutons HORS de l'échiquier */
body.focus-mode .board-controls-top {
    position: fixed !important;
    top: 0 !important;
    right: 0 !important;
    display: flex !important;
    flex-direction: column !important;
    gap: 0.75rem !important;
    padding: 1rem !important;
    z-index: 10000 !important;
}

body.focus-mode #fullscreen-btn {
    position: relative !important;
    top: auto !important;
    right: auto !important;
    display: flex !important;
    width: 48px !important;
    height: 48px !important;
    border-radius: 50% !important;
    background: rgba(0, 0, 0, 0.7) !important;
    border: 2px solid rgba(0, 243, 255, 0.4) !important;
}

body.focus-mode .focus-audio-btn {
    position: relative !important;
    top: auto !important;
    right: auto !important;
    display: flex !important;
    width: 48px !important;
    height: 48px !important;
    border-radius: 50% !important;
    background: rgba(0, 0, 0, 0.7) !important;
    border: 2px solid rgba(0, 243, 255, 0.4) !important;
}
