Am I in the wrong?

My husband and I have been together 10 years and have two kids. I still think he’s great in a lot of ways but he frustrates tf out of me. 95% of parenting is down to me. Most of the cooking, keeping the kids rooms tidy, sorting their school clothes and bags out is all down to me. I almost feel like he’s checked out and I’ve tried having the conversation but he doesn’t agree. He also moans and nags alll the time about the things I don’t do and never appreciates the stuff I do do.

I’ve started talking more and more to this guy in work who is a few years older than me. The more I’ve got to know him the more amazing he is. He’s sweet, funny, caring. I’ve started going to work in his office so no one can find me and we just sit and talk through all the work. He hugged me once and now we cuddle most times a day. He’s married too with children but he’s just a nice guy. I was off work unwell last week and he messaged to say he missed me. Whenever we’re together we seem to find an excuse to hug or touch each other’s arm. He said today how much he likes giving me hugs and he tells me he loves me but it’s definitely jokey.

So I saw nothing wrong with any of this, it was just a harmless flirty friendship and him being there for me while I’m struggling. One of my friends had a bit of a go at me and said I’m essentially having an emotional affair and need to stop. Am I in the wrong or is my friend wrong?

Edit to add: wow, some of you guys are harsh. To answer your questions my husband has a female colleague who he’s really good friends with and talks about all the time and she’s confused in him about how bad her marriage is so I’m unsure what goes on with them and as much as I feel jealous as long as he’s not sleeping with her, I don’t mind. My husband does know I spend time alone with this man in his office because I’ve mentioned it to him and he says as long as it helps with getting my work done why wouldn’t I want to work with a friend. I haven’t specifically said that me and this guy hug because it’s not the sort of thing you drop into conversation but my husband knows I’m a fairly physical person and hug lots of my friends. He knows I’ve been round to my female boss’ house and sat cuddled up on the couch with her.

Thanks to everyone who put it nicely

And no I’m not a troll this my life…