/* ========================================
   PROJECTS.CSS - Styles page projets
   ======================================== */

/* ========== HERO SECTION ========== */
.projects-hero {
  min-height: 40vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10rem 2rem 4rem;
  position: relative;
  overflow: hidden;
}

.projects-hero::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: radial-gradient(circle at 50% 20%, rgba(99, 102, 241, 0.15) 0%, transparent 40%);
  pointer-events: none;
}

.projects-hero #projects-starfield {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  background: transparent;
}

.projects-hero-content {
  max-width: 800px;
  text-align: center;
  position: relative;
  z-index: 1;
}

.projects-hero-content h1 {
  font-size: 3.5rem;
  font-weight: 800;
  margin-bottom: 1.5rem;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.hero-subtitle {
  font-size: 1.25rem;
  color: var(--text-secondary);
  line-height: 1.8;
}

/* ========== PROJECTS SECTION ========== */
.projects-section {
  padding: 4rem 2rem;
}

.projects-container {
  max-width: 1400px;
  margin: 0 auto;
}

/* ========== FILTERS & SORT BAR ========== */
.filters-bar {
  background: var(--bg-card);
  padding: 2rem;
  border-radius: 20px;
  border: 1px solid rgba(99, 102, 241, 0.1);
  margin-bottom: 3rem;
  display: flex;
  flex-wrap: wrap;
  gap: 3rem;
  align-items: flex-start;
}

.filters-group,
.sort-group {
  flex: 1;
  min-width: 280px;
}

.filters-group h3,
.sort-group h3 {
  font-size: 1rem;
  color: var(--text-secondary);
  margin-bottom: 1rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  font-weight: 600;
}

.filter-buttons,
.sort-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.filter-btn,
.sort-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.75rem 1.25rem;
  background: var(--bg-secondary);
  border: 2px solid rgba(99, 102, 241, 0.2);
  border-radius: 12px;
  color: var(--text-secondary);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  font-family: inherit;
}

.filter-btn:hover,
.sort-btn:hover {
  border-color: var(--accent-1);
  background: rgba(99, 102, 241, 0.1);
  color: var(--text-primary);
  transform: translateY(-2px);
}

.filter-btn.active,
.sort-btn.active {
  background: var(--accent-gradient);
  border-color: transparent;
  color: white;
  box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

.filter-btn svg,
.sort-btn svg {
  transition: transform 0.3s ease;
}

.filter-btn:hover svg,
.sort-btn:hover svg,
.filter-btn.active svg,
.sort-btn.active svg {
  transform: scale(1.1);
}

/* ========== PROJECTS GRID ========== */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
  gap: 2rem;
}

.project-card {
  background: var(--bg-card);
  border-radius: 20px;
  overflow: hidden;
  border: 1px solid rgba(99, 102, 241, 0.1);
  transition: all 0.3s ease;
  display: flex;
  flex-direction: column;
}

.project-card:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 50px rgba(99, 102, 241, 0.3);
  border-color: rgba(99, 102, 241, 0.3);
}

.project-content {
  padding: 2rem;
  flex-direction: column;
  flex: 1;
  display: flex;
}

.project-badge {
  display: inline-block;
  padding: 0.4rem 1rem;
  background: rgba(99, 102, 241, 0.15);
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: 20px;
  color: var(--accent-1);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  width: fit-content;
  margin-bottom: 1rem;
}

.project-badge-entreprise {
  background: rgba(139, 92, 246, 0.15);
  border-color: rgba(139, 92, 246, 0.3);
  color: var(--accent-2);
}

.project-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.5rem;
  margin-bottom: 1rem;
}

.project-text {
  flex: 1;
}

.project-text h3 {
  color: var(--text-primary);
  margin-bottom: 0.5rem;
  font-size: 1.25rem;
}

.project-logo {
  width: 100px;
  height: 100px;
  object-fit: cover;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.05);
  padding: 0.5rem;
  border: 1px solid rgba(99, 102, 241, 0.2);
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.project-logo:hover {
  transform: scale(1.05);
  border-color: var(--accent-1);
  box-shadow: 0 4px 20px rgba(99, 102, 241, 0.3);
}

.project-tech {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.project-badge-tech {
  padding: 0.5rem 1rem;
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: 20px;
  color: var(--text-secondary);
  font-size: 0.875rem;
  font-weight: 500;
  transition: all 0.3s ease;
}

.project-badge-tech:hover {
  background: rgba(99, 102, 241, 0.2);
  border-color: var(--accent-1);
  color: var(--text-primary);
  transform: translateY(-2px);
}

.project-description {
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
  margin-bottom: 1.5rem;
  flex: 1;
}

.project-view-btn {
  margin-top: auto;
  width: fit-content;
  text-align: center;
}

/* ========== RESPONSIVE - TABLETTES ========== */
@media (max-width: 968px) {
  .projects-hero-content h1 {
    font-size: 2.5rem;
  }

  .hero-subtitle {
    font-size: 1.1rem;
  }

  .filters-bar {
    padding: 1.5rem;
    gap: 2rem;
  }

  .projects-grid {
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  }
}

/* ========== RESPONSIVE - MOBILE ========== */
@media (max-width: 768px) {
  .projects-hero {
    min-height: 30vh;
    padding: 8rem 1.5rem 3rem;
  }

  .projects-hero-content h1 {
    font-size: 2rem;
  }

  .hero-subtitle {
    font-size: 1rem;
  }

  .projects-section {
    padding: 3rem 1.5rem;
  }

  .filters-bar {
    flex-direction: column;
    gap: 2rem;
  }

  .filters-group,
  .sort-group {
    width: 100%;
    min-width: auto;
  }

  .filter-buttons,
  .sort-buttons {
    flex-direction: column;
  }

  .filter-btn,
  .sort-btn {
    width: 100%;
    justify-content: center;
  }

  .projects-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .project-badge-tech {
    font-size: 0.8rem;
    padding: 0.4rem 0.8rem;
  }

  .project-logo {
    display: none;
  }

  .project-header {
    display: block;
  }

  .project-text h3 {
    margin-bottom: 1rem;
  }
}
