/* ========================================
   PROJECT.CSS - Styles page détail projet
   ======================================== */

/* ========== HERO SECTION ========== */
.project-hero {
  width: 100%;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10rem 2rem 5rem;
  position: relative;
  overflow: hidden;
}

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

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

.project-hero-container {
  max-width: 1000px;
  width: 100%;
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 4rem;
  align-items: center;
  position: relative;
  z-index: 1;
}

.project-hero-content {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: left;
}

.project-badge {
  display: inline-block;
  padding: 0.5rem 1.25rem;
  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.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin-bottom: 1.5rem;
}

.project-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;
  line-height: 1.2;
}

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

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

.tech-badge {
  padding: 0.625rem 1.25rem;
  background: rgba(99, 102, 241, 0.1);
  border: 1px solid rgba(99, 102, 241, 0.3);
  border-radius: 20px;
  color: var(--text-primary);
  font-size: 0.95rem;
  font-weight: 600;
  transition: all 0.3s ease;
}

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

.hero-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
}

.project-hero-image {
  display: flex;
  justify-content: flex-end;
  align-items: center;
}

.project-hero-image .project-main-image {
  max-width: 250px;
  width: 100%;
  height: auto;
  border-radius: 20px;
  background: rgba(255, 255, 255, 0.05);
  padding: 2rem;
  border: 1px solid rgba(99, 102, 241, 0.2);
  transition: all 0.3s ease;
  animation: float 6s ease-in-out infinite;
}

@keyframes float {
  0%,
  100% {
    transform: translateY(0px);
  }
  50% {
    transform: translateY(-20px);
  }
}

.project-hero-image .project-main-image:hover {
  transform: scale(1.02);
  border-color: var(--accent-1);
  box-shadow: 0 20px 60px rgba(99, 102, 241, 0.4);
}

/* ========== PROJECT DETAILS SECTION ========== */

.project-container {
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}

/* Card styles pour les sections */
.project-details .card {
  transition: all 0.3s ease;
}

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

.project-details .card h2 {
  font-size: 2rem;
  font-weight: 800;
  margin-bottom: 3rem;
  color: var(--text-primary);
}

.project-details .card h2::after {
  content: "";
  display: block;
  width: 80px;
  height: 4px;
  background: var(--accent-gradient);
  margin-top: 1rem;
  border-radius: 2px;
}

/* ==== 🔹 NOUVELLE SECTION : DESCRIPTION HTML RICHE ==== */

.project-description {
  color: var(--text-secondary);
  font-size: 1.05rem;
  line-height: 1.8;
}

.project-description p {
  margin-bottom: 1rem;
}

.project-description ul,
.project-description ol {
  margin: 1rem 0 1rem 1.5rem;
  padding-left: 1rem;
  list-style: disc;
}

.project-description li {
  margin-bottom: 0.5rem;
}

.project-description strong {
  color: var(--text-primary);
  font-weight: 700;
}

.project-description em {
  font-style: italic;
  color: var(--text-secondary);
}

.project-description a {
  color: var(--accent-1);
  text-decoration: none;
  font-weight: 600;
  transition: color 0.2s ease;
}

.project-description a:hover {
  text-decoration: underline;
  color: var(--accent-2);
}

.project-description code {
  background: rgba(99, 102, 241, 0.1);
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  font-family: monospace;
  color: var(--accent-1);
  font-size: 0.95rem;
}

/* Technologies Section */
.tech-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, max-content));
  gap: 2rem;
}

.tech-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  padding: 1.5rem;
  background: var(--bg-secondary);
  border-radius: 16px;
  border: 1px solid rgba(99, 102, 241, 0.1);
  transition: all 0.3s ease;
}

.tech-item:hover {
  transform: translateY(-5px);
  border-color: var(--accent-1);
  box-shadow: 0 8px 30px rgba(99, 102, 241, 0.2);
  background: rgba(99, 102, 241, 0.05);
}

.tech-icon {
  width: 70px;
  height: 70px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(99, 102, 241, 0.1);
  border-radius: 12px;
  transition: all 0.3s ease;
}

.tech-img {
  width: 50px;
  height: 50px;
  object-fit: contain;
  transition: all 0.3s ease;
}

.tech-item:hover .tech-icon {
  background: rgba(99, 102, 241, 0.2);
  transform: scale(1.1);
}

.tech-item:hover .tech-img {
  transform: scale(1.15);
}

.tech-item p {
  font-weight: 600;
  color: var(--text-secondary);
  transition: color 0.3s ease;
  text-align: center;
  font-size: 1.05rem;
  margin: 0;
}

.tech-item:hover p {
  color: var(--text-primary);
}

.btn-primary svg {
  transition: transform 0.25s ease;
  margin-left: 0.5rem;
}

.btn-primary:hover svg {
  transform: translateX(4px);
}

/* Screenshots Section */
.screenshots-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
  gap: 2rem;
}

.screenshot-item {
  background: var(--bg-secondary);
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid rgba(99, 102, 241, 0.15);
  transition: all 0.3s ease;
}

.screenshot-item:hover {
  transform: translateY(-3px);
  border-color: rgba(99, 102, 241, 0.4);
  box-shadow: 0 8px 30px rgba(99, 102, 241, 0.25);
}

.screenshot-img {
  width: 100%;
  height: auto;
  display: block;
  transition: all 0.3s ease;
}

.screenshot-item:hover .screenshot-img {
  opacity: 0.95;
}

.screenshot-caption {
  padding: 1.25rem;
  color: var(--text-secondary);
  font-size: 0.95rem;
  line-height: 1.6;
  text-align: center;
  margin: 0;
}

/* ========== RESPONSIVE - TABLETTES ========== */
@media (max-width: 968px) {
  .project-hero-container {
    grid-template-columns: 1fr;
    text-align: center;
    gap: 3rem;
  }

  .project-hero-content {
    align-items: center;
    text-align: center;
  }

  .hero-buttons {
    justify-content: center;
  }

  .project-tech-hero {
    justify-content: center;
  }

  .project-hero-content h1 {
    font-size: 3rem;
  }

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

  .project-hero-image .project-main-image {
    max-width: 350px;
  }

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

  .project-hero-image {
    justify-content: center;
  }
}

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

  .project-hero-container {
    grid-template-columns: 1fr;
    gap: 2.5rem;
  }

  .project-hero-content h1 {
    font-size: 2.5rem;
  }

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

  .hero-buttons {
    flex-direction: column;
    width: 100%;
  }

  .hero-buttons .btn {
    width: 100%;
    justify-content: center;
  }

  .project-hero-image .project-main-image {
    max-width: 280px;
  }

  .project-details {
    padding: 3rem 1.5rem;
  }

  .project-container {
    gap: 2rem;
  }

  .project-details .card h2 {
    font-size: 1.75rem;
  }

  .project-description {
    font-size: 1rem;
  }

  .tech-grid {
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 1.25rem;
  }

  .screenshots-grid {
    grid-template-columns: 1fr;
    gap: 1.5rem;
  }
}

@media (max-width: 640px) {
  .project-hero-content h1 {
    font-size: 2rem;
  }

  .project-badge {
    font-size: 0.75rem;
    padding: 0.4rem 1rem;
  }

  .tech-badge {
    font-size: 0.85rem;
    padding: 0.5rem 1rem;
  }

  .project-hero-image .project-main-image {
    max-width: 220px;
    padding: 1.5rem;
  }

  .project-details .card {
    padding: 1.5rem;
  }

  .project-details .card h2 {
    font-size: 1.5rem;
  }

  .tech-item {
    padding: 1.25rem 1rem;
  }

  .tech-icon {
    width: 60px;
    height: 60px;
  }

  .tech-img {
    width: 40px;
    height: 40px;
  }

  .tech-item p {
    font-size: 0.95rem;
  }

  .screenshots-grid {
    grid-template-columns: 1fr;
    gap: 1.25rem;
  }

  .screenshot-caption {
    padding: 1rem;
    font-size: 0.9rem;
  }
}
