@font-face {
  font-family: SecularOne;
  src: url("./fonts/SecularOne.ttf") format('truetype');
  font-display: swap;
}

@font-face {
  font-family: WickedGrit;
  src: url("./fonts/WickedGrit.ttf") format('truetype-variations');
  font-display: swap;
}

:root {
  --fond: #fff;
  --couleur-texte: #000;
  --rouge-asm: #de1f1b;
  --rouge-asm-clair: #ffe4e4;

  font-size: 10px;
  font-family: SecularOne, sans-serif;
  scroll-behavior: smooth;
  scroll-padding-top: 8rem;
}

* {
  box-sizing: border-box;
}

html {
  max-width: 45rem;
  padding: 1rem;
  margin-inline: auto;
  background-color: var(--fond);
}

header {
  display: flex;
  gap: 2rem;
  align-items: center;
  text-align: end;
  color: var(--couleur-texte);
}

header > img {
  width: 20%;
}

header > h1 {
  flex: 1;
  font-family: WickedGrit, sans-serif;
  font-size: clamp(3.2rem, 4vw, 4rem);
  margin: 0;
  text-transform: uppercase;
  justify-self: end;
  white-space: nowrap;
}

nav {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  width: 100%;
  position: sticky;
  top: 0;
  background-color: var(--fond);
  padding-block: 2rem;
  z-index: 1;
}

nav > a {
  color: var(--rouge-asm);
  text-decoration: none;
  display: inline-block;
  padding: 1rem 1.2rem;
  font-size: 1.6rem;
  font-family: WickedGrit, sans-serif;
  text-align: center;
  background-color: var(--rouge-asm-clair);
  border-radius: 1rem;
  white-space: nowrap;
}

section {
  margin-block: 4rem;
  color: var(--couleur-texte);
}

section:first-of-type {
  margin-block-start: 0;
}

section > h2 {
  font-family: WickedGrit, sans-serif;
  font-size: 5rem;
  text-transform: uppercase;
  text-align: center;
  margin-block: 2rem;
  color: var(--rouge-asm);
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

section > ul {
  padding: 0;
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

section > ul > li {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0 0.4rem;
}

section > ul > li > span:where(.produit, .prix) {
  font-size: 2rem;
}

section > ul > li > span.produit {
  display: flex;
  align-items: baseline;
  gap: 0.4rem;
}

section > ul > li > span.produit::after {
  content: '';
  display: inline-block;
  border-bottom: 2px dotted var(--couleur-texte);
  flex: 1;
  white-space: nowrap;
}

section > ul > li > span.description {
  font-size: 1.4rem;
}

div.consigne {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  width: 100%;
  align-items: end;
  gap: 2rem;
  border: 0.2rem solid var(--rouge-asm);
  border-radius: 1rem;
  padding: 1rem;
  margin-block: 3rem;
}

div.consigne > :is(b, p) {
  grid-column: span 2;
  text-align: center;
  font-size: 1.6rem;
}

div.consigne > b {
  font-size: 2rem;
}

div.consigne > img {
  width: 40%;
}

div.consigne > span {
  font-size: 1.4rem;
  text-align: center;
}

div.consigne > :is(img, span) {
  justify-self: center;
}

div.consigne > p {
  margin: 0;
}

@media (prefers-color-scheme: dark) {
  :root {
    --fond: #171717;
    --couleur-texte: #fff;
    --rouge-asm: #de1f1b;
    --rouge-asm-clair: #ffe4e4;
  }
}

@media screen and (min-width: 590px) {
  :root {
    font-size: 12px;
  }
}

@media screen and (min-width: 928px) {
  :root {
    font-size: 18px;
  }
}