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

:root {
  --coef: 1.2;
  --s0: 1rem;
  --s-1: calc(var(--s0) / var(--coef));
  --s1: calc(var(--coef) * var(--s0));
  --s2: calc(var(--coef) * var(--s1));
  --s3: calc(var(--coef) * var(--s2));
  --s4: calc(var(--coef) * var(--s3));
  --s5: calc(var(--coef) * var(--s4));

  --bg: white;
  --fg: black;
  --accent: #1e1e1e;
  --delay: 1s;
  --easing: cubic-bezier(0.87, 0, 0.13, 1);
  --max-width: 1100px;
  --stroke-width: 2px;
}

html,
body {
  scroll-behavior: smooth;
}

body {
  hyphens: auto;
  hyphenate-limit-chars: 6 3 3;
  background-color: var(--bg);
  color: var(--fg);
  margin: 0;
  font-family: serif;
  font-style: normal;
  font-weight: normal;
  transition:
    background-color var(--easing) var(--delay),
    color var(--easing) var(--delay);
  height: 100vh;
}

::-webkit-scrollbar {
  width: 3px;
}

::-webkit-scrollbar-track {
  background: var(--bg);
}

::-webkit-scrollbar-thumb {
  background: var(--fg);
}

::-webkit-scrollbar-thumb:hover {
  opacity: 0.8;
  cursor: grabbing;
}

body ::selection {
  background: var(--fg);
  color: var(--accent) !important;
}

img {
  max-width: 100%;
  max-height: 100%;
}

/* TYPO GENERAL */
html,
body {
  font-size: clamp(0.8rem, 0.65rem + 0.8vw, 1.4rem);
  color: var(--fg);
}

h1,
h2,
h3,
h4,
h5,
h6 {
  color: var(--fg);
  font-weight: normal;
  font-style: normal;
}

h1 {
  font-size: calc(var(--s5) * 2);
  text-align: center;
  margin-bottom: 1rem;
}

h1 ~ p {
  margin-bottom: 1rem;
  display: none;
}

h2 {
  font-size: var(--s3);
  margin-bottom: 1rem;
}
h3 {
  font-size: var(--s3);
}
h4 {
  font-size: var(--s2);
}
h5 {
  font-size: var(--s1);
}
h6 {
  font-size: var(--s0);
}

a,
a:visited {
  color: var(--fg);
}

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

p {
  line-height: 1.4;
  font-size: var(--s-1);
}

main {
  padding-block: 0;
  overflow-y: auto;
  height: 100%;
  font-size: var(--s0);
  scrollbar-color: var(--fg) var(--bg);
  scrollbar-width: auto;
}

#intro {
  display: none;
}

/* HEADER */
header.menu-temp {
  position: absolute;
  font-family: "Redaction_10-Bold-CVB";
  font-weight: normal;
  color: var(--bg);
  font-size: 5rem;
  -webkit-text-stroke: 0.01rem var(--fg);
  /* text-shadow: */
  /*   -0.1em 0.2rem 0 #00daaf, */
  /*   -0.2em 0.4rem 0 #0a78fe, */
  /*   -0.3em 0.6rem 0 #ae00e5, */
  /*   -0.4em 0.8rem 0 #ec015c; */
  text-shadow: 0 0 var(--fg);
  transition:
    all var(--easing) var(--delay),
    text-shadow 0.25s ease;
}

header.menu-temp:hover {
  text-shadow:
    -0.1em 0.2rem 0 #00daaf,
    -0.2em 0.4rem 0 #0a78fe,
    -0.3em 0.6rem 0 #ae00e5,
    -0.4em 0.8rem 0 #ec015c;
  cursor: pointer;
}

header.menu-temp span {
  position: fixed;
}

header.menu-temp a {
  color: var(--fg);
  transition: color var(--easing) var(--delay);
  text-decoration: none;
  -webkit-text-stroke: var(--stroke-width) var(--bg);
  margin: 0;
}

/* z-index dans cet ordre pour la version mobile */
header.menu-temp .nos {
  top: 0rem;
  left: 1rem;
  z-index: 1003;
}
header.menu-temp .futurs {
  top: 0rem;
  right: 1rem;
  z-index: 1002;
}
header.menu-temp .point {
  bottom: 0rem;
  left: 1rem;
  z-index: 1001;
}
header.menu-temp .net {
  bottom: 0rem;
  right: 1rem;
  z-index: 1000;
}

nav {
  position: fixed;
  bottom: 0;
  left: 0;

  width: 100%;
  background: transparent;
}

nav ul {
  font-size: var(--s2);
  display: flex;
  flex-flow: row wrap;
  justify-content: center;
  gap: 3rem;
  margin: 0 auto;
  border-radius: 1em;
  padding: 1rem 2rem;

  max-width: 100%;
  text-align: center;
}

/* MAIN */

ul.articles-list-home {
  list-style: none;

  display: flex;
  flex-flow: row wrap;
  justify-content: center;

  /* display: grid; */
  /* grid-template-columns: repeat(auto-fill, minmax(1fr, 350px)); */

  gap: 5rem;
  padding: 0rem 0.5rem;

  position: relative;
  transform: translateY(-25rem);
}

.articles-list-home li {
  min-width: 250px;
  max-width: 350px;
  flex: 1 1 50%;
  perspective: 1000px;
  position: relative;
}

.articles-list-home li:nth-last-child(-1n + 5)::after {
  content: " ";
  inset: 0;
  position: absolute;
  transform: translateY(calc(100% + 5rem));
  z-index: 100;
  border: ridge 0.4em var(--fg);
  border-radius: 60rem 60rem 1rem 1rem;
}

/* 4 colonnes */
@media screen and (max-width: 2226px) {
  ul.articles-list-home {
    transform: translateY(-25rem);
  }

  .articles-list-home li.empty:nth-child(1),
  .articles-list-home li.empty:nth-last-child(1) {
    display: none;
  }
}

/* 3 colonnes */
@media screen and (max-width: 1764px) {
  ul.articles-list-home {
    transform: translateY(-30rem);
  }

  .articles-list-home li.empty:nth-child(2),
  .articles-list-home li.empty:nth-last-child(2) {
    display: none;
  }

  .articles-list-home li:nth-last-child(2)::after {
    display: none;
  }
}

/* 2 colonnes */
@media screen and (max-width: 1283px) {
  ul.articles-list-home {
    transform: translateY(-30rem);
  }

  .articles-list-home li.empty:nth-child(3),
  .articles-list-home li.empty:nth-last-child(3) {
    display: none;
  }

  .articles-list-home li:nth-last-child(2)::after {
    display: block;
  }
}

/* 1 colonnes */
@media screen and (max-width: 807px) {
  ul.articles-list-home {
    transform: translateY(-40rem);
  }

  .articles-list-home li.empty:nth-child(4),
  .articles-list-home li.empty:nth-last-child(4) {
    display: none;
  }
}

.fenetre {
  position: relative;
  aspect-ratio: 1 / 2;
  color: var(--fg);
  background-color: var(--bg);
  position: relative;
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  border: ridge 0.4em var(--fg);
  padding: 1rem;
  --titre-height: 2.6rem;
}

/* ----- FENÊTRE ----- */
.fenetre,
.recto,
.recto .volet-devant,
.recto .volet-derriere,
.verso {
  border-radius: 60rem 60rem 1rem 1rem;
}

.recto,
.verso {
  position: absolute;
  inset: 0;
}

/* RECTO */
.recto {
  transition: transform ease var(--delay);
  transform: rotateY(0deg);
  transform-style: preserve-3d;
  transform-origin: center left;
  z-index: 10;
  border: ridge 0.4em var(--fg);
  inset: -0.3em;
  box-shadow: 0 0 1em var(--accent);
  bottom: var(--titre-height);
}

.recto .volet-devant,
.recto .volet-derriere {
  background-color: var(--bg);
  position: absolute;
  inset: 0;
  display: flex;
  flex-flow: column nowrap;

  -moz-backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}

li:hover .fenetre .recto,
li:focus-within .fenetre .recto {
  transform: rotateY(-160deg);
  transform-origin: center left;
}

.blason {
  flex: 1 1 auto;
  height: 90%;
  padding: 5rem 2rem 2rem 2rem;
}

.blason img {
  height: 100%;
  width: 100%;
  object-fit: contain;
  object-position: center bottom;
}

.title {
  font-family: "Young Serif";
  text-align: center;
  transition: color ease var(--delay);
  margin-bottom: 0;
  font-size: var(--s0);
  font-weight: 700;
  text-transform: uppercase;
  /* border-top: solid var(--fg) 0.15rem; */
  border-top: ridge var(--fg) 0.4rem;
  padding: 0.5rem;
  height: var(--titre-height);
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 1;
  background-color: var(--bg);
}

.recto .volet-derriere {
  background-color: var(--bg-volet);
  transform: rotateY(180deg);
}

.volet-derriere time {
  color: var(--fg-volet);
  font-family: "Young Serif";
  font-size: var(--s4);
  margin-block: auto;
  text-align: center;
}

/* VERSO */
.verso {
  display: flex;
  flex-flow: column nowrap;
  color: var(--fg-volet);
  background-color: var(--bg-volet);
  padding: 1rem;

  gap: 1rem;
  justify-content: space-between;

  margin-bottom: var(--titre-height);
}

.preview {
  height: 14rem;
}

.preview img {
  --radius: 9rem;
  border-radius: var(--radius) var(--radius) 0rem 0rem;
  height: 100%;
  width: 100%;
  object-fit: cover;
}

.content {
  font-size: var(--s-1);
}

#en-construction {
  cursor: not-allowed;
  margin-top: 1rem;
  font-size: var(--s0);
}

a {
  text-decoration: none;
}

a:hover,
a:focus,
a:active {
  border-color: transparent;
}

header a {
  border: none;
}

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

@media (max-width: 900px) {
  :root {
    --coef: 1.25;
  }

  header.menu-temp {
    display: flex;
    flex-direction: row;
    gap: 0;
    justify-content: center;
    width: 100%;
  }

  header.menu-temp span.lien-home {
    position: relative !important;
    top: initial !important;
    right: initial !important;
    bottom: initial !important;
    left: initial !important;
    font-size: 5rem;
  }

  main {
    padding-block: 7rem 1rem;
  }

  #intro {
    margin-inline: 1rem;
  }
}

@media (max-width: 900px) {
  :root {
    --stroke-width: 1px;
  }

  header.menu-temp a {
    font-size: 3.5rem;
  }
}
