:root {
    --cam-green: #125740;
    --cam-gold: #F2C200;
    --cam-white: #FFFFFF;
    --wall-color: var(--cam-green);
    --pellet-color: var(--cam-gold);
    --background-color: #f0f0f0;
    --text-color: var(--cam-green);
}

body {
    margin: 0;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background-color: var(--background-color);
    font-family: 'Montserrat', sans-serif;
    overflow: hidden;
}

#game-container {
    position: relative;
    border: 5px solid var(--wall-color);
    width: 100%;
    height: 100%;
    max-width: 90vw;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    background-color: transparent;
}

canvas {
    display: block;
    background-color: #FFFFFF;
    width: 100%;
    height: auto;
    max-width: 100%;
    max-height: 70vh;
    object-fit: contain;
    opacity: 1;
    filter: none;
}

/* Désactiver le touch uniquement quand le jeu est actif */
.game-active #game-container {
    touch-action: none; /* Désactive le comportement tactile par défaut */
    user-select: none; /* Empêche la sélection de texte */
    -webkit-user-select: none;
    -webkit-touch-callout: none; /* Désactive le menu contextuel sur iOS */
}

.game-active canvas {
    image-rendering: pixelated;
    image-rendering: -moz-crisp-edges;
    image-rendering: crisp-edges;
    touch-action: none; /* Désactive le comportement tactile par défaut */
    user-select: none; /* Empêche la sélection */
    -webkit-user-select: none;
    -webkit-touch-callout: none;
}

#score-board, #lives {
    position: absolute;
    top: 10px;
    color: var(--text-color);
    font-size: 1.5em;
    font-weight: bold;
}

#score-board {
    left: 10px;
}

#lives {
    right: 10px;
}

#game-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    text-align: center;
    color: var(--text-color);
    padding: 20px;
    box-sizing: border-box;
}

#game-overlay h2 {
    font-size: 3em;
    color: var(--cam-green);
    margin-bottom: 20px;
}

#game-overlay p {
    font-size: 1.1em;
    margin: 20px 0;
    line-height: 1.4;
}

#controls-info {
    margin: 15px 0;
    font-size: 0.9em;
}

.control-method {
    margin: 8px 0;
    padding: 5px 10px;
    background-color: rgba(18, 87, 64, 0.1);
    border-radius: 5px;
}

.control-method strong {
    color: var(--cam-green);
}

#game-overlay button {
    padding: 12px 25px;
    font-size: 1.1em;
    border: none;
    border-radius: 5px;
    background-color: var(--cam-gold);
    color: var(--cam-green);
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.3s;
    margin-top: 10px;
}

#game-overlay button:hover {
    background-color: #dcb000;
}

/* Responsive pour tablettes */
@media (max-width: 768px) {
    #game-container {
        max-width: 95vw;
        max-height: 95vh;
        border-width: 3px;
    }
    
    canvas {
        max-height: 65vh;
    }
    
    #score-board, #lives {
        font-size: 1em;
        padding: 4px 8px;
        top: 5px;
    }
    
    #score-board {
        left: 5px;
    }
    
    #lives {
        right: 5px;
    }
    
    #game-overlay h2 {
        font-size: 2em;
    }
    
    #game-overlay p {
        font-size: 1em;
        margin: 15px 0;
    }
    
    #controls-info {
        font-size: 0.8em;
        margin: 10px 0;
    }
    
    .control-method {
        margin: 5px 0;
        padding: 4px 8px;
    }
    
    #game-overlay button {
        padding: 10px 20px;
        font-size: 1em;
    }
}

/* Responsive pour mobile */
@media (max-width: 480px) {
    #game-container {
        max-width: 100vw;
        max-height: 100vh;
        border-width: 2px;
    }
    
    canvas {
        max-height: 60vh;
    }
    
    #score-board, #lives {
        font-size: 0.9em;
        padding: 3px 6px;
        top: 3px;
    }
    
    #score-board {
        left: 3px;
    }
    
    #lives {
        right: 3px;
    }
    
    #game-overlay {
        padding: 15px;
    }
    
    #game-overlay h2 {
        font-size: 1.5em;
        margin-bottom: 15px;
    }
    
    #game-overlay p {
        font-size: 0.9em;
        margin: 10px 0;
    }
    
    #controls-info {
        font-size: 0.75em;
        margin: 8px 0;
    }
    
    .control-method {
        margin: 4px 0;
        padding: 3px 6px;
    }
    
    #game-overlay button {
        padding: 8px 16px;
        font-size: 0.9em;
        width: 80%;
        max-width: 200px;
    }
}

.hidden {
    display: none !important;
}
