Designing Smart Electromagnetic Environments for Next-Generation Wireless Communications