body {
  margin: 0;
  padding: 0;
  overflow: hidden;
  font-family: 'Caveat Brush', cursive;
}

.library {
  position: relative;
  width: 100vw;
  height: 100vh;
  overflow: hidden;
}

.background {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* === OBJETS INTERACTIFS === */
.item {
  position: absolute;
  cursor: pointer;
  width: 200px; /* ta taille initiale */
  transition: transform 0.2s ease;
}

.item:hover {
  transform: scale(1.15);
}

#skills { bottom: 71%; left: 83%; width: 12.4vw; }        
#education { top: 45%; left: 80%; width: 13.4vw; }    
#experience { top: 39%; left: 57%; width: 13.4vw; }    
#contacts { top: 78%; left: 57%; width: 13.4vw; }     
#cv { top: 70%; left: 84%; width: 14.4vw; }            
#photos { top: 81%; left: 73%; width: 8.8vw; }       
#projets { top: 32%; left: 18%; width: 14.4vw; }       
#github { top: 12%; left: 58%; width: 17.8vw; }


.popup {
  position: absolute;
  display: none;
  color: #ffffff;
  font-size: 22px;
  pointer-events: none;
  z-index: 10;
  text-shadow:
    -1px -1px 0 #8b8686,  
     1px -1px 0 #8b8686,
    -1px  1px 0 #8b8686,
     1px  1px 0 #8b8686;
}


.modal {
  display: none;
  position: fixed;
  z-index: 20;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0, 0, 0, 0.6);
  animation: fadeInOverlay 0.3s ease;
}

.modal-content {
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 10% auto;
  position: relative;
  width: fit-content;
  background: none;
  box-shadow: none;
  border: none;
}

.modal-image {
  width: 100%;
  max-width: 700px;
  border-radius: 12px;
  animation: modalFadeIn 0.4s ease;
}

.close {
  position: absolute;
  top: 20px;
  right: -40px;
  color: white;
  font-size: 60px;
  font-weight: bold;
  cursor: pointer;
  text-shadow: 0 0 5px black;
}

.close:hover {
  color: #ffbfbf;
}

@keyframes modalFadeIn {
  from {
    opacity: 0;
    transform: translateY(40px) scale(0.9);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes fadeInOverlay {
  from { opacity: 0; }
  to { opacity: 1; }
}

.gallery-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  gap: 20px;
  position: relative;
  width: 90%;
  max-width: 1000px;
  margin: auto;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
  width: 100%;
  padding: 30px;
}

.gallery-grid img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  border-radius: 10px;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.gallery-grid img:hover {
  transform: scale(1.05);
  box-shadow: 0 4px 10px rgba(0, 0, 0, 0.3);
}

.photo-viewer {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.8);
  justify-content: center;
  align-items: center;
  z-index: 10;
}

.photo-viewer img {
  max-width: 90vw;
  max-height: 90vh;
  border-radius: 0px;
  box-shadow: 0 6px 15px rgba(0, 0, 0, 0.5);
  animation: fadeIn 0.3s ease;
}

.photo-viewer.show {
  display: flex;
}

@keyframes fadeIn {
  from { opacity: 0; transform: scale(0.98); }
  to { opacity: 1; transform: scale(1); }
}

.mode-button {
    position: fixed;
    top: 20px;      
    left: 25px;      
    font-size: 30px;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 10;
    transition: transform 0.2s ease;
}
.music-button {
    position: fixed;
    top: 65px;        
    left: 28px;
    font-size: 26px;
    background: none;
    border: none;
    cursor: pointer;
    z-index: 10;
    transition: transform 0.2s ease;
}

.music-button:hover {
    transform: scale(1.2);
}



.mode-button:hover {
    transform: scale(1.2);
}

body, .library {
    transition: background-color 0.6s ease, background-image 0.6s ease;
}

.contact-wrapper {
  position: relative;
  display: inline-block;
}

.contact-link {
  position: absolute;
  display: block;
  cursor: pointer;
}

.linkedin {
  top: 29%;
  left: 39%;
  width: 7%;
  height: 10%;
  transform: translate(-50%, -50%);
}

.email {
  top: 29%;
  left: 50%;
  width: 7%;
  height: 15%;
  transform: translate(-50%, -50%);
}

#modal-contacts .contact-image {
  width: 800px;     
  height: auto;
}


