The film's title is derived from the first verse of Arthur Rimbaud's 1870 poem "Roman": "On n'est pas sérieux quand on a dix-sept ans" ("When you are seventeen you aren't really serious"). Additionally, the poster's tagline, "L'adolescence est le seul temps où l'on ait appris quelque chose" ("Adolescence is the only period in which we learn anything") is taken from "In the Shadow of Young Girls in Flower", the second volume in Marcel Proust's novel "In Search of Lost Time". Both Rimbaud and Proust were known to be homosexual.
The film was produced by Fidélité Films. Shooting took place in around Bagnères-de-Luchon encompassing two different periods: a winter session, wrapped on 13 February 2015, and several weeks in the summer (from 25 June-31 July 2015). Téchiné choose to set the story in Southwest France in the Hautes-Pyrénées, with its mountainous landscapes, a region of the country rarely depicted in films. Téchiné commented: "I thought that would visually work very well. It also struck me that these mountains, with their evil charm and enchanting quality, seem to belong to a magical world like that of adolescence, which is lost when you enter the altogether more pragmatic adult world"
The script was written by Téchiné in collaboration with Céline Sciamma, director of three coming-of-age films: Water Lilies (2007), Tomboy (2011) and Girlhood (2014). About their collaboration, Téchiné explained: "I had a lot of admiration for what she's brought to French film, the innovative side of her work on adolescence, and I knew that my film would revolve around two teenagers. Moreover, I wanted the film to contain as little dialogue as possible, for it to be as physical as possible as you have these characters that aren't capable of putting their experience into words at all. In writing the screenplay, myself and Céline very much agreed on this, on creating something extremely minimalistic when it came to dialogue."
The film was shot in two sections, three weeks in the winter between January and February 2015, and five weeks in the summer between June and July of the same year.
For his 21st feature film, director André Téchiné returned to the theme of adolescent life more than twenty years after his success with Wild Reeds (1994).