Infrared imaging is nowadays growing rapidly due to large-scale production of uncooled detectors. One of the potential evolution of these sensors is to integrate optical filtering capabilities to realize images on several spectral bands, allowing to extract information such as the chemical composition of the observed scene. In this thesis, we discuss the possibilities to realize these filtering functions by bi-periodic diffractive structures patterned at a sub-wavelength scale, which shows a resonant behaviour. To that extent, we have developed a modal approach based on the finite element method (FEM) adapted to diffractive structures of arbitrary geometry. If the modal analysis in unbounded domains is well known, it shows to be much more difficult in the unbounded case, revealing quasimodes associated with complex eigenvalues. Through a geometrical transformation of space, our method allows to treat a bounded problem where the free space is truncated by Perfectly Matched Layers (PML). This technique that allows us to find numerically an arbitrary number of eigenvalues has been validated in the scalar case by comparing it with a pole finding method in the complex plane. In addition, we show that it is possible to expand the solution of the problem with sources on the reduced eigenvectors basis. Thus we can obtain the coupling coefficients of a plane wave of frequency, incidence and arbitrary polarization with a particular mode, giving us valuable information on the conditions of excitation of resonances of the system. These methods, developed in detail in the scalar case, are generalized to the vector case. We also developed a numerical model to take into account index dispersion in the case of the spectral problem. In addition we use a FEM formulation suitable for the calculation of the diffraction of a plane wave by diffractive structures of arbitrary geometry, and have developed adaptive PMLs to treat the case of Wood anomalies for which the classical PMLs become ineffective. We then apply these techniques to the design of several bi-periodic structures realizing different filtering functions in the infrared and study their spectral properties. Finally, two types of filters, band cut in reflexion and bandpass in transmission, have been fabricated and experimentally characterized.