[ The south did not just leave they then attacked the union fort which was a federal facility and declared themselves to be at with and in rebellion to the US ]
Precisely, had each southern state legislature held a sate vote to leave the union with at least 2/3 vote saying to leave, and then had state referendum(s) with 3/4 or more of the populace wanting to leave as well, they would have had a hell of a lot higher moral “high ground” to leave and then did nothing to antagonize the north then things would have turned out a hell of a lot differently.
Every Southern state had a referendum on secession. Many had a direct referendum vote. Others had a delegate selected referendum. The people of the South chose secession.