It can only be obtained in post game, after beating elite four + champion for the first time. After that Shauna (the girl who got the Pokemon starter weak to your starter.) Will tell you that Professor Sycamore wants to meet you in Lumiose city at the travel station. He gives you a pass to Kiloud city, once there meet up with your rival, they'll be at the very top of the hill (It's not very big but the area your rival appears in has a pond with a fence around it.) After that, battle them and when you win you get absolite.