/* Projects.css */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

.projects {
  padding: 6rem 2rem;
  max-width: 1400px;
  margin: 0 auto;
}

.summary-title {
  font-size: 3rem;
  font-weight: 700;
  margin-bottom: 4rem;
  letter-spacing: -1px;
  color: #ffffff;
}

.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.5rem;
  align-items: start;
}

/* Card */
.project-card {
  background: #121212; 
  border: 1px solid rgba(255, 255, 255, 0.1); 
  border-radius: 12px;
  overflow: hidden;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
  position: relative;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
}

.project-card:hover {
  transform: translateY(-5px);
  border-color: rgba(255, 255, 255, 0.3);
  background: #161616;
}

.project-card.active {
  z-index: 10;
  background: #161616;
  border-color: #ffffff; 
  box-shadow: 0 30px 60px rgba(0, 0, 0, 0.9);
}

/* Bannière */
.project-banner {
  width: 100%;
  height: 200px;
  background-size: cover;
  background-position: center;
  border-radius: 12px 12px 0 0;
  position: relative;
  border-bottom: 1px solid rgba(255,255,255,0.05);
}

/* Content */
.project-content {
  padding: 1.5rem;
  background: transparent;
}

.project-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  margin-bottom: 1rem;
}

.project-info-left h3 {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 0.5rem;
  color: #ffffff;
  letter-spacing: 0.5px;
}

.project-info-left p {
  font-size: 0.9rem;
  color: #888;
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/*  Boutons flèches */
.project-arrow-btn {
  width: 44px;
  height: 44px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.project-arrow-btn:hover {
  background: rgba(255, 255, 255, 0.2);
  border-color: #fff;
}

.project-arrow-btn svg {
  width: 20px;
  height: 20px;
  color: #fff;
  transition: transform 0.3s;
}


.project-card.active .project-arrow-btn {
  background: #ffffff;
  border-color: #ffffff;
}

.project-card.active .project-arrow-btn svg {
  transform: rotate(180deg);
  color: #000000; 
}
.project-more-text { display: none; }


/* Details */
.project-details,
.project-extended {
  max-height: 0;
  opacity: 0;
  overflow: hidden;
  transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.project-card.active .project-details {
  max-height: 400px; 
  opacity: 1;
  margin-top: 1.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.project-card.active .project-extended {
  max-height: 1500px;
  opacity: 1;
  margin-top: 1rem;
}

.detail-label {
  font-size: 0.65rem;
  text-transform: uppercase;
  color: #666;
  margin-bottom: 6px;
  display: block;
  letter-spacing: 1px;
}
.detail-value {
  font-size: 0.9rem;
  color: #fff;
  font-weight: 500;
}

/* Detail supplementaire */
.detail-link {
  font-size: 0.9rem;
  color: #fff;
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, 0.3);
  padding-bottom: 2px;
  transition: all 0.3s ease;
  display: inline-block;
}

.detail-link:hover {
  border-color: #fff;
  opacity: 0.8;
}

.project-socials {
  display: flex;
  gap: 10px;
}

.social-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #fff;
  transition: all 0.3s ease;
}

.social-icon svg {
  width: 18px;
  height: 18px;
  stroke: currentColor;
}

.social-icon:hover {
  background: #fff;
  color: #000;
  border-color: #fff;
  transform: translateY(-2px);
}


/* Contenu étendu */
.project-extended-content {
  padding: 0 1.5rem 1.5rem 1.5rem;
}

.project-description h4 {
  font-size: 1.1rem;
  color: #fff;
  margin-bottom: 0.5rem;
}
.project-description p {
  font-size: 0.95rem;
  color: #aaa;
  line-height: 1.6;
}

/* Galerie */
.project-gallery {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 1.5rem;
}

.project-gallery-item {
  aspect-ratio: 16/9;
  background-size: cover;
  background-position: center;
  border-radius: 8px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  cursor: pointer;
  transition: transform 0.3s;
}
.project-gallery-item:hover {
  transform: scale(1.03);
  border-color: #fff;
}

/* LIGHTBOX */
.lightbox {
  display: none; 
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0, 0, 0, 0.95);
  z-index: 9999;
  align-items: center;
  justify-content: center;
}

.lightbox.active {
  display: flex; 
}

.lightbox-content {
  position: relative;
  max-width: 90%;
  max-height: 90%;
}

.lightbox-image {
  max-width: 100%;
  max-height: 90vh;
  border-radius: 4px;
}

.lightbox-prev, .lightbox-next, .lightbox-close {
  position: absolute;
  background: rgba(255,255,255,0.1);
  border: none;
  color: #fff;
  cursor: pointer;
  z-index: 10000;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: 0.3s;
}
.lightbox-close { top: 2rem; right: 2rem; width: 40px; height: 40px; }
.lightbox-prev { left: 2rem; top: 50%; transform: translateY(-50%); width: 50px; height: 50px; }
.lightbox-next { right: 2rem; top: 50%; transform: translateY(-50%); width: 50px; height: 50px; }
.lightbox-counter {
    position: absolute;
    bottom: 2rem;
    color: white;
    font-size: 1rem;
}

/* RESPONSIVE */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.5rem;
  align-items: start;
}

@media (max-width: 1024px) {
  .projects-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 2rem;
  }
}

@media (max-width: 768px) {
  .projects-grid {
    grid-template-columns: 1fr;
    gap: 2rem;
  }
  
  .summary-title {
    font-size: 2rem;
  }
  
  .projects {
    padding: 3rem 1.5rem;
  }
}
