Geometric phases in superconducting nanocircuits