/* ==========================================================================
   EXERCICE 1 - FEUILLE DE STYLE CSS3
   ========================================================================== */

:root {
  --bg-dark: #0f172a;
  --bg-card: #1e293b;
  --text-main: #f8fafc;
  --text-muted: #94a3b8;
  --accent: #38bdf8;
  --accent-gradient: linear-gradient(135deg, #38bdf8, #818cf8);
  --border: rgba(255, 255, 255, 0.1);
  --font-sans: 'Plus Jakarta Sans', system-ui, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
}

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--font-sans);
  background-color: var(--bg-dark);
  color: var(--text-main);
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.container {
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* En-tête */
.project-header {
  border-bottom: 1px solid var(--border);
  padding: 1.2rem 0;
  background: rgba(15, 23, 42, 0.8);
  backdrop-filter: blur(8px);
}

.header-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.back-link {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  font-size: 0.95rem;
  transition: transform 0.2s ease;
}

.back-link:hover {
  transform: translateX(-4px);
}

.project-tag {
  font-family: var(--font-mono);
  font-size: 0.8rem;
  color: var(--text-muted);
  background: rgba(255, 255, 255, 0.05);
  padding: 0.3rem 0.75rem;
  border-radius: 999px;
  border: 1px solid var(--border);
}

/* Corps principal */
.main-content {
  flex-grow: 1;
  padding: 3rem 1.5rem;
}

.exercise-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 2.5rem;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.exercise-intro {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border);
}

.exercise-intro h1 {
  font-size: 2.2rem;
  font-weight: 800;
  margin-bottom: 0.5rem;
  background: var(--accent-gradient);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}

.subtitle {
  color: var(--text-muted);
  font-size: 1.05rem;
}

/* Démo / Rendu */
.demo-section {
  margin-bottom: 2.5rem;
}

.demo-section h2, .notes-section h2 {
  font-size: 1.3rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.demo-box {
  background: rgba(15, 23, 42, 0.6);
  border: 1px dashed var(--accent);
  border-radius: 12px;
  padding: 2rem;
}

.demo-box h3 {
  font-size: 1.15rem;
  margin-bottom: 0.8rem;
  color: var(--accent);
}

.demo-box p {
  color: var(--text-muted);
  font-size: 0.95rem;
  margin-bottom: 1.5rem;
}

.demo-box code {
  font-family: var(--font-mono);
  background: rgba(255, 255, 255, 0.1);
  padding: 0.2rem 0.4rem;
  border-radius: 4px;
  color: #fff;
}

.feature-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.pill {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  padding: 0.3rem 0.6rem;
  border-radius: 6px;
  background: rgba(56, 189, 248, 0.15);
  color: var(--accent);
}

/* Notes & Checklist */
.checklist {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.checklist li {
  color: var(--text-muted);
  font-size: 0.95rem;
  background: rgba(255, 255, 255, 0.02);
  padding: 0.75rem 1rem;
  border-radius: 8px;
  border: 1px solid var(--border);
}

/* Pied de page */
.project-footer {
  border-top: 1px solid var(--border);
  padding: 1.5rem 0;
}

.footer-content {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.footer-return {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}

.footer-return:hover {
  text-decoration: underline;
}

/* Responsive */
@media (max-width: 600px) {
  .header-content, .footer-content {
    flex-direction: column;
    gap: 0.75rem;
    align-items: flex-start;
  }

  .exercise-card {
    padding: 1.5rem;
  }

  .exercise-intro h1 {
    font-size: 1.7rem;
  }
}
