/* var(--rootem);* VARIABLES */

:root {
  --width: 30rem;
  --rootem: calc((100vw / 1) / 30);
}

/* MEDIA QUERIES / BREAKPOINTS */
/* min 350px par section? */

@media (width < 700px) {
  :root {
    --width: 30rem;
    --rootem: calc((100vw / 1) / 30);
  }
}
@media (700px <= width < 1050px) {
  :root {
    --width: 30rem;
    --rootem: calc((100vw / 2) / 30);
  }
}
@media (1050px <= width < 1400px) {
  :root {
    --width: 30rem;
    --rootem: calc((100vw / 3) / 30);
  }
}
@media (1400px <= width < 1921px) {
  :root {
    --width: 30rem;
    --rootem: calc((100vw / 4) / 30);
  }
}
@media (1921px <= width) {
  :root {
    --width: 30rem;
    --rootem: calc((100vw / 5) / 30);
  }
}

/* FONTFACES */

@font-face {
  font-family: Blemish-C;
  src: url(fonts/Blemish-C.woff2);
  font-display: swap;
}

@font-face {
  font-family: Blemish-D;
  src: url(fonts/Blemish-D.woff2);
  font-display: swap;
}

@font-face {
  font-family: EBGaramond-Variable;
  src: url(fonts/EB_Garamond/EBGaramond-VariableFont_wght.ttf);
  font-display: swap;
}

@font-face {
  font-family: Inter-Variable;
  src: url(fonts/Inter/Inter-VariableFont_opsz,wght.ttf);
  font-display: swap;
}

/* TODO back to fixed width so it s faster ?? */
/*
@font-face {
  font-family: Inter-Variable;
  src: url(fonts/Inter_18pt-Regular.tff);
  font-weight: normal;
}

@font-face {
  font-family: Inter-Variable;
  src: url(fonts/Inter_18pt-Medium.tff);
  font-weight: bold;
}
*/

/* BASIC THINGS */

* {
  box-sizing: border-box;
  padding: 0;
  margin: 0;

  /*outline: 1px solid red;*/
}

html {
  overflow-y: hidden;

  font-size: var(--rootem);
  font-family: Inter-Variable;
  font-weight: normal;
  font-variant-ligatures: none;
}

body {
  display: flex;
  overflow-x: scroll;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
}

/* GENERAL TYPOGRAPHY */

h1,
h2,
h3,
h4,
h5,
h6 {
  font-size: 1rem;
  font-weight: normal;
}

a {
  color: inherit;
  text-decoration: underline;
}

a:hover {
  text-decoration: underline;
}

ul {
  list-style-type: none;
}

/* common to nav and informations section */
h3 {
  margin-top: 3rem;
  margin-bottom: 1rem;
  text-transform: uppercase;
  font-weight: normal;
  font-family: Inter-Variable;
}

/* em in p with the right font */
p > em {
  /* TODO */
}

p > sup {
  font-size: 0.6em;
}

/* HEADER */

header {
  padding-top: 2rem;
  padding-left: 2rem;
  transform: skew(0deg, 10deg);
  letter-spacing: -0.1rem;
}

header * {
  font-size: 4.2rem;
  font-family: Blemish-C;
  font-weight: normal;
  transform: rotate(00deg);
  line-height: 1;
}

.level2.caps-header {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  /* z-index: 1000; */
  padding: 1rem;
  padding-bottom: 5rem;
  background: #fff;
}
.level2#informations {
  padding-bottom: 5rem;
}
.level2#edito {
  padding-bottom: 5rem;
}

.logo-centralvapeur {
  position: absolute;
  top: 1rem;
  right: 1rem;
  width: 4rem;
  height: auto;
}
.caps-header span {
  font-family: Blemish-D;
}

.dates-festival {
  /* height: 100%; */
}
.dates-festival p {
  font-size: 3rem;
  text-align: center;
  padding-top: 4rem;
  transform: skew(319deg, 0deg) rotate(-10deg);
  letter-spacing: 0.1rem;
}
.scritch {
  max-width: 100%;
}

/* ALL ITEMS (.level2 section) */

.level2 {
  height: 100dvh;
  padding: 2rem;
  padding-bottom: 2rem;
  flex: 0 0 var(--width);
  overflow-x: hidden; /* hide to compensate h2 scaling */
  overflow-y: scroll;
  scroll-snap-align: start;
  /*outline: 1px solid red;*/
}

.level2 > h2 {
  display: none;
}
/* NAV */

/* un bouton pour revenir à la nav rapidement */
#retour-sommaire {
  position: fixed;
  bottom: 0.2rem;
  right: 0.2rem;
  z-index: 100;
  font-size: 2rem;
  background-image: url("img/back4.jpeg");
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  mix-blend-mode: multiply;
  width: 10.6rem;
  height: 4.4rem;
  text-align: center;
  vertical-align: center;
}

/* remove margin top sur le premier h3 */
nav.level2 > ul:nth-child(1) > li:nth-child(1) > h3:nth-child(1) {
  margin-top: 0rem;
}

/* data-type=autre pour les items hors programmes */
nav > ul > li:last-of-type {
  margin-top: 4rem;
}
nav > ul > li:nth-last-of-type(1) > h3 {
  display: none;
}

/* we hide subtitles */
nav > ul > li > ul > li em {
  display: none;
}

nav a {
  text-decoration: inherit;
  display: block;
  padding: 0.35rem 0;
}

nav h3 {
  margin-top: 2rem;
  margin-bottom: 0.35rem;
  font-weight: 500;
}

nav br {
  display: contents;
}

/* data-type=édito (si on veut passer l'édito en haut du toc) */
/*
nav > ul > li:first-of-type {
    margin-bottom: 3rem;
}
nav > ul > li:first-of-type > h3 {
    display: none;
}
*/

/* ÉDITO */

#edito {
  display: flex;
  flex-direction: column;
  align-items: center;
  /* display: none; */
}

/* PROGRAMME ITEMS */

.prog {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
}

/* show item type */
section.prog:after {
  content: attr(data-type);
  margin-top: 1rem;
  order: 10;
  width: 100%;
  font-size: 2rem;
  text-transform: uppercase;
}

.prog > h2 {
  display: block;
  margin: 2rem 0;
  order: 2;

  text-align: center;
  font-family: EBGaramond-Variable;
  font-size: 6.2rem;
  font-weight: 500;
  line-height: 0.75;

  transform: scale(
    0.8,
    1
  ); /* scale in x not y so it doesn't fuck with the different title sizes */
  width: 111%; /* compensate scaling 0.90*/
  width: 117%; /* compensate scaling 0.85*/
  width: 125%; /* compensate scaling 0.80*/
}

.prog > h2 > em {
  margin-top: 1.5rem;
  display: block;
  text-align: center;
  font-family: Inter-Variable;
  font-weight: bold;
  font-size: 1.5rem;
  font-style: normal;
  line-height: 1;

  transform: scale(
    1.1,
    1
  ); /* scale in x not y so it doesn't fuck with the different title sizes */
  width: 90%; /* compensate scaling 0.90*/
}

/* date time and place */
.prog > ul:nth-of-type(1) {
  order: 1;
  width: 100%;

  display: flex;
  flex-direction: column;
  justify-content: center;

  list-style-type: none;
  font-family: Inter-Variable;
  font-size: 3.5rem;
  line-height: 0.9;
  text-align: center;
}

.prog > ul:nth-of-type(1) > li:nth-of-type(1) {
  text-align-last: justify;
}

.prog > ul:nth-of-type(1) a {
  text-decoration: inherit;
}

.prog > p {
  order: 4;
}

/*
#edito > p {
    font-family: Inter-Variable !important;
    font-weight: 400 !important;
    transform: scale(1, 1)!important;
    width: 100% !important;
    line-height: 1.1 !important;
    font-size: 1rem !important;
}
*/

/* le texte (same style as édito) */
.prog > p,
#edito > p {
  font-family: EBGaramond-Variable;
  font-weight: 500;
  font-size: 1.5rem;
  line-height: 0.9;
  text-indent: 3rem;

  /* TODO proper scaling*/
  transform: scale(
    0.85,
    1
  ); /* scale in x not y so it doesn't fuck with the different title sizes */
  width: 111%; /* compensate scaling 0.90*/
  width: 117%; /* compensate scaling 0.85*/
}

/* no indent first p */
.prog > p:nth-of-type(1),
#edito > p:nth-of-type(1) {
  text-indent: 0rem;
}

/* les informations supplémentaires */
.prog > ul:nth-of-type(2) {
  order: 4;
  margin-top: 2rem;
}

.prog > ul:nth-of-type(2) > li {
  margin-top: 0.5rem;

  list-style-type: none;
  text-align: center;
  font-size: 0.8rem;
  font-weight: bold;
  line-height: 1.2;
}
.prog > ul:nth-of-type(2) > li a {
  padding: 0.35rem;
  display: inline-block;
}
.prog > figure {
  display: flex;
  flex-direction: column;
  margin-top: 8rem;
  order: 5;
  align-self: flex-start;
  max-width: 100%;
}

.prog > figure > img {
  order: 2;
  max-height: 20rem;
  max-width: 100%;
  filter: grayscale(1);
}

.prog > figure > figcaption {
  order: 1;
  font-size: 0.8rem;
  margin-bottom: 0.2rem;
}

/* SPECIAL SELECTOR / EXCEPTIONS */

#hectographie-procédés-de-reproduction-en-petit-tirage > h2:nth-child(1) {
  letter-spacing: -0.1rem;
}

/* AUTRE */
#visites > h3:nth-child(1) {
  margin-top: 0;
}

#informations ul {
  list-style-type: circle;
  margin-left: 1rem;
}

/* INFORMATIONS PRATIQUES */

#lieux > ul > li {
  margin-top: 1rem;
}

#lieux a {
  text-decoration: none;
}

/* REMERCIEMENTS */

#remerciements ul {
  margin-top: 1rem;
}
#remerciements ul > li {
  list-style-type: circle;
}

/* logos */

#logos {
  /* display: none; */
}

#logos > h3 {
  display: none;
}

#logos > ul {
  margin-top: 2rem;
  display: flex;
  flex-wrap: wrap;
  flex-direction: row;
  gap: 1rem;
  list-style-type: none;
}

#logos > ul > li {
  width: calc((100% - 3rem) / 4);
}

#logos > ul > li > a {
  width: 100%;
  height: 100%;
}

#logos img {
  max-width: 100%;
}
.bandeau-soutient {
  margin-top: 1rem;
  text-align: center;
}
.bandeau-soutient ul {
  display: flex;
  flex-wrap: nowrap;
  flex-direction: row;
  gap: 1rem;
  list-style-type: none;
  justify-content: center;
  align-items: center;
}
.bandeau-soutient ul > li {
  margin-top: 0.5rem;
}

.bandeau-soutient img {
  max-width: 100%;
}
