Phase separation in confined systems