Text this: Non-Hermitian waves in a continuous periodic model and application to photonic crystals