Photometric detection of internal gravity waves in upper main-sequence stars