/* ========================================
   🚀 PROJECTS SECTION - Experience Theme
   ======================================== */

.projects-section {
  padding: 100px 0;
  background: linear-gradient(135deg, #0a0a0a 0%, #1a1a2e 50%, #0a0a0a 100%);
  position: relative;
  overflow: hidden;
  min-height: 100vh;
}

/* Background animé (identique aux autres pages) */
.projects-section::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-image: 
    linear-gradient(rgba(0, 212, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 212, 255, 0.03) 1px, transparent 1px);
  background-size: 50px 50px;
  animation: gridMove 20s linear infinite;
  z-index: 1;
}

@keyframes gridMove {
  0% { transform: translate(0, 0); }
  100% { transform: translate(50px, 50px); }
}

.projects-section::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 900px;
  height: 900px;
  background: radial-gradient(
    circle,
    rgba(0, 212, 255, 0.08) 0%,
    rgba(123, 44, 191, 0.06) 40%,
    transparent 70%
  );
  animation: pulseGlow 6s ease-in-out infinite;
  z-index: 1;
}

@keyframes pulseGlow {
  0%, 100% { 
    opacity: 0.4;
    transform: translate(-50%, -50%) scale(1);
  }
  50% { 
    opacity: 0.7;
    transform: translate(-50%, -50%) scale(1.1);
  }
}

.projects-section > .container {
  position: relative;
  z-index: 10;
}

/* ==========================================
   📋 SECTION HEADER
   ========================================== */

.section-header {
  text-align: center;
  margin-bottom: 60px;
}

.section-title {
  font-size: 3rem;
  font-weight: 700;
  background: linear-gradient(135deg, #00d4ff 0%, #7b2cbf 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 20px;
  text-shadow: 0 0 30px rgba(0, 212, 255, 0.3);
}

.section-subtitle {
  font-size: 1.2rem;
  color: rgba(255, 255, 255, 0.8);
  max-width: 700px;
  margin: 0 auto;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

/* ==========================================
   🎯 FILTERS
   ========================================== */

.projects-filter {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 15px;
  margin-bottom: 60px;
  padding: 25px;
  background: rgba(26, 26, 26, 0.8);
  backdrop-filter: blur(10px);
  border: 2px solid rgba(0, 212, 255, 0.2);
  border-radius: 60px;
  max-width: 900px;
  margin-left: auto;
  margin-right: auto;
  box-shadow: 
    0 8px 32px rgba(0, 0, 0, 0.4),
    inset 0 0 30px rgba(0, 212, 255, 0.05);
}

.filter-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(5px);
  border: 2px solid rgba(255, 255, 255, 0.1);
  border-radius: 50px;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.3s ease;
  position: relative;
  overflow: hidden;
}

.filter-btn::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0);
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #00d4ff, #7b2cbf);
  border-radius: 50px;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: -1;
}

.filter-btn:hover,
.filter-btn.active {
  border-color: #00d4ff;
  color: #ffffff;
  transform: translateY(-3px);
  box-shadow: 0 10px 30px rgba(0, 212, 255, 0.4);
}

.filter-btn.active::before {
  transform: translate(-50%, -50%) scale(1);
}

.filter-btn i {
  font-size: 1.2rem;
}

/* ==========================================
   💳 PROJECTS GRID
   ========================================== */

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
  gap: 30px;
  margin-bottom: 80px;
}

.project-card {
  background: rgba(26, 26, 26, 0.9);
  backdrop-filter: blur(15px);
  border: 2px solid rgba(0, 212, 255, 0.2);
  border-radius: 24px;
  overflow: hidden;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 
    0 10px 40px rgba(0, 0, 0, 0.5),
    inset 0 0 30px rgba(0, 212, 255, 0.03);
}

.project-card.hidden {
  display: none;
}

.project-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, #00d4ff, #7b2cbf, #00d4ff);
  background-size: 200% 100%;
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.5s ease;
}

.project-card:hover {
  transform: translateY(-10px);
  border-color: #00d4ff;
  box-shadow: 
    0 20px 60px rgba(0, 212, 255, 0.3),
    0 0 40px rgba(0, 212, 255, 0.2);
}

.project-card:hover::before {
  transform: scaleX(1);
  animation: gradientSlide 2s ease infinite;
}

@keyframes gradientSlide {
  to { background-position: 200% 0; }
}

/* ==========================================
   🖼️ PROJECT IMAGE
   ========================================== */

.project-image {
  position: relative;
  height: 250px;
  overflow: hidden;
  background: linear-gradient(135deg, rgba(0, 212, 255, 0.1), rgba(123, 44, 191, 0.1));
}

.project-image img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.project-placeholder {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(0, 212, 255, 0.15), rgba(123, 44, 191, 0.15));
}

.project-placeholder i {
  font-size: 5rem;
  color: rgba(0, 212, 255, 0.5);
}

.project-card:hover .project-image img {
  transform: scale(1.1);
}

.project-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, rgba(0, 212, 255, 0.9), rgba(123, 44, 191, 0.9));
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.project-card:hover .project-overlay {
  opacity: 1;
}

.project-link {
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.2);
  backdrop-filter: blur(10px);
  border: 2px solid rgba(255, 255, 255, 0.5);
  border-radius: 50%;
  color: #ffffff;
  font-size: 1.8rem;
  transition: all 0.3s ease;
}

.project-link:hover {
  transform: scale(1.2);
  background: rgba(255, 255, 255, 0.3);
}

/* ==========================================
   📄 PROJECT CONTENT
   ========================================== */

.project-content {
  padding: 30px;
}

.project-header {
  display: flex;
  gap: 15px;
  margin-bottom: 20px;
}

.project-icon {
  width: 60px;
  height: 60px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 16px;
  font-size: 1.8rem;
  flex-shrink: 0;
  transition: all 0.4s ease;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.project-icon.infrastructure {
  background: linear-gradient(135deg, rgba(0, 212, 255, 0.25), rgba(0, 212, 255, 0.1));
  color: #00d4ff;
}

.project-icon.serveur {
  background: linear-gradient(135deg, rgba(0, 255, 170, 0.25), rgba(0, 255, 170, 0.1));
  color: #00ffaa;
}

.project-icon.securite {
  background: linear-gradient(135deg, rgba(255, 107, 107, 0.25), rgba(255, 107, 107, 0.1));
  color: #ff6b6b;
}

.project-icon.dev {
  background: linear-gradient(135deg, rgba(255, 215, 0, 0.25), rgba(255, 215, 0, 0.1));
  color: #ffd700;
}

.project-card:hover .project-icon {
  transform: rotate(360deg) scale(1.1);
}

.project-meta {
  flex: 1;
}

.project-title {
  font-size: 1.4rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 8px;
  line-height: 1.3;
  text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.project-date {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.6);
}

.project-description {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.75);
  line-height: 1.7;
  margin-bottom: 20px;
  text-shadow: 0 1px 5px rgba(0, 0, 0, 0.5);
}

.project-context {
  padding: 12px 16px;
  background: rgba(0, 212, 255, 0.1);
  border-left: 3px solid #00d4ff;
  border-radius: 8px;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 20px;
}

.project-context strong {
  color: #00d4ff;
}

/* ==========================================
   🏷️ TECH STACK
   ========================================== */

.project-tech-stack {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 25px;
}

.tech-badge {
  padding: 6px 14px;
  background: rgba(255, 255, 255, 0.08);
  border: 2px solid rgba(255, 255, 255, 0.15);
  border-radius: 8px;
  font-size: 0.85rem;
  font-weight: 600;
  color: rgba(255, 255, 255, 0.8);
  transition: all 0.3s ease;
}

.tech-badge:hover {
  background: rgba(0, 212, 255, 0.2);
  border-color: #00d4ff;
  color: #00d4ff;
  transform: translateY(-3px);
}

/* ==========================================
   📊 PROJECT FOOTER
   ========================================== */

.project-footer {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 20px;
  border-top: 2px solid rgba(255, 255, 255, 0.1);
}

.project-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 24px;
  background: linear-gradient(135deg, #00d4ff, #7b2cbf);
  border-radius: 50px;
  color: #ffffff;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 212, 255, 0.3);
}

.project-btn:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 25px rgba(0, 212, 255, 0.5);
  color: #ffffff;
}

.project-stats {
  display: flex;
  gap: 15px;
}

.stat-item {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.7);
}

.stat-item i {
  color: #00d4ff;
}

/* ==========================================
   📞 CTA SECTION
   ========================================== */

.projects-cta {
  padding: 60px;
  background: rgba(26, 26, 26, 0.85);
  backdrop-filter: blur(15px);
  border: 2px solid rgba(0, 212, 255, 0.25);
  border-radius: 28px;
  text-align: center;
  box-shadow: 
    0 15px 50px rgba(0, 0, 0, 0.5),
    inset 0 0 40px rgba(0, 212, 255, 0.05);
}

.cta-content h3 {
  font-size: 2.2rem;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 15px;
  text-shadow: 0 0 30px rgba(0, 212, 255, 0.5);
}

.cta-content p {
  font-size: 1.1rem;
  color: rgba(255, 255, 255, 0.8);
  margin-bottom: 30px;
}

.cta-btn {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 18px 40px;
  background: linear-gradient(135deg, #00d4ff, #7b2cbf);
  border-radius: 50px;
  color: #ffffff;
  font-size: 1.1rem;
  font-weight: 700;
  text-decoration: none;
  transition: all 0.4s ease;
  box-shadow: 0 8px 30px rgba(0, 212, 255, 0.4);
}

.cta-btn:hover {
  transform: translateY(-5px);
  box-shadow: 0 15px 45px rgba(0, 212, 255, 0.6);
  color: #ffffff;
}

/* ==========================================
   📱 RESPONSIVE
   ========================================== */

@media (max-width: 991.98px) {
  .projects-grid {
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 25px;
  }

  .section-title {
    font-size: 2.5rem;
  }

  .projects-filter {
    padding: 20px;
  }

  .filter-btn {
    padding: 12px 22px;
  }
}

@media (max-width: 767.98px) {
  .projects-section {
    padding: 60px 0;
  }

  .section-title {
    font-size: 2rem;
  }

  .projects-filter {
    border-radius: 25px;
  }

  .filter-btn span {
    display: none;
  }

  .filter-btn {
    padding: 12px;
    min-width: 48px;
  }

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

  .project-content {
    padding: 25px;
  }

  .projects-cta {
    padding: 40px 30px;
  }

  .cta-content h3 {
    font-size: 1.8rem;
  }
}

@media (max-width: 575.98px) {
  .section-title {
    font-size: 1.8rem;
  }

  .project-image {
    height: 200px;
  }

  .project-title {
    font-size: 1.2rem;
  }

  .project-footer {
    flex-direction: column;
    gap: 15px;
  }

  .cta-btn {
    padding: 16px 32px;
    font-size: 1rem;
  }
}
