// camera update — dans la fonction update(dt) const targetX = player.x - W/2 + player.w/2; const targetY = player.y - H/2 + player.h/2; camera.x += (targetX - camera.x) * camera.smooth; camera.y += (targetY - camera.y) * camera.smooth;