.portfolio-section {
  padding: 60px 20px;
  background-color: #12141a;
  color: #ccc;
  border-bottom: 1px solid #222;
}

.portfolio-section h2 {
  font-size: 2em;
  color: #00f5ff;
  margin-bottom: 10px;
  text-align: center;
}

.section-desc {
  text-align: center;
  margin-bottom: 30px;
  color: #aaa;
}

.portfolio-grid {
  display: grid;
  gap: 25px;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  max-width: 1200px;
  margin: 0 auto;
}

.portfolio-card {
  background-color: #1a1c22;
  border-radius: 12px;
  overflow: hidden;
  text-align: center;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  cursor: pointer;
}

.portfolio-card:hover {
  transform: scale(1.03);
  box-shadow: 0 0 12px rgba(0, 245, 255, 0.1);
}

.portfolio-card img {
  width: 100%;
  height: auto;
  display: block;
  border-bottom: 1px solid #2a2d34;
}

.portfolio-card h3 {
  padding: 15px;
  color: #00f5ff;
  font-size: 1em;
}

/* En-tête Portfolio */
/* === En-tête Portfolio Modernisé === */
.portfolio-header {
  background-image: linear-gradient(rgba(0,0,0,0.7), rgba(0,0,0,0.9)), url('pictures/muyot.jpg');
  background-size: cover;
  background-position: center;
  height: 60vh;
  display: flex;
  justify-content: center;
  align-items: center;
  position: relative;
  text-align: center;
  padding: 0 20px;
}

.portfolio-header .overlay {
  background: rgba(0, 0, 0, 0.6);
  padding: 40px;
  border-radius: 10px;
}

.portfolio-header .title {
  font-size: 3rem;
  font-family: 'Orbitron', sans-serif;
  color: #00f5ff;
  text-shadow: 0 0 15px #00f5ff;
}

.portfolio-header .subtitle {
  font-size: 1.2rem;
  color: #ccc;
  font-weight: 300;
  margin-top: 10px;
}

@keyframes neonPulse {
  0% {
    text-shadow: 0 0 3px #00f5ff, 0 0 6px #00f5ff;
  }
  50% {
    text-shadow: 0 0 6px #00f5ff, 0 0 12px #00f5ff;
  }
  100% {
    text-shadow: 0 0 3px #00f5ff, 0 0 6px #00f5ff;
  }
}

.portfolio-header .title {
  animation: neonPulse 2.5s infinite;
}


/* Animation d'apparition douce */
@keyframes fadeUp {
  0% {
    opacity: 0;
    transform: translateY(30px);
  }
  100% {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Classe initiale cachée */
.reveal-on-scroll {
  opacity: 0;
  transform: translateY(30px);
  transition: all 0.6s ease-out;
}

/* Classe active déclenchée */
.reveal-on-scroll.active {
  animation: fadeUp 1s ease-out forwards;
}


/*-----------------------------------------------*/

/* Popup Modal */
.modal {
  display: none;
  position: fixed;
  z-index: 9999;
  left: 0; top: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(10,10,10,0.95);
  justify-content: center;
  align-items: center;
  padding: 30px;
}

.modal-content {
  background-color: #1a1c22;
  padding: 20px;
  border-radius: 10px;
  text-align: center;
  max-width: 600px;
  width: 90%;
  color: #ccc;
  position: relative;
  animation: zoomIn 0.3s ease;
}

.modal-content img {
  width: 100%;
  height: auto;
  border-radius: 8px;
  margin-bottom: 15px;
}

.modal-content h2 {
  color: #00f5ff;
  margin-bottom: 10px;
}

.modal-content p {
  color: #aaa;
  font-size: 0.95em;
}

.modal .close {
  position: absolute;
  top: 15px;
  right: 20px;
  font-size: 28px;
  font-weight: bold;
  color: #00f5ff;
  cursor: pointer;
}

@keyframes zoomFade {
  0% {
    opacity: 0;
    transform: scale(0.85) translateY(20px);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

.modal-content {
  animation: zoomFade 0.4s ease-out;
}

.modal::before {
  content: "";
  position: absolute;
  top: 0; left: 0;
  width: 100%;
  height: 100%;
  backdrop-filter: blur(5px); /* Effet flou */
  background-color: rgba(0, 0, 0, 0.5); /* Assombrissement */
  z-index: -1; /* Derrière le contenu du modal */
}

/*--------------------------------------------------------------------------------------------*/

.modal-actions {
  margin-top: 20px;
  display: flex;
  justify-content: center;
  gap: 15px;
  flex-wrap: wrap;
}

.action-btn {
  background: #00f5ff1a;
  border: 1px solid #00f5ff33;
  color: #00f5ff;
  padding: 8px 12px;
  border-radius: 6px;
  text-decoration: none;
  font-size: 0.9rem;
  transition: background 0.3s ease, transform 0.2s;
}

.action-btn:hover {
  background: #00f5ff33;
  transform: scale(1.05);
}

.action-btn i {
  margin-right: 6px;
}

/*------------------------------------------------------------------------------------------------------*/

.card-metrics {
  display: flex;
  justify-content: center;
  gap: 15px;
  padding: 8px 0 12px;
  font-size: 0.85rem;
  color: #00f5ff;
  user-select: none;
}

.card-metrics span {
  cursor: pointer;
}

.card-metrics .likes:hover {
  color: #ff4f81;
}

.likes.liked {
  color: #ff4f81;
  opacity: 0.6;
  cursor: default;
}


/*-------------------------------------------------------------------------------------------------------*/

.like-toast {
  position: fixed;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  background-color: #1a1c22;
  color: #00f5ff;
  padding: 10px 20px;
  border: 1px solid #00f5ff33;
  border-radius: 8px;
  font-size: 0.95rem;
  opacity: 0;
  pointer-events: none;
  z-index: 9999;
  transition: opacity 0.5s ease, transform 0.5s ease;
}

.like-toast.show {
  opacity: 1;
  transform: translateX(-50%) translateY(-10px);
}
/*--------------------------------------------------------------------------------------------------------*/


@media screen and (max-width: 768px) {
  .portfolio-grid {
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 16px;
  }

  .portfolio-card h3 {
    font-size: 0.9em;
    padding: 10px;
  }

  .modal-content {
    padding: 15px;
    max-width: 95%;
  }

  .modal-content h2 {
    font-size: 1.4rem;
  }

  .modal-content p {
    font-size: 0.9rem;
  }

  .modal .close {
    top: 10px;
    right: 15px;
    font-size: 24px;
  }
}

