French PM resigns after election losses