* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

#Projects {
  width: 100%;
  display: flex;
  align-items: center;
  padding: 30px 0;
}

.container {
  width: 80%;
  max-width: 1200px;
  margin: 0 auto;
}

.items-links {
  width: 60%;
  margin: 40px auto;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 40px;
}

.item-link {
  border: 2px solid #007bff;
  padding: 10px 30px;
  font-size: 18px;
  font-weight: 500;
  color: #007bff;
  cursor: pointer;
  border-radius: 30px;
  transition: .4s ease;
}

.item-link:hover {
  background: #007bff;
  color: #fff;
}

.menu-active {
  background: #007bff;
  color: #fff;
}

.gallery {
  display: grid;
  grid-template-columns: 1 fr 1 fr 1 fr;
  gap: 20px;
}

.project-img {
  border-radius: 12px;
  overflow: hidden;
  /* Contour plus marqué */
  border: 2.5px solid #ddd;
  box-shadow: 0 2px 12px 2px rgba(120,120,120,0.25);
  height: 14rem;
  animation: SclAnimation .4s ease;
  position: relative;
  background: #f7f7f7;
  opacity: 1;
  transition: opacity .4s;
}

.project-img.hide {
  opacity: 0;
  pointer-events: none;
  transition: opacity .4s;
}

@keyframes SclAnimation {
  0% { transform: scale(0); }
  100% { transform: scale(1); }
}

.project-img:hover .overlay {
  top: 0;
}

.overlay {
  height: 100%;
  width: 100%;
  position: absolute;
  top: 100%;
  left: 0;
  background: linear-gradient(transparent,#007bff);
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  gap: 10px;
  transition: .4s ease;
}

.overlay h4 {
  font-size: 20px;
  color: #fff;
}

/* UNE SEULE REGLE pour <p> avec fond flou autour du texte */
.overlay p {
  display: inline-block;
  position: relative;
  z-index: 2;
  font-size: 1.5rem;
  font-weight: bold;
  color: #ff9800;
  padding: 0.6em 1em;
  border-radius: 12px;
  background: rgba(0, 0, 0, 0.18);
  backdrop-filter: blur(7px);
  -webkit-backdrop-filter: blur(7px);
  border: 1px solid rgba(255,255,255,0.13);
  box-shadow: 0 2px 6px rgba(0,0,0,0.13);
}

.action-aria {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn,
.btn:visited,
.btn:active {
  display: inline-block;
  width: fit-content;
  padding: 10px 20px;
  background: #fff;
  border-radius: 12px;
  text-decoration: none !important;
  color: #007bff;
  font-size: 16px;
  font-weight: 500;
  border: 1px solid transparent;
  transition: .4s ease;
}

.btn-light {
  background: transparent;
  border-color: #fff;
  color: #fff;
}

.btn:hover,
.btn-light:hover,
.btn-view:hover {
  background: #fff !important;
  color: #007bff !important;
  border-color: #fff !important;
}

.btn-view {
  background: #fff;
  color: #007bff;
  border: 1px solid transparent;
  transition: .4s ease;
}
.btn-view:hover {
  background: transparent !important;
  color: #fff !important;
  border-color: #fff !important;
}

.project-img:hover img {
  transform: scale(1.1);
}

img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  transition: .4s ease;
}

/* Responsive */
@media (max-width:1024px) {
  .container { width: 90%; }
  .items-links { width: 90%; }
}
@media (max-width:991px) {
  .items-links { width: 100%; }
  .gallery { grid-template-columns: 1 fr 1 fr; }
}
@media (max-width:600px) {
  .items-links {
    gap: 20px;
    flex-wrap: wrap;
  }
  .gallery { grid-template-columns: 1 fr; }
  .project-img { height: max-content; }
}

/* Modal */
.modal {
  display: none;
  position: fixed;
  z-index: 1000;
  left: 0; top: 0;
  width: 100%; height: 100%;
  background-color: rgba(0,0,0,0.8);
  align-items: center;
  justify-content: center;
}
.modal.show { display: flex !important; }
.modal-content {
  width: auto;
  height: auto;
  max-width: 80vw;
  max-height: 80vh;
  box-shadow: 0 0 8px rgba(255,255,255,0.5);
  border-radius: 8px;
  /* décalage à droite si menu latéral */
  transform: translateX(4cm);
}
.modal-close {
  position: absolute;
  top: 20px; right: 30px;
  color: #fff;
  font-size: 40px;
  cursor: pointer;
  user-select: none;
}

.btn-light {
  color: #fff !important;
}