Castres (9) 21
Tries: Inigo, Malonga Con: Bernard Pens: Teulet 3
Edinburgh (9) 16
Try: Webster Con: Paterson Pens: Paterson 2. Laidlaw
Webster made a try-scoring return from injury for Edinburgh
Edinburgh stumbled to a third consecutive Heineken Cup defeat despite a game showing away to Castres.
Having gone in at the break level at 9-9, the French side took advantage of Fraser McKenzie's sin-binning on 58 minutes to land two quick tries.
Vincent Inigo and Steve Malonga scored while Edinburgh were a man down.
The visitors responded with a late try from Simon Webster but the hosts held on for the victory that lifts them to second place in Pool One.
Romain Teulet slotted over three penalties in a scrappy first half, with Chris Paterson replying in kind twice and Greig Laidlaw landing a monster kick from inside his own half right on the interval.
The Scots made a strong start to the second period only to see the normally reliable Paterson miss a penalty.
And Rob Moffat's team were in trouble when flanker McKenzie was shown a yellow card for deliberately killing the ball at a ruck as Castres surged forward through former All Black Chris Masoe.
Almost immediately, Joe Tekori broke from the back of a scrum and fed Inigo to burst over in the corner.
Pierre Bernard missed the conversion but the home lead was extended soon after, with Tekori again at the heart of the attack as he set up Malonga to touch down.
Bernard made sure of his second conversion attempt to establish a 21-9 lead.
Castres were given a fright on 72 minutes when Webster, making his first appearance since damaging his Achilles in April, finished off after Ross Rennie had broken clear.
Scott Newlands and Roddy Grant continued the move and Webster crashed on to Laidlaw's pass to stretch out and score.
Paterson landed the conversion to narrow the gap yet further but there was to be no late heroics.
Edinburgh have now claimed a losing bonus point from all three of their Pool One games, following narrow losses to Cardiff and Northampton, but with only three games remaining, there now appears little chance of progressing further.
Castres: Teulet, Inigo, Cabannes, Tatupu, Andreu, McIntyre, Albouy, Hoeft, Kayser, Ducalcon, Murray, Kulemin, Malonga, Masoe, Tekori. Replacements: Bernard for Teulet (40), Denos for McIntyre (65), Sanchou for Albouy (57), Coetzee for Hoeft (57), Bonello for Kayser (57), Saayman for Ducalcon (65), Capo for Murray (51), Diarra for Malonga (79).
Edinburgh: Paterson, Thompson, Cairns, Houston, L. Jones, D. Blair, Laidlaw, Jacobsen, Ford, G. Cross, McKenzie, S. Turnbull, Newlands, Grant, Rennie. Replacements: Webster for D. Blair (57), Young for G. Cross (66), Lozada for S. Turnbull (66). Not Used: Kelly, Traynor, MacDonald, King, Grove.
Sin Bin: McKenzie (58).