# Configuration du jeu Duel Force

# Dimensions
WINDOW_WIDTH = 1000
WINDOW_HEIGHT = 700
GAME_WIDTH = 1000
GAME_HEIGHT = 600

# Couleurs (thème rouge/blanc)
COLOR_BG = "#C41E3A"
COLOR_BUTTON = "#8B0000"
COLOR_BUTTON_HOVER = "#B01030"
COLOR_TEXT = "#FFFFFF"
COLOR_GAME_BG = "#FFF5F5"
COLOR_PLATFORM = "#335C81"
COLOR_PLAYER1 = "#e74c3c"
COLOR_PLAYER2 = "#f39c12"
COLOR_HEALTH_BAR = "#FFFFFF"
COLOR_HEALTH_BG = "#8B0000"

# Joueurs
PLAYER_WIDTH = 70
PLAYER_HEIGHT = 110
PLAYER_SPEED = 20
JUMP_FORCE = -24
GRAVITY = 1
MAX_JUMPS = 2
MAX_HEALTH = 100

# Combat
ATTACK_DAMAGE = 10
ATTACK_RANGE = 60
ATTACK_COOLDOWN = 300
SPECIAL_DAMAGE = 25
SPECIAL_COOLDOWN = 1800

# Projectiles
PROJECTILE_SPEED = 35
PROJECTILE_WIDTH = 12
PROJECTILE_HEIGHT = 12
PROJECTILE_COLOR_P1 = "#e74c3c"
PROJECTILE_COLOR_P2 = "#f39c12"

# Knockback
NORMAL_KNOCKBACK_FORCE = 8
SPECIAL_KNOCKBACK_BASE = 35
SPECIAL_KNOCKBACK_MAX_MULTIPLIER = 4.0

# Plateformes
PLATFORM_COLOR = "#335C81"
GROUND_HEIGHT = 550

# Contrôles joueur 1 (ZQSD)
P1_CONTROLS = {
    'left': 'q',
    'right': 'd',
    'jump': 'z',
    'attack': 'a',
    'special': 'e'
}

# Contrôles joueur 2 (Flèches + 0/Entrée)
P2_CONTROLS = {
    'left': 'Left',
    'right': 'Right',
    'jump': 'Up',
    'attack': '0',
    'special': 'Return'
}


def load_controls():
    """Charge les contrôles depuis keybindings.py"""
    try:
        import keybindings
        bindings = keybindings.load_keybindings()
        global P1_CONTROLS, P2_CONTROLS
        P1_CONTROLS = bindings['player1']
        P2_CONTROLS = bindings['player2']
    except Exception as e:
        print(f"Erreur chargement contrôles: {e}")


load_controls()

# Paramètres généraux
SETTINGS = {
    'difficulty': 'Normal',
    'sound': True,
    'music': True,
    'volume': 70
}
