/* - Global */
:root {
  --index-max-width: 1200px;
  --index-padding-vertical: calc(1rem + 2vw);
  --index-padding-horizontal: .75rem;
  --index-separator-height: 1px;
  --index-separator-color: var(--color-2-1);
}
@media (min-width: 420px) {
  :root {
    --index-padding-vertical: calc(3rem + 2vw);
    --index-padding-horizontal: 4vh;
  }
}

/* - header */
body > header {
  display: flex;
  flex-direction: column;
}

/* Navbar */
#mainnav {
  background-color: var(--color-2-1);
}
#mainnav ul {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: .5rem;
  max-width: var(--index-max-width);
  height: 100%;
  margin: 0 auto;
  padding: .5rem var(--index-padding-horizontal);
  box-sizing: border-box;
}
#mainnav li {
  height: 100%;
}
#mainnav li a:first-child {
  display: flex;
  gap: .2rem;
}
#mainnav li a:first-child img:nth-of-type(2) {
  display: none;
}
#mainnav li:last-child {
  margin-left: auto;
}
#mainnav a {
  display: grid;
  height: 100%;
  color: white;
  font-weight: var(--font-weight-title-1);
  font-size: 1.1rem;
  text-decoration: none;
}
@media (min-width: 420px) {
  #mainnav li a:first-child img:nth-of-type(2) {
    display: unset;
  }
}

/* Title */
body > header h1 {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  width: 80%;
  max-width: calc(.8 * var(--index-max-width));
  padding: var(--index-padding-vertical) var(--index-padding-horizontal) calc(var(--index-padding-vertical) + var(--index-separator-height));
  margin: 0 auto;
  box-sizing: border-box;
  text-align: center;
}
body > header h1::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 20%;
  height: var(--index-separator-height);
  width: 60%;
  background-color: var(--index-separator-color);
}
body > header h1 .legend {
  font-family: var(--font-family-2);
  font-size: var(--font-size-title-2);
  font-weight: var(--font-weight-body-1);
}

/* - Main content */
body > main {
  width: 100%;
  max-width: var(--index-max-width);
  margin: 0 auto;
}

body > main > section {
  position: relative;
  padding: var(--index-padding-vertical) var(--index-padding-horizontal) calc(var(--index-padding-vertical) + var(--index-separator-height));
}
body > main > section:not(:last-child)::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: var(--index-padding-horizontal);
  height: var(--index-separator-height);
  width: calc(100% - (2 * var(--index-padding-horizontal)));
  background-color: var(--index-separator-color);
}

/* Texts */
body > main > section h2 {
  margin-bottom: 1rem;
  text-transform: uppercase;
}
body > main > section p:not(:last-child) {
  margin-bottom: 1rem;
}
body > main > section ul {
  padding-left: 1.5em;
  list-style: disc;
}
body > main > section ul:not(:last-child) {
  margin-bottom: 1rem;
}
body > main > section .cta {
  color: var(--color-2-1);
  font-weight: 800;
  text-decoration: none;
  font-size: 1.2em;
}
body > main > section .cta svg {
  height: 1em;
  fill: currentColor;
}
body > main > section .cta span {
  margin-left: .3em;
  vertical-align: .15em;
}

/* Split content */
body > main > section .split {
  display: grid;
  gap: calc(1rem + 2vw);;
}
body > main > section .split img {
  width: 100%;
  height: 100%;
  max-height: 20rem;
  max-width: 90%;
  margin: 0 auto;
  border-radius: .25rem;
  box-shadow: 0px 2px 4px 0px var(--color-1-2-1);
  object-fit: cover;
}
body > main > section .split img.flyer {
  width: auto;
  max-width: 100%;
}
@media (min-width: 600px) {
  body > main > section .split img {
    max-width: 30rem;
  }
}
@media (min-width: 782px) {
  body > main > section .split {
    gap: calc(2rem + 2vw);
  }
  body > main > section .split.left {
    grid-template-columns: auto minmax(1rem, 1fr);
  }
  body > main > section .split.right {
    grid-template-columns: minmax(1rem, 1fr) auto;
  }
  body > main > section .split img,
  body > main > section .split img.flyer {
    max-height: unset;
    max-width: unset;
    margin: unset;
    width: 16rem;
  }
  body > main > section .split img.flyer {
    height: auto;
  }
  body > main > section .split.right img {
    order: 1;
  }
}

/* Specific image positions */
body > main > section img[src="/public/images/Saucisson de France - 1.png"] {
  object-position: center 70%;
}
body > main > section img[src="/public/images/Saucisson de France - 10.png"] {
  object-position: center 80%;
}
body > main > section img[src="/public/images/Saucisson de France - 7.png"] {
  object-position: center 30%;
}

/* Specific content */
#contact a {
  padding: .75rem 1.25rem;
  border-radius: .25rem;
  background-color: var(--color-2-1);
  color: white;
  font-weight: 800;
  text-decoration: none;
  font-size: 1.2em;
}
#contact .split {
  align-items: center;
}
#contact .split > .content + div {
  display: flex;
  justify-content: center;
}

/* - Footer */
body > footer {
  padding: .2rem;
  background-color: var(--color-1-1);
  color: white;
  text-align: center;
  font-size: .75rem;
}
body > footer a {
  color: inherit;
}