@import url('https://fonts.googleapis.com/css2?family=Comic+Neue:wght@400;700&family=Bangers&display=swap');

:root {
  --black: #050505;
  --white: #ffffff;
  --grey: #e2e8f0;
  --border-width: 4px;
  --shadow-offset: 8px;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  font-family: 'Comic Neue', cursive, sans-serif;
  color: var(--black);
  background-color: var(--white);
  /* Trame manga classique (Screentone) */
  background-image: radial-gradient(circle, #05050522 1.5px, transparent 1.5px);
  background-size: 15px 15px;
  background-attachment: fixed;
  min-height: 100vh;
}

.container {
  max-width: 1000px;
  margin: 0 auto;
  padding: 2rem;
}

/* PANELS FAÇON CASE DE BD */
.manga-panel {
  background: var(--white);
  border: var(--border-width) solid var(--black);
  border-radius: 4px; /* Un peu carré, façon case */
  box-shadow: var(--shadow-offset) var(--shadow-offset) 0 var(--black);
  padding: 2rem;
  margin-bottom: 2rem;
  position: relative;
  overflow: hidden;
}

/* Titres type Manga Shonen */
h1, h2, h3, .manga-title {
  font-family: 'Bangers', cursive;
  text-transform: uppercase;
  margin-top: 0;
  letter-spacing: 2px;
}

h1 { font-size: 3.5rem; text-shadow: 3px 3px 0 var(--grey); }
h2 { font-size: 2.2rem; }

/* BOUTON D'ACTION */
.manga-btn {
  display: inline-block;
  background: var(--white);
  border: var(--border-width) solid var(--black);
  border-radius: 2px;
  padding: 10px 24px;
  font-family: 'Bangers', cursive;
  font-size: 1.5rem;
  letter-spacing: 1px;
  cursor: pointer;
  box-shadow: 4px 4px 0 var(--black);
  transition: all 0.1s ease-in-out;
  text-decoration: none;
  color: var(--black);
}

.manga-btn:hover {
  background: var(--grey);
}

.manga-btn:active {
  transform: translate(4px, 4px);
  box-shadow: 0px 0px 0 var(--black);
}

.manga-btn.primary {
  background: var(--black);
  color: var(--white);
  box-shadow: 4px 4px 0 var(--grey);
}
.manga-btn.primary:active {
  box-shadow: 0px 0px 0 var(--grey);
}

/* FORMULAIRES */
.manga-input {
  border: 3px solid var(--black);
  border-radius: 2px;
  padding: 12px;
  font-family: 'Comic Neue', cursive;
  font-weight: bold;
  font-size: 1.1rem;
  width: 100%;
  margin-bottom: 1rem;
  background: #fff;
}

.manga-input:focus {
  outline: none;
  background: var(--grey);
}

label {
  font-weight: bold;
  font-size: 1.1rem;
  display: block;
  margin-bottom: 5px;
}

/* GRILLES / LISTES */
.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 2rem;
  align-items: stretch;
}

.grid .manga-panel {
  display: flex;
  flex-direction: column;
  margin-bottom: 0;
}

.grid .manga-panel form {
  display: flex;
  flex-direction: column;
  flex: 1;
}

.grid .manga-panel button[type="submit"] {
  margin-top: auto;
}

.course-card {
  border: 3px solid var(--black);
  background: var(--white);
  box-shadow: 6px 6px 0 var(--black);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
}

.course-card img {
  width: 100%;
  height: 150px;
  object-fit: cover;
  border-bottom: 3px solid var(--black);
  margin-bottom: 1rem;
}

.progress-bar {
  border: 3px solid var(--black);
  height: 24px;
  width: 100%;
  background: var(--white);
  position: relative;
  margin: 1rem 0;
}

.progress-fill {
  background: var(--black);
  height: 100%;
  width: 0%;
  transition: width 0.3s;
}

/* MENU ET HEADER */
header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 3rem;
  background: var(--white);
  border: var(--border-width) solid var(--black);
  padding: 1rem 2rem;
  box-shadow: 8px 8px 0 var(--black);
  transform: rotate(-1deg);
}

.nav-user {
  font-weight: bold;
  font-size: 1.2rem;
}

/* LECTEUR DE PARCOURS */
.module-list {
  list-style: none;
  padding: 0;
}

.module-item {
  border: 3px solid var(--black);
  padding: 1rem;
  margin-bottom: 1rem;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  background: var(--white);
}

.module-item.locked {
  background: #aaa;
  color: #555;
  border-color: #555;
  pointer-events: none;
}

.module-item.completed {
  /* Hachures en CSS pour module fini */
  background: repeating-linear-gradient(45deg, #fff, #fff 10px, #eee 10px, #eee 20px);
}

.badge {
  background: var(--black);
  color: var(--white);
  padding: 4px 8px;
  font-family: 'Bangers', cursive;
  font-size: 1.2rem;
}

.view-section {
  display: none;
}
.view-section.active {
  display: block;
}
