GALICS I: A hybrid N-body semi-analytic model of hierarchical galaxy formation