Overstaying a visa is a big deal. You should not be counting days or nights because you should not let yourself be in the country anywhere near the expiry of a visa.
Instead, arrive a bit early to the airport, and analogously, don't run visas down to the last hour based on the minutiae of Moroccan timezones etc.
You're privileged if you're able to do so. In many occasions people have single-entry visas with one day leeway from tickets submitted to the consulate.