Role of the surface in nuclear pairing