/* Importation des fonts */
@font-face {
  font-family: "Onest";
  src: url("./font/Onest-Bold.ttf") format("truetype");
}

@font-face {
  font-family: "Onest-semi-bold";
  src: url("./font/Onest-SemiBold.ttf") format("truetype");
}

@font-face {
  font-family: "Onest-medium";
  src: url("./font/Onest-Medium.ttf") format("truetype");
}

@font-face {
  font-family: "Geist-Bold";
  src: url("font/Geist-Bold.ttf") format("truetype");
}

@font-face {
  font-family: "Geist-Light";
  src: url("font/Geist-Light.ttf") format("truetype");
}

@font-face {
  font-family: "Geist-Medium";
  src: url("font/Geist-Medium.ttf") format("truetype");
}

@font-face {
  font-family: "Geist-Regular";
  src: url("font/Geist-Regular.ttf") format("truetype");
}

/* Definir variable de couleurs a la racine du document */
:root {
  --white: #f4f4f4;
  --white-before: #bebbbb;
  --blue: #94e7ec;
  --gray: #202020;
}

/* S'applique sur tout le body */
body {
  background-image: url("img/background.png");
  background-size: contain;
  background-repeat: no-repeat;
  font-family: "Geist-Regular";
  background-color: var(--gray);
}

/* S'applique sur tout les paragraphes */
p {
  font-size: 1.2rem;
  font-family: "Geist-Light";
  line-height: 30px;
}

/* Navbar et header */

header {
  display: flex;
  align-items: center;
  justify-content: space-between; /* Separe les elements du header au maximum (gap) */
  padding: 40px 100px;
  position: sticky; /* reste sur l'ecran quand on scroll */
  top: 0;
  z-index: 1000; /* positionne par dessus tout */
}

header p {
  margin: 0; /* pas de marge pour ce bout de texte */
  font-family: "Geist-Light";
  font-size: 1.7rem;
  color: var(--white);
  z-index: 1000; /* positionne par dessus tout */
}

.navbar {
  display: flex;
  justify-content: space-between;
  width: 50%; /* la navbar (tout les a) commence a partir du milieu */
  font-family: "Geist-Light";
  position: static; /* pas fixed en desktop */
  opacity: 1; /* visible */
  transform: none; /* pas de transformation */
}

.navbar a {
  text-decoration: none;
  color: var(--white);
  font-size: 1.2rem;
}

.navbar a:hover {
  /* :hover se produit quand on mais la sourie sur un element */
  color: var(--blue);
}

/* -------- Burger & Overlay -------- */
.burger {
  display: none; /* caché en desktop */
  flex-direction: column;
  gap: 6px;
  cursor: pointer;
}

.burger span {
  width: 28px;
  height: 3px;
  background-color: var(--white);
  border-radius: 5px;
}

/* Animation du X */
.burger.active span:nth-child(1) {
  transform: rotate(45deg) translate(0, 9px);
}

.burger.active span:nth-child(2) {
  opacity: 0;
}

.burger.active span:nth-child(3) {
  transform: rotate(-45deg) translate(3px, -13px);
}

.overlay {
  position: fixed;
  inset: 0;
  backdrop-filter: blur(8px);
  background: rgba(0, 0, 0, 0.4);
  opacity: 0;
  pointer-events: none;
  transition: 0.3s ease;
}

.overlay.active {
  opacity: 1;
  pointer-events: all;
}

/* Acceuil */

.acceuil {
  display: flex;
  position: relative; /* Place position d'origine dans le flux normal du document, affecte pas emplacement des autres */
  height: 100vh;
  justify-content: start; /* contenue commence a gauche */
  margin: 0 auto; /* Definie les marges a 0 et et centre horizontalement */
  max-width: 1100px; /* Largeur maximale de l'acceuil (1100px) */
}

.elementacceuil {
  display: flex;
  text-align: left; /* texte aligné à gauche */
  flex-direction: column;
  width: 50%; /* Les element de l'acceuil commence a partir du milieu */
  order: 2; /* apres imgacceuil */
  justify-content: center;
}

.imgacceuil {
  display: flex;
  /*border: 1px solid pink;*/
  width: 50%;
  order: 1; /* avant elementacceuil */
  justify-content: center;
  align-items: center;
}

.acceuil h1 {
  margin: 0;
  line-height: 1; /* hauteur vertical des lignes de texte */
}

.prenom,
.nom {
  font-size: 8rem;
  color: var(--white);
}

.description {
  font-size: 1.8rem;
  padding-top: 28px;
  color: var(--white-before);
  word-spacing: 5px;
  font-family: "Geist-Light";
}

.description span {
  transition: color 0.3s ease;
}

.description span:hover {
  color: var(--blue);
}

/* À propos */

.apropos {
  display: grid;
  grid-template-columns: 2fr 1fr; /* apropos-container prend 2/3 et apropos img 1/3 */
  column-gap: 90px; /* Espacement horizontal entre column */
  align-items: center;
  max-width: 1100px;
  margin: 0 auto;
  padding-top: 190px;
}

.apropos img {
  width: 100%; /* prend toute la largeur dispo */
  height: auto; /* prend le hauteur par default */
  object-fit: cover; /* image completement couverte, garde le ratio du contenu de l'image intact */
  order: 2;
}

.apropos-container {
  display: flex;
  flex-direction: column;
  justify-content: center;
  color: var(--white);
  order: 1;
}

.apropos-container h2 {
  font-size: 6rem;
  margin: 0;
  padding-bottom: 30px;
  color: var(--white);
}

/* Competences */

.competences {
  display: grid;
  align-items: center;
  justify-content: center;
  max-width: 1100px;
  margin: 0 auto;
  padding-top: 220px;
}

.imagecompetences {
  display: grid;
  grid-template-columns: repeat(
    6,
    1fr
  ); /* logos sur 6 column de long et chaqun prend 1fr, repeat l'applique pour chaqun */
  column-gap: 45px;
}

.imagecompetences img {
  height: 65px;
  width: 65px;
  opacity: 0; /* invisible au départ */
  transform: translateX(-50px); /* décalage à gauche */
}

/* Projets */

.projets {
  display: grid;
  align-items: center;
  color: var(--white);
  max-width: 1100px;
  margin: 0 auto;
  padding-top: 220px;
}

.projets h2 {
  font-size: 6rem;
  margin: 0;
  padding-bottom: 40px;
  color: var(--white);
}

.projectscontainer {
  display: grid;
  align-items: center;
  grid-template-columns: 1fr 1fr; /* 2 projet de sur la largeur */
  grid-template-rows: 1fr 1fr; /* 2 projet de sur la hauteur */
  column-gap: 80px;
  row-gap: 40px; /* Espacement verticale en les rows */
  align-self: center;
  cursor: pointer;
}

.projectscontainer a {
  text-decoration: none; /* Enleve surlignement */
}

.projectscontainer h3 {
  font-size: 1.8rem;
  color: var(--white);
}

.projectscontainer img {
  width: 100%;
  height: 300px;
  object-fit: cover;
  object-position: center; /* positionne image centre horizontalement et verticalement */
}

.projectscontainer > a:hover h3 {
  color: var(--blue);
}

.projectscontainer > a:hover img {
  transform: scale(1.03); /* grossisement */
}

/* Page Projet */

.imagecentrale {
  display: flex;
  justify-content: center;
  max-width: 1100px;
  margin: 0 auto;
  padding-top: 50px;
}

.imagecentrale img {
  width: 1100px;
  height: 500px;
  object-fit: cover;
  object-position: center;
}

.info {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  flex-direction: row;
  max-width: 1100px;
  margin: 0 auto;
  padding-top: 120px;
}

.info h2 {
  color: var(--white);
  font-size: 5rem;
  color: var(--white);
  margin: 0; /* enlève la marge par défaut des h */
}

.info h3 {
  color: var(--white);
  font-size: 1.8rem;
  font-family: "Geist-Light";
}

.texte {
  color: var(--white);
  max-width: 1100px;
  margin: 0 auto;
  padding-top: 20px;
}

.btnjouer {
  display: flex;
  justify-content: center;
  align-items: center;
  padding-top: 50px;
}

.ajouer {
  text-decoration: none;
}

.btnjouer button,
.ajouer {
  display: flex;
  border: 2px solid var(--white);
  color: var(--white);
  background-color: transparent; /* Fond transparent */
  border-radius: 60px; /* Coins arrondis */
  font-size: 2rem;
  padding: 10px 90px;
}

.btnjouer button:hover,
.ajouer:hover {
  border: 2px solid var(--blue); /* Bordure blanche (tu peux changer la couleur) */
  color: var(--blue); /* Couleur du texte */
}

/* Gallery photos */

.fullscreen-gallery {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%; /* centrer lecran et lui faire prendre tt la place possible */
  background-color: rgba(0, 0, 0, 0.8); /* fond asombrie */
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000; /* positionne par dessus tout */
}

.fullscreen-image {
  max-width: 90%;
  max-height: 90%;
}

/* Bouton colse */
.close {
  position: absolute;
  top: 30px;
  right: 40px;
  color: white;
  font-size: 50px;
  font-weight: bold; /* grossie l'element */
  cursor: pointer; /* sourie normal devient un pointer */
}

/* Flèches navigation */
.prev,
.next {
  cursor: pointer;
  position: absolute;
  top: 50%; /* positionne a 50% depuis le top */
  font-size: 60px;
  color: white;
  user-select: none; /* empeche les utilisateurs de selectionner du texte dans html */
  padding: 15px;
  transition: 0.3s; /* petite transition en silde */
}

.prev:hover,
.next:hover {
  color: var(--white-before);
}

.prev {
  left: 30px;
}

.next {
  right: 30px;
}

/* Footer */

footer {
  text-align: center;
  padding: 20px 10px;
  padding-top: 150px;
}

.footer-content {
  color: var(--white);
  max-width: 700px;
  margin: 0 auto;
}

.footer-logos {
  margin-top: 10px;
}

.footer-logos a {
  display: inline-block; /* Elements hybrides entre inline et block */
  margin: 0 10px;
}

.footer-logos img {
  width: 40px;
  height: 40px;
  color: var(--white);
}

.footer-logos a:hover {
  transform: scale(1.1);
  opacity: 0.8;
}

/* Version Mobile */

@media (max-width: 900px) {
  /* Header */

  header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 40px;
    position: relative;
    position: sticky; /* reste sur l'ecran quand on scroll */
  }

  .burger {
    display: flex; /* visible en mobile */

    z-index: 1001; /* burger toujours au-dessus de navbar et overlay */
  }

  .navbar {
    pointer-events: none; /* désactive tous les liens quand menu fermé */
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.8);
    flex-direction: column;
    gap: 30px;
    text-align: center;
    opacity: 0;
    transition: 0.3s ease;

    z-index: 999; /* en dessous du header et du burger */
  }

  .navbar a {
    font-size: 1rem;
  }

  /* Quand actif (burger cliqué) */
  .navbar.active {
    pointer-events: all; /* rend les liens cliquables seulement quand menu ouvert */
    opacity: 1;
    transform: translate(-50%, -50%) scale(1);
  }

  /* Overlay */
  .overlay {
    z-index: 998; /* toujours derrière le header et navbar */
  }

  /* Overlay actif */
  .overlay.active {
    opacity: 1;
  }

  /* Acceuil */

  .acceuil {
    flex-direction: column; /* devient column */
    height: auto;
    padding-top: 300px;
    padding-inline: 30px;
  }

  .elementacceuil {
    order: 1;
    width: 100%;
  }

  .imgacceuil {
    order: 2;
    width: 100%;
  }

  .prenom,
  .nom {
    font-size: 4.5rem;
  }

  .description {
    font-size: 1.2rem;
    padding-top: 20px;
  }

  /* À propos */

  .apropos {
    grid-template-columns: 1fr;
    row-gap: 40px;
    padding-top: 250px;
    padding-inline: 30px; /* padding des cotes (horizontalement) */
  }

  .apropos-container h2 {
    font-size: 3.5rem;
    text-align: center;
  }

  .apropos-container p {
    text-align: center;
  }

  /* Compétences */

  .competences {
    padding: 100px 20px 0 20px;
  }

  .imagecompetences {
    grid-template-columns: repeat(
      3,
      1fr
    ); /* logo vont sur 3 column de largeur */
    column-gap: 25px;
    row-gap: 25px;
  }

  .imagecompetences img {
    height: 50px;
    width: 50px;
  }

  /* Projets */

  .projets {
    padding-top: 150px;
    padding-inline: 30px;
  }

  .projets h2 {
    font-size: 3.5rem;
    text-align: center;
  }

  .projectscontainer {
    grid-template-columns: 1fr; /* un projet a la fois */
  }

  .projectscontainer h3 {
    font-size: 1.5rem;
  }

  .projectscontainer img {
    height: 220px;
  }

  /* Page Projets */

  .info {
    align-items: flex-start; /* place les elements au debut (gauche) */
    flex-direction: column;
    padding-top: 150px;
    padding-inline: 30px;
  }

  .info h2 {
    font-size: 3rem;
  }

  .info h3 {
    font-size: 1.2rem;
  }

  .imagecentrale {
    padding-inline: 30px;
  }

  .imagecentrale img {
    width: 100%;
    height: auto;
  }

  .texte {
    padding-inline: 30px;
  }

  .btnjouer button {
    font-size: 1.2rem;
    padding: 10px 90px;
  }

  p {
    font-size: 1rem;
  }
}
