Théorème de Bachet-Bézout dans un anneau principal