Ultrathin and multicolour optical cavities with embedded metasurfaces