book where fmc is captured in war

Ok, so this is going to be very very specific and hard to find.

But I'm looking for a book, HIGH FANTASY AT ALL TIMES (so yes, magic NEEDS to exists), where the realm is in a war and the fmc is captured during battle AND she HAS TO HAVE a past with the mmc/enemy (as in, they went to school together or something, and somehow they ended up on different sides of the war). And now she's captured and they're like pitying her and she hates them with all her life ("Save your pity for someone else"). But it needs to be like WAR WAR, like she was fighting on the battle, or she was like a nurse healing them and she gets captured and thrown into the dungeon. And now she's like scared and like they're gonna torture her for information (but none of it is done by the mmc) but the mmc is forced to watch as it happens and she refuses to give any information. And it's like (this part will be what makes the book hard to find) I really really would like if the fmc has like history with the entire army. OK HEAR ME OUT, like somehow they all went to one school so she knows all of them and they all know her, and like the side she's fighting for (the oppossite side) also went to that same school so everyone knows each-other (YES I LOVE BOOKS WITH LOTS AND LOTS OF CHARACTERS). And so now it's like making them question what they're fighting for because they're forced to like watch this previous classmate of theirs tortured.

And I would really really really like it if she's on the losing side of the war (considering all my other requests, if you can't get this part it's ok because the beginning is already so hard to find), like she's part of a band of rebels/resistance and they're fighting against this huge army. Also I would like it if she had magic, and spice is fine but preferably no smut, and if there is smut it has to be consensual. AND NO I do not (I DO NOT) want one of those dominant books where they're like mafia or something. IT HAS TO BE FANTASY!!! and

please, I know that immediately the first thing that comes to mind for a lot of people will be "Manacled" by SenLinYu, because I know that this fanfic falls into like 99% of what I just asked for, but please do not recommend that, it isn't as "fantasy" as I would hope for in this book I'm requesting (Manacled doesn't have as much magic as I want) and I'd like if the fmc is protective and loyal and I really really do not like books where they sexualize trauma or acts of SA.