/* ============================================
   NIVEAU 30 — LES PROJETS FINAUX
   Styles spécifiques au chapitre
   ============================================ */

/* ---------- PROJECT CARDS ---------- */
.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
  gap: 1.5rem;
  margin-top: 1rem;
}

.project-card {
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  overflow: hidden;
  transition: box-shadow 0.2s;
}

.project-card:hover {
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.project-card-header {
  padding: 1.25rem 1.25rem 0;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.project-card-header h3 {
  font-size: 1.1rem;
  margin: 0;
}

.project-stars {
  color: #f59e0b;
  font-size: 0.9rem;
  white-space: nowrap;
  flex-shrink: 0;
}

.project-card-body {
  padding: 0.75rem 1.25rem;
}

.project-card-body p {
  font-size: 0.85rem;
  color: #64748b;
  margin: 0;
}

.project-card-tags {
  padding: 0.75rem 1.25rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.project-tag {
  display: inline-block;
  padding: 0.15rem 0.5rem;
  background: #eff6ff;
  color: #2563eb;
  border-radius: 9999px;
  font-size: 0.7rem;
  font-weight: 600;
}

.project-card-code {
  border-top: 1px solid #e2e8f0;
}

.project-card-code summary {
  padding: 0.75rem 1.25rem;
  font-weight: 600;
  font-size: 0.85rem;
  color: #2563eb;
  cursor: pointer;
  user-select: none;
}

.project-card-code summary:hover {
  background: #f1f5f9;
}

.project-card-code pre {
  margin: 0;
  padding: 0 1.25rem 1.25rem;
  font-size: 0.78rem;
  line-height: 1.5;
  overflow-x: auto;
}

.project-card-code pre code {
  display: block;
  white-space: pre;
}

/* ---------- TECHNIQUE LIST ---------- */
.technique-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  padding: 0.75rem 1.25rem;
  border-top: 1px solid #e2e8f0;
}

.technique-list .project-tag {
  background: #f0fdf4;
  color: #16a34a;
}

/* ---------- DIFFICULTY COLORS ---------- */
.stars-1 { color: #16a34a; }
.stars-2 { color: #65a30d; }
.stars-3 { color: #ca8a04; }
.stars-4 { color: #ea580c; }
.stars-5 { color: #dc2626; }

/* ---------- RESPONSIVE ---------- */
@media (max-width: 700px) {
  .projects-grid {
    grid-template-columns: 1fr;
  }
}

/* ---------- PROJETS LAYOUT INTERNE ---------- */
.projet-demo-area {
  background: #1e293b;
  border-radius: 8px;
  padding: 1rem;
  margin-top: 0.75rem;
  overflow-x: auto;
}

.projet-demo-area * {
  font-size: 0.8rem;
}
