Electronic structure and interlayer magnetic couplings in metallic superlattices