@import url("https://fonts.googleapis.com/css2?family=Inria+Sans:ital,wght@0,300;0,400;0,700;1,300;1,400;1,700&display=swap");

:root {
  --main-color: #4c4c6d;
  --main-color-shadow: #34344b;
}

* {
  padding: 0;
  margin: 0;
  list-style: none;
}

html {
  /* background-image: url(../img/pattern_bg.png);
    background-size: cover;
    background-attachment: fixed; */
  padding: 3em;
  padding-bottom: 1em;
  overflow-x: hidden;
}

body {
  display: flex;
  flex-direction: column;
  gap: 7vh;
  font-family: "Inria Sans";
  font-size: 20px;
  color: white;
  position: relative;
}

/* body::before {
    content: "";
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url(../img/pattern_bg.png);
    background-size: cover;
    background-position: center;
    z-index: -1;
    transform: translateZ(0);
} */

#background-fixed {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-image: url(../img/pattern_bg.png);
  background-size: cover;
  background-position: center;
  z-index: -1;
}

a {
  text-decoration: none;
  color: white;
}

h2 {
  font-size: 35px;
  justify-content: center;
  width: fit-content;
}

h3 {
  font-size: 40px;
  text-shadow: var(--main-color-shadow) 4px 4px;
}

h4 {
  font-size: 40px;
  writing-mode: vertical-rl;
  transform: rotate(-180deg);
  height: fit-content;
}

.bold {
  font-weight: 700;
}

.light {
  font-weight: 300;
  font-size: 16px;
}

/* **************** Header **************** */

nav {
  display: flex;
  flex-direction: column;
  gap: 2em;
}

nav div {
  display: flex;
  justify-content: space-between;
  gap: 2em;
}

.researches {
  display: flex;
  flex-direction: column;
  width: 50%;
  gap: 1em;
}

#big-menu {
  display: flex;
  justify-content: center;
  gap: 5vw;
  height: fit-content;
  background: linear-gradient(
    to right,
    rgba(153, 153, 153, 0) 0%,
    rgba(214, 214, 214, 0.05) 50%,
    rgba(229, 229, 229, 0) 100%
  );
  padding: 30px;
}

#big-menu a {
  padding: 10px 20px 10px 20px;
}

#big-menu a:hover,
#big-menu a.router-link-active.router-link-exact-active {
  background-color: rgba(255, 255, 255, 0.06);
  padding: 10px 20px 10px 20px;
  box-shadow: white 4px 4px;
}

#small-menu {
  display: none;
}

/* Sidebar */

.contact-sidebar {
  position: fixed;
  top: 50%;
  left: 0;
  display: flex;
  flex-direction: column;
  z-index: 1000;
}

.contact-sidebar a {
  display: block;
}

.contact-sidebar img {
  width: 20px;
}

/* **************** ALL PAGES **************** */

.page,
.top-page {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3em;
}

.intro {
  text-align: center;
}

.page article {
  display: flex;
  gap: 1em;
}

.legend {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2em;
}

.legend div {
  display: flex;
  align-items: center;
  gap: 1em;
}

.legend .legend-levels {
  gap: 2em;
}

.container-illu {
  display: flex;
  gap: 0.5em;
}

.container-img {
  max-width: 400px;
}

.container-img img {
  width: 100%;
}

/* Ensemble image + texte dessous (localisation, date) */
.img-date {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1em;
}

/* Dans le cas où le texte sous l'image est précédé d'une icône */
.img-date span {
  display: flex;
  gap: 0.5em;
}

.page article .container-details {
  display: flex;
  flex-direction: column;
  gap: 1em;
}
/* -> Exception */
#experience .container-details {
  width: 50%;
}
#projects .container-details {
  width: 100%;
}

/* Style item de la liste */
.page article ul li {
  list-style: url(../img/icons/chevron-dark.svg);
  padding-left: 1em;
  margin-left: 2em;
}

.page article ul li.li-fav {
  list-style: url(../img/icons/hobbies/heart.svg);
}

.page article ul li div {
  display: flex;
  gap: 1em;
}

/* Taille des icônes */
.icon {
  height: 30px;
}

/* Style des images */
.img-illu {
  box-shadow: 4px 4px white;
}

/* Style des encarts blancs (annonce, footer) */
.white-box {
  display: flex;
  align-items: center;
  background-color: white;
  color: var(--main-color);
  padding: 0.8em;
  gap: 1em;
  height: fit-content;
  box-shadow: var(--main-color-shadow) 4px 4px;
}

/* **************** Experience **************** */

#experience .container-cat {
  display: flex;
  gap: 2em;
}

#experience .container-cat section {
  display: flex;
  flex-direction: column;
  gap: 3em;
  width: 50%;
}

#experience h3 {
  text-align: center;
}

.vl {
  border-left: 2px solid;
  border-image: linear-gradient(to top, rgb(255, 255, 255), rgba(0, 0, 0, 0)) 1
    100%;
}

#experience .container-img {
  max-width: 200px;
}

/* **************** Skills **************** */

#skills article {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2em;
}

.skills-logos {
  display: flex;
  gap: 3em;
  text-align: center;
  font-size: 16px;
  font-weight: 300;
  p {
    padding-top: 0.5rem;
  }
}

/* **************** Projects **************** */

.project-cat {
  display: flex;
  flex-direction: column;
  padding: 2em;
  gap: 2em;
  background-color: rgba(255, 255, 255, 0.05);
  width: 90%;
}

.project-cat-title {
  display: flex;
  gap: 1vw;
  align-items: center;
}

/* **************** Footer **************** */

footer {
  width: fit-content;
  align-self: center;
  padding-top: 3em;
}

/* Tablets */
@media screen and (max-width: 1023px) {
  body {
    font-size: 18px;
  }

  h2 {
    font-size: 30px;
  }

  h3,
  h4 {
    font-size: 35px;
  }

  #experience .container-cat {
    flex-direction: column;
  }

  #experience .hl {
    border-top: solid 1px;
    border-color: #ffffff49;
  }

  /* Skills */

  .skills-logos {
    justify-content: center;
    flex-wrap: wrap;
  }

  .project-cat {
    gap: 3em;
  }
}

/* Mobiles */
@media screen and (max-width: 767px) {
  html {
    padding: 2em;
  }

  body {
    font-size: 16px;
  }

  h2 {
    font-size: 24px;
  }

  h3,
  h4 {
    font-size: 30px;
  }

  .light {
    font-size: 12px;
  }

  .researches {
    width: 100%;
  }

  nav {
    gap: 3em;
  }

  nav div {
    flex-direction: column;
    align-items: center;
  }

  #big-menu {
    display: none;
  }

  #small-menu {
    display: flex;
    justify-content: center;
    gap: 3em;
    background: linear-gradient(
      to right,
      rgba(153, 153, 153, 0) 0%,
      rgba(214, 214, 214, 0.05) 50%,
      rgba(229, 229, 229, 0) 100%
    );
    padding: 1em;
  }

  #small-menu a.router-link-active.router-link-exact-active {
    filter: brightness(0) saturate(100%) invert(100%) sepia(0%) saturate(2%)
      hue-rotate(33deg) brightness(101%) contrast(101%);
  }

  .page article {
    flex-direction: column;
    gap: 2em;
  }

  .legend {
    gap: 1em;
  }

  .legend div {
    gap: 0.5em;
  }

  /* Projects */

  .project-cat {
    padding: 1em;
  }

  .contact-sidebar img {
    width: 18px;
  }

  .contact-sidebar.white-box {
    gap: 2em;
    padding: 0.5em;
  }

  #experience .container-details {
    width: fit-content;
  }

  #experience .container-cat section {
    width: 100%;
  }
}

/* Jeu */

.modal-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(52, 52, 75, 0.5); /* Fond semi-transparent */
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.modal {
  display: flex;
  flex-direction: column;
  gap: 1em;
  padding: 2em;
  background: white;
  box-shadow: var(--main-color-shadow) 4px 4px;
  position: relative;
}

.instructions {
  font-size: 18px;
  color: var(--main-color);
}

.score,
.timer,
.joke {
  font-size: 16px;
  color: var(--main-color);
}

.game-area {
  position: relative;
  width: 100%;
  height: 300px;
  background-color: var(--main-color);
  overflow: hidden;
}

.mailbox {
  position: absolute;
  width: 50px;
  height: 50px;
  background: url("../img/icons/mailbox.png") no-repeat center;
  background-size: contain;
  cursor: pointer;
}

.start-game {
  cursor: pointer;
}

.close-btn {
  position: absolute;
  top: 0.5em;
  right: 0.5em;
  color: white;
  cursor: pointer;
}
