Custom post type permalink uses archive page to display posts

You should add the code you have in team.php to archive-team.php. Also, read this.

By default, WordPress matches the id of the custom post type to a file with the name archive-{custom_post_type_id}.php, and if it doesn’t exist it uses the archive.php file.