Optoelectronic device comprising a substrate (350,450,550,750) and a stack of organic layers (370,470) comprising at least one active layer that can be a light-emitting layer (572,575,578) or a photodiode, disposed between a reflective surface, or between the surface of a transparent layer deposited directly on said reflective surface, and a semi-reflective surface disposed facing one another at a given distance and forming an optical cavity of a given optical length d, and said device comprising at least three groups of pixels (367a,367b,367c;767a,767b,767c), each group of which is characterized by a cavity of a different optical length d, said cavity comprising a number of bilayers arranged between said substrate and said stack of organic layers, each bilayer being formed by a first transparent and conductive layer (3561, 3562, 7561, 7562) of a first transparent and conductive material, and by a second transparent and conductive layer (3601, 3602, 7601, 7602) of a second transparent and conductive material, in direct contact with said first transparent and conductive layer, said first material being different than said second material, and in said device: - for a for a first group (367c, 767c) of pixels the number of bilayers is zero, - for a second group (367b,767b) of pixels, the number of bilayers is one, - for a third group of pixels, the number of bilayers is two or one, but in the latter case, said first layer of the bilayer associated with the third group of pixels is thicker than that of the second group of pixels, - for each additional group of pixels, if present, the number of bilayers increases by one with respect to the previous group or remains the same, but in the latter case, said first layer of the bilayer associated with the additional group of pixels is thicker than that of the preceding group of pixels, - knowing that the counting of the groups into first, second, third and, if necessary, so on follows an increasing order of the value of d, and in said device, for each of these bilayers said first conductive and transparent layer, counted from said substrate, has a lower resistance to a wet etching treatment than said second conductive and transparent layer, and in said device, for each group of pixels beyond the first, at least said first layer of the bilayer farthest from the substrate is protected laterally by said second layer of the bilayer. and said device comprising at least three groups of pixels (367a,367b,367c;767a,767b,767c), each group of which is characterized by a cavity of a different optical length d, said cavity comprising a number of bilayers arranged between said substrate and said stack of organic layers, each bilayer being formed by a first transparent and conductive layer (3561, 3562, 7561, 7562) of a first transparent and conductive material, and by a second transparent and conductive layer (3601, 3602, 7601, 7602) of a second transparent and conductive material, in direct contact with said first transparent and conductive layer, said first material being different than said second material, and in said device: - for a for a first group (367c, 767c) of pixels the number of bilayers is zero, - for a second group (367b,767b) of pixels, the number of bilayers is one, - for a third group of pixels, the number of bilayers is two or one, but in the latter case, said first layer of the bilayer associated with the third group of pixels is thicker than that of the second group of pixels, - for each additional group of pixels, if present, the number of bilayers increases by one with respect to the previous group or remains the same, but in the latter case, said first layer of the bilayer associated with the additional group of pixels is thicker than that of the preceding group of pixels, - knowing that the counting of the groups into first, second, third and, if necessary, so on follows an increasing order of the value of d, - for a for a first group (367c, 767c) of pixels the number of bilayers is zero, - for a second group (367b,767b) of pixels, the number of bilayers is one, - for a third group of pixels, the number of bilayers is two or one, but in the latter case, said first layer of the bilayer associated with the third group of pixels is thicker than that of the second group of pixels, - for each additional group of pixels, if present, the number of bilayers increases by one with respect to the previous group or remains the same, but in the latter case, said first layer of the bilayer associated with the additional group of pixels is thicker than that of the preceding group of pixels, - knowing that the counting of the groups into first, second, third and, if necessary, so on follows an increasing order of the value of d, and in said device, for each of these bilayers said first conductive and transparent layer, counted from said substrate, has a lower resistance to a wet etching treatment than said second conductive and transparent layer, and in said device, for each group of pixels beyond the first, at least said first layer of the bilayer farthest from the substrate is protected laterally by said second layer of the bilayer.