Random walks on torus and random interlacements: Macroscopic coupling and phase transition