The Mediterranean Sea is not an inland sea. By definition, an inland sea (or epeiric sea) is a shallow sea covering part of a continent, connected to the ocean only by a narrow strait or completely enclosed (like the Caspian Sea). The Mediterranean fails this test on two counts:
Average depth: ~1,500 m. Maximum: 5,267 m (Calypso Deep). It's a deep oceanic basin, not a shallow continental flooding.
The Strait of Gibraltar (14 km wide, 300–900 m deep) connects the Mediterranean to the Atlantic Ocean. While narrow relative to the Mediterranean's size, it allows massive, continuous two-way exchange: ~0.9 Sv (Sverdrups) of Atlantic water in at surface; denser Mediterranean water out at depth. This exchange drives the Mediterranean's thermohaline circulation and prevents it from becoming a stagnant, hypersaline lake (as it did during the Messinian Salinity Crisis, 5.96–5.33 Ma, when the strait closed).
Oceanographers classify the Mediterranean as a marginal sea of the Atlantic Ocean—a semi-enclosed basin connected by one or more straits, with distinct circulation and water properties. Other marginal seas: Caribbean, South China, Baltic, Red Sea.
So while it feels inland, hydrologically and geologically, the Mediterranean is an open, dynamic arm of the Atlantic.