On the geometry of higher-spin gauge fields