/* Parcours 6 semaines — map type jeu, isolé du reste de l'app. */

.wrap {
  width: min(1360px, calc(100% - 48px));
  margin: 0 auto;
  padding: 24px 0 64px;
}

.parcours-page {
  max-width: 720px;
  margin: 0 auto;
}

.parcours-head {
  text-align: center;
  margin: 8px 0 28px;
}
.parcours-head .badge,
.week-hero .badge,
.badge {
  display: inline-block;
  background: var(--teal-soft);
  color: var(--teal-deep);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 6px 12px;
  border-radius: 999px;
  margin-bottom: 12px;
}
.parcours-head h1 {
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  margin-bottom: 8px;
}
.parcours-head .lead {
  color: var(--muted);
  max-width: 42ch;
  margin: 0 auto;
}

.progress-bar {
  height: 8px;
  background: rgba(255, 255, 255, 0.7);
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
  margin: 18px auto 0;
  max-width: 280px;
}
.progress-bar > span {
  display: block;
  height: 100%;
  background: linear-gradient(90deg, var(--teal), var(--coral));
  border-radius: inherit;
  width: 0%;
  transition: width 0.4s ease;
}

/* —— Map —— */
.map-wrap {
  position: relative;
  padding: 12px 8px 48px;
}
.map-canvas {
  position: relative;
  min-height: 920px;
}
.map-path {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  overflow: visible;
}
.map-path path {
  fill: none;
  stroke: rgba(31, 155, 122, 0.35);
  stroke-width: 8;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-dasharray: 14 12;
}
.map-path path.done {
  stroke: var(--teal);
  stroke-dasharray: none;
  stroke-width: 6;
  opacity: 0.55;
}

.map-nodes {
  list-style: none;
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  gap: 28px;
  padding: 8px 0 24px;
}
.map-nodes li {
  display: flex;
  width: 100%;
}
.map-nodes li:nth-child(odd) { justify-content: flex-start; padding-left: 6%; }
.map-nodes li:nth-child(even) { justify-content: flex-end; padding-right: 6%; }

.map-flag, .map-finish {
  display: flex;
  justify-content: center;
  position: relative;
  z-index: 1;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 4px 0 10px;
}

.node-btn {
  appearance: none;
  border: 0;
  background: transparent;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  width: 168px;
  font-family: inherit;
  color: inherit;
  text-align: center;
}
.node-btn:disabled {
  cursor: not-allowed;
}

.node-disc {
  width: 92px;
  height: 92px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: #fff;
  border: 4px solid var(--line);
  box-shadow: var(--shadow-lift);
  position: relative;
  color: var(--teal);
  transition: transform 0.18s ease, box-shadow 0.18s ease, border-color 0.18s;
}
.node-btn:not(:disabled):hover .node-disc {
  transform: translateY(-3px) scale(1.04);
}
.node-disc svg {
  width: 42px;
  height: 42px;
}

.node-btn.is-locked .node-disc {
  background: #e8eee9;
  color: #8aa198;
  border-color: #d5e0da;
  box-shadow: none;
  filter: grayscale(0.4);
}
.node-btn.is-done .node-disc {
  border-color: var(--teal);
  background: var(--teal-soft);
  color: var(--teal-deep);
}
.node-btn.is-current .node-disc {
  border-color: var(--coral);
  box-shadow: 0 0 0 6px rgba(232, 93, 76, 0.18), var(--shadow-lift);
  animation: nodePulse 2.2s ease-in-out infinite;
}
@keyframes nodePulse {
  0%, 100% { box-shadow: 0 0 0 6px rgba(232, 93, 76, 0.16), var(--shadow-lift); }
  50% { box-shadow: 0 0 0 11px rgba(232, 93, 76, 0.08), var(--shadow-lift); }
}

.lock-badge, .check-badge {
  position: absolute;
  right: -4px;
  bottom: -2px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-size: 13px;
  background: #fff;
  border: 2px solid var(--line);
}
.check-badge {
  background: var(--teal);
  color: #fff;
  border-color: var(--teal);
  font-weight: 800;
}
.lock-badge { color: var(--muted); }

.node-meta { line-height: 1.25; }
.node-meta .wk {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
}
.node-meta .ttl {
  font-weight: 800;
  font-size: 0.98rem;
}
.node-btn.is-locked .node-meta { opacity: 0.55; }

/* —— Week / day views —— */
.view { display: none; }
.view.is-on { display: block; }

.back-link {
  background: none;
  border: 0;
  font: inherit;
  font-weight: 700;
  color: var(--muted);
  cursor: pointer;
  margin-bottom: 12px;
  padding: 0;
}
.back-link:hover { color: var(--ink); }

.week-hero {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 22px 22px 18px;
  box-shadow: var(--shadow);
  margin-bottom: 22px;
}
.week-hero h2 { font-size: 1.7rem; margin: 6px 0 8px; }
.week-hero p { color: var(--muted); }
.week-hero .explain {
  margin-top: 10px;
  color: var(--ink);
  font-size: 0.98rem;
}
.week-hero .eval {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px dashed var(--line);
  font-size: 0.92rem;
  font-style: italic;
}

.days {
  display: grid;
  gap: 10px;
}
.day-card {
  display: grid;
  grid-template-columns: 56px 1fr auto;
  gap: 12px;
  align-items: center;
  text-align: left;
  width: 100%;
  padding: 14px 16px;
  border-radius: 18px;
  border: 2px solid var(--line);
  background: #fff;
  font: inherit;
  cursor: pointer;
  box-shadow: var(--shadow);
}
.day-card:hover { border-color: var(--teal); }
.day-card.is-locked {
  opacity: 0.5;
  cursor: not-allowed;
}
.day-card.is-done { border-color: var(--teal); }
.day-ico {
  width: 48px;
  height: 48px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 0.78rem;
  background: var(--teal-soft);
  color: var(--teal-deep);
}
.day-card.is-challenge .day-ico {
  background: var(--sun);
  color: #8a5a10;
}
.day-card h3 { font-family: Outfit, sans-serif; font-size: 1rem; font-weight: 800; }
.day-card p { font-size: 0.85rem; color: var(--muted); }
.day-card .pill {
  font-size: 0.75rem;
  font-weight: 800;
  color: var(--teal-deep);
}

/* —— Exercise —— */
.ex-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 22px;
  box-shadow: var(--shadow);
}
.ex-card h2 { font-size: 1.55rem; margin-bottom: 6px; }
.ex-kicker { color: var(--muted); font-weight: 700; font-size: 0.85rem; margin-bottom: 14px; }

.phase {
  background: var(--teal-soft);
  border-radius: 16px;
  padding: 12px 14px;
  margin-bottom: 16px;
  font-size: 0.95rem;
}
.phase strong { display: block; font-size: 0.75rem; letter-spacing: 0.05em; text-transform: uppercase; color: var(--teal-deep); margin-bottom: 4px; }

.steps { margin: 0 0 18px 18px; }
.steps li { margin: 6px 0; }

.timer-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin: 8px 0 18px;
  padding: 16px;
  border-radius: 18px;
  background: linear-gradient(180deg, #f7fffb, #eef6f2);
  border: 1px solid var(--line);
}
.timer-box .time {
  font-variant-numeric: tabular-nums;
  font-weight: 800;
  font-size: 2.6rem;
  letter-spacing: -0.04em;
  line-height: 1;
}
.timer-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: center; }

.rec-privacy {
  font-size: 0.82rem;
  color: var(--muted);
  text-align: center;
  max-width: 36ch;
  margin: 0 auto 8px;
  line-height: 1.45;
}
.rec-live {
  font-size: 0.85rem;
  font-weight: 800;
  color: var(--coral);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  animation: recBlink 1.2s ease-in-out infinite;
}
@keyframes recBlink {
  50% { opacity: 0.35; }
}
.playback {
  width: 100%;
  margin-top: 8px;
}
.playback p {
  font-size: 0.8rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 8px;
}
.playback audio {
  width: 100%;
  height: 40px;
}

.topic-box, .phrase-box, .q-box {
  border: 1px dashed var(--line);
  border-radius: 16px;
  padding: 14px 16px;
  margin-bottom: 16px;
  background: #fbfefc;
}
.topic-box p, .phrase-box p, .q-box p {
  font-family: "Source Serif 4", Georgia, serif;
  font-size: 1.15rem;
  font-weight: 700;
}
.hl-word { color: var(--coral); text-decoration: underline; text-underline-offset: 3px; }

.note-field label {
  display: block;
  font-weight: 700;
  font-size: 0.85rem;
  margin-bottom: 6px;
}
.note-field input, .note-field textarea {
  width: 100%;
  border: 1.5px solid var(--line);
  border-radius: 12px;
  padding: 10px 12px;
  font: inherit;
  margin-bottom: 14px;
  background: #fff;
}
.stars { display: flex; gap: 6px; margin-bottom: 16px; }
.stars button {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1.5px solid var(--line);
  background: #fff;
  cursor: pointer;
  font-size: 1.1rem;
}
.stars button.on { background: var(--sun); border-color: #e0c26a; }

.actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }

.toast {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--ink);
  color: #fff;
  padding: 10px 16px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.9rem;
  z-index: 50;
  display: none;
}
.toast.is-on { display: block; }

.reset-progress {
  display: block;
  margin: 28px auto 0;
  background: none;
  border: 0;
  color: var(--muted);
  font: inherit;
  font-size: 0.8rem;
  cursor: pointer;
  text-decoration: underline;
}

@media (max-width: 640px) {
  .map-nodes li:nth-child(odd) { padding-left: 2%; }
  .map-nodes li:nth-child(even) { padding-right: 2%; }
  .node-btn { width: 148px; }
  .node-disc { width: 80px; height: 80px; }
}
