@font-face {
  font-family: "HealTheWeb-A";
  src:
    url("../fonts/HealTheWebA-Regular.woff") format("woff"),
    url("../fonts/HealTheWebA-Regular.woff2") format("woff2");
}

@font-face {
  font-family: "LT Saeda";
  src: url("../fonts/LTSaeada-3/LTSaeada-Bold.otf");
  font-weight: 700;
}

@font-face {
  font-family: "LT Saeda";
  src: url("../fonts/LTSaeada-3/LTSaeada-SemiBold.otf");
  font-weight: 600;
}

@font-face {
  font-family: "Overused Grotesk";
  src:
    url("../fonts/OverusedGrotesk-VF.woff") format("woff"),
    url("../fonts/OverusedGrotesk-VF.woff2") format("woff2");
}

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

:root {
  --ratio: 1.25;
  --s-5: calc(var(--s-4) / var(--ratio));
  --s-4: calc(var(--s-3) / var(--ratio));
  --s-3: calc(var(--s-2) / var(--ratio));
  --s-2: calc(var(--s-1) / var(--ratio));
  --s-1: calc(var(--s0) / var(--ratio));
  --s0: 1rem;
  --s1: calc(var(--s0) * var(--ratio));
  --s2: calc(var(--s1) * var(--ratio));
  --s3: calc(var(--s2) * var(--ratio));
  --s4: calc(var(--s3) * var(--ratio));
  --s5: calc(var(--s4) * var(--ratio));

  --couleur1: #ff595e;
  --couleur2: #ffca3a;
  --couleur3: #8ac926;
  --couleur4: #1982c4;

  --couleur1: #fff;
  --couleur2: #fff;
  --couleur3: #fff;
  --couleur4: #fff;

  --delay: 0.3s;
  --background: #fff;
  --text-color: #f23f1b;
}

html,
body {
  font-size: clamp(1rem, 0.5rem + 0.5vw, 1.4rem);
  line-height: 1.3;
  font-family: "Overused Grotesk", sans-serif;
}

body {
  font-size: var(--s0);
  color: var(--text-color);
}

/* TYPOGRAPHIE */
h1,
h2,
h3,
h4 {
  font-family: "HealTheWeb-A", monospace;
  font-family: "LT Saeda", monospace;
}

h1 {
  font-size: var(--s5);
}

h2 {
  font-size: var(--s2);
}

h3 {
  font-size: var(--s2);
}

h4 {
  font-size: var(--s1);
}

h5 {
  font-size: var(--s0);
}

* + h2,
* + h3,
* + h4,
* + h5,
* + h6 {
  line-height: 1.2;
  margin-top: var(--s3);
  margin-bottom: var(--s0);
}

/* IMAGES */
img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* LIENS */
a,
a:visited {
  color: var(--text-color);
}

a:hover,
a:focus-visible {
  text-decoration: none !important;
}

header,
footer {
  padding: 1rem 2rem;
}

/* HEADER */
header {
  background-color: var(--couleur2);
  position: fixed;
  top: 0;
  left: 0;
  display: flex;
  flex-flow: row wrap;
  gap: var(--s0);
  width: 100%;
  padding-right: 4rem;
}

header a:nth-child(2) {
  margin-right: auto;
}

#menu {
  position: fixed;
  top: 0;
  right: 0;
  height: 100%;
  width: min(45ch, 100%);
  background-color: var(--text-color);
  padding: var(--s2);
  padding-top: var(--s5);
  transform: translateX(100%);
  transition: transform ease-out 0.2s;
  z-index: 100;
}

#menu,
#menu a {
  color: var(--background);
  font-size: var(--s2);
}

#menu.open {
  transform: translateX(0);
}

#menu ul {
  list-style: none;
}

#menu li::before {
  content: "→";
  margin-right: var(--s-5);
}

#toggle-menu {
  z-index: 1000;
  position: absolute;
  top: var(--s-1);
  right: var(--s1);
  aspect-ratio: 1/1;
  background: transparent;
  border: none;
  cursor: pointer;
  height: var(--s3);
  width: var(--s3);
}

#toggle-menu svg {
  max-width: 100%;
  max-height: 100%;
  stroke: var(--text-color);
  stroke-width: 0.5rem;
}

/* Animation bouton menu */
#toggle-menu[aria-expanded="true"] {
  /* background: var(--couleur3); */
}

#toggle-menu[aria-expanded="true"] svg {
  stroke: var(--background);
}

#toggle-menu line {
  --duration: 0.2s;
  transition:
    transform ease-out var(--duration),
    rotate ease-out var(--duration),
    y ease-out var(--duration);
  transform-origin: center;
}

#toggle-menu[aria-expanded="true"] line.top {
  rotate: 45deg;
  transform: translateY(17px);
}

#toggle-menu[aria-expanded="true"] line.bottom {
  rotate: -45deg;
  transform: translateY(-16px);
}

/* FOOTER */
footer {
  margin-top: var(--s2);
  background-color: var(--background);
}

/* SKIP TO CONTENT */
.skip-link {
  position: absolute;
  background: var(--background);
}

.skip-link:not(:focus-visible) {
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border-width: 0;
}

/* MAIN */
main {
  padding: var(--s2);
  padding-top: calc(var(--s2) * 3);
  min-height: 100vh;

  display: flex;
  flex-direction: column;
  gap: var(--s3);
}

/* ARCHIVE */
.pagelist {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
  gap: var(--s0);
}

.pagelist li {
  position: relative;
  aspect-ratio: 4 / 3;
}

.pagelist li a {
  display: inline-block;
  margin: 1em;
  font-size: var(--s3);
  background: var(--background);
  padding: 0.3em 0.75em;
  border-radius: 0.2em;
  text-decoration: none;
}

.pagelist li h2 {
  display: inline;
}

.pagelist li .image-wrapper {
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: -1;
}

.pagelist li .image-wrapper img {
  object-fit: cover;
}

@media screen and (hover: hover) {
  .pagelist li a {
    opacity: 0;
    transition: opacity var(--delay);
  }

  .pagelist li img {
    transform: scale(1);
    transition: transform var(--delay);
  }

  .pagelist li:hover a,
  .pagelist li:focus-within a {
    opacity: 1;
  }

  .pagelist li:hover img,
  .pagelist li:focus-within img {
    transform: scale(1.01);
  }
}

.pagelist li h3 {
  margin-top: var(--s0);
}

.stretched-link::after {
  content: "";
  inset: 0;
  z-index: 1;
  position: absolute;
}

/* SINGLE */
main.single {
  display: flex;
  flex-flow: row wrap;
  /* grid-template-columns: 1fr 2fr; */
}

main.single > * {
  flex: 1 1 50%;
}

.single #texte {
  flex: 1 1 30%;
  min-width: min(100%, 300px);
  max-width: 800px;
}

/* .single .galerie-images { */
/*   flex: 1 1 70%; */
/* } */

.single-infos {
  list-style: none;
}

.single-infos span strong {
  text-transform: uppercase;
}

.single-content {
  padding: var(--s1) 0;
}

.galerie-images {
  display: flex;
  flex-direction: column;
  width: 100%;
  gap: var(--s0);
}

.galerie-images .image-wrapper {
  aspect-ratio: 4/3;
  height: 100%;
  width: 100%;
  overflow: hidden;
}

/* À PROPOS */
.a-propos {
  columns: 2 auto;
}

/* RESPONSIVE */
@media screen and (max-width: 549px) {
  #menu {
    width: 100%;
  }

  .pagelist {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  }
}
