/* Reset de base */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

/* Header */
header {
  text-align: center;
  padding: 2rem 1rem;
  background: #f9f9f9;
}

header h1 {
  font-size: 2rem;
}

header p {
  color: #555;
}

/* Grille */
.portfolio-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1.5rem;
  padding: 2rem;
}

.project-item {
  cursor: pointer;
  text-align: center;
  transition: transform 0.3s ease;
}

.project-item:hover {
  transform: scale(1.03);
}

.project-item img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  transition: transform 0.3s ease;
}

.project-item:hover img {
  transform: scale(1.05);
}

.project-item h3 {
  background: rgba(0, 0, 0, 0.6);
  color: white;
  padding: 0.5rem;
  margin-top: -3px;
  transition: background-color 0.3s ease;
}


.project-item {
  position: relative;
  text-align: center;
  cursor: pointer;
  overflow: hidden;
}

.project-item h3 {
  position: absolute;
  bottom: 0;
  width: 100%;
  background: rgba(0, 0, 0, 0.6);
  color: white;
  padding: 0.5rem;
  margin: 0;
  font-size: 1rem;
  transition: background-color 0.3s ease;
}

.project-item:hover h3 {
  background-color: rgba(0, 0, 0, 0.85);
}







.project-item {
  position: relative;
  text-align: center;
  cursor: pointer;
  overflow: hidden;
}

.project-item h3 {
  position: absolute;
  bottom: 0;
  width: 100%;
  background: rgba(0, 0, 0, 0.6);
  color: white;
  padding: 0.8rem;
  margin: -10;
  font-size: 1rem;
  transition: background-color 0.3s ease;
  border-bottom-left-radius: 10px;
  border-bottom-right-radius: 10px;
}

.project-item:hover h3 {
  background-color: rgba(0, 0, 0, 0.85);
}



/* Popup */
.popup {
  position: fixed;
  top: 0;
  left: 0;
  height: 100vh;
  width: 100vw;
  background-color: rgba(0, 0, 0, 0.8);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.popup-content {
  background-color: #fff;
  border-radius: 10px;
  max-width: 90%;
  max-height: 90%;
  width: 800px;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 1rem;
  overflow: hidden;
  position: relative;
}

#popup-title {
  color: white;
  background-color: #333;
  width: 100%;
  padding: 1rem;
  text-align: center;
  font-size: 1.4rem;
  border-radius: 10px;
}

.popup-body {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  width: 100%;
  height: calc(100vh - 200px); /* prend en compte titre + description */
  overflow: visible;
}

#popup-image {
  max-height: 100%;
  max-width: 100%;
  object-fit: contain;
  transition: opacity 0.5s ease;
}




/* Description */
#popup-description {
  padding: 1rem;
  text-align: center;
  font-size: 1rem;
  color: #333;
}

/* Navigation */
.nav-btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: rgba(0, 0, 0, 0.2);
  color: white;
  border: none;
  font-size: 1.8rem;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  cursor: pointer;
  opacity: 0.4;
  transition: background 0.3s ease, opacity 0.3s ease, transform 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

.nav-btn:hover {
  background: rgba(0, 0, 0, 0.6);
  opacity: 1;
  transform: translateY(-50%) scale(1.1);
}


#prev-btn {
  left: 10px;
}

#next-btn {
  right: 10px;
}

/*DOT*/

.popup-dots {
  display: flex;
  justify-content: center;
  margin: 1rem 0 0.5rem 0;
  gap: 8px;
}

.popup-dots .dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background-color: #ccc;
  transition: background-color 0.3s ease;
  cursor: default;
}

.popup-dots .dot.active {
  background-color: #333;
}


/* Close button */
.close-btn {
  position: absolute;
  top: 10px;
  right: 20px;
  font-size: 2rem;
  color: white;
  cursor: pointer;
  transition: transform 0.4s ease;
}

.close-btn:hover {
  transform: rotate(90deg) scale(1.3);
}

.share-buttons button {
  margin: 0.3rem;
  padding: 0.5rem 1rem;
  border: none;
  background: #333;
  color: white;
  cursor: pointer;
  transition: background 0.3s;
}

.share-buttons button:hover {
  background: #555;
}
/* Style pour la section des boutons de partage */
.share-buttons {
  text-align: center;
  margin: 2em 0;
}

.share-buttons h2 {
  font-size: 1.4em;
  margin-bottom: 1em;
}

/* Conteneur des icônes */
.social-icons {
  display: flex;
  justify-content: center;
  gap: 20px;
  flex-wrap: wrap;
}

/* Icônes sociales */
.social-icons a img {
  width: 40px;
  height: 40px;
  transition: transform 0.3s ease, opacity 0.3s ease;
  opacity: 0.8;
}

.social-icons a img:hover {
  transform: scale(1.1);
  opacity: 1;
}


/* Plein écran */
.fullscreen .popup-content {
  width: 100vw;
  height: 100vh;
  border-radius: 0;
}