Direct observation of the capillary mechanisms of liquid-liquid entrapment