#projets {
  background: linear-gradient(180deg, #2c3e50 0%, #7892ad 100%);
  padding: 3rem 1rem;
  color: #f0f3fa;
}

#projets h2 {
  color: #ffffff;
  text-align: center;
  font-weight: 700;
  margin-bottom: 1.5rem;
}

.projets-intro {
  color: #dfe4ea;
  max-width: 800px;
  margin: 0 auto 2rem auto;
  text-align: center;
  font-size: 1.1rem;
  line-height: 1.6;
}

.projets-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2rem;
  padding: 2rem 0;
  align-items: stretch;
  margin: 0 auto;
  max-width: 1200px;
}

.project-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 2px 18px rgba(44,62,80,0.07), 0 1.5px 3.5px rgba(44,62,80,0.12);
  transition: transform 0.16s, box-shadow 0.22s;
  max-height: 700px; 
  max-width: 375px;  
  margin: 0 auto;
  height: auto;
}

.project-card:hover {
  transform: translateY(-6px) scale(1.033);
  box-shadow: 0 8px 24px rgba(44,62,80,0.13), 0 5px 10px rgba(44,62,80,0.15);
}

.project-card-img img {
  width: 100%;
  max-height: 160px;  
  object-fit: contain;
  background: #f6f7fa;
  display: block;
}

.project-card-content {
  padding: 1rem 1rem 1rem 1rem; 
  text-align: left;
  display: flex;
  flex-direction: column;
  flex-grow: 1;
  min-height: 0;
}

.project-title {
  font-size: 1.25rem;
  font-weight: 700;
  margin-bottom: 0.8rem;
  color: var(--secondary-color);
  font-family: 'Roboto', sans-serif;
  text-align: center;
}

.project-desc {
  font-size: 1.05rem; 
  color: var(--text-color-light);
  margin-bottom: 0.8rem;
  text-align: center;
}

.project-card-video {
  position: relative;
  width: 100%;
  padding-bottom: 52.5%;
  overflow: hidden;
  background: #ffffff;
  flex-shrink: 0;
  height: auto;
  min-height: 0;
  margin-top: 0.8rem;
}

.project-card-video iframe {
  position: absolute;
  width: 100%;
  height: 100%;
  left: 0;
  top: 0;
  border: 0;
  padding: 1rem;
}

.project-card-footer {
  padding: 1.2rem 0;
  text-align: center;
  margin-top: 1rem;
  border-top: 1px solid #eee;
}

.project-link {
  display: inline-block;
  font-weight: 600;
  color: var(--primary-color);
  background: #f0f3fa;
  border-radius: 14px;
  padding: 0.6em 1.3em;
  font-size: 1rem;
  text-decoration: none;
  transition: background 0.19s, color 0.19s;
}

.project-link:hover {
  background: var(--button-hover-color);
  color: #fff;
}

@media (min-width: 700px) {
  .projets-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 2.5rem;
    align-items: stretch;
  }
  .project-card {
    max-height: 650px;
    max-width: 450px;
  }
}

@media (min-width: 900px) {
  .projets-grid {
    grid-template-columns: repeat(2, 1fr); 
    gap: 2.5rem;
    align-items: stretch;
    max-width: 900px; 
  }
  .project-card {
    max-width: 450px; 
    margin: 0 auto;
  }
}

@media (min-width: 1100px) {
  .projets-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1.8rem;
    max-width:760px; 
  }
  .project-card {
    max-width: 470px;
    margin: 0 auto;
  }
}
