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

:root {
  --coef: 1.1;
  --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;
  --gray: #e7e7e7;
  --accent: #1e1e1e;
  --delay: 0.5s;
  --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: "Luciole", sans-serif;
  font-style: normal;
  font-weight: normal;
  transition:
    background-color var(--easing) var(--delay),
    color var(--easing) var(--delay);
}

::-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(--bg) !important;
}

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

/* TYPO GENERAL */
html,
body {
  font-size: 16px;
  font-size: clamp(1rem, 0.65rem + 0.8vw, 1.3rem);
  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;
}

main {
  padding-block: 7rem 2rem;
  font-size: var(--s0);
  scrollbar-color: var(--fg) var(--bg);
  scrollbar-width: auto;
}

/* 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;

  z-index: 10000;
}

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;

  /* display: grid; */
  /* grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr)); */

  justify-content: center;
  gap: 2rem;
  padding: 0 2rem;
}

.articles-list-home li {
  flex: 1 1 100%;
  min-width: min(100%, 300px);
  max-width: 350px;

  color: var(--fg);
  position: relative;
  border-radius: 0.1rem;
  box-shadow: 0;
  min-height: 10rem;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;

  border-radius: 1rem;
  /* background-color: var(--fg); */
  background-color: #202020;
  /* border: solid var(--fg) 2px; */
  box-shadow:
    rgba(0, 0, 0, 0.16) 0px 3px 6px,
    rgba(0, 0, 0, 0.23) 0px 3px 6px;

  /* transform: translate3d(0, 0, 0) scale(1); */
  --easing: cubic-bezier(0.33, 1, 0.68, 1);

  top: 0;
  transition:
    top var(--easing) var(--delay),
    box-shadow var(--easing) var(--delay);

  flex: 1 1 50%;
  aspect-ratio: 822/1122; /* porportions cartes de poker */
}

.articles-list-home li:hover,
.articles-list-home li:focus-within {
  box-shadow:
    rgba(0, 0, 0, 0.25) 0px 14px 28px,
    rgba(0, 0, 0, 0.22) 0px 10px 10px;
  /* top: -0.5rem; */
  /* transform: translate3d(0, -0.3rem, 0.5rem) scale(1); */
}

.info {
  padding: 0.5rem;
  background-color: var(--bg-volet);
  z-index: 100;
  height: 100%;
  border-radius: 1rem;
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.title {
  font-size: 122px;
  margin: auto;
  font-family: var(--fonte-volet), sans-serif;
  text-transform: uppercase;
  -webkit-text-stroke-color: var(--fg-volet);
  -webkit-text-stroke-width: 3px;
  opacity: 1;
  transition: opacity var(--easing) var(--delay);
}

.time,
.title a {
  display: block;
  color: var(--bg-volet);
  hyphens: auto;
  word-break: break-word;
  line-height: 1;
}

#securite-alimentaire .title {
  font-size: 88px;
}

#la-mort-vivante .title {
  font-size: 88px;
}

.time {
  display: none;
}

.content {
  margin-top: auto;
  z-index: 0;
  background: var(--bg);
  border: solid var(--fg-volet);
  border-radius: 0.3rem;
  padding: 1rem;
  position: fixed;

  inset: auto 0 0rem 0;
  margin: 3rem;
  opacity: 0;
  z-index: 1000;
  transition: opacity var(--easing) var(--delay);
}

.content p {
  font-size: var(--s0);
  line-height: 1.4;
}

.preview {
  border-radius: 1rem;
  overflow: hidden;
  background: white;
  position: absolute;
  inset: 0;
  z-index: -1;
}

.preview iframe {
  width: 269% !important;
  left: -84% !important;
}

li:focus-within .title,
li:hover .title {
  opacity: 0;
}

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

li:focus-within .preview,
li:hover .preview {
  transform: translateY(0) scale(1);
}

#fond div {
  background-color: var(--color);
  position: fixed;
  inset: 0;
  z-index: -1;
  opacity: 0;
  transition: opacity ease-in-out calc(var(--delay) / 1.3);
}

#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: 2;
}

ul.articles-list-home #autogestion::after {
  content: "Le travail qui vient";
  text-transform: uppercase;
  position: absolute;
  top: calc(-1.3rem - var(--s1) / 2);
  background-color: var(--bg);
  padding: 0.2rem;
  left: 1rem;
  font-size: var(--s1);
}

ul.articles-list-home #autogestion::before,
ul.articles-list-home #atomisation::before {
  content: " ";
  position: absolute;
  inset: -1rem;
  border: dashed 2px gray;
}

ul.articles-list-home #autogestion::before {
  border-right: 0;
}

ul.articles-list-home #atomisation::before {
  border-left: 0;
}

/* 3 colonnes */
@media (max-width: 1608px) {
  ul.articles-list-home {
    row-gap: 3rem;
  }
}

@media (max-width: 1608px) and (min-width: 1211px) {
  ul.articles-list-home::before {
    content: "";
    width: 350px;
    aspect-ratio: 822/1122;
  }
}

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

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

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

  nav ul {
    font-size: var(--s1);
  }

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

  main {
    padding-block: 6rem 3rem;
  }

  #intro {
    margin-inline: 1rem;
  }

  ul.articles-list-home {
    gap: 4rem;
    padding: 0;
  }

  ul.articles-list-home li {
    max-width: 100%;
    aspect-ratio: initial;
    background-color: var(--bg);
    padding: 1rem;
    box-shadow: none;

    border-radius: 0;
  }

  ul.articles-list-home #autogestion::before,
  ul.articles-list-home #atomisation::before {
    border: none;
    inset: -1rem 0 0 0;
  }

  ul.articles-list-home #autogestion {
    margin-top: 2rem;
  }

  ul.articles-list-home #autogestion::before {
    top: -3rem;
    border-top: dashed gray 2px;
  }

  ul.articles-list-home #autogestion::after {
    top: calc(-3rem - var(--s1) / 2);
    left: 0;
    text-align: center;
  }

  .content {
    margin: 1.5rem;
  }

  li .info {
    background-color: transparent;
    gap: 2rem;
    padding: 0;
    border-radius: 0;
    height: auto;
  }

  li .preview {
    position: relative;
    aspect-ratio: 16/9;
    background-color: var(--fg);
    border-radius: 0;
  }

  li .content {
    opacity: 1;
  }

  li .title {
    margin-block: 0;
    background-color: var(--bg-volet);
    padding: 0.2em;
    border-radius: 1rem;
  }

  li .title a {
    font-size: var(--s5);
    text-align: center;
  }

  li .content {
    position: relative;
    margin: 0;
    border: none;
    inset: initial;
  }
}

@media screen and (hover: none), screen and (max-width: 836px) {
  header.menu-temp a {
    font-size: 3rem;
  }

  #intro {
    margin-inline: 0.5rem;
  }

  .articles-list-home li:hover,
  .articles-list-home li:focus-within {
    top: 0;
    box-shadow: none;
  }

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

  li .content {
    padding-inline: 0.5rem;
  }
}

@media screen and (max-width: 500px) {
  ul.articles-list-home li {
    padding: 0.5rem;
  }

  li .title {
    padding: 0.1em;
  }

  li .title a {
    font-size: var(--s3);
  }
}
