Warm molecular layers in protoplanetary disks