/* ================================================================
   Panel Crème — Tutoriels : Parcours de formation
   ================================================================ */

/* ---- Barre de progression globale ---- */

.tuto-progress-wrap {
  position: relative;
  z-index: 1;
  max-width: 700px;
  margin: 0 auto 2.5rem;
  width: 100%;
}
.tuto-progress-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0.55rem;
}
.tuto-progress-label {
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--base);
}
.tuto-progress-pct {
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--primary);
}
.tuto-progress-bar {
  width: 100%;
  height: 14px;
  background: #fff;
  border: 2.5px solid var(--base);
  border-radius: 999px;
  box-shadow: 3px 3px 0 var(--base);
  overflow: hidden;
}
.tuto-progress-fill {
  height: 100%;
  background: var(--primary);
  border-radius: 999px;
  transition: width 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---- Parcours (timeline verticale) ---- */

.tuto-parcours {
  position: relative;
  z-index: 1;
  max-width: 700px;
  margin: 0 auto;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 0;
}

/* ---- Module ---- */

.tuto-module {
  display: grid;
  grid-template-columns: 48px 1fr;
  gap: 1rem;
  min-height: 0;
}

/* ---- Timeline line + dot ---- */

.tuto-module-line {
  display: flex;
  flex-direction: column;
  align-items: center;
  position: relative;
}
.tuto-module-line::after {
  content: "";
  flex: 1;
  width: 3px;
  background: var(--line, #e0ddd5);
  margin-top: 4px;
  transition: background 0.3s ease;
}
.tuto-module[data-state="done"] .tuto-module-line::after {
  background: var(--green, #00c26b);
}
.tuto-module:last-of-type .tuto-module-line::after,
.tuto-module[data-module="6"] .tuto-module-line::after { display: none; }

.tuto-module-dot {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 2.5px solid var(--base);
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  box-shadow: 3px 3px 0 var(--base);
  transition: background 0.25s ease, border-color 0.25s ease, transform 0.25s ease;
  position: relative;
  z-index: 2;
}
.tuto-module-dot[data-status="active"] {
  background: var(--primary);
  border-color: var(--base);
  animation: dot-pulse 2s ease infinite;
}
.tuto-module-dot[data-status="done"] {
  background: var(--green, #00c26b);
  border-color: var(--base);
}
.tuto-module-dot[data-status="locked"] {
  background: #f0ede5;
  opacity: 0.6;
}

@keyframes dot-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.08); }
}

.tuto-dot-num {
  font-family: Labil, Arial, sans-serif;
  font-size: 0.85rem;
  font-weight: 900;
  color: var(--base);
}
.tuto-module-dot[data-status="active"] .tuto-dot-num,
.tuto-module-dot[data-status="done"] .tuto-dot-num {
  color: #fff;
}

/* ---- Module card ---- */

.tuto-module-card {
  background: #fff;
  border: 2.5px solid var(--base);
  border-radius: 1.1rem;
  padding: 1.25rem 1.3rem;
  box-shadow: 5px 5px 0 var(--base);
  margin-bottom: 1.5rem;
  cursor: pointer;
  transition: transform 0.25s var(--ease), box-shadow 0.25s var(--ease), opacity 0.3s ease;
}
.tuto-module[data-state="locked"] .tuto-module-card {
  opacity: 0.5;
  pointer-events: none;
}
.tuto-module[data-state="active"] .tuto-module-card {
  border-color: var(--primary);
  box-shadow: 5px 5px 0 var(--primary);
}
.tuto-module[data-state="done"] .tuto-module-card {
  opacity: 1;
}

/* ---- Module head ---- */

.tuto-module-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.tuto-module-tag {
  display: inline-block;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--primary);
  background: color-mix(in srgb, var(--primary) 10%, transparent);
  border: 1.5px solid color-mix(in srgb, var(--primary) 25%, transparent);
  padding: 0.25rem 0.7rem;
  border-radius: 6px;
}

.tuto-module-status {
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.25rem 0.7rem;
  border-radius: 6px;
  border: 1.5px solid;
}
.tuto-module-status[data-label="locked"] {
  color: var(--grey);
  border-color: var(--line, #e0ddd5);
  background: #f7f5ef;
}
.tuto-module-status[data-label="active"] {
  color: var(--primary);
  border-color: var(--primary);
  background: color-mix(in srgb, var(--primary) 8%, #fff);
}
.tuto-module-status[data-label="done"] {
  color: var(--green, #00c26b);
  border-color: var(--green, #00c26b);
  background: color-mix(in srgb, var(--green, #00c26b) 8%, #fff);
}

/* ---- Module text ---- */

.tuto-module-title {
  font-family: Labil, Arial, sans-serif;
  font-size: 1.15rem;
  font-weight: 900;
  letter-spacing: -0.02em;
  color: var(--base);
  margin: 0 0 0.3rem;
  line-height: 1.15;
}
.tuto-module-desc {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--grey);
  line-height: 1.5;
  margin: 0 0 1rem;
}

/* ---- Video ---- */

.tuto-module-video {
  margin-bottom: 1rem;
}
.tuto-video {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 0.85rem;
  border: 2.5px solid var(--base);
  box-shadow: none;
  background: #000;
  display: block;
}
.tuto-video-placeholder {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 0.85rem;
  border: 2.5px dashed var(--base);
  background: #f7f5ef;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--grey);
  font-size: 0.86rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

/* ---- Module footer ---- */

.tuto-module-footer {
  display: flex;
  justify-content: flex-end;
}

.btn-mark-done {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.85rem 1.4rem;
  font-size: 0.86rem;
  font-weight: 800;
  border: 2.5px solid var(--base);
  border-radius: 0.65rem;
  box-shadow: 3px 3px 0 var(--base);
  background: var(--green, #00c26b);
  color: #fff;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.2s ease;
}
.btn-mark-done:hover:not(:disabled) {
  transform: translate(-2px, -2px);
  box-shadow: 5px 5px 0 var(--base);
}
.btn-mark-done:disabled {
  opacity: 0.35;
  cursor: not-allowed;
}

/* ---- Finish banner ---- */

.tuto-finish {
  margin-top: 1rem;
  margin-bottom: 3rem;
}
.tuto-finish-inner {
  text-align: center;
  background: linear-gradient(180deg, color-mix(in srgb, var(--green, #00c26b) 10%, #fff) 0%, #fff 60%);
  border: 2.5px solid var(--green, #00c26b);
  border-radius: 1.15rem;
  padding: 2rem 1.5rem;
  box-shadow: 5px 5px 0 var(--green, #00c26b);
  cursor: pointer;
}
.tuto-finish-emoji {
  font-size: 2.5rem;
  display: block;
  margin-bottom: 0.5rem;
}
.tuto-finish-title {
  font-family: Labil, Arial, sans-serif;
  font-size: 1.4rem;
  font-weight: 900;
  color: var(--base);
  margin: 0 0 0.4rem;
}
.tuto-finish-desc {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--grey);
  margin: 0;
  line-height: 1.5;
}

/* ---- Responsive ---- */

@media (max-width: 640px) {
  .tuto-module { grid-template-columns: 36px 1fr; gap: 0.65rem; }
  .tuto-module-dot { width: 36px; height: 36px; }
  .tuto-dot-num { font-size: 0.75rem; }
  .tuto-module-card { padding: 1rem; }
}
