Generalized Young's equation for rough and heterogeneous substrates: a microscopic proof.