Magnetohydrodynamic shocks in diffuse clouds. III - The line of sight toward Zeta Ophiuchi