/*=========================Effet wave=======================*/

@import url("https://fonts.googleapis.com/css?family=Poppins:200,300,400,500,600,700,800,900&display=swap");

section {
  position: relative;
  width: 99vw;
  height: 100vh;
  top: 50vh;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
}



section .wave {
  position: absolute;
  left: 0;
  width: 100%;
  height: 100%;
  background: #4973ff;
  box-shadow: inset 0 0 50px rgba(0, 0, 0, 0.5);
  transition: 0.5s;
}
section .wave span {
  content: "";
  position: absolute;
  width: 325vh;
  height: 325vh;
  top: 0;
  left: 50%;
  transform: translate(-50%, -75%);
  background: #000;
}
.content {
  position: relative;
  z-index: 1;
  font-size: 4em;
  letter-spacing: 2px;
  color: #fff;
}
section .wave span:nth-child(1) {
  border-radius: 45%;
  background: rgba(20, 20, 20, 1);
  animation: animate 60s linear infinite;
}

section .wave span:nth-child(2) {
  border-radius: 40%;
  background: rgba(20, 20, 20, 0.5);
  animation: animate 65s linear infinite;
}
section .wave span:nth-child(3) {
  border-radius: 42.5%;
  background: rgba(20, 20, 20, 0.5);
  animation: animate 76s linear infinite;
}
@keyframes animate {
  0% {
    transform: translate(-50%, -75%) rotate(0deg);
  }
  100% {
    transform: translate(-50%, -75%) rotate(360deg);
  }
}


*{
    margin: 0px;
    color: #fff;
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Open Sans", "Helvetica Neue", sans-serif;
}

body{
    background-color: rgb(20, 20, 20);
}

header{
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 50px;
    width: auto;
}





.glass-card{
    position: absolute;
    margin: 10px;
    padding-right: 40px;
    background: rgba(255, 255, 255, 0.11);
    border-radius: 16px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(5.9px);
    -webkit-backdrop-filter: blur(5.9px);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

#MenuPrincipal{
      position: fixed;
      z-index: 10;
}

#MenuPrincipal ul{
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
}

#MenuPrincipal ul li{
    display: flex;
    justify-content: center;
    align-items: center;
    text-decoration: none;

    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
}

.BouttonMenu{
    display: flex;
    justify-content: center;
    align-items: center;

    height: 100%;              /* prend toute la hauteur du li */
    min-width: 120px;          /* largeur confortable */
    padding: 20px 0px;           /* espace horizontal */
    
    background-color: rgba(0, 0, 0, 0.25);
    color: white;              /* texte blanc */
    text-decoration: none;

    border-radius: 999px;      /* bords bien ronds (pill) */
    transition: 0.2s ease;     /* animation propre */

    background: none;
    border: none;
    font: inherit;
    cursor: pointer;
}

/* Effet hover (indispensable) */
.BouttonMenu:hover {
    background-color: rgba(0, 0, 0, 0);
}

/* slider actif */
#menu-slider {
    display: flex;
    justify-content: center;
    align-items: center;
    position: absolute;
    height: 70%;
    background: rgba(17, 17, 17, 0.9);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 999px;
    transition: transform 0.3s ease, width 0.3s ease;
    z-index: 0;
    left: 0;
    top: 0;
    pointer-events: none;
}


.BouttonMenu {
    position: relative;
    z-index: 1;
    cursor: pointer;
}

.MainMenuBackground{
  width: 99vw;
  height: 100vh;

  position: absolute;
  top: 0;
  left: 0;

  object-fit: cover;

  opacity: 0;
  transition: opacity 1.5s ease-in-out;

  z-index: -1;            /* même z-index pour toutes */
  pointer-events: none;
}

.MainMenuBackground.active{
  opacity: 1;             /* seule différence = visible */
}


#lastAdded{
    position: absolute;
    width: 300px;
    height: 330px;
    bottom: 30px;
    right: 30px;

    color: white; 

    font-family: system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;

    z-index: 3;
}

#lastAdded h2{
    position: absolute;
    top: 2%;
    left: 22%;
}

#redirectionButton{
    display: flex;
    flex-direction: column;
    align-items: center;
    flex-wrap: nowrap;
    justify-content: space-between;
    padding: 10px;

    position: absolute;
    top: 20%;
    left: 12%;
}

#redirectionButton img{
    width: 200px;
    height: auto;
}

#redirectionButton:hover{
  background: linear-gradient(
      180deg,
      rgba(48, 56, 61, 0) 0%,
      rgba(58, 68, 75, 0.42) 100%
    ),
    rgba(48, 56, 56, 0.24);
  box-shadow: inset 0 0 12px rgba(4, 6, 8, 0.44);
  border-radius: 0.5rem;
  z-index: -1;
  transition: all 0.3s ease-in;
    
}

#redirectionButton:not(:hover){
    opacity: 1;
    transition: all 0.3s ease-out;
}

/*=========================Transition=======================*/

#fade{
    background: #121212;
    background: linear-gradient(0deg, rgba(20, 20, 20, 1) 70%, rgba(20, 20, 20, 0.0) 100%);
    width: 99vw;
    height: 200px;
    z-index: 1;

    position: absolute;
    top: 85vh
}

/* ========================= About section (presentation + bio) ========================= */

#about{
  position: relative;
  top: 900px;
  left: 20px;

  z-index: 2;
  padding: 80px 24px 40px;
  max-width: 1100px;
  margin: 0 auto;
}

.about-card{
  position: relative;          /* overwrite .glass-card absolute */
  margin: 0;                   /* on gère via #about */
  padding: 28px;
  border-radius: 18px;
}

.about-grid{
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 28px;
  align-items: start;
}

.about-photo{
  width: 100%;
  height: auto;
  border-radius: 18px;
  object-fit: cover;
  box-shadow: 0 12px 30px rgba(0,0,0,0.35);
}

.about-content{
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.about-title{
  font-size: 28px;
  letter-spacing: 0.3px;
  margin: 0;
}

.about-highlights{
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 10px;
}

.about-item{
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(0,0,0,0.18);
  border: 1px solid rgba(255,255,255,0.10);
}

.about-icon{
  width: 28px;
  height: 28px;
  flex: 0 0 28px;
}

.about-bio{
  margin: 0;
  line-height: 1.65;
  font-size: 16px;
  color: rgba(255,255,255,0.92);
}

/* ========================= Présentation rapide des projets effectué ============================== */

#about-projects{
  position: relative;
  top: 1000px;

  height: 450px;

  display: flex;
  flex-direction: row;
  align-items: center;

}

.project{
  position: relative;

  text-align: center;

  display: flex;
  flex-direction: column;
  align-items: center;

  padding: 80px 24px 40px;
  width: 400px;
  height: 430px;
  margin: 0 auto;

  z-index: 3;
}

.project p{
  margin: 10px;
}






/* IMPORTANT: ton CSS avait un 'section { ... }' global (wave) => ça cassait toutes les sections.
   On le neutralise ici, et on garde l'effet seulement sur .wave-section */
section{
  position: relative;
  width: auto;
  height: auto;
  top: auto;
  overflow: visible;
  display: block;
  justify-content: initial;
  align-items: initial;
  min-height: 0;
}


/* ========================= Flow fix (content after hero) ========================= */
.page-content{
  position: relative;
  z-index: 2;
  padding-top: calc(100vh + 90px);
  padding-left: 20px;
  padding-right: 20px;
}

.page-section{
  scroll-margin-top: 130px;
}

.glass-card.is-relative{
  position: relative;
}

/* ------------------------- About projects row ------------------------- */
.projects-row{
  margin-top: 90px;
  display: flex;
  gap: 22px;
  align-items: stretch;
  justify-content: center;
  flex-wrap: wrap;
}

#about{
  top: auto !important;
  left: auto !important;
  padding: 0 !important;
  max-width: 1100px;
  margin: 0 auto;
}

#about-projects{
  top: auto !important;
  height: auto !important;
}

/* ========================= Sections titles ========================= */
.section-title{
  text-align: center;
  font-size: 34px;
  letter-spacing: 0.3px;
  margin: 0 auto 28px;
  max-width: 1100px;
}

/* ========================= Projects grid (DEV / GAMES / PHOTOS) ========================= */
.projects-grid{
  max-width: 1100px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
  padding-bottom: 80px;
}

@media (max-width: 980px){
  .projects-grid{ grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 640px){
  .projects-grid{ grid-template-columns: 1fr; }
}

.project-tile{
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px;
  text-decoration: none;
  border-radius: 16px;
  transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.project-tile:hover{
  transform: translateY(-3px);
  background: linear-gradient(
      180deg,
      rgba(48, 56, 61, 0) 0%,
      rgba(58, 68, 75, 0.42) 100%
    ),
    rgba(48, 56, 56, 0.24);
  box-shadow: inset 0 0 12px rgba(4, 6, 8, 0.44);
}

.project-tile-img{
  width: 100%;
  height: 170px;
  object-fit: cover;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.18);
}

.project-tile-title{
  margin: 0;
  font-size: 18px;
}

.project-tile-desc{
  margin: 0;
  opacity: 0.92;
  line-height: 1.45;
  font-size: 14px;
}

.section-empty{
  text-align: center;
  opacity: 0.75;
  max-width: 1100px;
  margin: 0 auto 80px;
}

/* ========================= Wave section (scoped) ========================= */
.wave-section{
  position: relative;
  width: 99vw;
  height: 80vh;
  overflow: hidden;
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 80vh;
  margin-top: 40px;
}

.wave-section .wave{
  position: absolute;
  left: 0;
  width: 100%;
  height: 100%;
}


/* ========================= Responsive (phones) ========================= */
/* Objectif: que tout reste lisible sur petits écrans (ex: iPhone XS ~375px, et même 320px) */

@media (max-width: 520px){
  header{
    margin-top: 18px;
  }

  /* Menu: éviter le débordement horizontal */
 
  #MenuPrincipal{
    top: 16px;
    left: 50%;
    transform: translateX(-50%);
    width: calc(100vw - 16px);     /* 🔥 rentre toujours */
    max-width: 520px;
    margin: 0;                     /* 🔥 stop le margin 10px de .glass-card */
    padding: 8px;                  /* 🔥 padding propre */
    padding-right: 8px;            /* 🔥 écrase le padding-right:40px de .glass-card */
    box-sizing: border-box;
  }

  /* UL: reste en ligne, et si ça dépasse → scroll horizontal */
  #MenuPrincipal ul{
    flex-wrap: nowrap;
    justify-content: flex-start;
    gap: 6px;
    overflow-x: auto;              /* 🔥 sauve les très petits écrans */
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;         /* Firefox */
    padding: 0;
  }
  #MenuPrincipal ul::-webkit-scrollbar{ display:none; } /* Chrome/Safari */

  /* Boutons: plus compacts */
  .BouttonMenu{
    padding: 8px 10px;
    font-size: 12px;
    min-width: auto;
    white-space: nowrap;
  }

  #menu-slider{
    height: 34px;
  }

  /* Hero: éviter que ça déborde */
  .MainMenuBackground,
  #fade{
    width: 100vw;
  }

  .page-content{
    padding-left: 12px;
    padding-right: 12px;
    padding-top: calc(100vh + 70px);
  }

  /* "Dernier ajout": le mettre centré et plus compact */
  #lastAdded{
    width: 92vw;
    max-width: 420px;
    height: 330px;
    right: auto;
    left: 50%;
    transform: translateX(-50%);
    bottom: 14px;
  }

  #lastAdded h2{
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    width: 100%;
  }

  #redirectionButton{
    left: 50%;
    transform: translateX(-50%);
    width: 86%;
  }

  #redirectionButton img{
    width: 180px;
  }

  /* About: passer en 1 colonne */
  .about-grid{
    grid-template-columns: 1fr;
  }

  .about-photo{
    max-height: 340px;
  }

  .about-title{
    font-size: 24px;
  }

  .about-bio{
    font-size: 15px;
  }

  /* Cartes projets de la home */
  .project{
    width: 92vw;
    max-width: 420px;
    height: auto;
    padding: 26px 18px 20px;
  }

  /* Grille projets (dev/games/photos) */
  .projects-grid{
    grid-template-columns: 1fr;
    gap: 14px;
  }

  .project-tile-img{
    height: 160px;
  }

  .section-title{
    font-size: 26px;
    margin-bottom: 18px;
  }

  /* Wave plus courte sur mobile */
  .wave-section{
    height: 55vh;
    min-height: 55vh;
  }
}

@media (max-width: 360px){
  /* Très petits écrans (320-360px) */
  .BouttonMenu{
    min-width: 88px;
    padding: 11px 8px;
    font-size: 13px;
  }

  #lastAdded{
    height: 285px;
  }

  #redirectionButton img{
    width: 160px;
  }

  .project-tile-img{
    height: 150px;
  }
}
