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

html {
  scroll-behavior: smooth;
}

@media all {
  .container {
    display: inline-block;
    align-content: start;
    gap: 10px;
    break-after: always;
  }

  header {
    padding: 15px;
    height: 100vh;
    background-color: var(--tonique);
    color: white;
    background-clip: border-box;
  }

  .page-break {
    break-after: always;
  }

  /*vue d'arrivée sur le site*/
  .landing {
    position: relative;
    overflow: hidden;
    background-position: center;
    background-repeat: no-repeat;
    filter: none;
    background-size: contain;
    transition: none;
    animation: landingImg infinite 10s;
    height: 80%;
    margin-top: 1%;
    animation-timing-function: step-start;
  }

  @keyframes landingImg {
    0% {
      background-image: url(../img/landing/landing1.jpg);
    }

    9% {
      background-image: url(../img/landing/landing2.jpg);
    }

    18% {
      background-image: url(../img/landing/landing3.jpg);
    }

    27% {
      background-image: url(../img/landing/landing4.jpg);
    }

    36% {
      background-image: url(../img/landing/landing5.jpg);
    }

    45% {
      background-image: url(../img/landing/landing6.jpg);
    }

    54% {
      background-image: url(../img/landing/landing7.jpg);
    }

    63% {
      background-image: url(../img/landing/landing8.jpg);
    }

    72% {
      background-image: url(../img/landing/landing9.jpg);
    }

    81% {
      background-image: url(../img/landing/landing10.jpg);
    }

    90% {
      background-image: url(../img/landing/landing11.jpg);
    }

    100% {
      background-image: url(../img/landing/landing6.jpg);
    }
  }

  #presentation {
    height: 100vh;
  }

  body {
    font-family: "Chantier Regular", sans-serif;
    font-weight: 100;
  }

  h1 {
    font-family: "Chantier Bold", sans-serif;
    font-weight: 100;
    line-height: 20px;
    font-size: 17pt;
  }

  h2, h3, h4, h5 {
    margin-bottom: 0;
    font-weight: 100;
  }

  h2, h3, h4 {
    font-family: "Chantier Bold", sans-serif;
    font-weight: 300;
  }

  i {
    font-family: "Chantier Italic", sans-serif;
    font-style: normal;
  }

  /* apparence des éléments en catalan*/
  .cat {
    font-family: "Chantier Italic", sans-serif;
  }

  .cat>i {
    font-family: "Chantier Regular", sans-serif;
  }

  em {
    font-family: "Chantier Bold", sans-serif;
  }

  ul, li {
    list-style-type: none;
    padding: 0;
  }

  a, a:visited {
    font-family: "Chantier Constructed", sans-serif;
    color: var(--tonique);
    padding: 3px;
    white-space: normal;
    text-decoration: none;
  }

  /*liens dans la navbar*/
  nav>a, nav>a:visited, footer>a, footer>a:visited, header>div>a, header>div>a:visited {
    color: var(--white);
    white-space: nowrap;
  }

  nav>a:hover {
    color: var(--tonique);
  }

  a:hover {
    color: var(--white);
  }

  /*flèche devant lien*/
  a:before {
    content: "→ ";
  }

  p {
    text-indent: 15pt;
    font-size: 11pt;
  }

  figcaption {
    font-size: 8pt;
  }

  figure {
    padding-bottom: var(--margin);
  }

  .flex-item {
    box-sizing: border-box;
    display: inline-block;
    align-content: start;
  }

  .center {
    justify-content: center;
    align-items: center;
  }

  footer {
    position: relative;
    left: 0;
    bottom: 0;
    width: 100%;
    background-color: var(--tonique);
    color: white;
    text-align: center;
    padding-top: 1em;
    padding-bottom: 3.5em;
    ;
  }

  .nomargin {
    margin: 0;
    margin-left: var(--margin);
  }
}

@media screen {
  .print-only {
    display: none;
  }

  img {
    max-width: 100%;
    max-height: 100%;
  }
}

@media only screen and (min-width: 768px) {

  /* tablets and desktop */
  /*système 3 colonnes*/
  .flex-row {
    display: flex;
    align-items: start;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 1em;
    margin: var(--margin);
  }

  /*1/3col*/
  .f33 {
    width: 33%;
  }

  /*2/3col*/
  .f66 {
    width: 66%;
  }

  /*3/3col*/
  .f100 {
    width: 100%;
  }

  nav {
    position: fixed;
    bottom: 0;
    left: 0;
    padding-left: 15px;
    min-height: 35px;
    width: 100%;
    background-color: var(--tonique);
    background-clip: border-box;
    z-index: 10;
    text-align: center;
  }

  /*pour éviter que les légendes soient trop longues*/
  figcaption {
    max-width: 33vw;
  }
}

@media only screen and (max-width: 767px) {

  /* portrait phones */
  .flex-row {
    display: flex;
    align-items: flex-start;
    flex-wrap: wrap;
    gap: 0.5em;
    margin: var(--margin);
    margin-top: var(--margin);
  }

  nav {
    position: fixed;
    bottom: 0;
    left: 0;
    padding-left: 10px;
    padding-bottom: 10px;
    padding-top: 8px;
    width: 100%;
    background-color: var(--tonique);
    background-clip: border-box;
  }
}

@media print {
  .screen-only {
    display: none;
  }

  .landing {
    position: relative;
    overflow: hidden;
    background-position: center;
    background-repeat: no-repeat;
    filter: none;
    background-size: contain;
    transition: none;
    animation: none;
    height: 60%;
    margin-top: 2%;
    /* une seule image à choisir pour la version imprimée*/
    background-image: url(../img/landing/landing8.jpg);
  }

  .flex-row {
    display: flex;
    align-items: start;
    flex-direction: row;
    flex-wrap: nowrap;
    break-after: page;
    break-inside: avoid-page;
    break-before: auto;
    gap: 1em;
    margin: var(--margin);
  }

  .f33 {
    width: 33%;
    max-height: 100%
  }

  .f66 {
    width: 66%;
    max-height: 100%
  }

  .f100 {
    max-width: 100%;
    max-height: 100%
  }

  img {
    max-width: 100%;
    max-height: calc(100% - 7em);
    position: relative;
  }

  figcaption {
    max-width: calc(29cm / 3);
    position: relative;
  }

  img.left {
    top: 0;
    left: 0;
    margin: var(--margin);
    margin-bottom: 0;
    position: absolute;
  }

  /* images verticales plus hautes que la page*/
  img.right {
    position: absolute;
    top: 0;
    right: 0;
    margin: var(--margin);
    margin-bottom: 0;
  }

  /* mettre dans une div les <figcaption> pour qu'elles
apparaissent correctement */
  img.left+div {
    position: absolute;
    top: calc(100% - 6.8em);
    left: 0;
    margin: var(--margin);
  }

  img.right+div {
    position: absolute;
    top: calc(100% - 6.8em);
    left: 628px;
    margin: var(--margin);
  }

  nav {
    display: none;
  }

  /*pas de saut de page automatique après*/
  .nobreakafter {
    break-after: avoid;
    break-inside: auto;
  }

  /*saut de page après*/
  .breakbefore {
    break-before: always;
  }

  a:after {
    content: " (" attr(href) ")";
    font-size: 80%;
  }

  .bottom {
    position: absolute;
    bottom: 0;
    left: 0;
    margin-right: var(--margin);
    margin-bottom: 0;
  }

  footer {
    position: absolute;
    bottom: 0;
    left: 0;
    break-before: page;
    padding-top: 0;
    padding-bottom: 1.5em;
  }
}

@page {
  size: A4 landscape;
  orphans: 5;
  widows: 5;
  margin-top: 0mm;
  margin-bottom: 0mm;
  margin-right: 0mm;
  margin-left: 0mm;
  padding-left: 0mm;
}