The even-phase diffractive optical element that produces four equi-intense diffraction orders with maximum efficiency is derived. A full-wave electromagnetic analysis is performed to study the behavior of the device in the resonance domain. Moreover, such full-wave analysis agrees with the scalar prediction in the limit of very large values of the grating period. Design curves for the transmission efficiency as a function of the grating period and of the incidence angle are presented. The effects of quantization of the phase profile to a discrete number of phase levels are considered. The optimization of a simple structure with only four phase levels is reported, showing good results in terms of diffraction efficiency and angular bandwidth.