/* ======================================================
   Base globale
====================================================== */
body {
  background: linear-gradient(180deg, #1B1B1B 0%, #2B2B2B 44.23%, #323232 77.88%, #1B1B1B 100%);
  background-attachment: fixed;
  background-size: cover;
  margin: 0;
  padding: 0;
}

span, p, strong {
  font-family: var(--general-font);
  color: var(--font-color);
}

h1 {
  color: var(--font-color);
  font-family: var(--title-font);
}

/* ================== Titre par lettres ================== */


.titre-arcade-layer {
  visibility: hidden; /* caché au départ */
}

.titre-arcade-layer .letter {
  display: inline-block;
  opacity: 0;
  transform: translateX(-20px); /* part de la gauche */
  transition: opacity 0.7s ease, transform 0.7s ease;

  font-family: var(--title-font);
  color: inherit;
  -webkit-text-stroke-width: inherit;
  -webkit-text-stroke-color: inherit;
}

.titre-arcade-layer .letter.active {
  opacity: 1;
  transform: translateX(0); /* arrive à sa place */
}

/* ================== Manette ================== */
.manette-wrapper {
  opacity: 0;
  transform: translateX(-50px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.manette-wrapper.active {
  opacity: 1;
  transform: translateX(0);
}

/* ================== Bouton retour ================== */
.retour-arcade {
  opacity: 0;
  transform: translateX(-20px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.retour-arcade.active {
  opacity: 1;
  transform: translateX(0);
}

.infos-cours-annee {
  display: none;
}

/* ======================================================
   Bordures fixes
====================================================== */
.border {
  position: fixed;
  background: var(--border-color-side);
  z-index: 9999;
}

.border.gauche {
  top: 0;
  left: 1em;
  width: 1px;
  height: 100%;
}

.border.droite {
  top: 0;
  right: 1em;
  width: 1px;
  height: 100%;
}

/* ======================================================
   Conteneur principal
====================================================== */
main {
  background-image: linear-gradient(#4e4b4194 1px, transparent 1px),
                    linear-gradient(to right, #4e4b4194 1px, #71718300 1px);
  background-size: 40px 40px;
  background-attachment: scroll;
  position: relative;
  padding: 0 1em;
  margin: 0 auto;
}

/* ======================================================
   Présentation projet
====================================================== */
.titre-arcade {
  background-image: linear-gradient(177deg, var(--bouton-projet-arcade-color) 11.95%, #362CB6 28.39%, #21212100 82.04%);
  position: relative;
  line-height: 0.7;
  padding: 3vw;
  border-bottom: 2px solid var(--border-color-side);
  font-family: var(--title-font);
  text-align: center;
  margin-top: 0;

  line-height: 0.6;
  text-transform: uppercase;
  margin: 0;
  -webkit-text-stroke-width: 0.8px;
  -webkit-text-stroke-color: rgb(255, 255, 255);
  letter-spacing: 1px;
  height: auto;
  font-weight: lighter;
  place-content: center;
  padding-top: 10vh;
}

.titre-arcade > * {
  font-family: var(--title-font);
}

.titre-arcade-layer {
  display: block;
  font-size: clamp(10px, 10vw, 4rem);
  color: white;
}

.titre-arcade-layer1 {
  color: transparent;
  opacity: 0.8;
  -webkit-text-stroke-width: 0.8px;
  -webkit-text-stroke-color: var(--font-color);
}

.titre-arcade-layer2 {
  opacity: 0.5;
  color: transparent;
  -webkit-text-stroke-width: 0.6px;
  -webkit-text-stroke-color: var(--font-color);
}

.titre-arcade-layer3{
  opacity: 0.5;
  color: transparent;
  -webkit-text-stroke-width: 0.4px;
  -webkit-text-stroke-color: var(--font-color);
}

.retour-arcade {
  margin-top: 20px;
  margin-left: 20px;
}

.lien-retour {
  color: #ffffff;
  text-decoration: none;
  font-weight: 100;
  font-size: 16px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}

.lien-retour:hover {
  text-decoration: underline;
  cursor: pointer;
}

/* ======================================================
   Manette
====================================================== */
.manette {
  position: absolute;
  right: 15%;
  width: 20vw;
  bottom: 20vw;
  transform: rotateZ(-20deg);
  bottom: 17%;
  right: 8%;
}

/* ======================================================
   Vidéo et infos cours
====================================================== */
.video-projet {
  border-bottom: 2px solid var(--border-color-side);
  display: block;
  height: 40vh;
  min-height: 200px;
}

.video-projet iframe {
  width: 100%;
  height: 100%;
  border: none;
}

.infos-cours-annee {
  text-align: center;
  background-image: linear-gradient(177deg, var(--bouton-projet-arcade-color) 11.95%, #362CB6 28.39%, #21212100 82.04%);
  width: 80%;
  max-width: 400px;
  padding: 2em;
  margin: 2em auto;
  border: 2px solid var(--border-color-side);
  border-radius: 40px;
  font-weight: bold;
}

/* ======================================================
   Infos étudiants
====================================================== */
.infos-etudiants {
  display: flex;
  flex-direction: column;
  margin: 2em auto;
  width: 80%;
  max-width: 800px;
  border: 2px solid var(--border-color-side);
}

.titre-equipe {
  background-image: linear-gradient(177deg, var(--bouton-projet-arcade-color) 11.95%, #362CB6 28.39%, #21212100 82.04%);
  color: #ffffff;
  padding: 15px;
  border-bottom: 2px solid var(--border-color-side);
}

.nom-etudiant {
  padding: 15px;
}

/* Modifications apportées : Style pour les noms d'étudiants qui sont cliquables */
.nom-etudiant a {color: var(--background-color-finissant);text-decoration: none;letter-spacing: normal;}
.nom-etudiant a:hover {text-decoration: underline;}

/* ======================================================
   Image projet
====================================================== */
.image-projet {
  display: flex;
  flex-direction: column;
  margin: 2em auto;
  width: 80%;
  max-width: 800px;
  border: 2px solid var(--border-color-side);
}

.image-projet > span, .description-projet > .description-titre {
  background-image: linear-gradient(177deg, var(--bouton-projet-arcade-color) 11.95%, #362CB6 28.39%, #21212100 82.04%);
  width: auto;
  padding: 10px;
  border-bottom: 2px solid var(--border-color-side);
}

/* ======================================================
   Description projet
====================================================== */
.description-projet {
  display: flex;
  flex-direction: column;
  width: 80%;
  max-width: 800px;
  margin: 2em auto;
  border: 2px solid var(--border-color-side);
  position: relative;
  height: fit-content;
}

.description-projet .description-titre {
  width: auto;
  padding-left: 20px;
  font-weight: bold;
  border-top: none;
}

.description-projet > .description {
  padding: 20px;
}

/* ======================================================
   Tablette
====================================================== */
@media screen and (min-width: 576px) {

  main {
  padding: 0 2em;
  background-attachment: fixed;
  }

  .border {
    position: fixed;
    background: var(--border-color-side);
    z-index: 9999;
  }

  .border.gauche { top: 0; left: 2em; width: 1px; height: 100%; }
  .border.droite { top: 0; right: 2em; width: 1px; height: 100%; }

  .video-projet {
    height: 65vh;
  }
}

/* ======================================================
   Desktop
====================================================== */
@media screen and (min-width: 1024px) {

  .manette-wrapper {
    opacity: 0;
    transform: translateX(-50px); /* animation slide */
    transition: opacity 1s ease, transform 1s ease;
  
    /* Position initiale exacte */
    position: absolute;
    bottom: 7%;   /* ajuster si besoin */
    right: 30%;   /* idem pour horizontal */
  }
  
  .manette-wrapper.active {
    opacity: 1;
    transform: translateX(0); /* glisse de gauche à droite à sa place */
  }
  

  main {
  padding: 0 3em;
  }

  .border { position: fixed; background: var(--border-color-side); z-index: 9999; }
  .border.gauche { top: 0; left: 3em; width: 1px; height: 100%; }
  .border.droite { top: 0; right: 3em; width: 1px; height: 100%; }

  .titre-arcade-layer {
    font-size: 4vw;
  }

  .manette {
    width: 10vw;
    right: 30%;
    bottom: 7%;
    top: auto;
  }

  .video-projet {
    height: 70vh;
  }

  .infos-cours-annee {
    width: 20vw;
    padding: 2vw;
    font-size: 2vw;
  }

  .image-projet span,
  .description-projet {
    font-size: 1.8vw;
  }

  .titre-equipe, .infos-etudiants {
    font-size: 17px;
  }

  .image-projet {
    border: none;
    max-width: none;
  }

  .image-projet img {
    width: auto;
    border: 2px solid var(--border-color-side);
    height: 70vh;
  }

  /* Layout description + infos + image */
  .description-image {
    display: grid;
    grid-template-columns: auto auto;
    grid-template-rows: clamp(40%, 55%, 300px)auto;
    gap: 2em;
    /*width: 80%;*/
    /*max-width: 1200px;*/
    /*margin: 0 auto 70px;*/
    padding: 4em;
    background-color: rgba(48, 48, 48, 0);
    border: 2px solid var(--border-color-side);
    position: relative;
    box-sizing: border-box;
    transition: all 260ms ease;
  }

  .description-image > * {
    margin: 0;
  }

  .description-image .image-projet {
    grid-column: 1 / 2;
    grid-row: 1 / 3;
    display: block;
    width: 100%;
    display: flex;
    align-items: end;
  }

  .description-image .infos-etudiants {
    grid-column: 2 / 3;
    grid-row: 1 / 2;
    margin: 0;
    width: 100%;
    font-size: 15px;
    background: var(--background-color);
  }

  .infos-etudiants {
    margin: 0;
    border-radius: 0 0 10px 10px;
  }

  .titre-equipe {
    height: 15%;
    color: var(--font-color);
  }

  .nom-etudiant {
    flex-grow: 1;
  }

  .infos-etudiants > * {
    place-content: center;
    padding-top: 0;
    padding-bottom: 0;
  }
  

  .description-image .description-projet {
    grid-column: 2 / 3;
    grid-row: 2 / 3;
    font-size: 17px;
    margin: 0;
    height: auto;
    width: 100%;
    background: var(--background-color);
    max-height: 15vh;
    min-height: 100%;
    border-radius: 0 0 10px 10px;
  }

  .description-projet .description {
    overflow-x: hidden;
  }

  /* scroll bar de description */
  .description-projet .description::-webkit-scrollbar {
    width: 8px;
  }

  .description-projet .description::-webkit-scrollbar-track {
    background: rgba(37, 36, 36, 0.984);
    padding: 2px 0;
  }

  .description-projet .description::-webkit-scrollbar-thumb {
    background: #cdcce3;
    border-radius: 4px;
    margin: 2px 0;
  }

  .description-projet .description::-webkit-scrollbar-thumb:hover {
    background: #5542ff;
  }
}