/* VARIABLES */

:root {
  --width: 30rem;
  --rootem: calc((100vw / 1) / 30);
  --font-sans: "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-serif: "Times New Roman", Times, serif;
}

/* Keep variable fonts off the critical path on small/medium screens. */
@media (1050px <= width) {
  :root {
    --font-sans: Inter-Variable, "Helvetica Neue", Helvetica, Arial, sans-serif;
    --font-serif: EBGaramond-Variable, "Times New Roman", Times, serif;
  }
}

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

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

/* FONTFACES */

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

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

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

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

/* BASIC THINGS */

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

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

html {
  overflow-y: hidden;

  font-size: var(--rootem);
  font-family: var(--font-sans);
  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: var(--font-sans);
}

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

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

/* HEADER */

#header {
  position: relative;
}

/* Option A for header texts */
/*
#formats {
    position: absolute;
    top: 6rem;
    left: 0rem;

    font-size: 4.5rem;
    font-family: Blemish-C;
    font-weight: normal;
    transform: skew(0deg, 10deg) rotate(-45deg);
    line-height: 1;
}

#strasbourg {
    display: block;
    position: absolute;
    top: 16rem;
    right: -10rem;

    font-size: 4.5rem;
    font-family: Blemish-C;
    font-weight: normal;
    transform: skew(0deg, 10deg) rotate(80deg);
    line-height: 1;
}

#festival {
    display: block;
    position: absolute;
    top: 29rem;
    left: -2rem;
    width: 40rem;

    font-size: 1.7rem;
    font-family: Blemish-D;
    font-weight: normal;
    transform: skew(0deg, 10deg) rotate(30deg) scale(0.9,1.4);
    line-height: 1;
}

#date {
    display: block;
    position: absolute;
    top: 31.5rem;
    left: 7.0rem;
    width: 40rem;
    
    font-size: 2.5rem;
    font-family: Inter-Variable;
    font-weight: normal;
    transform: skew(0deg, 45deg) rotate(-80deg);
    line-height: 1;
}
*/

/* Option B for header texts */
#formats {
  margin-top: 4rem;
}
#formats,
#festival,
#strasbourg {
  margin-left: 2rem;
  display: block;
  font-size: 4.2rem;
  font-family: Blemish-C;
  font-weight: normal;
  transform: skew(0deg, 10deg) rotate(10deg);
  line-height: 1;
}

#date {
  display: block;
  font-size: 2.7rem;
  text-align: center;
  font-family: var(--font-sans);
  font-weight: normal;
  margin-top: 1rem;
  transform: skew(-319deg, 0deg) rotate(20deg);
  margin-top: 6rem;
  transform: skew(312deg, 0deg) rotate(-20deg);
  line-height: 1;
}

.caps-header span {
  font-family: Blemish-D;
}

#logo-centralvapeur {
  position: absolute;
  top: 2rem;
  right: 3.5rem;
  width: 4rem;
  height: auto;
}

/* ALL ITEMS (.level2 section) */

.level2 {
  height: 100dvh;
  padding: 2rem;
  padding-bottom: 4rem;
  flex: 0 0 var(--width);
  content-visibility: auto;
  contain-intrinsic-size: 100dvh 30rem;
  overflow-x: hidden; /* hide to compensate h2 scaling */
  overflow-y: scroll;
  scroll-snap-align: start;
}

.level2 > h2 {
  display: none; /* hide all titles */
}

/* NAV */

/* un bouton pour revenir à la nav rapidement */
#retour-sommaire {
  width: 12rem;
  height: 5.1rem;
  width: 9.6rem;
  height: 4.08rem;
  position: fixed;
  bottom: 0.4rem;
  right: 0.4rem;
  z-index: 100;

  background-image: url("webp/back.webp");
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  background-size: 75%;
  /*mix-blend-mode: multiply;*/
  background-color: #fff;
  border-radius: 100%;

  font-size: 2rem;
}

nav {
  margin-top: 4rem;
  text-align: center;
}

/* remove margin top sur le premier h3 */
nav > 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: 3rem;
  /*display: none;*/
}
nav > ul > li:last-of-type > h3 {
  display: none;
}

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

nav a,
nav h3 {
  /*
    display: flex;
    align-items: center;
    align-content: center;
    min-height: 20px;
    */
  text-decoration: inherit;
  font-size: 1rem;
}

nav h3 {
  margin-top: 1rem;
  margin-bottom: 0rem;
}

nav br {
  display: contents;
}

/* ÉDITO */

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

/* PROGRAMME ITEMS */

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

.prog * {
  /*outline: 1px solid red;*/
}

/* 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;

  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*/

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

  text-align: center;
  font-family: var(--font-serif);
  font-size: 6.2rem;
  font-weight: 500;
  line-height: 0.75;
}

.prog > h2 > em {
  display: block;
  margin-top: 1.5rem;

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

  text-align: center;
  font-family: var(--font-sans);
  font-weight: bold;
  font-size: 1.5rem;
  font-style: normal;
  line-height: 1;
}

/* 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: var(--font-sans);
  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;
}

/* le texte (same style as édito) */
.prog > p,
#édito > p {
  font-family: var(--font-serif);
  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),
#édito > 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 > 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;
}
#hectographie-procédés-de-reproduction-en-petit-tirage > h2:nth-child(1) > em {
  letter-spacing: -0rem;
}

/* INFORMATIONS */

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

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

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

#lieux a {
  text-decoration: none;
}

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

/* logos */

#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%;
  object-fit: contain;
  object-position: center;
}

.bandeau-soutient {
  margin-top: 1rem;
  text-align: center;
  display: none;
}
.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%;
}
