Mechanics of rough contacts in elastic and viscoelastic thin layers. (September 2015)