:root {
  --bg-color: #112;
  box-sizing: border-box;
}

*,
*::before,
*::after {
  box-sizing: inherit; /* Applique border-box à tout */
}

body {
  margin: 0; /* Supprime les marges pour éviter le débordement */
  padding: 10px; /* Garde l'espace intérieur */
  height: 100vh; /* Hauteur pleine */
  overflow: hidden;
  position: relative;
  background-color: black;
  color: #eee;
  font-family: "Arial", "Helvetica", sans-serif;
}

.container {
  display: flex;
  height: 100%;
  width: 100%; /* Remplace width: 99% */
  background-color: rgba(0, 0, 0, 0);
  border: 1px solid #eee6;
  border-radius: 0.5rem;
  opacity: 0;
  transition: opacity 0.5s ease-in;
}

.container.visible {
  opacity: 1;
}

nav {
  height: 33%;
  margin-top: 5%;
  z-index: 2;
}

ul {
  list-style-type: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  height: 100%;
  gap: 1%;
  justify-content: center;
}

li {
  display: flex;
  align-items: center;
}

a {
  color: #eee;
  text-decoration: none;
  font-family: "Arial", "Helvetica", sans-serif;
  font-size: 18px;
  padding: 10px;
  width: 100%;
  display: block;
}

a:hover {
  background-color: #333;
}

a.active {
  background-color: #555;
}

main {
  flex-grow: 1;
  padding: 20px;
  color: #eee;
  font-family: "Arial", "Helvetica", sans-serif;
  overflow: hidden;
  display: flex; /* Ajouté pour permettre l'alignement */
  justify-content: flex-end; /* Aligne le contenu à droite */
  
}

main.visible {
  display: flex;
}

#content {
  text-align: right;
  z-index: 2;
  width: 100%;
  height: 100%;
  align-content: center;
}

.myname {
  position: absolute;
  display: flex;
  margin-top: 1%;
  margin-left: 1%;
}

h1 {
  margin-top: 0;
  font-size: 24px;
}

p {
  font-size: 16px;
  line-height: 1.5;
}

.large-header {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0; /* Place l'animation en arrière-plan */
  }
  

  #canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0; /* Laisse l'interaction avec le site */
}

.xb {
  top: 42% !important;
  left: 72% !important;
}

.xb-github {
  top: 52% !important;
  left: 72% !important;
}

.twitter-follow-button:hover {
  background-color: #4099ff !important;
}

.trapdoor {
  -webkit-transform: translateZ(0px);
  transform: translateZ(0px);
  -webkit-font-smoothing: antialiased;
  position: absolute;
  top: 50%;
  left: 50%;
  margin-left: -100px;
  margin-top: -25px;
  width: 200px;
  height: 50px;
  box-shadow: inset -7px 0px 12px -8px rgba(0, 0, 0, 0),
    inset 7px 0px 12px -8px rgba(0, 0, 0, 0);
  background: transparent;
}

.trapdoor:hover .door {
  box-shadow: 0px 0px 10px -2px rgba(0, 0, 0, 0);
  -webkit-transform: scale(1.08);
  -moz-transform: scale(1.08);
  -ms-transform: scale(1.08);
  -o-transform: scale(1.08);
  transform: scale(1.08);
  background-color: transparent;
}

.trapdoor:hover .top {
  top: -50%;
}

.trapdoor:hover .bottom {
  top: 100%;
}

.trapdoor .twitter-follow-button:hover {
  background-color: #4099ff !important;
  transition: all 0.5s ease-in-out;
}

.trapdoor .twitter-follow-button {
  padding: 15px !important;
  text-align: center;
  border-radius: 0.5rem;
  position: relative;
  z-index: 1;
  opacity: 0;
  visibility: hidden;
  -webkit-transition: opacity 150ms ease-in-out 100ms, visibility 0s linear 100ms;
  -moz-transition: opacity 150ms ease-in-out 100ms, visibility 0s linear 100ms;
  -ms-transition: opacity 150ms ease-in-out 100ms, visibility 0s linear 100ms;
  -o-transition: opacity 150ms ease-in-out 100ms, visibility 0s linear 100ms;
  transition: opacity 150ms ease-in-out 100ms, visibility 0s linear 100ms;
}

.trapdoor:hover .twitter-follow-button {
  opacity: 1;
  visibility: visible;
  -webkit-transition: opacity 150ms ease-in-out 100ms, visibility 0s linear 0s;
  -moz-transition: opacity 150ms ease-in-out 100ms, visibility 0s linear 0s;
  -ms-transition: opacity 150ms ease-in-out 100ms, visibility 0s linear 0s;
  -o-transition: opacity 150ms ease-in-out 100ms, visibility 0s linear 0s;
  transition: opacity 150ms ease-in-out 100ms, visibility 0s linear 0s;
}

.trapdoor .github-follow-button:hover {
  background-color: #ffffff !important;
  color: #24292e !important;
  transition: all 0.5s ease-in-out;
}

.trapdoor .github-follow-button {
  padding: 15px !important;
  text-align: center;
  border-radius: 0.5rem;
  position: relative;
  z-index: 1;
  color: #ffffff !important;
  opacity: 0;
  visibility: hidden;
  -webkit-transition: opacity 150ms ease-in-out 100ms, visibility 0s linear 100ms;
  -moz-transition: opacity 150ms ease-in-out 100ms, visibility 0s linear 100ms;
  -ms-transition: opacity 150ms ease-in-out 100ms, visibility 0s linear 100ms;
  -o-transition: opacity 150ms ease-in-out 100ms, visibility 0s linear 100ms;
  transition: opacity 150ms ease-in-out 100ms, visibility 0s linear 100ms;
}

.trapdoor:hover .github-follow-button {
  opacity: 1;
  visibility: visible;
  -webkit-transition: opacity 150ms ease-in-out 100ms, visibility 0s linear 0s;
  -moz-transition: opacity 150ms ease-in-out 100ms, visibility 0s linear 0s;
  -ms-transition: opacity 150ms ease-in-out 100ms, visibility 0s linear 0s;
  -o-transition: opacity 150ms ease-in-out 100ms, visibility 0s linear 0s;
  transition: opacity 150ms ease-in-out 100ms, visibility 0s linear 0s;
}

.top {
  top: 0%;
  left: 0px;
}

.top::before {
  top: 5px;
}

.bottom {
  top: 50%;
  left: 0px;
}

.bottom::before {
  top: -20px;
}

.door {
  -webkit-transition: top 400ms, box-shadow 200ms, -webkit-transform 300ms, background-color 200ms ease-in-out 400ms;
  -moz-transition: top 400ms, box-shadow 200ms, -moz-transform 300ms, background-color 200ms ease-in-out 400ms;
  -ms-transition: top 400ms, box-shadow 200ms, -ms-transform 300ms, background-color 200ms ease-in-out 400ms;
  -o-transition: top 400ms, box-shadow 200ms, -o-transform 300ms, background-color 200ms ease-in-out 400ms;
  transition: top 400ms, box-shadow 200ms, transform 300ms, background-color 200ms ease-in-out 400ms;
  -webkit-transition-timing-function: ease-in-out;
  -moz-transition-timing-function: ease-in-out;
  -ms-transition-timing-function: ease-in-out;
  -o-transition-timing-function: ease-in-out;
  transition-timing-function: ease-in-out;
  background-color: #00000000;
  position: absolute;
  overflow: hidden;
  width: 100%;
  z-index: 3;
  height: 50%;
}

.door::before {
  position: absolute;
  margin-left: -20px;
  font-size: 35px;
  display: block;
  color: #4099ff;
  content: "";
  width: 35px;
  height: 35px;
  left: 52%;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%234099ff'%3E%3Cpath d='M23.953 4.57a10 10 0 01-2.825.775 4.958 4.958 0 002.163-2.723c-.951.555-2.005.959-3.127 1.184a4.92 4.92 0 00-8.384 4.482C7.69 8.095 4.067 6.13 1.64 3.162a4.822 4.822 0 00-.666 2.475c0 1.71.87 3.213 2.188 4.096a4.904 4.904 0 01-2.228-.616v.06a4.923 4.923 0 003.946 4.827 4.996 4.996 0 01-2.212.085 4.936 4.936 0 004.604 3.417 9.867 9.867 0 01-6.102 2.105c-.39 0-.779-.023-1.17-.067a13.995 13.995 0 007.557 2.209c9.053 0 13.998-7.496 13.998-13.985 0-.21 0-.42-.015-.63A9.935 9.935 0 0024 4.59z'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}

.door-github::before {
  position: absolute;
  margin-left: -20px;
  font-size: 35px;
  display: block;
  color: #ffffff;
  content: "";
  width: 35px;
  height: 35px;
  left: 52%;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='%23ffffff'%3E%3Cpath d='M12 0c-6.626 0-12 5.373-12 12 0 5.302 3.438 9.8 8.207 11.387.599.111.793-.261.793-.577v-2.234c-3.338.726-4.033-1.416-4.033-1.416-.546-1.387-1.333-1.756-1.333-1.756-1.089-.745.083-.729.083-.729 1.205.084 1.839 1.237 1.839 1.237 1.07 1.834 2.807 1.304 3.492.997.107-.775.418-1.305.762-1.604-2.665-.305-5.467-1.334-5.467-5.931 0-1.311.469-2.381 1.236-3.221-.124-.303-.535-1.524.117-3.176 0 0 1.008-.322 3.301 1.23.957-.266 1.983-.399 3.003-.404 1.02.005 2.047.138 3.006.404 2.291-1.552 3.297-1.23 3.297-1.23.653 1.653.242 2.874.118 3.176.77.84 1.235 1.911 1.235 3.221 0 4.609-2.807 5.624-5.479 5.921.43.372.823 1.102.823 2.222v3.293c0 .319.192.694.801.576 4.765-1.589 8.199-6.086 8.199-11.386 0-6.627-5.373-12-12-12z'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
}


/* Media queries pour responsive design amélioré */
@media (max-width: 768px) {
  .container {
    flex-direction: column;
  }

  nav {
    padding: 10px;
    width: 100%;
    height: auto;
    margin-top: 2%;
  }

  ul {
    flex-direction: row;
    flex-wrap: wrap;
    gap: 5px;
  }

  li {
    flex: 1 1 auto;
    min-width: 80px;
  }

  a {
    font-size: 16px;
    padding: 8px;
    text-align: center;
  }

  main {
    padding: 15px;
  }

  #content {
    text-align: center;
  }

  .myname {
    position: relative;
    margin: 10px 0;
  }

  h1 {
    font-size: 20px;
  }

  .xb {
    top: 50% !important;
    left: 50% !important;
    transform: translate(-50%, -50%);
  }
}

@media (max-width: 480px) {
  body {
    padding: 5px;
  }

  nav {
    padding: 5px;
    margin-top: 1%;
  }

  ul {
    flex-direction: column;
    gap: 2px;
  }

  li {
    width: 100%;
  }

  a {
    font-size: 14px;
    padding: 6px;
  }

  main {
    padding: 10px;
  }

  h1 {
    font-size: 18px;
  }

  p {
    font-size: 14px;
  }

  .trapdoor {
    width: 180px;
    margin-left: -90px;
  }
}

@media (max-width: 350px) {
  .container {
    flex-direction: column;
  }

  nav {
    padding: 15%;
    width: 100%;
    height: auto;
  }

  ul {
    flex-direction: row;
  }

  li {
    gap: 1%;
    text-align: center;
  }

  main {
    padding: 10px;
  }
}
