  The three-dimensional secular behavior of a system composed of a central star
and two massive planets is modeled semi-analytically in the frame of the
general three-body problem. The main dynamical features of the system are
presented in geometrical pictures allowing us to investigate a large domain of
the phase space of this problem without time-expensive numerical integrations
of the equations of motion and without any restriction on the magnitude of the
planetary eccentricities, inclinations and mutual distance. Several regimes of
motion of the system are observed. With respect to the secular angle
$\Delta\varpi$, possible motions are circulations, oscillations (around 0 and
$180^\circ$), and high eccentricity/inclination librations in secular
resonances. With respect to the arguments of pericenter, $\omega_1$ and
$\omega_2$, possible motions are direct circulation and high-inclination
libration around $\pm 90^\circ$ in the Lidov-Kozai resonance. The regions of
transition between domains of different regimes of motion are characterized by
chaotic behavior.
  We apply the analysis to the case of the two outer planets of the $\upsilon$
Andromedae system, observed edge-on. The topology of the 3--D phase space of
this system is investigated in detail by means of surfaces of section, periodic
orbits and dynamical spectra, mapping techniques and numerical simulations. We
obtain the general structure of the phase space, and the boundaries of the
spatial secular stability. We find that this system is secularly stable in a
large domain of eccentricities and inclinations.
