@font-face {
  font-family: "Nunito";
  src: url("./police/Nunito-VariableFont_wght.ttf") format("truetype");
  font-style: normal;
  font-weight: 200 900;
  font-display: swap;
}

@font-face {
  font-family: "Nunito";
  src: url("./police/Nunito-Italic-VariableFont_wght.ttf") format("truetype");
  font-style: italic;
  font-weight: 200 900;
  font-display: swap;
}

:root {
  --ink: #15122f;
  --muted: #655f7f;
  --night: #19153d;
  --night-2: #2a2457;
  --paper: #fbf8f1;
  --white: #ffffff;
  --lilac: #c77cf2;
  --violet: #7964ec;
  --pink: #f48ce9;
  --yellow: #e8f20b;
  --mint: #abf0db;
  --orange: #ffb17c;
  --line: rgba(21, 18, 47, 0.12);
  --nav-height: 76px;
  color-scheme: only light;
  font-family: "Nunito", system-ui, sans-serif;
  color: var(--ink);
  background: var(--night);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  width: 100%;
  min-height: 100%;
  overflow: hidden;
  color-scheme: only light;
  background: var(--night);
}

body {
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

button,
a,
input,
select,
textarea {
  font: inherit;
  color-scheme: only light;
}

button,
a {
  -webkit-tap-highlight-color: transparent;
}

button {
  border: 0;
  cursor: pointer;
  color: inherit;
  background: transparent;
  -webkit-appearance: none;
  appearance: none;
}

.app-shell {
  position: relative;
  width: 100%;
  height: 100dvh;
  max-width: 620px;
  margin: 0 auto;
  overflow: hidden;
  background: var(--paper);
}

.screen {
  position: relative;
  display: flex;
  flex-direction: column;
  height: calc(100dvh - var(--nav-height));
  min-height: 0;
  padding: 18px 18px 10px;
  overflow: hidden;
  background:
    radial-gradient(circle at 94% 7%, rgba(244, 140, 233, 0.25), transparent 24%),
    radial-gradient(circle at 4% 88%, rgba(121, 100, 236, 0.13), transparent 26%),
    var(--paper);
}

.screen--immersive {
  height: 100dvh;
  padding: 18px;
}

.screen--dark {
  color: var(--white);
  background:
    radial-gradient(circle at 90% 10%, rgba(199, 124, 242, 0.31), transparent 30%),
    radial-gradient(circle at 8% 80%, rgba(121, 100, 236, 0.35), transparent 32%),
    var(--night);
}

.screen__body {
  display: flex;
  flex: 1;
  min-height: 0;
  flex-direction: column;
  gap: 12px;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: 1px 4px 8px 0;
}

.screen__body--center {
  justify-content: center;
}

.topbar {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 38px;
  margin-bottom: 7px;
}

.topbar__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  min-height: 30px;
}

.breadcrumb {
  display: flex;
  align-items: center;
  gap: 4px;
  width: 100%;
  min-height: 22px;
  padding: 2px 5px;
  overflow-x: auto;
  color: rgba(255, 255, 255, 0.68);
  white-space: nowrap;
  scrollbar-width: none;
}

.breadcrumb::-webkit-scrollbar { display: none; }

.breadcrumb__item {
  flex: 0 0 auto;
  padding: 3px 6px;
  border-radius: 999px;
  color: inherit;
  background: transparent;
  font-size: 0.56rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.breadcrumb__icon {
  width: 16px;
  height: 16px;
  margin-right: 2px;
  vertical-align: middle;
  object-fit: contain;
}

button.breadcrumb__item { cursor: pointer; }

.breadcrumb__item.is-current {
  color: var(--ink);
  background: var(--yellow);
}

.breadcrumb__separator {
  flex: 0 0 auto;
  color: rgba(255, 255, 255, 0.48);
  font-size: 0.72rem;
  font-weight: 900;
}

.topbar__brand {
  width: 112px;
  height: 30px;
  object-fit: contain;
  object-position: left center;
}

.topbar__brand--color {
  width: 128px;
}

.topbar__step {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.page-controls {
  display: flex;
  align-items: center;
  gap: 5px;
  margin-left: auto;
  margin-right: 5px;
}

.page-controls__button {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  color: var(--yellow);
  background: #6032bd;
  border: 2px solid var(--ink);
  box-shadow: 2px 3px 0 var(--ink);
  font-size: 1.25rem;
  font-weight: 900;
  line-height: 1;
}

.page-controls__button:hover,
.page-controls__button:focus-visible {
  color: var(--ink);
  background: var(--yellow);
}

.page-controls__button:disabled {
  cursor: default;
  opacity: 0.35;
}

.eyebrow {
  margin: 0;
  color: var(--violet);
  font-size: 0.74rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.eyebrow--light {
  color: var(--yellow);
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1,
h2,
h3 {
  line-height: 0.98;
  letter-spacing: -0.045em;
}

h1 {
  max-width: 520px;
  font-size: clamp(2.15rem, 9vw, 4.5rem);
  font-weight: 900;
}

h2 {
  font-size: clamp(1.65rem, 7vw, 2.7rem);
  font-weight: 900;
}

h3 {
  font-size: 1.12rem;
  font-weight: 900;
}

.lede {
  max-width: 520px;
  color: var(--muted);
  font-size: clamp(0.92rem, 3.9vw, 1.08rem);
  line-height: 1.35;
}

.lede--light {
  color: rgba(255, 255, 255, 0.76);
}

.muted {
  color: var(--muted);
}

.small {
  font-size: 0.78rem;
  line-height: 1.25;
}

.hero-logo {
  display: block;
  width: min(88%, 480px);
  max-height: 37dvh;
  margin: 0 auto 12px;
  object-fit: contain;
}

.hero-logo--small {
  width: min(72%, 330px);
  max-height: 25dvh;
}

.splash__logos {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 20px;
  margin-top: auto;
  animation: fade-in 0.9s ease both;
}

.splash__logos img {
  width: 40%;
  max-width: 170px;
  max-height: 75px;
  object-fit: contain;
}

.splash__present {
  margin-top: 10px;
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.18em;
  text-align: center;
  text-transform: uppercase;
}

.splash__logo {
  margin: auto auto 0;
  animation: pop-in 0.8s 0.9s cubic-bezier(0.18, 0.9, 0.25, 1.1) both;
}

.splash__hint {
  margin-top: 14px;
  color: rgba(255, 255, 255, 0.56);
  font-size: 0.78rem;
  text-align: center;
  animation: fade-in 1s 1.2s ease both;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 48px;
  padding: 12px 18px;
  border-radius: 999px;
  color: var(--ink);
  background: var(--yellow);
  box-shadow: 0 7px 0 rgba(21, 18, 47, 0.16);
  font-size: 0.96rem;
  font-weight: 900;
  line-height: 1;
  transition: transform 0.18s ease, box-shadow 0.18s ease, filter 0.18s ease;
}

.btn:hover,
.btn:focus-visible {
  filter: brightness(1.04);
  transform: translateY(-2px);
  box-shadow: 0 9px 0 rgba(21, 18, 47, 0.16);
}

.btn:active {
  transform: translateY(3px);
  box-shadow: 0 3px 0 rgba(21, 18, 47, 0.16);
}

.btn--secondary {
  color: var(--white);
  background: var(--violet);
}

.btn--ghost {
  color: var(--ink);
  background: rgba(255, 255, 255, 0.64);
  border: 1px solid var(--line);
  box-shadow: none;
}

.btn--dark {
  color: var(--white);
  background: var(--night-2);
  box-shadow: 0 7px 0 rgba(21, 18, 47, 0.22);
}

.btn--wide {
  width: 100%;
}

.btn-row {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-top: auto;
}

.btn-row .btn {
  flex: 1;
}

.home-play {
  gap: 12px;
}

.home-play img {
  width: 62px;
  height: auto;
  object-fit: contain;
}

.home-hero {
  display: grid;
  gap: 10px;
  padding: 8px 0 2px;
}

.home-body {
  gap: 8px;
}

.home-body > .btn-row {
  position: sticky;
  bottom: 0;
  z-index: 4;
  padding: 8px 0 5px;
  background: linear-gradient(180deg, rgba(145, 79, 232, 0), rgba(145, 79, 232, 0.96) 32%);
}

.home-body__note {
  padding: 10px 12px;
  font-size: 0.76rem;
  line-height: 1.2;
}

.home-hero__spark {
  display: inline-flex;
  align-items: center;
  width: max-content;
  padding: 5px 10px;
  border-radius: 10px;
  color: var(--ink);
  background: var(--pink);
  font-size: 0.72rem;
  font-weight: 900;
  transform: rotate(-2deg);
}

.stage-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 4px;
}

.stage-tile {
  position: relative;
  display: flex;
  min-height: 104px;
  flex-direction: column;
  justify-content: space-between;
  padding: 13px;
  overflow: hidden;
  border-radius: 18px;
  color: var(--ink);
  background: var(--white);
  border: 1px solid rgba(21, 18, 47, 0.08);
  box-shadow: 0 8px 18px rgba(35, 29, 78, 0.08);
  text-align: left;
  text-decoration: none;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.stage-tile:hover,
.stage-tile:focus-visible {
  transform: translateY(-3px) rotate(-1deg);
  box-shadow: 0 12px 24px rgba(35, 29, 78, 0.14);
}

.stage-tile::after {
  position: absolute;
  right: -18px;
  bottom: -22px;
  width: 74px;
  height: 74px;
  border-radius: 50%;
  background: var(--stage-color, var(--pink));
  content: "";
  opacity: 0.55;
}

.stage-tile__number {
  color: var(--stage-color, var(--violet));
  font-size: 0.73rem;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.stage-tile__icon {
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 1;
  width: 44px;
  height: 44px;
  object-fit: contain;
}

.stage-tile__icon--text {
  font-size: 1.45rem;
}

.stage-tile__title {
  max-width: 125px;
  font-size: 0.94rem;
  font-weight: 900;
  line-height: 1.05;
}

.stage-tile.is-done {
  background: #f7f1ff;
}

.stage-tile.is-done::before {
  position: absolute;
  top: 8px;
  right: 10px;
  z-index: 2;
  content: "✓";
  color: #2d8f71;
  font-size: 0.9rem;
  font-weight: 900;
}

.stage-tile--wide {
  grid-column: 1 / -1;
  min-height: 72px;
  flex-direction: row;
  align-items: center;
}

.stage-tile--wide .stage-tile__title {
  max-width: 220px;
}

.section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px;
}

.section-heading__count {
  color: var(--violet);
  font-size: 0.78rem;
  font-weight: 900;
}

.info-card {
  padding: 15px;
  border-radius: 19px;
  background: rgba(255, 255, 255, 0.88);
  border: 1px solid var(--line);
  box-shadow: 0 8px 18px rgba(35, 29, 78, 0.06);
}

.info-card--dark {
  color: var(--white);
  background: rgba(255, 255, 255, 0.1);
  border-color: rgba(255, 255, 255, 0.16);
  box-shadow: none;
}

.info-card--accent {
  background: linear-gradient(135deg, rgba(244, 140, 233, 0.22), rgba(121, 100, 236, 0.18));
}

.info-card p + p {
  margin-top: 8px;
}

.info-card__label {
  display: block;
  margin-bottom: 7px;
  color: var(--violet);
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.step-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 54px;
  flex: 0 0 auto;
  border-radius: 14px;
  color: var(--ink);
  background: var(--stage-color, var(--pink));
  object-fit: contain;
}

.step-intro {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.step-intro__text {
  display: grid;
  gap: 6px;
}

.progress-dots {
  display: flex;
  justify-content: center;
  gap: 7px;
  margin: 2px 0 3px;
}

.progress-dots span {
  width: 8px;
  height: 8px;
  border: 2px solid var(--violet);
  border-radius: 99px;
  background: transparent;
}

.progress-dots span.is-active {
  width: 23px;
  background: var(--violet);
}

.question-card {
  display: grid;
  gap: 10px;
  padding: 16px;
  border-radius: 21px;
  color: var(--white);
  background: var(--night);
  box-shadow: 0 11px 0 rgba(21, 18, 47, 0.12);
}

.question-card__number {
  color: var(--yellow);
  font-size: 0.72rem;
  font-weight: 900;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.question-card__text {
  font-size: clamp(1.08rem, 4.8vw, 1.55rem);
  font-weight: 900;
  line-height: 1.08;
}

.answer-list {
  display: grid;
  gap: 8px;
}

.answer {
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 45px;
  padding: 9px 11px;
  border-radius: 14px;
  color: var(--ink);
  background: var(--white);
  border: 2px solid transparent;
  box-shadow: 0 4px 0 rgba(21, 18, 47, 0.08);
  font-size: 0.91rem;
  font-weight: 800;
  text-align: left;
  transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease;
}

.answer:hover,
.answer:focus-visible {
  border-color: var(--violet);
  transform: translateX(3px);
}

.answer__letter {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 25px;
  height: 25px;
  flex: 0 0 auto;
  border-radius: 50%;
  color: var(--white);
  background: var(--violet);
  font-size: 0.75rem;
  font-weight: 900;
}

.answer.is-correct {
  background: var(--mint);
  border-color: #2d8f71;
}

.answer.is-wrong {
  background: #ffd6d1;
  border-color: #cf5149;
}

.feedback {
  padding: 10px 12px;
  border-radius: 13px;
  color: var(--white);
  background: rgba(255, 255, 255, 0.15);
  font-size: 0.82rem;
  line-height: 1.3;
}

.feedback strong {
  display: block;
  margin-bottom: 2px;
  color: var(--yellow);
  font-size: 0.9rem;
}

.pegi-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 48px;
  border: 4px solid var(--ink);
  border-radius: 50%;
  color: var(--white);
  background: var(--pegi, var(--violet));
  font-size: 1rem;
  font-weight: 900;
}

.pegi-row {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 7px;
}

.pegi-option {
  display: grid;
  justify-items: center;
  gap: 3px;
  padding: 6px 2px;
  border-radius: 13px;
  color: var(--ink);
  background: var(--white);
  border: 2px solid transparent;
  font-size: 0.7rem;
  font-weight: 900;
}

.pegi-option .pegi-pill {
  width: 34px;
  height: 34px;
  border-width: 3px;
  font-size: 0.72rem;
}

.pegi-badge {
  width: 44px;
  height: 44px;
  object-fit: contain;
  flex: 0 0 auto;
}

.pegi-option .pegi-badge {
  width: 38px;
  height: 38px;
}

.pegi-option:hover,
.pegi-option:focus-visible,
.pegi-option.is-selected {
  border-color: var(--violet);
  transform: translateY(-2px);
}

.level-grid {
  display: grid;
  gap: 6px;
}

.level-row {
  display: grid;
  grid-template-columns: 39px 1fr;
  align-items: center;
  gap: 9px;
  padding: 6px 8px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.8);
  border: 1px solid var(--line);
}

.level-row p {
  color: var(--ink);
  font-size: 0.71rem;
  line-height: 1.16;
}

.level-focus {
  display: grid;
  justify-items: center;
  gap: 12px;
  padding: 18px 16px;
  border: 2px solid #ef94ec;
  border-radius: 20px;
  color: var(--ink);
  background: #fff0f8;
  box-shadow: 4px 6px 0 rgba(38, 17, 84, 0.46);
  text-align: center;
}

.level-focus__title {
  width: 100%;
  padding: 7px 10px;
  border-radius: 10px;
  color: #fff;
  background: var(--violet);
  font-size: 0.84rem;
  font-weight: 900;
}

.level-focus__badge {
  width: 82px;
  height: 82px;
  object-fit: contain;
}

.level-focus p {
  max-width: 32rem;
  color: var(--ink);
  font-size: 0.88rem;
  line-height: 1.28;
}

.game-card {
  display: grid;
  gap: 8px;
  padding: 14px;
  border-radius: 20px;
  background: linear-gradient(135deg, #292352, #433879);
  color: var(--white);
  box-shadow: 0 9px 0 rgba(21, 18, 47, 0.12);
}

.game-card__top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.game-card__image {
  display: block;
  width: 100%;
  height: 132px;
  border: 2px solid var(--yellow);
  border-radius: 14px;
  object-fit: cover;
}

.game-card h3 {
  font-size: 1.38rem;
}

.game-card p {
  color: rgba(255, 255, 255, 0.78);
  font-size: 0.82rem;
  line-height: 1.25;
}

.game-meta,
.bullet-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.game-meta li {
  padding: 4px 8px;
  border-radius: 999px;
  color: var(--ink);
  background: var(--yellow);
  font-size: 0.68rem;
  font-weight: 900;
}

.bullet-list {
  display: grid;
  gap: 3px;
}

.bullet-list li {
  color: rgba(255, 255, 255, 0.8);
  font-size: 0.75rem;
}

.bullet-list li::before {
  margin-right: 5px;
  color: var(--pink);
  content: "•";
}

.picto-board {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 7px;
}

.picto-card {
  display: grid;
  justify-items: center;
  gap: 4px;
  min-height: 65px;
  padding: 7px 3px;
  border-radius: 14px;
  color: var(--ink);
  background: var(--white);
  border: 2px solid transparent;
  font-size: 0.66rem;
  font-weight: 900;
  text-align: center;
}

.picto-card__symbol {
  font-size: 1.2rem;
}

.picto-card__image {
  width: 76px;
  height: 76px;
  border-radius: 10px;
  background: #1c1c1c;
  object-fit: contain;
}

.picto-card.is-matched {
  background: var(--mint);
  border-color: #2d8f71;
}

.match-target {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
}

.match-drop {
  display: flex;
  align-items: center;
  min-height: 43px;
  padding: 8px 10px;
  border-radius: 12px;
  color: var(--ink);
  background: rgba(255, 255, 255, 0.82);
  border: 2px dashed rgba(21, 18, 47, 0.2);
  font-size: 0.72rem;
  font-weight: 800;
  transition: background 0.18s ease, border-color 0.18s ease;
}

.match-drop.is-over {
  background: #fff2a5;
  border-color: var(--violet);
}

.match-drop.is-matched {
  background: var(--mint);
  border-style: solid;
  border-color: #2d8f71;
}

.match-drop strong {
  margin-left: auto;
  font-size: 0.95rem;
}

.tf-list {
  display: grid;
  gap: 7px;
}

.tf-item {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 9px;
  padding: 11px 12px;
  border-radius: 15px;
  background: var(--white);
  border: 2px solid transparent;
  box-shadow: 0 4px 0 rgba(21, 18, 47, 0.07);
}

.tf-item__text {
  font-size: 0.79rem;
  font-weight: 800;
  line-height: 1.22;
}

.tf-actions {
  display: flex;
  gap: 5px;
}

.tf-btn {
  min-width: 47px;
  padding: 7px 9px;
  border-radius: 10px;
  color: var(--ink);
  background: #eeeafa;
  font-size: 0.68rem;
  font-weight: 900;
}

.tf-btn.is-selected {
  color: var(--white);
  background: var(--violet);
}

.tf-item.is-correct {
  background: var(--mint);
  border-color: #2d8f71;
}

.tf-item.is-wrong {
  background: #ffd6d1;
  border-color: #cf5149;
}

.message-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.message-card {
  display: grid;
  align-content: start;
  gap: 6px;
  min-height: 95px;
  padding: 11px;
  border-radius: 15px;
  color: var(--ink);
  background: var(--white);
  border: 1px solid var(--line);
}

.message-card__number {
  color: var(--violet);
  font-size: 0.68rem;
  font-weight: 900;
}

.message-card p {
  font-size: 0.73rem;
  font-weight: 800;
  line-height: 1.17;
}

.checklist {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
}

.check-item {
  display: flex;
  align-items: flex-start;
  gap: 6px;
  min-height: 42px;
  padding: 7px;
  color: var(--ink);
  border-radius: 11px;
  background: rgba(255, 255, 255, 0.82);
  border: 1px solid var(--line);
  font-size: 0.68rem;
  font-weight: 800;
  line-height: 1.14;
}

.check-item input {
  width: 16px;
  height: 16px;
  margin: 0;
  flex: 0 0 auto;
  accent-color: var(--violet);
}

.badge-reveal {
  display: grid;
  justify-items: center;
  gap: 7px;
  padding: 16px;
  border-radius: 21px;
  color: var(--white);
  background: var(--night);
  text-align: center;
  animation: pop-in 0.55s cubic-bezier(0.18, 0.9, 0.25, 1.1) both;
}

.badge-reveal__icon {
  display: grid;
  place-items: center;
  width: 100px;
  height: 100px;
  border-radius: 0;
  object-fit: contain;
}

.badge-strip {
  display: flex;
  justify-content: center;
  gap: 8px;
  padding: 9px 7px;
  border-radius: 15px;
  background: rgba(255, 255, 255, 0.64);
}

.badge-strip span {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 9px;
  color: rgba(21, 18, 47, 0.25);
  background: rgba(21, 18, 47, 0.08);
  font-size: 0.9rem;
}

.badge-strip span img {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.badge-strip span.is-done {
  color: var(--ink);
  background: var(--yellow);
}

.nav {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 20;
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  height: var(--nav-height);
  padding: 8px 8px max(8px, env(safe-area-inset-bottom));
  gap: 4px;
  background: rgba(25, 21, 61, 0.97);
  box-shadow: 0 -8px 24px rgba(21, 18, 47, 0.16);
}

.nav__item {
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 3px;
  min-width: 0;
  border-radius: 12px;
  color: rgba(255, 255, 255, 0.6);
  background: transparent;
  font-size: 0.62rem;
  font-weight: 900;
  transition: background 0.18s ease, color 0.18s ease;
}

.nav__item:hover,
.nav__item:focus-visible,
.nav__item.is-active {
  color: var(--ink);
  background: var(--yellow);
}

.nav__icon {
  width: 25px;
  height: 25px;
  object-fit: contain;
  line-height: 1;
}

.toast {
  position: absolute;
  right: 16px;
  bottom: calc(var(--nav-height) + 16px);
  left: 16px;
  z-index: 30;
  padding: 11px 13px;
  border-radius: 13px;
  color: var(--white);
  background: var(--night);
  box-shadow: 0 10px 25px rgba(21, 18, 47, 0.22);
  font-size: 0.8rem;
  font-weight: 800;
  text-align: center;
  animation: toast-in 0.25s ease both;
}

.screen--immersive .btn-row {
  margin-top: 18px;
}

.footer-note {
  margin-top: auto;
  color: var(--muted);
  font-size: 0.7rem;
  text-align: center;
}

@keyframes fade-in {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes pop-in {
  from { opacity: 0; transform: scale(0.76) rotate(-3deg); }
  to { opacity: 1; transform: scale(1) rotate(0); }
}

@keyframes toast-in {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (min-width: 700px) {
  :root { --nav-height: 84px; }

  .screen { padding: 28px 30px 16px; }
  .nav { padding-inline: 18px; }
  .stage-list { gap: 13px; }
  .stage-tile { min-height: 118px; padding: 16px; }
}

@media (max-height: 700px) {
  .screen { padding-top: 11px; }
  .topbar { min-height: 28px; margin-bottom: 2px; }
  .topbar__brand { height: 24px; }
  .stage-tile { min-height: 83px; padding: 10px; }
  .stage-tile__icon { right: 9px; bottom: 9px; }
  .info-card { padding: 11px; }
  .question-card { padding: 12px; }
  .message-card { min-height: 78px; padding: 8px; }
  .check-item { min-height: 34px; padding: 5px; }
  .check-item input { width: 14px; height: 14px; }
}

@media (max-height: 780px) {
  .home-body { gap: 6px; }
  .home-hero { gap: 6px; padding-top: 0; }
  .home-hero h1 { font-size: clamp(2rem, 8vw, 3.1rem); }
  .home-hero .lede { font-size: 0.84rem; }
  .stage-list { gap: 7px; }
  .stage-tile { min-height: 84px; padding: 10px; }
  .stage-tile--wide { min-height: 55px; }
  .home-body__note { padding: 8px 10px; }
}

@media print {
  html, body { overflow: visible; background: white; }
  .app-shell { height: auto; max-width: none; overflow: visible; }
  .screen { height: auto; min-height: 0; overflow: visible; padding: 32px; }
  .nav, .btn, .topbar__step { display: none !important; }
}

/* Direction visuelle issue des maquettes du PowerPoint */
:root {
  --ink: #17122f;
  --night: #2e185c;
  --night-2: #5830b8;
  --paper: #914fe8;
  --lilac: #9956ee;
  --violet: #7139cf;
  --pink: #EB5CF5;
  --yellow: #e8f20b;
  --mint: #abf0db;
  --line: rgba(23, 18, 47, 0.2);
}

.screen {
  isolation: isolate;
  color: #fff;
  background: #914fe8;
}

.screen::before {
  position: absolute;
  inset: 0;
  z-index: -1;
  background: conic-gradient(from 170deg at 50% 50%, #9854eb 0deg, #7b3fce 18deg, #a159ee 35deg, #7d41d1 55deg, #9c55eb 76deg, #7b3fce 99deg, #a159ee 122deg, #7b3fce 143deg, #9e58ec 168deg, #7d41d1 190deg, #9d58ed 212deg, #7a3dcc 235deg, #9d56ec 260deg, #7b40d0 284deg, #9e58ed 310deg, #7c40cf 338deg, #9854eb 360deg);
  content: "";
  opacity: 0.85;
}

.screen::after {
  position: absolute;
  right: -18%;
  bottom: -14%;
  z-index: -1;
  width: 72%;
  height: 45%;
  border-radius: 50% 50% 0 0;
  background: rgba(111, 54, 194, 0.32);
  content: "";
  transform: rotate(-13deg);
}

.screen > * {
  position: relative;
  z-index: 1;
}

.screen--immersive {
  background: #914fe8;
}

.screen--dark {
  background: #2f1b62;
}

.screen--dark::before {
  background: conic-gradient(from 170deg at 50% 50%, #6940bd 0deg, #45268b 18deg, #7345c9 35deg, #3f2383 55deg, #7145c5 76deg, #43258a 99deg, #7345c9 122deg, #402384 143deg, #7547c9 168deg, #3d227f 190deg, #7445c8 212deg, #3e2283 235deg, #7446c9 260deg, #3e2283 284deg, #7446c9 310deg, #3d227f 338deg, #6940bd 360deg);
}

.topbar__partners {
  display: flex;
  align-items: center;
  gap: 4px;
  min-width: 100px;
}

.topbar__partners img {
  height: 28px;
  object-fit: contain;
}

.topbar__partners img:first-child { width: 36px; }
.topbar__partners img:last-child { width: 66px; }

.topbar__brand,
.topbar__brand--color {
  width: 92px;
  height: 34px;
  object-fit: contain;
  mix-blend-mode: multiply;
}

.topbar__step {
  position: absolute;
  right: 0;
  bottom: -1px;
  color: #fff;
  text-shadow: 1px 1px 0 var(--ink);
}

.eyebrow,
.section-heading__count,
.info-card__label {
  color: #ffb7ef;
  text-shadow: 1px 1px 0 var(--ink);
}

h1,
h2,
h3 {
  color: #fff;
  text-shadow: 3px 3px 0 var(--ink);
  -webkit-text-stroke: 1px var(--ink);
}

.home-hero h1,
.screen--immersive h1 {
  color: #f7a0eb;
}

.lede,
.lede--light,
.footer-note,
.muted {
  color: rgba(255, 255, 255, 0.92);
  text-shadow: 1px 1px 0 rgba(23, 18, 47, 0.24);
}

.home-hero__spark {
  color: var(--ink);
  background: var(--yellow);
  border: 2px solid var(--ink);
  box-shadow: 3px 3px 0 var(--ink);
}

.hero-logo {
  mix-blend-mode: multiply;
}

.info-card,
.info-card--accent {
  color: var(--ink);
  background: #fff0f8;
  border: 2px solid #ef94ec;
  box-shadow: 4px 6px 0 rgba(38, 17, 84, 0.46);
}

.info-card p,
.info-card .lede,
.info-card .muted {
  color: var(--ink);
  text-shadow: none;
}

.info-card__label { text-shadow: none; }

.step-mark {
  border: 2px solid var(--ink);
  box-shadow: 3px 3px 0 var(--ink);
}

.question-card,
.game-card,
.badge-reveal {
  color: var(--ink);
  background: #fff0f8;
  border: 2px solid #ef94ec;
  box-shadow: 4px 6px 0 rgba(38, 17, 84, 0.46);
}

.question-card__number,
.game-card__top p,
.game-card p,
.bullet-list li {
  color: var(--ink);
  text-shadow: none;
}

.question-card__text,
.game-card h3 {
  color: var(--ink);
  text-shadow: none;
  -webkit-text-stroke: 0;
}

.feedback {
  color: #fff;
  background: #7139cf;
  border: 2px solid #EB5CF5;
}

.answer,
.pegi-option,
.picto-card,
.match-drop,
.tf-item,
.level-row,
.check-item,
.stage-tile {
  background: #fff0f8;
  border-color: #ef94ec;
}

.tf-item,
.tf-item__text,
.tf-item .small {
  color: var(--ink);
  text-shadow: none;
}

.answer:hover,
.answer:focus-visible,
.pegi-option:hover,
.pegi-option:focus-visible,
.pegi-option.is-selected,
.picto-card:hover,
.picto-card:focus-visible {
  border-color: var(--yellow);
}

.game-card {
  background: #7139cf;
  color: #fff;
  border-color: var(--yellow);
}

.game-card__top p,
.game-card p,
.bullet-list li {
  color: rgba(255, 255, 255, 0.92);
}

.game-card h3 {
  color: #fff;
  text-shadow: 2px 2px 0 var(--ink);
  -webkit-text-stroke: 1px var(--ink);
}

.nav {
  height: var(--nav-height);
  padding: 8px 8px max(8px, env(safe-area-inset-bottom));
  background: #2d195e;
  box-shadow: 0 -4px 0 rgba(23, 18, 47, 0.36);
}

.nav__item {
  justify-self: center;
  align-self: center;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  color: #fff;
  background: #6334c0;
  border: 2px solid rgba(23, 18, 47, 0.5);
  text-shadow: 1px 1px 0 var(--ink);
}

.nav__item:hover,
.nav__item:focus-visible,
.nav__item.is-active {
  color: var(--ink);
  background: var(--yellow);
  text-shadow: none;
}

.nav__item span:last-child { font-size: 0.55rem; }

.nav__arrow {
  justify-self: center;
  align-self: center;
  width: 48px;
  height: 48px;
  font-size: 1.5rem;
}

.nav__arrow img {
  width: 22px;
  height: 22px;
  object-fit: contain;
}

.btn {
  border: 2px solid var(--ink);
  box-shadow: 4px 5px 0 var(--ink);
}

.btn--secondary {
  color: #fff;
  background: #7139cf;
  border-color: #EB5CF5;
  box-shadow: 4px 5px 0 var(--ink);
}

.btn--ghost {
  color: var(--ink);
  background: #fff0f8;
  border-color: #ef94ec;
}

.badge-strip {
  background: #fff0f8;
  border: 2px solid #ef94ec;
}

.toast {
  border: 2px solid #EB5CF5;
  background: #2d195e;
}

.page-arrows {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 22px;
  min-height: 58px;
  padding-top: 8px;
  margin-top: auto;
}

.page-arrow {
  display: grid;
  place-items: center;
  width: 54px;
  height: 54px;
  border-radius: 50%;
  color: var(--yellow);
  background: #6032bd;
  border: 3px solid var(--ink);
  box-shadow: 3px 4px 0 var(--ink);
  font-size: 1.75rem;
  font-weight: 900;
  line-height: 1;
  transition: transform 0.18s ease, background 0.18s ease, opacity 0.18s ease;
}

.page-arrow:hover,
.page-arrow:focus-visible {
  color: var(--ink);
  background: var(--yellow);
  transform: translateY(-2px);
}

.page-arrow:disabled {
  cursor: default;
  opacity: 0.35;
  filter: grayscale(0.8);
  transform: none;
}

.picto-board--single {
  display: flex;
  justify-content: center;
}

.picto-card--hero {
  width: min(210px, 62vw);
  min-height: 170px;
  border-width: 3px;
  font-size: 0.88rem;
}

.picto-card--hero .picto-card__image {
  width: 126px;
  height: 126px;
}

.match-target--labels {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-height: 248px;
}

/* Ajustements des écrans 3 et 4 selon les maquettes Figma */
.stage3-intro {
  gap: 10px;
}

.stage3-intro h1 {
  align-self: center;
  text-align: center;
}

.stage-intro__asset {
  display: block;
  width: 64px;
  height: 64px;
  margin: 0 auto;
  object-fit: contain;
}

.stage-intro__asset--star {
  width: 70px;
  height: 70px;
}

.progress-dots--intro {
  margin-top: 0;
}

.picto-play-card {
  display: grid;
  justify-items: center;
  gap: 8px;
  width: min(220px, 72vw);
  margin: 0 auto;
  padding: 8px;
  border: 2px solid #ef94ec;
  border-radius: 16px;
  background: #fff0f8;
  box-shadow: 4px 6px 0 rgba(38, 17, 84, 0.46);
}

.picto-play-card__title {
  width: 100%;
  padding: 6px 8px;
  border-radius: 8px;
  color: #fff;
  background: var(--violet);
  font-size: 0.76rem;
  font-weight: 900;
  text-align: center;
}

.picto-play-card .picto-card--hero {
  min-height: 126px;
  padding: 4px;
  border: 0;
  box-shadow: none;
  background: transparent;
  touch-action: none;
  user-select: none;
  -webkit-user-select: none;
  cursor: grab;
}

.picto-play-card .picto-card__image {
  width: 112px;
  height: 112px;
}

.picto-play-card .picto-card--hero.is-dragging {
  opacity: 0.68;
  transform: scale(0.96);
  cursor: grabbing;
}

.picto-play-card .picto-card--hero.is-selected {
  outline: 4px solid var(--yellow);
  outline-offset: 4px;
  border-radius: 14px;
}

.drag-ghost {
  position: fixed;
  z-index: 1000;
  display: grid;
  place-items: center;
  padding: 4px;
  pointer-events: none;
  opacity: 0.8;
  transform: translate(-50%, -50%) scale(1.04) rotate(-2deg);
  filter: drop-shadow(0 8px 8px rgba(23, 18, 47, 0.38));
}

.drag-ghost img {
  pointer-events: none;
}

body.is-pointer-dragging {
  cursor: grabbing;
  overscroll-behavior: none;
}

.match-drop[role="button"] {
  touch-action: manipulation;
  cursor: pointer;
}

.feedback--answer {
  display: grid;
  gap: 5px;
  padding: 12px 14px;
  color: #fff;
  background: #7139cf;
  border: 2px solid #e8f20b;
  border-radius: 14px;
  box-shadow: 4px 5px 0 #17122f;
}

.feedback--answer strong {
  color: #e8f20b;
}

.feedback--answer span,
.feedback--answer p {
  color: #fff;
}

.screen--dark .tf-item--feedback,
.screen--dark .picto-play-card {
  color: #fff;
}

.screen--dark .tf-item--feedback {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
}

.screen--dark .tf-item--feedback .tf-item__text,
.screen--dark .tf-item--feedback .small {
  color: #fff;
}

.screen--dark .picto-play-card {
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(246, 156, 234, 0.55);
}

.screen--dark .stage3-match-screen .match-drop,
.screen--dark .stage4-tf-screen .tf-btn {
  color: var(--ink);
}

.stage4-tf-screen {
  gap: 10px;
}

.stage4-tf-heading {
  display: grid;
  justify-items: center;
  gap: 6px;
  text-align: center;
}

.stage4-tf-heading .lede {
  font-size: 0.8rem;
}

.tf-question-card {
  display: grid;
  gap: 8px;
  width: min(100%, 320px);
  margin: 0 auto;
  padding: 10px 14px 14px;
  border: 2px solid #ef94ec;
  border-radius: 14px;
  color: var(--ink);
  background: #fff0f8;
  box-shadow: 4px 6px 0 rgba(38, 17, 84, 0.46);
  text-align: center;
}

.tf-question-card__label {
  margin: -10px -14px 0;
  padding: 7px 10px;
  border-radius: 11px 11px 0 0;
  color: #fff;
  background: var(--violet);
  font-size: 0.76rem;
  font-weight: 900;
}

.tf-question-card p {
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 800;
  line-height: 1.22;
}

.tf-choice-list {
  display: grid;
  justify-items: center;
  gap: 8px;
  width: min(100%, 230px);
  margin: 0 auto;
}

.tf-choice,
.tf-result-pill {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  min-height: 42px;
  padding: 8px 16px;
  border: 2px solid #ef94ec;
  border-radius: 999px;
  color: var(--ink);
  background: #fff0f8;
  box-shadow: 3px 4px 0 rgba(38, 17, 84, 0.46);
  font-size: 0.9rem;
  font-weight: 900;
}

.tf-choice span,
.tf-result-pill span {
  display: inline-grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  color: #fff;
  background: #22b78b;
  font-size: 0.9rem;
}

.tf-choice:nth-child(2) span,
.tf-result-pill.is-wrong span {
  background: #d63583;
}

.tf-choice:hover,
.tf-choice:focus-visible {
  border-color: var(--yellow);
  transform: translateY(-2px);
}

.tf-result-pill {
  width: min(100%, 150px);
  margin: 0 auto;
}

.tf-result-pill.is-correct {
  border-color: #e8f20b;
}

.tf-result-pill.is-wrong {
  border-color: #EB5CF5;
}

.screen--dark .tf-question-card {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(246, 156, 234, 0.55);
  box-shadow: none;
}

.screen--dark .tf-question-card p {
  color: #fff;
}

.screen--dark .tf-result-pill {
  color: var(--ink);
}

.screen--dark .stage4-tf-screen .feedback--answer {
  width: min(100%, 320px);
  margin: 0 auto;
}

/* Écrans d’entrée selon les nouvelles maquettes */
.screen,
.screen--immersive {
  background-color: #7645d9;
  background-image: url("./assets/icons/background.png");
  background-position: center;
  background-size: cover;
}

.screen--dark {
  background-color: #2f1b62;
  background-image: linear-gradient(rgba(28, 15, 70, 0.3), rgba(28, 15, 70, 0.3)), url("./assets/icons/background.png");
}

.screen--intro {
  background-color: #7645d9;
}

.screen::before,
.screen::after {
  display: none;
}

.splash-screen {
  justify-content: flex-start;
  padding-top: 15vh;
}

.splash-screen .splash__logos {
  margin: 0 auto;
}

.splash-screen .splash__logo {
  width: min(92%, 470px);
  max-height: 34vh;
  margin: 11vh auto auto;
}

.topbar--intro {
  margin-bottom: 0;
}

.home-intro {
  gap: 12px;
  padding-top: 0;
}

.home-intro__heading {
  display: grid;
  justify-items: center;
  gap: 4px;
  text-align: center;
}

.home-intro__heading h1 {
  color: #EB5CF5;
  font-size: clamp(2.1rem, 10vw, 3.5rem);
}

.home-intro__heading h2 {
  font-size: clamp(1.65rem, 7vw, 2.7rem);
}

.home-intro__card {
  position: relative;
  display: grid;
  gap: 12px;
  width: min(100%, 420px);
  margin: 42px auto 0;
  padding: 50px 24px 22px;
  border: 2px solid #ef94ec;
  border-radius: 16px;
  color: var(--ink);
  background: #fff0f8;
  box-shadow: 5px 7px 0 rgba(38, 17, 84, 0.48);
  font-size: 20px;
  line-height: 1.25;
}

.home-intro__card p {
  color: var(--ink);
}

.home-intro__card strong {
  font-weight: 900;
}

.home-intro__icon {
  position: absolute;
  top: -58px;
  left: 50%;
  width: 88px;
  height: 88px;
  object-fit: contain;
  transform: translateX(-50%);
}

.home-intro__next,
.home-intro__play {
  display: grid;
  place-items: center;
  width: max-content;
  margin: 4px auto 0;
  padding: 0;
  background: transparent;
  box-shadow: none;
}

.home-intro__next img {
  width: 94px;
  height: auto;
}

.home-intro__card--summary {
  gap: 14px;
  margin-top: 8px;
  padding: 28px 24px 24px;
}

.home-intro__card--summary ul {
  display: grid;
  gap: 8px;
  padding: 0 0 0 24px;
  margin: 0;
  color: var(--ink);
}

.home-intro__card--summary li {
  padding-left: 2px;
}

.home-intro__play {
  margin-top: 4px;
}

.home-intro__play img {
  width: min(190px, 58vw);
  height: auto;
}

.nav {
  grid-template-columns: 72px 1fr 72px;
}

.nav__home {
  grid-column: 1;
  justify-self: start;
}

.nav__arrows {
  grid-column: 2;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
}

/* Le bandeau supérieur reprend les proportions plus généreuses de la maquette. */
.topbar__partners {
  gap: 6px;
  width: 154px;
  min-width: 154px;
}

.topbar__partners img.topbar__partners-logo {
  display: block;
  width: 154px;
  height: auto;
  object-fit: contain;
}

.topbar__brand,
.topbar__brand--color {
  position: relative;
  right: -50px;
  width: 190px;
  height: 60px;
}

.splash-screen .splash__logos img {
  width: min(66vw, 210px);
  max-width: 210px;
  height: auto;
}

/* Pied de page conforme à la maquette : accueil isolé à gauche et flèches centrées. */
.screen:not(.screen--immersive) {
  height: 100dvh;
  padding-bottom: calc(var(--nav-height) + 10px);
}

.nav {
  grid-template-columns: 70px 1fr 70px;
  height: var(--nav-height);
  padding: 8px 18px max(8px, env(safe-area-inset-bottom));
  background: transparent;
  box-shadow: none;
}

.nav__home {
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 50%;
  color: #fff;
  background: rgba(106, 61, 207, 0.9);
  box-shadow: 3px 4px 0 rgba(23, 18, 47, 0.32);
}

.nav__home .nav__icon {
  width: 23px;
  height: 23px;
}

.nav__home span:last-child {
  display: none;
}

.nav__home:hover,
.nav__home:focus-visible,
.nav__home.is-active {
  color: #fff;
  background: rgba(106, 61, 207, 0.9);
  text-shadow: none;
}

.nav__arrows {
  width: max-content;
  min-width: 150px;
  min-height: 64px;
  justify-self: center;
  padding: 5px 10px;
  border-radius: 999px;
  background: rgba(53, 28, 111, 0.86);
  box-shadow: 3px 4px 0 rgba(23, 18, 47, 0.28);
}

.nav__arrows .nav__arrow {
  width: 54px;
  height: 54px;
  border: 3px solid var(--ink);
  border-radius: 50%;
  background: #7045d2;
  box-shadow: 2px 3px 0 var(--ink);
}

.nav__arrows .nav__arrow:hover,
.nav__arrows .nav__arrow:focus-visible {
  background: #7045d2;
}

@media (max-height: 700px) {
  .splash-screen {
    padding-top: 10vh;
  }

  .splash-screen .splash__logo {
    margin-top: 7vh;
  }

  .home-intro__card {
    margin-top: 32px;
    padding-top: 42px;
  }

  .home-intro__card--summary {
    margin-top: 2px;
    padding-top: 20px;
  }
}

/* Étape 1 : composition alignée sur la maquette mobile. */
.stage1-intro,
.stage1-quiz-screen {
  gap: 10px;
}

.stage1-intro > *,
.stage1-quiz-screen > * {
  align-self: center;
}

.stage1-intro > .stage1-heading,
.stage1-quiz-screen > .stage1-heading {
  width: 100%;
}

.stage1-heading {
  display: grid;
  justify-items: center;
  gap: 5px;
  text-align: center;
}

.stage1-heading h1 {
  font-size: clamp(2.1rem, 9vw, 3.6rem);
}

.stage1-intro__card {
  width: min(100%, 320px);
  display: grid;
  gap: 14px;
  padding: 22px 20px;
}

.stage1-intro__card p {
  color: var(--ink);
  font-size: 0.92rem;
  line-height: 1.26;
}

.stage-intro__asset--game {
  width: 74px;
  height: 74px;
  margin: -4px auto -28px;
}

.stage1-quiz-screen .progress-dots {
  margin-top: 0;
}

.stage1-quiz-screen .question-card {
  width: min(100%, 320px);
  padding: 0 14px 14px;
  color: var(--ink);
  background: #fff0f8;
  border: 2px solid #ef94ec;
  box-shadow: 4px 6px 0 rgba(38, 17, 84, 0.46);
  text-align: center;
  border-radius: 15px;
}

.stage1-quiz-screen .question-card__number {
  display: block;
  margin: 0 -14px 12px;
  padding: 8px 10px;
  border-radius: 12px 12px 0 0;
  color: #fff;
  background: var(--violet);
  font-size: 0.82rem;
  letter-spacing: 0;
  text-transform: none;
}

.stage1-quiz-screen .question-card__text {
  color: var(--ink);
  font-size: 0.92rem;
  line-height: 1.22;
}

.stage1-quiz-screen .answer-list {
  width: min(100%, 320px);
  gap: 9px;
}

.stage1-quiz-screen .answer {
  min-height: 46px;
  padding: 0 12px 0 0;
  overflow: hidden;
  border-radius: 999px;
  border: 2px solid #ef94ec;
  background: #fff0f8;
  font-size: 0.92rem;
  text-align: center;
}

.stage1-quiz-screen .answer__letter {
  width: 56px;
  height: 100%;
  min-height: 42px;
  border-radius: 999px 0 0 999px;
  color: var(--ink);
  background: linear-gradient(90deg, #e8f20b, #EB5CF5);
  font-size: 1.25rem;
}

.stage1-quiz-screen .answer > span:last-child {
  flex: 1;
}

.quiz-result-pill {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: min(100%, 180px);
  min-height: 42px;
  margin: 0 auto;
  padding: 8px 14px;
  border: 2px solid #e8f20b;
  border-radius: 999px;
  color: var(--ink);
  background: #fff0f8;
  box-shadow: 3px 4px 0 var(--ink);
  font-weight: 900;
}

.quiz-result-pill span {
  display: grid;
  place-items: center;
  width: 25px;
  height: 25px;
  border-radius: 50%;
  color: var(--ink);
  background: var(--yellow);
}

.screen--dark .stage1-quiz-screen .question-card {
  color: #fff;
  background: rgba(255, 255, 255, 0.12);
  border-color: rgba(246, 156, 234, 0.55);
  box-shadow: none;
}

.screen--dark .stage1-quiz-screen .question-card__text {
  color: #fff;
}

.screen--dark .stage1-quiz-screen .question-card__number {
  background: rgba(72, 35, 130, 0.82);
}

.screen--dark .stage1-quiz-screen .feedback--answer {
  width: min(100%, 320px);
  margin: 0 auto;
}

/* Palette des blocs de contenu et effets de la maquette. */
.screen:not(.screen--dark) .home-intro__card,
.screen:not(.screen--dark) .info-card,
.screen:not(.screen--dark) .question-card,
.screen:not(.screen--dark) .tf-question-card,
.screen:not(.screen--dark) .answer,
.screen:not(.screen--dark) .tf-choice,
.screen:not(.screen--dark) .tf-result-pill,
.screen:not(.screen--dark) .level-focus,
.screen:not(.screen--dark) .picto-play-card,
.screen:not(.screen--dark) .picto-card,
.screen:not(.screen--dark) .match-drop,
.screen:not(.screen--dark) .check-item,
.screen:not(.screen--dark) .badge-strip {
  background: #f8f0ff;
}

.stage1-intro__card {
  position: relative;
  z-index: 1;
}

.stage-intro__asset--game {
  position: relative;
  z-index: 2;
}

.stage1-quiz-screen .answer__letter {
  background: linear-gradient(90deg, #e8f20b 0%, #e8f20b 16%, #f5d34f 34%, #EB5CF5 60%, #a05bed 100%);
}

.tf-choice__icon {
  width: 34px;
  height: 34px;
  flex: 0 0 auto;
  object-fit: contain;
}

.tf-choice,
.tf-result-pill {
  gap: 9px;
}

.tf-choice span,
.tf-result-pill span {
  display: inline;
  width: auto;
  height: auto;
  border-radius: 0;
  color: inherit;
  background: transparent;
  font-size: inherit;
}

.screen--dark .badge-reveal {
  position: relative;
  width: min(100%, 320px);
  margin: 0 auto;
  padding: 62px 18px 22px;
  color: #fff;
  border: 3px solid transparent;
  background: linear-gradient(#7139cf, #7139cf) padding-box,
    linear-gradient(120deg, #e8f20b 0%, #EB5CF5 42%, #a05bed 72%, #e8f20b 100%) border-box;
  box-shadow: 5px 7px 0 rgba(20, 10, 58, 0.5);
}

.screen--dark .badge-reveal__icon {
  position: absolute;
  top: -66px;
  left: 50%;
  width: 132px;
  height: 132px;
  transform: translateX(-50%);
  filter: drop-shadow(3px 4px 0 rgba(20, 10, 58, 0.5));
}

.screen--dark .badge-reveal h2,
.screen--dark .badge-reveal .lede {
  color: #fff;
}

.screen--dark .badge-strip {
  background: rgba(248, 240, 255, 0.9);
  border-color: #ef94ec;
}

.screen--dark .quiz-result-pill,
.screen--dark .tf-result-pill {
  background: #f8f0ff;
}

/* Fil de progression de fin d’étape : les badges remplacent le fil textuel. */
.breadcrumb--progress {
  position: relative;
  justify-content: space-between;
  gap: 0;
  min-height: 42px;
  padding: 4px 12px;
  overflow: visible;
}

.breadcrumb--progress::before {
  position: absolute;
  top: 50%;
  right: 34px;
  left: 34px;
  z-index: 0;
  height: 5px;
  content: "";
  border-radius: 999px;
  background: linear-gradient(90deg, #e8f20b 0%, #EB5CF5 46%, #a05bed 100%);
  transform: translateY(-50%);
}

.breadcrumb--progress .breadcrumb__item {
  position: relative;
  z-index: 1;
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  padding: 3px;
  border: 2px solid rgba(246, 156, 234, 0.8);
  border-radius: 50%;
  background: rgba(47, 27, 98, 0.72);
}

.breadcrumb--progress .breadcrumb__item.is-done {
  border-color: #e8f20b;
  background: linear-gradient(135deg, #e8f20b, #EB5CF5 54%, #a05bed);
}

.breadcrumb--progress .breadcrumb__item.is-current {
  width: 40px;
  height: 40px;
  border: 3px solid #e8f20b;
  background: linear-gradient(135deg, #e8f20b, #EB5CF5 48%, #a05bed);
  box-shadow: 2px 3px 0 rgba(21, 18, 47, 0.55);
}

.breadcrumb--progress .breadcrumb__icon {
  width: 27px;
  height: 27px;
  margin: 0;
  object-fit: contain;
}

.breadcrumb--progress .breadcrumb__item.is-current .breadcrumb__icon {
  width: 32px;
  height: 32px;
}

.feedback--answer {
  text-align: left;
}

.feedback--rainbow {
  border: 3px solid transparent;
  background: linear-gradient(#7139cf, #7139cf) padding-box,
    linear-gradient(120deg, #e8f20b 0%, #EB5CF5 42%, #a05bed 72%, #e8f20b 100%) border-box;
}

.feedback--rainbow.is-wrong {
  border: 0;
  background: #7139cf;
}

.feedback__head {
  display: flex;
  align-items: center;
  gap: 8px;
}

.feedback__icon {
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  object-fit: contain;
}

.feedback__answer {
  display: block;
  font-weight: 900;
}

.stage-finish-screen {
  gap: 10px;
}

.screen--dark .badge-reveal__kicker {
  color: #EB5CF5;
  font-size: 0.8rem;
  font-weight: 900;
  text-shadow: 2px 2px 0 var(--ink);
}

.screen--dark .badge-reveal h2 {
  margin: 0;
  font-size: 1.05rem;
}

.badge-reveal__unlocked {
  color: #EB5CF5;
  font-size: clamp(2.15rem, 8vw, 3rem);
  line-height: 0.95;
  letter-spacing: -0.03em;
  white-space: nowrap;
  text-shadow: 3px 3px 0 var(--ink);
  -webkit-text-stroke: 1px var(--ink);
}

.badge-finish-copy {
  width: min(100%, 320px);
  color: #fff;
  text-align: center;
}

.badge-finish-copy strong {
  display: block;
  margin-bottom: 12px;
  font-size: 16px;
  line-height: 1.15;
}

.badge-finish-copy p {
  margin: 0;
  color: rgba(255, 255, 255, 0.92);
  font-size: 16px;
  line-height: 1.28;
}

/* Étape 2 : écrans d’introduction et paliers PEGI selon la maquette. */
.stage2-intro-screen,
.stage2-levels-screen {
  gap: 10px;
  overflow: hidden;
}

.stage2-heading {
  display: grid;
  justify-items: center;
  gap: 5px;
  text-align: center;
}

.stage2-heading p {
  color: #EB5CF5;
  font-family: "Nunito", sans-serif;
  font-size: 20px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0;
  text-shadow: 2px 2px 0 var(--ink);
  -webkit-text-stroke: 1px var(--ink);
}

.stage2-heading h1 {
  color: #fff;
  font-family: "Nunito", sans-serif;
  font-size: 40px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0;
  text-align: center;
  text-shadow: 3px 3px 0 var(--ink);
  -webkit-text-stroke: 3px var(--ink);
}

.stage2-intro-card-wrap {
  position: relative;
  width: min(100%, 360px);
  margin: 34px auto 0;
  padding-top: 42px;
}

.stage2-intro__eyes {
  position: absolute;
  top: -4px;
  left: 50%;
  z-index: 2;
  width: 88px;
  height: 88px;
  object-fit: contain;
  transform: translateX(-50%);
}

.stage2-intro__card {
  width: min(100%, 360px);
  margin: 0 auto;
  display: grid;
  gap: 18px;
  padding: 28px 24px 25px;
  color: var(--ink);
  background: #f8f0ff;
  border: 2px solid #ef94ec;
  border-radius: 16px;
  box-shadow: 5px 7px 0 rgba(38, 17, 84, 0.48);
}

.stage2-intro__card--first {
  padding-top: 55px;
}

.stage2-intro__card p,
.stage2-intro__card li {
  color: var(--ink);
  font-family: "Nunito", sans-serif;
  font-size: 20px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0;
  text-shadow: none;
}

.stage2-intro__card strong {
  font-weight: 900;
}

.stage2-intro__card ul {
  display: grid;
  gap: 10px;
  margin: 0;
  padding-left: 24px;
}

.stage2-intro__card li {
  padding-left: 2px;
}

.stage2-intro-screen .page-arrows,
.stage2-levels-screen .page-arrows {
  margin-top: auto;
}

.stage2-levels-screen .progress-dots {
  margin-top: 8px;
  margin-bottom: 2px;
}

.stage2-levels-screen .stage2-heading,
.stage2-levels-screen .progress-dots,
.stage2-levels-screen .page-arrows {
  flex: 0 0 auto;
}

.stage2-level-card {
  flex: 0 1 auto;
  width: min(100%, 360px);
  height: fit-content;
  min-height: 360px;
  max-height: min(100%, calc(100dvh - 260px));
  margin: 2px auto 0;
  padding: 10px 16px 14px;
  gap: 18px;
  grid-template-rows: auto minmax(88px, 1fr) minmax(0, auto);
  align-items: center;
  overflow: hidden;
}

.stage2-level-card .level-focus__title {
  padding: 10px;
  border-radius: 0;
  font-family: "Nunito", sans-serif;
  font-size: 20px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0;
}

.stage2-level-card .level-focus__badge {
  width: 88px;
  height: 88px;
  align-self: center;
}

.stage2-level-card p {
  align-self: stretch;
  min-height: 0;
  margin: 0;
  overflow-y: hidden;
  overscroll-behavior: contain;
  padding-right: 4px;
  color: var(--ink);
  font-family: "Nunito", sans-serif;
  font-size: 20px;
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: 0;
}

.stage2-level-card p.is-scrollable {
  overflow-y: auto;
}

.stage2-practice-card {
  gap: 18px;
}

/* Même hiérarchie visuelle pour les écrans qui reprennent l’en-tête des étapes. */
.stage1-heading .eyebrow,
.stage4-tf-heading .eyebrow {
  color: #EB5CF5;
  font-family: "Nunito", sans-serif;
  font-size: 20px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0;
  text-transform: none;
  text-shadow: 2px 2px 0 var(--ink);
  -webkit-text-stroke: 5px var(--ink);
}

.stage1-heading h1,
.stage3-intro h1,
.stage4-tf-heading h2 {
  color: #fff;
  font-family: "Nunito", sans-serif;
  font-size: 40px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0;
  text-align: center;
  text-shadow: 3px 3px 0 var(--ink);
  -webkit-text-stroke: 3px var(--ink);
}

.stage1-intro__card p,
.stage1-quiz-screen .question-card__text,
.stage1-quiz-screen .answer,
.stage4-tf-screen .tf-question-card p {
  font-family: "Nunito", sans-serif;
  font-size: 20px;
  font-weight: 500;
  line-height: 1;
  letter-spacing: 0;
}

.stage1-intro__card strong,
.stage1-quiz-screen .feedback__answer,
.stage4-tf-screen .feedback__answer {
  font-weight: 900;
}

.stage1-quiz-screen .feedback--answer p,
.stage4-tf-screen .feedback--answer p {
  font-family: "Nunito", sans-serif;
  font-size: 18px;
  font-weight: 500;
  line-height: 1.12;
}

/* Étape 2 : fiche de jeu et réponse en panneau superposé, sans défilement. */
.stage2-games-screen {
  position: relative;
  justify-content: flex-start;
  gap: 8px;
  overflow: hidden;
  /* L'écran de vote n'affiche pas les points, mais conserve l'espace haut
     prévu par la maquette pour éviter que la fiche ne remonte sous le header. */
  padding-top: 35px;
}

.stage2-game-card {
  position: relative;
  display: block;
  width: min(100%, 318px);
  min-height: 238px;
  margin: 42px auto 0;
  padding: 58px 18px 14px;
  overflow: visible;
  color: var(--ink);
  background: #f8f0ff;
  border: 2px solid #ef94ec;
  border-radius: 16px;
  box-shadow: 4px 6px 0 rgba(38, 17, 84, 0.46);
}

.stage2-game-card__image {
  position: absolute;
  top: -54px;
  left: 50%;
  width: min(62%, 164px);
  height: 92px;
  border: 2px solid var(--ink);
  border-radius: 16px;
  object-fit: cover;
  transform: translateX(-50%);
  box-shadow: 3px 4px 0 var(--ink);
}

.stage2-game-card__content {
  display: grid;
  gap: 10px;
  min-height: 166px;
  text-align: center;
}

.stage2-game-card__description {
  margin: 0;
  color: var(--ink) !important;
  font-family: "Nunito", sans-serif;
  font-size: 20px !important;
  font-weight: 500;
  line-height: 1.08 !important;
  text-shadow: none !important;
}

.stage2-game-card .bullet-list {
  display: grid;
  justify-items: start;
  gap: 2px;
  margin: 0 auto;
  padding-left: 18px;
  color: var(--ink);
  text-align: left;
}

.stage2-game-card .bullet-list li {
  color: var(--ink) !important;
  font-family: "Nunito", sans-serif;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.05;
  text-shadow: none !important;
}

.stage2-game-card .game-meta {
  justify-content: center;
  gap: 6px;
}

.stage2-game-card .game-meta li {
  padding: 4px 8px;
  color: var(--ink);
  background: #ded2f7;
  font-size: 12px;
  font-weight: 900;
}

.stage2-game-card__ask {
  position: absolute;
  right: -14px;
  bottom: -20px;
  z-index: 2;
  width: 76px;
  height: 76px;
  object-fit: contain;
}

.stage2-pegi-row {
  flex: 0 0 auto;
  width: min(100%, 310px);
  margin: 2px auto 0;
  gap: 6px;
}

.stage2-pegi-row .pegi-option {
  min-width: 0;
  padding: 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.stage2-pegi-row .pegi-option:hover,
.stage2-pegi-row .pegi-option:focus-visible,
.stage2-pegi-row .pegi-option.is-selected {
  transform: translateY(-2px);
  background: transparent;
  border: 0;
}

.stage2-pegi-row .pegi-badge {
  width: 56px;
  height: 56px;
  filter: drop-shadow(2px 3px 0 rgba(21, 18, 47, 0.35));
}

.stage2-game-feedback {
  position: absolute;
  top: 53%;
  left: 50%;
  z-index: 5;
  display: grid;
  gap: 9px;
  width: min(100%, 300px);
  min-height: 190px;
  padding: 24px 16px 16px;
  color: #fff;
  background: #7139cf;
  border-radius: 14px;
  box-shadow: 4px 5px 0 #17122f;
  transform: translate(-50%, -50%);
}

.stage2-game-feedback.is-correct {
  border: 3px solid transparent;
  background: linear-gradient(#7139cf, #7139cf) padding-box,
    linear-gradient(120deg, #e8f20b 0%, #EB5CF5 42%, #a05bed 72%, #e8f20b 100%) border-box;
}

.stage2-game-feedback.is-wrong {
  border: 0;
}

.stage2-game-feedback__badge {
  position: absolute;
  top: -38px;
  right: 26px;
  width: 74px;
  height: 74px;
  object-fit: contain;
  filter: drop-shadow(2px 3px 0 rgba(21, 18, 47, 0.35));
}

.stage2-game-feedback .feedback__icon {
  width: 38px;
  height: 38px;
}

.stage2-game-feedback .feedback__head strong {
  color: #fff;
  font-family: "Nunito", sans-serif;
  font-size: 20px;
  font-weight: 900;
}

.stage2-game-feedback p {
  margin: 0;
  color: #fff;
  font-family: "Nunito", sans-serif;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.12;
}

.screen--dark .stage2-game-card,
.screen--dark .stage2-pegi-row {
  opacity: 0.38;
}

/* En feedback, la fiche reste grisée mais opaque : le décor ne transparaît
   ni dans la zone de contenu ni sous l'image du jeu. */
.screen--dark:has(.stage2-games-screen) .stage2-game-card {
  opacity: 1;
  color: var(--ink);
  background: #9d97a6;
  border-color: #a665a5;
}

.screen--dark:has(.stage2-games-screen) .stage2-game-card__image {
  filter: grayscale(0.22) brightness(0.65) saturate(1.15);
}

.screen--dark .stage2-game-feedback {
  opacity: 1;
}

/* Étape 3 : introduction et association des pictogrammes selon la maquette. */
.stage3-intro,
.stage3-match-screen {
  gap: 8px;
  overflow: hidden;
  padding-top: 0;
}

.stage3-heading {
  display: grid;
  justify-items: center;
  gap: 5px;
  text-align: center;
}

.stage3-heading p {
  color: #EB5CF5;
  font-family: "Nunito", sans-serif;
  font-size: 20px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0;
  text-shadow: 2px 2px 0 var(--ink);
  -webkit-text-stroke: 1px var(--ink);
}

.stage3-heading h1 {
  color: #fff;
  font-family: "Nunito", sans-serif;
  font-size: 40px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0;
  text-align: center;
  text-shadow: 3px 3px 0 var(--ink);
  -webkit-text-stroke: 2px var(--ink);
}

.stage3-intro-card-wrap {
  position: relative;
  width: min(100%, 318px);
  margin: 30px auto 0;
  padding-top: 42px;
}

.stage3-intro-card-wrap .stage-intro__asset--star {
  position: absolute;
  top: -2px;
  left: 50%;
  z-index: 2;
  width: 74px;
  height: 74px;
  margin: 0;
  transform: translateX(-50%);
}

.stage3-intro__card {
  width: min(100%, 318px);
  margin: 0 auto;
  padding: 28px 20px 22px;
  color: var(--ink);
  background: #f8f0ff;
  border: 2px solid #ef94ec;
  border-radius: 16px;
  box-shadow: 5px 7px 0 rgba(38, 17, 84, 0.48);
}

.stage3-intro__card--first {
  padding-top: 42px;
}

.stage3-intro__card p {
  color: var(--ink);
  font-family: "Nunito", sans-serif;
  font-size: 20px;
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: 0;
  text-shadow: none;
}

.stage3-intro__card strong {
  font-weight: 900;
}

.stage3-match-dots {
  flex: 0 0 auto;
  width: 100%;
}

.stage3-match-dots .progress-dots {
  margin: 0 0 4px;
}

.stage3-match-screen .picto-play-card {
  position: relative;
  flex: 0 0 auto;
  width: min(100%, 318px);
  min-height: 180px;
  margin: 28px auto 0;
  padding: 8px 8px 12px;
  gap: 6px;
  border: 2px solid #ef94ec;
  border-radius: 16px;
  background: #f8f0ff;
  box-shadow: 4px 6px 0 rgba(38, 17, 84, 0.46);
}

.stage3-match-screen .picto-play-card__title {
  padding: 8px;
  border-radius: 8px 8px 0 0;
  color: #fff;
  background: var(--violet);
  font-family: "Nunito", sans-serif;
  font-size: 20px;
  font-weight: 900;
  line-height: 1;
}

.stage3-match-screen .picto-play-card .picto-card--hero {
  min-height: 126px;
  padding: 0;
}

.stage3-match-screen .picto-play-card .picto-card__image {
  width: 126px;
  height: auto;
}

.stage3-match-screen .picto-card__image-wrap {
  position: relative;
  display: block;
  width: 126px;
  height: 126px;
  overflow: hidden;
  border-radius: 10px;
}

.stage3-match-screen .picto-card__image-wrap .picto-card__image {
  display: block;
}

.stage3-match-screen .picto-card--hero[data-drop] {
  cursor: default;
  touch-action: manipulation;
}

.stage3-match-screen .picto-card__drop-hint {
  display: block;
  width: 100%;
  padding: 8px 8px;
  border: 2px dashed #ea5ad7;
  border-radius: 999px;
  color: #ea5ad7;
  background: #fff0f8;
  font-family: "Nunito", sans-serif;
  font-size: 13px;
  font-weight: 800;
  line-height: 1;
  text-align: center;
}

.picto-card__question {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  display: block;
  padding: 2px 0 1px;
  color: #fff;
  background: #0b0b0b;
  font-family: "Nunito", sans-serif;
  font-size: 18px;
  font-weight: 900;
  line-height: 1;
  text-align: center;
}

.stage3-match-screen .match-target--labels {
  flex: 0 0 auto;
  width: min(100%, 318px);
  max-height: none;
  gap: 9px;
  margin: 2px auto 0;
}

.stage3-match-screen .match-drop {
  width: 100%;
  justify-content: center;
  min-height: 44px;
  padding: 7px 9px;
  border: 2px solid #ef94ec;
  border-radius: 999px;
  color: var(--ink);
  background: #f8f0ff;
  font-family: "Nunito", sans-serif;
  font-size: 16px;
  font-weight: 500;
  line-height: 1;
  text-align: center;
  cursor: grab;
  touch-action: none;
  box-shadow: 3px 4px 0 rgba(38, 17, 84, 0.3);
}

.stage3-match-screen .match-drop.is-over {
  background: var(--yellow);
  border-color: var(--yellow);
}

.stage3-match-screen .picto-card--hero.is-over {
  background: transparent;
  outline: 0;
}

.stage3-match-screen .picto-card--hero.is-over .picto-card__drop-hint {
  color: var(--ink);
  background: var(--yellow);
  border-color: var(--yellow);
}

.stage3-match-screen .match-drop.is-selected {
  border-color: var(--yellow);
  box-shadow: 0 0 0 3px var(--yellow), 3px 4px 0 rgba(38, 17, 84, 0.3);
}

.stage3-match-feedback {
  position: relative;
  z-index: 1;
  display: grid;
  gap: 8px;
  width: min(100%, 318px);
  min-height: 178px;
  flex: 0 0 auto;
  margin: 2px auto 0;
  padding: 18px 16px 15px;
  color: #fff;
  background: #7139cf;
  border-radius: 14px;
  box-shadow: 4px 5px 0 #17122f;
}

.stage3-match-feedback.feedback--rainbow.is-correct {
  border: 3px solid transparent;
  background: linear-gradient(#7139cf, #7139cf) padding-box,
    linear-gradient(120deg, #e8f20b 0%, #EB5CF5 42%, #a05bed 72%, #e8f20b 100%) border-box;
}

.stage3-match-feedback.feedback--rainbow.is-wrong {
  border: 0;
  background: #7139cf;
}

.stage3-match-feedback .feedback__head {
  align-items: center;
}

.stage3-match-feedback .feedback__head strong,
.stage3-match-feedback p strong {
  color: #fff;
  font-family: "Nunito", sans-serif;
  font-size: 20px;
  font-weight: 900;
}

.stage3-match-feedback p {
  margin: 0;
  color: #fff;
  font-family: "Nunito", sans-serif;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.12;
}

.screen--dark .stage3-match-screen .picto-play-card,
.screen--dark .stage3-match-screen .stage3-match-dots {
  opacity: 0.38;
}

/* Même traitement pour le pictogramme de l'étape 3 : carte et image opaques,
   en-tête violet conservé. */
.screen--dark:has(.stage3-match-screen) .stage3-match-screen .picto-play-card {
  opacity: 1;
  background: #9d97a6;
  border-color: #a665a5;
}

.screen--dark:has(.stage3-match-screen) .stage3-match-screen .picto-play-card__title {
  color: #cfc8d9;
  background: #512b83;
}

.screen--dark:has(.stage3-match-screen) .stage3-match-screen .picto-play-card .picto-card--hero {
  background: #9d97a6;
}

.screen--dark:has(.stage3-match-screen) .stage3-match-screen .picto-card__image {
  filter: saturate(0.3) brightness(0.76);
}

.screen--dark .stage3-match-feedback {
  opacity: 1;
}

/* Étape 4 : titres et écran des tutoriels selon la maquette. */
.stage4-intro-screen,
.stage4-tutorials-screen {
  gap: 8px;
  overflow: hidden;
  padding-top: 0;
}

.stage4-heading {
  display: grid;
  justify-items: center;
  gap: 5px;
  text-align: center;
}

.stage4-heading p {
  color: #EB5CF5;
  font-family: "Nunito", sans-serif;
  font-size: 20px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0;
  text-shadow: 2px 2px 0 var(--ink);
  -webkit-text-stroke: 1px var(--ink);
}

.stage4-heading h1 {
  color: #fff;
  font-family: "Nunito", sans-serif;
  font-size: 40px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0;
  text-align: center;
  text-shadow: 3px 3px 0 var(--ink);
  -webkit-text-stroke: 2px var(--ink);
}

.stage4-intro-card-wrap,
.stage4-tutorial-card-wrap {
  position: relative;
  width: min(100%, 318px);
  margin: 28px auto 0;
  padding-top: 42px;
}

.stage4-intro__pc,
.stage4-tutorials__pc {
  position: absolute;
  top: -5px;
  left: 50%;
  z-index: 2;
  width: 84px;
  height: 82px;
  object-fit: contain;
  transform: translateX(-50%);
  filter: drop-shadow(2px 3px 0 rgba(38, 17, 84, 0.46));
}

.stage4-intro-card,
.stage4-tutorial-card {
  width: min(100%, 318px);
  margin: 0 auto;
  padding: 28px 20px 22px;
  color: var(--ink);
  background: #f8f0ff;
  border: 2px solid #ef94ec;
  border-radius: 16px;
  box-shadow: 5px 7px 0 rgba(38, 17, 84, 0.48);
}

.stage4-intro-card p,
.stage4-tutorial-card p {
  color: var(--ink);
  font-family: "Nunito", sans-serif;
  font-size: 20px;
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: 0;
}

.stage4-intro-card strong,
.stage4-tutorial-card strong {
  font-weight: 900;
}

.stage4-tutorial-card {
  padding: 34px 18px 20px;
}

.stage4-tutorial-card p {
  margin-bottom: 14px;
}

.tutorial-links {
  display: grid;
  gap: 9px;
}

.tutorial-link {
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 37px;
  padding: 5px 12px 5px 7px;
  border: 2px solid #ef94ec;
  border-radius: 999px;
  color: var(--ink);
  background: #f8f0ff;
  box-shadow: 3px 4px 0 rgba(38, 17, 84, 0.28);
  font-family: "Nunito", sans-serif;
  font-size: 16px;
  font-weight: 900;
  line-height: 1;
  text-decoration: none;
}

.tutorial-link:hover,
.tutorial-link:focus-visible {
  border-color: var(--yellow);
  transform: translateY(-1px);
}

.tutorial-link__icon {
  display: inline-grid;
  width: 25px;
  height: 25px;
  flex: 0 0 25px;
  place-items: center;
  color: #EB5CF5;
  font-size: 24px;
  font-weight: 900;
  line-height: 1;
}

.stage4-tf-heading .lede {
  color: #fff;
  font-family: "Nunito", sans-serif;
  font-size: 16px;
  font-weight: 900;
  line-height: 1;
  text-shadow: 1px 1px 0 var(--ink);
}

.stage4-tf-screen .tf-choice,
.stage4-tf-screen .tf-result-pill {
  font-family: "Nunito", sans-serif;
  font-size: 20px;
  font-weight: 900;
}

/* Étape 5 : écrans alignés sur la maquette des règles à garder. */
.stage5-intro-screen,
.stage5-messages-screen,
.stage5-charter-screen,
.stage5-checklist-screen {
  gap: 8px;
  overflow: hidden;
  padding-top: 0;
}

.stage5-heading {
  display: grid;
  justify-items: center;
  gap: 4px;
  flex: 0 0 auto;
  text-align: center;
}

.stage5-heading p {
  margin: 0;
  color: #EB5CF5;
  font-family: "Nunito", sans-serif;
  font-size: 20px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0;
  text-shadow: 2px 2px 0 var(--ink);
  -webkit-text-stroke: 1px var(--ink);
}

.stage5-heading h1 {
  margin: 0;
  color: #fff;
  font-family: "Nunito", sans-serif;
  font-size: 40px;
  font-weight: 900;
  line-height: 0.98;
  letter-spacing: 0;
  text-align: center;
  text-shadow: 3px 3px 0 var(--ink);
  -webkit-text-stroke: 2px var(--ink);
}

.stage5-intro-card-wrap {
  position: relative;
  width: min(100%, 318px);
  margin: 28px auto 0;
  padding-top: 46px;
}

.stage5-intro__mouse {
  position: absolute;
  top: -7px;
  left: 50%;
  z-index: 2;
  width: 96px;
  height: 96px;
  object-fit: contain;
  transform: translateX(-50%);
  filter: drop-shadow(2px 3px 0 rgba(38, 17, 84, 0.46));
}

.stage5-intro-card,
.stage5-charter-card {
  width: min(100%, 318px);
  margin: 0 auto;
  padding: 28px 20px 22px;
  color: var(--ink);
  background: #f8f0ff;
  border: 2px solid #ef94ec;
  border-radius: 16px;
  box-shadow: 5px 7px 0 rgba(38, 17, 84, 0.48);
}

.stage5-intro-card p,
.stage5-charter-card p {
  margin: 0;
  color: var(--ink);
  font-family: "Nunito", sans-serif;
  font-size: 20px;
  font-weight: 500;
  line-height: 1.08;
  letter-spacing: 0;
}

.stage5-intro-card p + p,
.stage5-charter-card p + p {
  margin-top: 12px;
}

.stage5-intro-card strong,
.stage5-charter-card strong {
  font-weight: 900;
}

.stage5-messages-screen .progress-dots {
  flex: 0 0 auto;
  margin: 1px 0 2px;
}

.stage5-message-card {
  display: grid;
  width: min(100%, 318px);
  min-height: 310px;
  margin: 4px auto 0;
  overflow: hidden;
  color: var(--ink);
  background: #f8f0ff;
  border: 2px solid #ef94ec;
  border-radius: 16px;
  box-shadow: 5px 7px 0 rgba(38, 17, 84, 0.48);
}

.stage5-message-card__header,
.stage5-checklist-card__header {
  display: grid;
  min-height: 44px;
  place-items: center;
  padding: 8px 12px;
  color: #fff;
  background: var(--violet);
  font-family: "Nunito", sans-serif;
  font-size: 20px;
  font-weight: 900;
  line-height: 1;
  text-align: center;
}

.stage5-message-card__body {
  display: grid;
  align-content: start;
  justify-items: center;
  gap: 20px;
  padding: 22px 22px 26px;
  text-align: center;
}

.stage5-message-card__number {
  color: #EB5CF5;
  font-family: "Nunito", sans-serif;
  font-size: 48px;
  font-weight: 900;
  line-height: 0.95;
  text-shadow: 3px 3px 0 var(--ink);
  -webkit-text-stroke: 1px var(--ink);
}

.stage5-message-card__body p {
  margin: 0;
  color: var(--ink);
  font-family: "Nunito", sans-serif;
  font-size: 20px;
  font-weight: 500;
  line-height: 1.08;
  text-align: left;
}

.stage5-charter-card {
  position: relative;
  min-height: 234px;
  margin-top: 24px;
  padding: 40px 20px 42px;
}

.stage5-charter-card p {
  font-size: 20px;
  line-height: 1.08;
}

.stage5-charter__cursor {
  position: absolute;
  right: 4px;
  bottom: -38px;
  z-index: 2;
  width: 82px;
  height: 82px;
  object-fit: contain;
  transform: rotate(-10deg);
}

.stage5-checklist-screen {
  justify-content: flex-start;
}

.stage5-checklist-card {
  display: grid;
  width: min(100%, 318px);
  max-height: min(64vh, 430px);
  margin: 18px auto 0;
  overflow: hidden;
  color: var(--ink);
  background: #f8f0ff;
  border: 2px solid #ef94ec;
  border-radius: 16px;
  box-shadow: 5px 7px 0 rgba(38, 17, 84, 0.48);
}

.stage5-checklist-card__body {
  display: grid;
  gap: 12px;
  overflow-y: auto;
  padding: 14px 14px 16px;
}

.stage5-check-item {
  display: grid;
  grid-template-columns: 22px 1fr;
  align-items: start;
  gap: 8px;
  color: var(--ink);
  font-family: "Nunito", sans-serif;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.08;
}

.stage5-check-item input {
  width: 20px;
  height: 20px;
  margin: 0;
  accent-color: var(--violet);
}

.stage5-checklist-actions {
  display: flex;
  justify-content: center;
  flex: 0 0 auto;
  margin-top: 2px;
}

.stage5-pdf-button {
  min-width: 178px;
  padding: 10px 18px;
  color: var(--ink);
  background: linear-gradient(100deg, var(--yellow), #EB5CF5 55%, #a05bed);
  border: 3px solid var(--ink);
  border-radius: 999px;
  box-shadow: 4px 5px 0 rgba(21, 18, 47, 0.8);
  font-family: "Nunito", sans-serif;
  font-size: 16px;
  font-weight: 900;
  line-height: 1;
  margin-bottom: 5px;
}

.stage5-pdf-button:hover,
.stage5-pdf-button:focus-visible {
  transform: translateY(-1px);
}

.stage5-finish-screen .badge-reveal {
  margin-top: 10px;
  padding-top: 70px;
}

.stage5-finish-screen .badge-reveal h2 {
  margin: 0;
  color: #fff;
  font-family: "Nunito", sans-serif;
  font-size: 20px;
  font-weight: 900;
  line-height: 1;
}

.stage5-finish-screen .badge-reveal__kicker {
  font-size: 18px;
}

.stage5-finish-screen .badge-reveal__unlocked {
  font-size: clamp(2.35rem, 10vw, 3.4rem);
}

.stage5-finish-screen .badge-finish-copy strong {
  font-family: "Nunito", sans-serif;
  font-size: 16px;
  font-weight: 900;
}

.stage5-finish-screen .badge-finish-copy p {
  font-family: "Nunito", sans-serif;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.08;
}

@media (max-width: 420px) {
  .stage5-heading h1 { font-size: 36px; }
  .stage5-message-card__body p,
  .stage5-intro-card p,
  .stage5-charter-card p { font-size: 18px; }
  .stage5-message-card { min-height: 280px; }
  .stage5-check-item { font-size: 14px; }
}

/* La checklist imprimée doit rester complète : aucun scroll ni bouton PDF dans le document. */
@media print {
  .stage5-checklist-screen {
    display: block;
    height: auto;
    min-height: 0;
    overflow: visible;
  }

  .stage5-checklist-screen .stage5-heading {
    margin-bottom: 18px;
  }

  .stage5-checklist-card {
    width: 100%;
    max-height: none;
    overflow: visible;
    box-shadow: none;
  }

  .stage5-checklist-card__body {
    max-height: none;
    overflow: visible;
  }

  .stage5-check-item {
    break-inside: avoid;
  }

  .stage5-checklist-actions {
    display: none !important;
  }
}

/* Conclusion en deux écrans selon la maquette. */
.conclusion-screen {
  padding-top: 0;
}

.conclusion-summary-screen,
.conclusion-final-screen {
  gap: 14px;
  overflow: hidden;
  padding-inline: 18px;
}

.conclusion-summary__title,
.conclusion-final-screen h1 {
  margin: 0;
  margin-left:auto;
  margin-right: auto;
  color: #fff;
  font-family: "Nunito", sans-serif;
  font-size: 40px;
  font-weight: 900;
  line-height: 1;
  text-align: center;
  text-shadow: 3px 3px 0 var(--ink);
  -webkit-text-stroke: 2px var(--ink);
}

.conclusion-summary__progress {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: min(100%, 278px);
  height: 25px;
  margin-top: -4px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(248, 240, 255, 0.32);
  box-shadow: 0 4px 0 rgba(38, 17, 84, 0.32);
}

.conclusion-summary__progress::before {
  position: absolute;
  inset: 0 auto 0 0;
  width: 0;
  content: "";
  border-radius: inherit;
  background: linear-gradient(90deg, var(--yellow) 0%, #EB5CF5 58%, #c77cf2 100%);
  animation: conclusion-progress-fill 1.7s cubic-bezier(0.2, 0.8, 0.25, 1) 0.15s forwards;
}

.conclusion-summary__progress span {
  color: var(--ink);
  font-family: "Nunito", sans-serif;
  font-size: 16px;
  font-weight: 900;
  line-height: 1;
  position: relative;
  z-index: 1;
}

.conclusion-badges {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  align-items: start;
  justify-items: center;
  width: min(100%, 320px);
  margin: 8px auto 0;
  row-gap: 18px;
}

.conclusion-badge {
  display: grid;
  grid-column: span 2;
  justify-items: center;
  gap: 1px;
  opacity: 0;
  color: #fff;
  text-align: center;
  transform: translateY(16px) scale(0.78);
  animation: conclusion-badge-pop 0.62s cubic-bezier(0.18, 0.9, 0.25, 1.12) forwards;
}

.conclusion-badge:nth-child(1) { animation-delay: 0.45s; }
.conclusion-badge:nth-child(2) { animation-delay: 0.68s; }
.conclusion-badge:nth-child(3) { animation-delay: 0.91s; }
.conclusion-badge:nth-child(4) { animation-delay: 1.14s; }
.conclusion-badge:nth-child(5) { animation-delay: 1.37s; }

.conclusion-badge:nth-child(4) {
  grid-column: 2 / span 2;
}

.conclusion-badge:nth-child(5) {
  grid-column: 4 / span 2;
}

.conclusion-badge img {
  width: auto;
  height: 120px;
  object-fit: contain;
}

.conclusion-badge span {
  margin-top: -2px;
  color: #EB5CF5;
  font-family: "Nunito", sans-serif;
  font-size: 16px;
  font-weight: 900;
  line-height: 1;
  text-shadow: 2px 2px 0 var(--ink);
  -webkit-text-stroke: 1px var(--ink);
}

.conclusion-badge small {
  max-width: 92px;
  color: #fff;
  font-family: "Nunito", sans-serif;
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
  text-shadow: 1px 1px 0 var(--ink);
}

.conclusion-last-next {
  display: block;
  width: 128px;
  height: 64px;
  margin: auto auto 4px;
}

.conclusion-last-next img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.conclusion-final-screen {
  justify-content: center;
}

.conclusion-final-card {
  width: min(100%, 278px);
  margin: 4px auto 0;
  padding: 18px 18px 20px;
  color: var(--ink);
  background: #f8f0ff;
  border: 2px solid #ef94ec;
  border-radius: 14px;
  box-shadow: 5px 7px 0 rgba(38, 17, 84, 0.48);
}

.conclusion-final-card p {
  margin: 0;
  color: var(--ink);
  font-family: "Nunito", sans-serif;
  font-size: 18px;
  font-weight: 500;
  line-height: 1.08;
}

.conclusion-final-card p + p {
  margin-top: 18px;
}

.conclusion-final-card strong {
  font-weight: 900;
}

.conclusion-home {
  display: grid;
  width: 58px;
  height: 58px;
  margin: 8px auto 0;
  place-items: center;
  border-radius: 50%;
  background: rgba(121, 100, 236, 0.82);
}

.conclusion-home img {
  width: 38px;
  height: 38px;
  object-fit: contain;
}

@media (max-width: 420px) {
  .conclusion-summary__title,
  .conclusion-final-screen h1 { font-size: 36px; }
  .conclusion-final-card p { font-size: 17px; }
}

@keyframes conclusion-progress-fill {
  from { width: 0; }
  to { width: 100%; }
}

@keyframes conclusion-badge-pop {
  0% { opacity: 0; transform: translateY(16px) scale(0.78) rotate(-5deg); }
  70% { opacity: 1; transform: translateY(-3px) scale(1.04) rotate(1deg); }
  100% { opacity: 1; transform: translateY(0) scale(1) rotate(0); }
}

/* Finitions communes alignées sur la maquette. */
h1,
h2,
h3,
.home-intro__heading h1,
.home-intro__heading h2,
.stage1-heading h1,
.stage2-heading h1,
.stage3-heading h1,
.stage4-heading h1,
.stage4-tf-heading h2,
.stage5-heading h1,
.conclusion-summary__title,
.conclusion-final-screen h1,
.badge-reveal__unlocked {
  font-family: "Nunito", sans-serif;
  text-shadow: none !important;
  -webkit-text-stroke: 9px var(--ink);
  paint-order: stroke fill;
}

/* Première page d’introduction : le texte autour du bouton Play suit la taille
   des autres textes principaux de carte. */
.home-intro--first .home-intro__card {
  font-size: 20px;
}

.badge-reveal__kicker {
  text-shadow: none !important;
  -webkit-text-stroke: 5px var(--ink);
  paint-order: stroke fill;
}

.screen--dark .badge-reveal h2 {
  text-shadow: none !important;
  -webkit-text-stroke: 5px var(--ink);
  paint-order: stroke fill;
}

.stage1-heading .eyebrow,
.stage2-heading p,
.stage3-heading p,
.stage4-heading p,
.stage5-heading p {
  font-family: "Nunito", sans-serif;
  text-shadow: none !important;
  -webkit-text-stroke: 5px var(--ink);
  paint-order: stroke fill;
}

/* La maquette laisse apparaître le motif derrière la navigation. */
.nav {
  bottom: max(18px, env(safe-area-inset-bottom));
  background: transparent;
  box-shadow: none;
}

.nav__arrows .nav__arrow img {
  display: block;
  width: 36px;
  height: 36px;
  margin: 0;
  object-fit: contain;
}

/* L’en-tête des exercices de l’étape 4 reprend exactement celui de l’introduction. */
.stage4-tf-heading {
  gap: 5px;
}

.stage4-tf-heading .eyebrow {
  color: #EB5CF5;
  font-family: "Nunito", sans-serif;
  font-size: 20px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0;
  text-shadow: none !important;
  -webkit-text-stroke: 5px var(--ink);
  paint-order: stroke fill;
}

.stage4-tf-heading h2 {
  color: #fff;
  font-family: "Nunito", sans-serif;
  font-size: 40px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0;
  text-align: center;
  text-shadow: none !important;
  -webkit-text-stroke: 9px var(--ink);
  paint-order: stroke fill;
}

.nav__arrows .nav__arrow:first-child img {
  transform: translateX(-4px);
}

.nav__arrows .nav__arrow:last-child img {
  transform: translateX(4px);
}

.nav__arrows .nav__arrow {
  display: grid;
  place-items: center;
  padding: 0;
  line-height: 0;
}

/* Le bouton PLAY de la seconde carte est légèrement plus compact. */
.home-intro__play img {
  width: min(170px, 52vw);
}

/* Stepper : ronds réguliers, vides ou remplis, comme dans la maquette. */
.progress-dots {
  gap: 7px;
}

.progress-dots span,
.progress-dots span.is-active {
  width: 15px;
  height: 15px;
  border: 1.5px solid rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  background: transparent;
}

.progress-dots span.is-active {
  border-color: #fff;
  background: #fff;
}

/* Fil d’ariane de fin d’étape : badges posés sur une ligne rose continue. */
.breadcrumb--progress {
  display: block;
  position: relative;
  width: 100%;
  max-width:300px;
  height: 48px;
  min-height: 48px;
  padding: 0;
  overflow: visible;
}

.breadcrumb--progress::before {
  display: none;
}

.breadcrumb--progress .breadcrumb__bar,
.breadcrumb--progress .breadcrumb__items {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(319px, calc(100% - 22px));
  transform: translate(-50%, -50%);
}

.breadcrumb--progress .breadcrumb__bar {
  z-index: 0;
  display: block;
  left: max(11px, calc((100% - 319px) / 2));
  width: auto;
  max-width: none;
  height: auto;
  max-width: 282px;
  object-fit: contain;
  transform: translateY(-50%);
}

.breadcrumb--progress .breadcrumb__bar--previous {
  z-index: 0;
}

.breadcrumb--progress .breadcrumb__bar--ghost {
  z-index: 1;
  filter: grayscale(1) saturate(0.25);
  opacity: 0.52;
}

.breadcrumb--progress .breadcrumb__bar--current {
  z-index: 2;
  transform-origin: left center;
  animation: progress-bar-advance 900ms cubic-bezier(0.2, 0.8, 0.2, 1) 420ms both;
}

.breadcrumb--progress .breadcrumb__items {
  z-index: 3;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 48px;
}

.breadcrumb--progress .breadcrumb__item,
.breadcrumb--progress .breadcrumb__item.is-done,
.breadcrumb--progress .breadcrumb__item.is-current {
  display: block;
  width: auto;
  height: auto;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.breadcrumb--progress .breadcrumb__icon,
.breadcrumb--progress .breadcrumb__item.is-current .breadcrumb__icon {
  display: block;
  width: auto;
  height: auto;
  margin: 0;
  object-fit: contain;
}

.breadcrumb--progress .breadcrumb__item.is-new .breadcrumb__icon {
  animation: progress-badge-pop 650ms cubic-bezier(0.18, 0.9, 0.25, 1.1) 780ms both;
}

@keyframes progress-bar-advance {
  from { opacity: 1; transform: translateY(-50%) scaleX(0); }
  to { opacity: 1; transform: translateY(-50%) scaleX(1); }
}

@keyframes progress-badge-pop {
  0% { opacity: 0.72; filter: grayscale(1) saturate(0.15); transform: scale(0.88) rotate(-8deg); }
  70% { opacity: 1; filter: grayscale(0.35) saturate(0.8); transform: scale(1.12) rotate(2deg); }
  100% { opacity: 1; filter: grayscale(0) saturate(1); transform: scale(1) rotate(0); }
}

.stage-finish-screen .badge-reveal__icon {
  z-index: 10;
  animation: badge-acquisition-pop 850ms cubic-bezier(0.18, 0.9, 0.25, 1.1) 120ms both;
}

@keyframes badge-acquisition-pop {
  0% { opacity: 0; transform: translateY(12px) scale(0.62) rotate(-7deg); }
  70% { opacity: 1; transform: translateY(-4px) scale(1.08) rotate(2deg); }
  100% { opacity: 1; transform: translateY(0) scale(1) rotate(0); }
}

@media (prefers-reduced-motion: reduce) {
  .breadcrumb--progress .breadcrumb__bar--current,
  .breadcrumb--progress .breadcrumb__item.is-new .breadcrumb__icon,
  .stage-finish-screen .badge-reveal__icon {
    animation: none;
  }
}

/* Badge débloqué : l'icône reste centrée et occupe sa propre place dans le flux. */
.screen--dark .badge-reveal {
  display: grid;
  justify-items: center;
  align-content: start;
  gap: 8px;
  box-sizing: border-box;
  min-height: 238px;
  padding: 0 18px 24px;
  overflow: visible;
}

.screen--dark .badge-reveal__icon {
  position: relative;
  top: auto;
  left: auto;
  display: block;
  width: min(116px, 36vw);
  height: min(116px, 36vw);
  margin: -58px auto 2px;
  transform: none;
  object-fit: contain;
  justify-self: center;
  z-index: 1;
}

.screen--dark .badge-reveal__kicker {
  max-width: 100%;
  margin: 0;
  font-size: clamp(1rem, 4.4vw, 1.2rem);
  line-height: 1.05;
  text-align: center;
}

.screen--dark .badge-reveal h2 {
  max-width: 100%;
  margin: 0;
  font-size: clamp(1.15rem, 5.2vw, 1.4rem);
  line-height: 1.08;
  text-align: center;
}

.screen--dark .badge-reveal__unlocked {
  display: block;
  max-width: 100%;
  margin: 2px 0 0;
  font-size: clamp(2.2rem, 10vw, 3.35rem);
  line-height: 1;
  text-align: center;
  white-space: normal;
  overflow-wrap: anywhere;
}

@media (max-width: 360px) {
  .screen--dark .badge-reveal {
    min-height: 226px;
    padding-inline: 12px;
  }

  .screen--dark .badge-reveal__unlocked {
    font-size: clamp(2rem, 10vw, 2.7rem);
  }
}

/* Sur grand écran, le texte de fin doit rester aligné sous la carte centrale. */
.stage-finish-screen .badge-finish-copy {
  margin-inline: auto;
  max-height: clamp(110px, 26vh, 180px);
  overflow-y: auto;
  overscroll-behavior: contain;
  padding-right: 4px;
}

/* L'icône animée déborde volontairement au-dessus de la carte et doit pouvoir
   passer devant le fil de progression sans être découpée par le scroll. */
.stage-finish-screen {
  overflow: visible;
}

/* Sur les écrans courts, utiliser l'espace libre inférieur pour compenser le
   débordement visuel de l'icône au-dessus de sa carte. */
.stage-finish-screen {
  padding-top: clamp(1px, calc((760px - 100dvh) * 0.5), 48px);
  padding-bottom: 0;
}

/* Récapitulatif : tous les éléments restent centrés sur un écran PC large. */
.conclusion-summary-screen {
  align-items: center;
}

/* PEGI : trois niveaux en haut, puis deux niveaux centrés dessous, sur tous les écrans. */
.stage2-games-screen {
  padding-top: 30px;
}

.stage2-pegi-row {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  width: min(100%, 420px);
  margin-top: 30px;
  column-gap: 10px;
  row-gap: 16px;
}

.stage2-pegi-row .pegi-option {
  grid-column: span 2;
  justify-self: center;
}

.stage2-pegi-row .pegi-option:nth-child(4) {
  grid-column: 2 / span 2;
}

.stage2-pegi-row .pegi-option:nth-child(5) {
  grid-column: 4 / span 2;
}

.stage2-pegi-row .pegi-badge {
  width: clamp(70px, 9vw, 86px);
  height: clamp(70px, 9vw, 86px);
}

@media (max-width: 520px) {
  .stage2-pegi-row {
    width: min(100%, 320px);
    column-gap: 8px;
    row-gap: 14px;
  }

  .stage2-pegi-row .pegi-badge {
    width: clamp(64px, 20vw, 76px);
    height: clamp(64px, 20vw, 76px);
  }
}

/* Récapitulatif des badges : grille identique sur PC et mobile, centrée verticalement. */
.conclusion-summary-screen {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  align-items: center;
  justify-items: center;
  gap: 14px;
}

.conclusion-summary-screen .conclusion-badges {
  align-self: center;
  align-items: center;
  column-gap: 30px;
  row-gap: 24px;
  margin: 0;
}

.conclusion-summary-screen .conclusion-badge {
  align-items: center;
}

.conclusion-summary-screen .conclusion-last-next {
  margin: 0 auto 4px;
}

.conclusion-home {
  width: 58px;
  height: 58px;
  padding: 0;
  margin: 8px auto 0;
  background: transparent;
  border: 0;
  box-shadow: none;
}

.conclusion-home img {
  width: 58px;
  height: 58px;
  object-fit: contain;
}

/* Logos du bandeau : SVG net à gauche et marges latérales symétriques. */
.topbar__partners {
  width: min(170px, 46vw);
  min-width: 0;
  margin-left: 0;
}

.topbar__partners img.topbar__partners-logo {
  width: 100%;
  height: auto;
  object-fit: contain;
}

.topbar__brand,
.topbar__brand--color {
  right: auto;
  width: auto;
  height: 80px;
  max-width: 210px;
  /* Le PNG contient une marge transparente interne : ce retrait aligne
     son bord visible sur celui du SVG gauche. */
  margin-right: -13px;
  object-fit: contain;
}

/* Dernier écran : le bouton d’accueil repose au même niveau que la navigation. */
.conclusion-final-screen {
  justify-content: flex-start;
  padding-bottom: calc(max(8px, env(safe-area-inset-bottom)) + 18px);
}

.conclusion-final-screen .conclusion-home {
  margin-top: auto;
  margin-bottom: 0;
}

/* Réponse de l'étape 1 : la page reste grisée, seul le panneau de résultat
   conserve ses couleurs, avec la navigation laissée intacte. */
.screen--dark:has(.stage1-quiz-screen) .topbar,
.screen--dark:has(.stage1-quiz-screen) .stage1-quiz-screen > * {
  opacity: 0.38;
}

.screen--dark:has(.stage1-quiz-screen) .stage1-quiz-screen > .question-card {
  opacity: 1;
  color: var(--ink);
  background: #9d97a6;
  border-color: #a665a5;
  box-shadow: 4px 6px 0 rgba(38, 17, 84, 0.46);
}

.screen--dark:has(.stage1-quiz-screen) .stage1-quiz-screen > .question-card .question-card__text {
  color: var(--ink);
}

.screen--dark:has(.stage1-quiz-screen) .stage1-quiz-screen > .question-card .question-card__number {
  color: #cfc8d9;
  background: #512b83;
}

.screen--dark:has(.stage1-quiz-screen) .stage1-quiz-screen > .feedback--answer {
  opacity: 1;
  z-index: 2;
}

/* Étape 4 : même état de feedback que les étapes 1 et 2. */
.screen--dark:has(.stage4-tf-screen) .topbar,
.screen--dark:has(.stage4-tf-screen) .stage4-tf-screen > * {
  opacity: 0.38;
}

.screen--dark:has(.stage4-tf-screen) .stage4-tf-screen > .tf-question-card {
  opacity: 1;
  color: var(--ink);
  background: #9d97a6;
  border-color: #a665a5;
  box-shadow: 4px 6px 0 rgba(38, 17, 84, 0.46);
}

.screen--dark:has(.stage4-tf-screen) .stage4-tf-screen > .tf-question-card .tf-question-card__label {
  color: #cfc8d9;
  background: #512b83;
}

.screen--dark:has(.stage4-tf-screen) .stage4-tf-screen > .tf-question-card p {
  color: var(--ink);
}

.screen--dark:has(.stage4-tf-screen) .stage4-tf-screen > .tf-result-pill,
.screen--dark:has(.stage4-tf-screen) .stage4-tf-screen > .feedback--answer {
  opacity: 1;
  z-index: 2;
}

/* Les deux écrans de conclusion gardent la même marge haute que les autres écrans. */
.conclusion-screen {
  padding-top: 18px;
}

@media (min-width: 700px) {
  .conclusion-screen {
    padding-top: 28px;
  }
}

/* Logos partenaires nets : deux PNG séparés, alignés sur la hauteur du logo droit. */
.topbar__partners {
  display: flex;
  align-items: center;
  gap: 6px;
  width: auto;
  min-width: 0;
  height: 60px;
}

.topbar__partners img.topbar__partners-logo {
  display: block;
  width: auto;
  height: 42px;
  max-width: none;
  object-fit: contain;
}

/* Accueil : on conserve l'emprise actuelle du bloc de logos. */
.topbar__partners--home {
  width: 170px;
  height: 45px;
  gap: 6px;
}

.topbar__partners--home img.topbar__partners-logo {
  height: 42px;
}

.splash__logos--partners {
  width: min(66vw, 210px);
  gap: 6px;
}

.splash__logos--partners .splash__partner-logo {
  width: auto;
  max-width: none;
  height: 54px;
  max-height: 54px;
  object-fit: contain;
}

/* Ajustements réservés aux petits écrans mobiles, comme l'iPhone SE.
   Les écrans plus hauts et les affichages desktop conservent les dimensions
   habituelles de la maquette. */
@media (max-width: 520px) and (max-height: 700px) {
  .stage4-intro-screen,
  .stage4-tutorials-screen {
    justify-content: flex-start;
    overflow: hidden;
    padding-top: 8px;
    padding-bottom: 0;
  }

  .stage3-intro {
    justify-content: flex-start;
    padding-top: 6px;
  }

  .stage3-intro-card-wrap {
    margin-top: 18px;
    padding-top: 36px;
  }

  .stage4-intro__pc,
  .stage4-tutorials__pc {
    top: -20px;
  }

  .stage4-heading {
    gap: 3px;
  }

  .stage4-heading h1 {
    font-size: 36px;
  }

  .stage4-intro-card-wrap,
  .stage4-tutorial-card-wrap {
    margin-top: 18px;
    padding-top: 34px;
  }

  .stage4-intro__pc,
  .stage4-tutorials__pc {
    width: 76px;
    height: 74px;
  }

  .stage4-intro-card,
  .stage4-tutorial-card {
    padding: 20px 16px 16px;
  }

  .stage4-intro-card p,
  .stage4-tutorial-card p {
    line-height: 1.02;
  }

  .stage4-tutorial-card {
    padding-top: 24px;
    padding-bottom: 14px;
  }

  .tutorial-links {
    gap: 6px;
  }

  .tutorial-link {
    min-height: 33px;
    padding: 4px 10px 4px 6px;
    gap: 8px;
  }

  .stage3-match-screen .match-drop {
    min-height: 35px;
  }

  .stage-finish-screen .badge-reveal__icon {
    width: min(110px, 34vw);
    height: min(110px, 34vw);
    margin-top: -55px;
  }

  .stage2-level-card .level-focus__badge {
    width: 82px;
    height: 82px;
  }

  .stage2-level-card {
    gap: 10px;
  }

    .stage2-pegi-row .pegi-badge {
      width: clamp(60px, 18vw, 60px);
      height: clamp(60px, 18vw, 60px);
    }

  .home-intro__card,
  .home-intro--first .home-intro__card,
  .stage1-heading .eyebrow,
  .stage1-intro__card p,
  .stage1-quiz-screen .question-card__text,
  .stage1-quiz-screen .answer,
  .stage2-heading p,
  .stage2-intro__card p,
  .stage2-intro__card li,
  .stage2-level-card .level-focus__title,
  .stage2-level-card p,
  .stage2-game-card__description,
  .stage2-game-feedback .feedback__head strong,
  .stage3-heading p,
  .stage3-intro__card p,
  .stage3-match-screen .picto-play-card__title,
  .stage3-match-feedback .feedback__head strong,
  .stage3-match-feedback p strong,
  .stage4-heading p,
  .stage4-intro-card p,
  .stage4-tutorial-card p,
  .stage4-tf-heading .eyebrow,
  .stage4-tf-screen .tf-choice,
  .stage4-tf-screen .tf-result-pill,
  .stage5-heading p,
  .stage5-intro-card p,
  .stage5-message-card__body p,
  .stage5-message-card__header,
  .stage5-checklist-card__header,
  .stage5-charter-card p,
  .stage5-finish-screen .badge-reveal h2 {
    font-size: 19px;
  }

  .stage4-tf-screen .tf-question-card p {
    font-size: 19px;
  }

  .stage2-game-card__description {
    font-size: 19px !important;
  }
}
