Specifically in the case of Morocco, I imagine they have the biggest multiplier for anything above Y travel in the world. From what I can ascertain, Y departures are charged 100 Dirhams. Anything else is 400 Dirhams.
On upgrade, the whole ticket is repriced so you might also get a small hit (or gain) on all the other charges (YQ etc) if the exchange rate has moved.
At current exchange rates the 300 Dirhams difference is 27.90 Euros, so it looks like A3 has charged you the correct amount.