Here's an idea to come to Mahdia :
The best way to reach Mahdia is to come via Monastir airport and not Tunis airport.
Once arrived at Monastir airport:
In front of the airport exit there is a train station that takes you directly to Mahdia
The city of Mahdia is 200 km from Tunis carthage airport and about 20 km from Monastir airport
Once arrived at Tunis-Carthage airport:
1) You can take a taxi to Tunis train station (about 5km from the airport) to take the train to Sousse (http://www.sncft.com.tn/) then another train to Mahdia.
2) There is a second way to go to Mahdia, you can take a taxi to "Louage station" named Bab Alioua. There are some big cars (for 8 persons) that make the travel Tunis-Mahdia, you can find such cars at each time (about 8 Euros).
3) You can take a tourist Taxi from the airport directly to the hotel (50 euros).