Casimir effect and Radiative Heat Transfer with Nanostructured Systems