Compounds of formula (I): wherein X, Y, A1, A2, Ra, Rb, Rc, Rd, R3, R4, T and R5 are as defined in the description. Medicinal products containing the same which are useful in treating pathologies involving a deficit in apoptosis, such as cancer, auto-immune diseases, and diseases of the immune system.