:root {
  --scale: 0.1;
  --space: 4vmin;
}

@media (prefers-reduced-motion) {   /* aucune idée du rôle */
  :root {
    --scale: 0;
  }
}

* {
  box-sizing: border-box;   /* les bordures sont incluses dans les éléments parents */
}

body {
  color: hsl(5, 15%, 5%);
  background-color: hsl(0, 0%, 95%);
}

.page-title {
  text-align: center;
  border: 0;
}

.page-title::after {    /* apparition d'une flèche pour indiquer la nécessité de scroller */
  content: url("Images/down-arrow.png");
  display: block;
  opacity: 0;
  transform: translateY(-24px);
  animation: fadein 800ms 500ms cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
}

.header {
  display: grid;
  place-items: center;  /* alignement de tous les items verticalement centré et distribue verticalement */
  min-height: calc(100vh - 88px);
}
.footer {
  display: grid;
  place-items: center;  /* alignement de tous les items verticalement centré et distribue verticalement */
  height: 50vh;
}
.section {
  transform-origin: center top;
  transform: scaleY(calc(1 - var(--scale)));    /* diminue la taille de la section pour permmettre un scroll */
}

.section > * {
  transform-origin: center top;
  transform: scaleY(calc(1 / (1 - var(--scale))));  /* augmente la taille du contenu pour retrouver une proportion normale */
}

.content {
  position: relative;
  margin: -50vh auto 0; /* règle la position de départ du contenu sur l'image */
  padding: var(--space);
  max-width: 100ch;
  width: calc(100% - var(--space));
  background: hsla(0, 0%, 95%, 0.9);
  box-shadow: 0 0 2em black;
}

.content > * + * {
  margin-top: 2rem; /* règles les marges internes entre éléments de contenu */
}

.content img {
  display: block;
  max-width: 100%;
  max-height: 50vh;
  margin-left: auto;
  margin-right: auto;
}

.image-container {
  position: sticky; /* fixe la position de l'image en sticky (collée en haut) quand on arrive dessus */
  top: 80px;
  width: 100%;
  height: 100vh;
  z-index: -2;
}

.image-container img {
  display: block;
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;    /* l'image remplit tout le bloc en gardant son ratio initial */
/*   filter: blur(1px);
    -webkit-filter: blur(1px);
    -moz-filter: blur(1px);
    -o-filter: blur(1px);
    -ms-filter: blur(1px); */
}

.image-container::after {   /* création du dégradé de bas d'image */
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 50%;
  background: linear-gradient(
    to bottom,
    hsla(0, 0%, 95%, 0) 0%,
    hsla(0, 0%, 95%, 0.013) 8.1%,
    hsla(0, 0%, 95%, 0.049) 15.5%,
    hsla(0, 0%, 95%, 0.104) 22.5%,
    hsla(0, 0%, 95%, 0.175) 29%,
    hsla(0, 0%, 95%, 0.259) 35.3%,
    hsla(0, 0%, 95%, 0.352) 41.2%,
    hsla(0, 0%, 95%, 0.45) 47.1%,
    hsla(0, 0%, 95%, 0.55) 52.9%,
    hsla(0, 0%, 95%, 0.648) 58.8%,
    hsla(0, 0%, 95%, 0.741) 64.7%,
    hsla(0, 0%, 95%, 0.825) 71%,
    hsla(0, 0%, 95%, 0.896) 77.5%,
    hsla(0, 0%, 95%, 0.951) 84.5%,
    hsla(0, 0%, 95%, 0.987) 91.9%,
    hsl(0, 0%, 95%) 100%
  );
}

@keyframes fadein { /* fais apparaitre la flèche (estomper) */
  to {
    opacity: 1;
    transform: translateY(0);
  }
}
