Excitons in confined systems: from quantum well to bulk behaviour