/* ------------------------------------------------------------------ Styles fonctionnels */
body{
  margin: 0;
  overflow: hidden;
}

article{
  position: absolute;
  inset: 0;
  display: none;
}

article.visible{
  display: flex;
  align-items: flex-start;
  justify-content: flex-start;
  /* flex-wrap: wrap; */
}

#bar{
  position: fixed;
  bottom: 0;
  height: 2px;
  background: white;
}

#bar.animated{
  animation: baranim 30s linear 1 forwards;
}

@keyframes baranim{
  0%{
    width: 0;
  }

  66.666%{
    width: 100%;
    background: white;
  }

  100%{
    width: 100%;
    background: red;
  }
}

/* ------------------------------------------------------------------ Styles personnalisables */
:root{
  --padding: 40px;
  --basesize: 4vw;
}

@font-face{
  font-family: "meta-old-french";
  src: url("fonts/Meta-old-French.otf") format("opentype");
  font-weight: normal;
  font-style: normal;
}

@font-face{
  font-family: "ocr-pbi-newsletter";
  src: url("fonts/Ocr-Pbi-newsletter.otf") format("opentype");
  font-weight: normal;
  font-style: normal;
}

@font-face{
  font-family: "ocr-pbi-site";
  src: url("fonts/OCR-PBI-site.otf") format("opentype");
  font-weight: normal;
  font-style: normal;
}

@font-face{
  font-family: "meta-old-french-incisive";
  src: url("fonts/meta-old-french-incisive.otf") format("opentype");
  font-weight: normal;
  font-style: normal;
}

@font-face{
  font-family: "meta-old-french-links";
  src: url("fonts/meta-old-french-links.otf") format("opentype");
  font-weight: normal;
  font-style: normal;
}

@font-face{
  font-family: "meta-old-french-poem";
  src: url("fonts/meta-old-french-poem.otf") format("opentype");
  font-weight: normal;
  font-style: normal;
}

@font-face{
  font-family: "meta-old-french-bold";
  src: url("fonts/meta-old-french-bold.otf") format("opentype");
  font-weight: normal;
  font-style: normal;
}

@font-face{
  font-family: "meta-old-french-regular";
  src: url("fonts/meta-old-french-regular.otf") format("opentype");
  font-weight: normal;
  font-style: normal;
}

html{
  background-color: black;
  color: white;
}

article{
  text-align: left;
  font-size: var(--basesize);
  padding: var(--padding);
  line-height: 1.25;
}

h2{
  position: absolute;
  top: 0;
  left: 0;
  font-size: .35em;
  font-family: "meta";
  color: rgb(255, 255, 255);
  margin: 0;
  font-family: "meta-old-french-regular";
}

em{
  font-family: "meta-old-french-poem";
  font-weight: bold;
}

.indent {
  display: block;
  text-indent: 1em;
}

a{
  font-family: "meta-old-french-links";
  color: yellow;
}

a.links{
  position: absolute;
  top: 0;
  right: 0;
  font-size: .35em;
  line-height: 1.4;
  text-align: right;
}

a:hover{
  text-decoration-style: wavy;
  background-color: black;
}

p, ul{
  width: 37em;
  margin: 0;
}

p.legende{
  max-width: 45em;
  font-family: "meta-old-french-incisive";
  position: absolute;
  bottom: 0;
  right: 0;
  font-size: .35em;
  line-height: 1.4;
  padding: var(--padding);
  text-align: right;
}

.description{
  font-family: "meta-old-french-incisive";
}

ul{
  list-style-type: none;
  margin-top: 0;
  padding: 0;
}

ul li{
  padding-left:var(--padding);
} */

.bold{
  font-family: "meta-old-french-incisive";
}

/* Taille par défaut des images et vidéos */
img:first-of-type{
  margin-left: 3.5rem;
}

img{
  max-width: 100%;
  max-height: 80%;
  margin: 0;
  display: block;
  margin-left: 1.5rem;
}

video{
  width: 100%;
  height: 100%;
  object-fit: contain;
  margin: 0 auto;
  display: block;
}

/* Images “fullscreen” */
.cover img,
.cover video{
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.contain img,
.contain video{
  width: 100%;
  height: 100%;
  object-fit: contain;
}

/* Taille du texte */
.description{
  font-size: .3em;
  line-height: 1.2;
  bottom: 1em;
  position: absolute;
}

/* intégration youtube, vimeo, etc. */
.embedded{
  background: white;
  position: absolute;
  inset: var(--padding);
}
.embedded iframe{
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

/* ------------------------------------------------------------------ Vue grille */
.grid{
  --basesize: calc(2vw / 4.5);
  overflow: auto;
  background: #eee;
  padding: 2em;
}

.grid .slides{
  position: static;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 2em;
}

.grid article{
  display: flex;
  align-items: center;
  justify-content: flex-start;
  position: relative;
  overflow: hidden;
  background: black;
  aspect-ratio: 16 / 9;
  padding: 1em !important;
  box-shadow: rgba(0, 0, 0, 0.16) 0px 1px 4px;
  color: white;
}

.grid article::after{
  position: absolute;
  right: 0;
  top: 0;
  font-size: 18px;
  content: attr(data-id);
  background: black;
  width: 3ch;
  text-align: center;
  empty-cells: 3;
}

.grid .embed{
  align-self: center;
}

.grid .embed::before{
  position: absolute;
  inset: 0;
  content: attr(rel);
  -ms-flex-item-align: center;
  align-self: center;
  text-align: center;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 2em;
  padding: 2em;
  word-break: break-all;
  margin: 0 auto;
  color: yellow;
}

/* ------------------------------------------------------------------ Responsive */

@media only screen and (max-width: 1400px){
  body{
    overflow: visible
  }

  article.visible{
    flex-wrap: wrap;
    gap: 20px;
  }

  article{
    position: relative;
    padding: 0;
  }

  article img:last-of-type{
    padding-bottom: var(--padding);
  }

  img:first-of-type{
    margin-left: 0;
  }

  img{
    max-height: 75%;
  }

  h2{
    font-size: 1em;
    line-height: 1.2;
  }

  a.links{
    position: relative !important;
    padding-top: var(--padding);
    left: 0;
    text-decoration-style: wavy;
  }

  .description, a.links{
    font-size: 0.8em;
  }
  
  .description{
    bottom: 0;
    position: relative;
    margin-top: var(--padding);
    margin-left: 3rem;
  }

  img{
    max-width: 80%;
    padding: 0rem 5rem 2rem 5rem;
    margin-left: 0;
    margin: 0 auto;
  }

  h2 + p{
    padding-top: var(--padding);
  }
}