/* ROBLOX STARS — la plateforme du guide
   Même branding que la page de vente : Lilita One + Nunito, blocs en relief
   (bord coloré + tranche plus foncée), boutons 3D, étiquettes penchées. Aucun halo flou. */

:root {
  --bg: #061121;
  --card: #0C1F38;
  --card-2: #081830;
  --line: #1A3A63;
  --line-edge: #0F2646;
  --ink: #020A16;
  --gold-1: #FFC800;
  --gold-2: #FF8C00;
  --gold-deep: #B35900;
  --blue: #0099FF;
  --blue-deep: #005C99;
  --blue-soft: #6CC4FF;
  --blue-soft-edge: #2F6E9E;
  --red: #E5202E;
  --green: #35C46B;
  --text: #F3F7FF;
  --soft: #C5D6EE;
  --muted: #9DB4D3;
  --display: "Lilita One", "Arial Rounded MT Bold", ui-rounded, system-ui, sans-serif;
  --body: "Nunito", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--text);
  font: 600 1.05rem/1.6 var(--body);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, p, ul, ol, figure, blockquote { margin: 0; }
h1, h2, h3 { font-weight: 400; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; }
button { font: inherit; color: inherit; }
:focus-visible { outline: 3px solid #fff; outline-offset: 3px; border-radius: 8px; }
[hidden] { display: none !important; }

.wrap { width: min(100% - 32px, 720px); margin-inline: auto; }

/* ───────────── Boutons 3D ───────────── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  min-height: 56px;
  margin-bottom: 6px;                   /* place pour la tranche */
  padding: 0 24px;
  border: 0;
  border-radius: 16px;
  font: 400 1.2rem/1.1 var(--display);
  letter-spacing: .03em;
  text-transform: uppercase;
  text-decoration: none;
  text-align: center;
  cursor: pointer;
  user-select: none;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  transition: transform .08s ease-out, box-shadow .08s ease-out, filter .15s;
}
.btn--gold {
  color: #2E1700;
  background: linear-gradient(180deg, var(--gold-1), var(--gold-2));
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, .5), 0 6px 0 var(--gold-deep);
}
.btn--blue {
  color: #fff;
  background: linear-gradient(180deg, #1FA8FF, #0080E0);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, .35), 0 6px 0 #00529A;
}
.btn--ghost {
  color: var(--soft);
  background: var(--card);
  box-shadow: inset 0 0 0 3px var(--line), 0 6px 0 var(--line-edge);
}
@media (hover: hover) { .btn:hover { filter: brightness(1.08); } }
.btn:active { transform: translateY(5px); }
.btn--gold:active { box-shadow: inset 0 2px 0 rgba(255, 255, 255, .5), 0 1px 0 var(--gold-deep); }
.btn--blue:active { box-shadow: inset 0 2px 0 rgba(255, 255, 255, .35), 0 1px 0 #00529A; }
.btn--ghost:active { box-shadow: inset 0 0 0 3px var(--line), 0 1px 0 var(--line-edge); }
.btn[disabled] { opacity: .35; pointer-events: none; }

/* ═════════════ LA CARTE DES MODULES ═════════════ */

.top {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--card-2);
  border-bottom: 3px solid var(--line-edge);
}
.top__in {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 64px;
  padding: max(8px, env(safe-area-inset-top)) 0 8px;
}
.top__logo { height: 46px; width: auto; flex: none; }
.top__prog { flex: 1; min-width: 0; }
.top__label { display: flex; justify-content: space-between; gap: 10px; font: 400 .9rem/1 var(--display); letter-spacing: .04em; color: var(--soft); }
.top__label b { font-weight: 400; color: var(--gold-1); }

.track {
  height: 16px;
  margin-top: 6px;
  border-radius: 999px;
  background: var(--ink);
  box-shadow: inset 0 0 0 2px var(--line);
  overflow: hidden;
}
.track i {
  display: block;
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: linear-gradient(180deg, #FFE36B, var(--gold-1) 45%, var(--gold-2));
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, .45);
  transition: width .35s ease-out;
}

.intro { padding: 30px 0 6px; text-align: center; }
.intro h1 { font: 400 clamp(1.9rem, 7.4vw, 2.8rem)/1.06 var(--display); text-shadow: 0 .07em 0 var(--ink); text-wrap: balance; }
.intro .btn { width: 100%; max-width: 420px; margin-top: 22px; min-height: 64px; font-size: 1.35rem; }
.intro__next { margin-top: 10px; font-size: .95rem; font-weight: 700; color: var(--muted); text-wrap: balance; }

.part { margin-top: 44px; }
.part__head {
  position: relative;
  padding: 14px 18px 12px;
  border-radius: 18px;
  background: var(--blue);
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, .3), 0 6px 0 var(--blue-deep);
}
.part__label { font: 400 .85rem/1 var(--display); letter-spacing: .12em; text-transform: uppercase; color: #CFEBFF; }
.part__name { margin-top: 3px; font: 400 1.6rem/1.1 var(--display); text-shadow: 0 .07em 0 rgba(2, 10, 22, .35); }

.path { margin: 26px 0 0; padding: 0; list-style: none; }
.mod {
  --node: var(--card);
  --node-edge: var(--line-edge);
  --node-border: var(--line);
  --node-ink: var(--soft);
  position: relative;
  display: grid;
  grid-template-columns: 84px 1fr;
  align-items: center;
  gap: 4px 14px;
  padding: 10px 0;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}
/* le chemin en pointillés entre deux modules */
.path li:not(:last-child) .mod::before {
  content: "";
  position: absolute;
  left: 40px;
  top: 50%;
  height: 100%;
  border-left: 4px dashed var(--line);
}
.mod__node {
  position: relative;
  display: grid;
  place-items: center;
  width: 68px;
  height: 68px;
  margin-inline: auto;
  border-radius: 50%;
  background: var(--node);
  border: 4px solid var(--node-border);
  box-shadow: 0 6px 0 var(--node-edge);
  font: 400 1.7rem/1 var(--display);
  color: var(--node-ink);
  transition: transform .08s ease-out, box-shadow .08s ease-out;
}
.path li:nth-child(4n + 2) .mod__node { transform: translateX(8px); }
.path li:nth-child(4n + 4) .mod__node { transform: translateX(-8px); }
.mod:active .mod__node { box-shadow: 0 1px 0 var(--node-edge); translate: 0 5px; }
.mod__node svg { width: 34px; height: 34px; }

.mod__title { display: block; font: 400 1.22rem/1.18 var(--display); letter-spacing: .01em; text-wrap: balance; }
.mod__meta { display: block; margin-top: 3px; font-size: .86rem; font-weight: 800; color: var(--muted); }
.mod__tag {
  display: inline-block;
  margin-bottom: 6px;
  padding: 5px 9px 4px;
  border-radius: 7px;
  font: 400 .74rem/1 var(--display);
  letter-spacing: .06em;
  text-transform: uppercase;
  transform: rotate(-2deg);
}

/* états */
.mod.is-done { --node: linear-gradient(180deg, var(--gold-1), var(--gold-2)); --node-edge: var(--gold-deep); --node-border: #FFE36B; --node-ink: #2E1700; }
.mod.is-done .mod__meta { color: var(--gold-1); }
.mod.is-current { --node: linear-gradient(180deg, #1FA8FF, #0080E0); --node-edge: #00529A; --node-border: #8FD4FF; --node-ink: #fff; }
.mod.is-current .mod__tag { background: var(--gold-1); color: #2E1700; box-shadow: 0 3px 0 var(--gold-deep); }
.mod.is-current .mod__node { animation: nudge 1.8s ease-in-out infinite; }
@keyframes nudge { 50% { translate: 0 -5px; } }

/* ── Écran de connexion ── */
body.is-locked .top__prog,
body.is-locked #resume,
body.is-locked #resume-note { display: none; }
.gate {
  margin: 30px auto 0;
  max-width: 520px;
  padding: 26px 20px 20px;
  border-radius: 24px;
  background: var(--card);
  border: 4px solid var(--blue);
  box-shadow: 0 8px 0 var(--blue-deep);
  text-align: center;
}
.gate__kicker {
  display: inline-block;
  margin-bottom: 12px;
  padding: 6px 11px 5px;
  border-radius: 8px;
  background: var(--gold-1);
  box-shadow: 0 3px 0 var(--gold-deep);
  color: #2E1700;
  font: 400 .85rem/1 var(--display);
  letter-spacing: .08em;
  text-transform: uppercase;
  transform: rotate(-2deg);
}
.gate__title { font: 400 clamp(1.7rem, 6.6vw, 2.2rem)/1.08 var(--display); text-shadow: 0 .07em 0 var(--ink); text-wrap: balance; }
.gate__text { margin-top: 10px; font-weight: 700; color: var(--soft); text-wrap: balance; }
.gate__notice { margin-top: 18px; padding: 12px 14px; border-radius: 14px; border: 3px solid var(--tone); background: var(--card-2); text-align: left; font-size: .95rem; color: var(--soft); }
.gate__notice b { display: block; margin-bottom: 2px; color: #fff; }
.gate__notice--stop { --tone: var(--red); }
.gate__notice--info { --tone: var(--blue-soft); }
.gate__actions { display: grid; gap: 14px; margin-top: 22px; }
.gate__actions .btn { width: 100%; }
.gate__actions .btn--ghost { min-height: 52px; font-size: 1rem; }

.foot p + p { margin-top: 8px; }
.foot__links { display: flex; flex-wrap: wrap; justify-content: center; gap: 4px 16px; }
.foot__links a { padding: 6px 2px; }

.foot { margin-top: 56px; padding: 24px 0 max(28px, env(safe-area-inset-bottom)); border-top: 3px solid var(--line-edge); text-align: center; font-size: .84rem; color: #8AA2C4; }

/* ═════════════ LE LECTEUR D'ÉTAPES ═════════════ */

.reader { display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; }

.bar {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--card-2);
  border-bottom: 3px solid var(--line-edge);
}
.bar__in { display: flex; align-items: center; gap: 12px; min-height: 60px; padding: max(8px, env(safe-area-inset-top)) 0 8px; }
.bar__close {
  flex: none;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--card);
  box-shadow: inset 0 0 0 3px var(--line), 0 4px 0 var(--line-edge);
  text-decoration: none;
}
.bar__close:active { transform: translateY(3px); box-shadow: inset 0 0 0 3px var(--line), 0 1px 0 var(--line-edge); }
.bar .track { flex: 1; margin: 0; }
.bar__count { flex: none; min-width: 3.2em; font: 400 1rem/1 var(--display); letter-spacing: .04em; text-align: right; color: var(--soft); font-variant-numeric: tabular-nums; }

.lesson { flex: 1; padding: 26px 0 40px; }
.lesson__kicker {
  display: inline-block;
  margin-bottom: 12px;
  padding: 6px 11px 5px;
  border-radius: 8px;
  background: var(--blue);
  box-shadow: 0 3px 0 var(--blue-deep);
  font: 400 .85rem/1 var(--display);
  letter-spacing: .08em;
  text-transform: uppercase;
  transform: rotate(-2deg);
}
.lesson__title { font: 400 clamp(1.8rem, 7vw, 2.5rem)/1.08 var(--display); text-shadow: 0 .07em 0 var(--ink); text-wrap: balance; }
.lesson__meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.pill { padding: 6px 12px; border-radius: 999px; background: var(--card); box-shadow: inset 0 0 0 2px var(--line); font-size: .86rem; font-weight: 800; color: var(--soft); }
.goal {
  margin-top: 18px;
  padding: 14px 16px;
  border-radius: 16px;
  background: var(--card);
  border: 3px solid var(--gold-1);
  box-shadow: 0 5px 0 var(--gold-deep);
}
.goal b { display: block; margin-bottom: 3px; font: 400 .85rem/1 var(--display); letter-spacing: .1em; text-transform: uppercase; color: var(--gold-1); }

/* ── Le contenu du guide ── */
.md { margin-top: 22px; }
.md > * + * { margin-top: 16px; }
.md p { text-wrap: pretty; }
.md strong { font-weight: 800; color: #fff; }
.md a { color: var(--blue-soft); text-underline-offset: 3px; }
.md h3.sub { margin-top: 28px; font: 400 1.3rem/1.2 var(--display); color: var(--blue-soft); }
.md > h3.sub:first-child { margin-top: 0; }
.md code {
  padding: .12em .42em;
  border-radius: 6px;
  background: #12305A;
  font: 700 .9em/1.4 ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  color: #DCEBFF;
  overflow-wrap: anywhere;
}

.md ul, .md ol { display: grid; gap: 10px; padding: 0; list-style: none; }
.md ul > li { position: relative; padding-left: 26px; }
.md ul > li::before { content: ""; position: absolute; left: 4px; top: .62em; width: 10px; height: 10px; border-radius: 3px; background: var(--blue-soft); transform: rotate(45deg); }
.md ol { counter-reset: n; }
.md ol > li { position: relative; min-height: 34px; padding: 3px 0 0 46px; counter-increment: n; }
.md ol > li::before {
  content: counter(n);
  position: absolute;
  left: 0;
  top: 0;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--blue);
  box-shadow: 0 3px 0 var(--blue-deep);
  font: 400 1.05rem/1 var(--display);
  color: #fff;
}
.md li > ul, .md li > ol { margin-top: 10px; }

.md blockquote {
  padding: 12px 16px;
  border-radius: 14px;
  border-left: 6px solid var(--blue-soft);
  background: var(--card);
  color: var(--soft);
  font-style: italic;
}

/* Astuces et pièges */
.note { padding: 14px 16px 15px; border-radius: 16px; background: var(--card); border: 3px solid var(--tone); box-shadow: 0 5px 0 var(--tone-edge); }
.note--tip { --tone: var(--blue-soft); --tone-edge: var(--blue-soft-edge); }
.note--warn { --tone: var(--red); --tone-edge: #8E0F1A; }
.note__tag { display: inline-block; margin-bottom: 7px; padding: 5px 9px 4px; border-radius: 7px; background: var(--tone); font: 400 .78rem/1 var(--display); letter-spacing: .08em; text-transform: uppercase; color: #04182E; transform: rotate(-2deg); }
.note--warn .note__tag { color: #fff; }

.tag-pack { display: inline-block; margin-right: 4px; padding: 4px 9px 3px; border-radius: 7px; background: var(--blue); box-shadow: 0 3px 0 var(--blue-deep); font: 400 .78rem/1.2 var(--display); letter-spacing: .06em; text-transform: uppercase; color: #fff; }

/* Blocs à copier */
.copybox { border-radius: 16px; background: var(--card-2); border: 3px solid var(--gold-1); box-shadow: 0 5px 0 var(--gold-deep); overflow: hidden; }
.copybox--code { border-color: var(--line); box-shadow: 0 5px 0 var(--line-edge); }
.copybox__head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 8px 8px 8px 14px; background: var(--card); border-bottom: 3px solid var(--line); }
.copybox__head span { font: 400 .9rem/1 var(--display); letter-spacing: .08em; text-transform: uppercase; color: var(--gold-1); }
.copybox--code .copybox__head span { color: var(--soft); }
.copy {
  min-width: 96px;
  min-height: 40px;
  padding: 0 14px;
  border: 0;
  border-radius: 11px;
  background: linear-gradient(180deg, var(--gold-1), var(--gold-2));
  box-shadow: inset 0 2px 0 rgba(255, 255, 255, .5), 0 4px 0 var(--gold-deep);
  font: 400 .95rem/1 var(--display);
  letter-spacing: .04em;
  text-transform: uppercase;
  color: #2E1700;
  cursor: pointer;
  transition: transform .08s ease-out, box-shadow .08s ease-out;
}
.copy:active { transform: translateY(3px); box-shadow: inset 0 2px 0 rgba(255, 255, 255, .5), 0 1px 0 var(--gold-deep); }
.copy.is-ok { background: var(--green); box-shadow: inset 0 2px 0 rgba(255, 255, 255, .4), 0 4px 0 #1C7A40; color: #03200F; }
.copybox__body { margin: 0; padding: 14px 16px 16px; font: 700 .98rem/1.55 var(--body); color: #E6EEFB; white-space: pre-wrap; overflow-wrap: anywhere; }
.copybox--code .copybox__body { font: 600 .86rem/1.5 ui-monospace, "SF Mono", Menlo, Consolas, monospace; white-space: pre; overflow-x: auto; }
.copybox--code .copybox__body code { padding: 0; background: none; font: inherit; overflow-wrap: normal; }
.fill { padding: .05em .3em; border-radius: 5px; background: var(--gold-1); color: #2E1700; }
.plain { margin: 0; padding: 14px 16px; border-radius: 14px; background: var(--card); border: 3px solid var(--line); font: 700 .95rem/1.5 var(--body); color: var(--soft); white-space: pre-wrap; overflow-wrap: anywhere; }

/* Tableaux */
.table-wrap { border-radius: 14px; border: 3px solid var(--line); overflow-x: auto; background: var(--card); }
.md table { width: 100%; border-collapse: collapse; font-size: .95rem; }
.md th { padding: 10px 12px; background: var(--line); font: 400 .9rem/1.2 var(--display); letter-spacing: .05em; text-align: left; text-transform: uppercase; white-space: nowrap; }
.md td { padding: 10px 12px; border-top: 2px solid var(--line); vertical-align: top; }

/* Captures */
.shot { border-radius: 16px; background: var(--card); border: 3px solid var(--line); box-shadow: 0 5px 0 var(--line-edge); overflow: hidden; }
.shot__zoom { display: block; width: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; }
.shot img { width: 100%; height: auto; }
.shot figcaption { padding: 9px 14px 10px; border-top: 3px solid var(--line); font-size: .88rem; font-weight: 700; color: var(--muted); }
.shot--todo { border-style: dashed; box-shadow: none; background: var(--card-2); }
.shot__ph { display: grid; gap: 4px; padding: 22px 18px; text-align: center; }
.shot__ph b { font: 400 .85rem/1 var(--display); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.shot__ph span { font-size: .9rem; color: #7F97B8; }

/* Cases à cocher */
.md ul.checks { gap: 12px; }
.md ul.checks > li { padding: 0; }
.md ul.checks > li::before { content: none; }
.check label {
  display: grid;
  grid-template-columns: 34px 1fr;
  align-items: start;
  gap: 12px;
  padding: 13px 14px;
  border-radius: 16px;
  background: var(--card);
  border: 3px solid var(--line);
  box-shadow: 0 5px 0 var(--line-edge);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}
.check input { position: absolute; opacity: 0; }
.check__box { width: 34px; height: 34px; border-radius: 10px; background: var(--ink); box-shadow: inset 0 0 0 3px var(--line); }
.check__txt { padding-top: 3px; }
.check input:checked ~ .check__box {
  background: var(--green) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='%2303200F' stroke-width='4' stroke-linecap='round' stroke-linejoin='round' d='M5 12.5l4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / 24px no-repeat;
  box-shadow: inset 0 0 0 3px #7BE3A2;
}
.check:has(input:checked) label { border-color: var(--green); box-shadow: 0 5px 0 #1C7A40; }
.check input:focus-visible ~ .check__box { outline: 3px solid #fff; outline-offset: 3px; }

/* Barre du bas */
.nav { position: sticky; bottom: 0; z-index: 20; background: var(--card-2); border-top: 3px solid var(--line-edge); }
.nav__in { display: grid; grid-template-columns: auto 1fr; gap: 12px; padding: 12px 0 max(8px, env(safe-area-inset-bottom)); }
.nav .btn--ghost { padding: 0 18px; font-size: 1rem; }
.nav .btn--gold { font-size: 1.3rem; }

/* Écran de fin de module */
.done { text-align: center; padding-top: 8vh; }
.done__medal {
  display: grid;
  place-items: center;
  width: 124px;
  height: 124px;
  margin: 0 auto 22px;
  border-radius: 50%;
  background: linear-gradient(180deg, var(--gold-1), var(--gold-2));
  border: 6px solid #FFE36B;
  box-shadow: 0 9px 0 var(--gold-deep);
  color: #2E1700;
  animation: pop .5s cubic-bezier(.2, 1.6, .4, 1) both;
}
.done__medal svg { width: 66px; height: 66px; }
@keyframes pop { from { transform: scale(.4) rotate(-20deg); opacity: 0; } }
.done .goal { margin-top: 24px; text-align: left; }
.done__actions { display: grid; gap: 14px; margin-top: 28px; }
.done__actions .btn { width: 100%; min-height: 62px; }

/* Capture agrandie */
.zoom { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; padding: 16px; background: rgba(2, 10, 22, .92); cursor: zoom-out; }
.zoom img { max-width: 100%; max-height: 100%; border-radius: 10px; }

.state { padding: 60px 0; text-align: center; color: var(--muted); }

@media (min-width: 760px) {
  body { font-size: 1.1rem; }
  .mod { grid-template-columns: 96px 1fr; padding: 12px 0; }
  .path li:not(:last-child) .mod::before { left: 46px; }
  .mod__title { font-size: 1.4rem; }
  .lesson { padding-top: 40px; }
  .nav__in { grid-template-columns: 180px 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .mod.is-current .mod__node, .done__medal { animation: none; }
  .btn, .track i { transition: none; }
}
