I found the answer in nav-menu.php, it wasn’t too complicated.
I just changed the foreach loop content like this :
if($item->classes[0] == 'subdomain1' && !empty( $item->menu_item_parent )){
$item->menu_item_parent="";
}elseif($item->classes[0] == 'main' && $sub != 'domain'){
unset($items[$key]);
}
Hope it can help !