/* Mochi Studio : feuille de style unique du site (HTML/CSS statique, sans JavaScript). */

@font-face {
  font-family: "Fredoka";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/fredoka-latin-400-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Fredoka";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("/assets/fonts/fredoka-latin-500-normal.woff2") format("woff2");
}

:root {
  --cream: #FFF4E3;
  --paper: #FFFCF6;
  --pink: #FF7BAC;
  --pink-soft: #FFDCE8;
  --yellow: #FFD166;
  --yellow-soft: #FFEDBC;
  --brown: #4A2C17;
  --ink: #3B2413;
  --muted: #6B4529;
  --line: 3px;
  --wrap: 1040px;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--cream);
  color: var(--brown);
  font-family: "Fredoka", ui-rounded, "SF Pro Rounded", "Arial Rounded MT Bold", system-ui, sans-serif;
  font-size: 1.0625rem;
  font-weight: 400;
  line-height: 1.6;
  overflow-wrap: break-word;
}

img, svg { display: block; max-width: 100%; height: auto; }

h1, h2, h3 {
  margin: 0 0 .45em;
  color: var(--ink);
  font-weight: 500;
  line-height: 1.12;
  letter-spacing: -.01em;
  text-wrap: balance;
}
h1 { font-size: clamp(2.2rem, 8vw, 3.6rem); }
h2 { font-size: clamp(1.65rem, 5vw, 2.3rem); }
h3 { font-size: 1.3rem; }
p { margin: 0 0 1em; text-wrap: pretty; }
p:last-child { margin-bottom: 0; }
strong, b { font-weight: 500; color: var(--ink); }

a {
  color: var(--ink);
  text-decoration-line: underline;
  text-decoration-color: var(--pink);
  text-decoration-thickness: 3px;
  text-underline-offset: 3px;
}
a:hover { text-decoration-color: var(--ink); }
:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; border-radius: 8px; }

.wrap { width: min(100% - 32px, var(--wrap)); margin-inline: auto; }
/* Pages de texte : colonne de lecture + colonne latérale sur grand écran */
.doc { display: grid; gap: 0; grid-template-areas: "head" "lead" "side" "body" "end"; }
.doc > * { min-width: 0; }
.doc__head { grid-area: head; }
.doc__lead { grid-area: lead; }
.doc__side { grid-area: side; }
.doc__body { grid-area: body; }
.doc__end { grid-area: end; }
.doc--support { grid-template-areas: "head" "body" "side" "end"; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%);
  white-space: nowrap;
}

.skip {
  position: absolute; left: 16px; top: -80px; z-index: 10;
  padding: 10px 16px;
  background: var(--yellow); color: var(--ink);
  border: var(--line) solid var(--ink); border-radius: 999px;
  font-weight: 500; text-decoration: none;
}
.skip:focus { top: 12px; }

/* Surlignage jaune sous un mot clé */
.hl {
  background: linear-gradient(transparent 60%, var(--yellow) 60%, var(--yellow) 90%, transparent 90%);
  padding-inline: .06em;
  white-space: nowrap;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

/* ---------- En-tête ---------- */
.top { padding: 14px 0 6px; }
.top__in { display: flex; align-items: center; justify-content: space-between; gap: 12px; }

.brand {
  display: inline-flex; align-items: center; gap: 10px;
  color: var(--ink); text-decoration: none;
}
.brand img { width: 50px; }
.brand__name { font-size: 1.55rem; font-weight: 500; line-height: 1; letter-spacing: -.01em; }
.brand__tag {
  display: inline-block;
  margin-left: 4px;
  padding: 1px 9px 2px;
  background: var(--pink);
  border: 2px solid var(--ink);
  border-radius: 999px;
  font-size: .78rem; font-weight: 500; line-height: 1.4;
  transform: rotate(-5deg) translateY(-2px);
}

.lang {
  display: flex; gap: 2px; padding: 3px;
  background: var(--paper);
  border: var(--line) solid var(--ink);
  border-radius: 999px;
  box-shadow: 0 3px 0 var(--ink);
}
.lang a, .lang span {
  display: grid; place-items: center;
  min-width: 46px; min-height: 38px;
  border-radius: 999px;
  font-size: .95rem; font-weight: 500;
  color: var(--ink); text-decoration: none;
}
.lang a:hover { background: var(--pink-soft); }
.lang [aria-current] { background: var(--yellow); }

/* Menu d'une appli (Le jeu, Confidentialité, Support) */
.subnav { padding: 10px 0 0; }
.subnav ul {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-wrap: wrap; gap: 8px;
}
.subnav a {
  display: inline-flex; align-items: center; min-height: 40px;
  padding: 4px 16px;
  border: 2px solid var(--ink); border-radius: 999px;
  background: var(--paper);
  font-size: .98rem; font-weight: 500; text-decoration: none;
}
.subnav a:hover { background: var(--pink-soft); }
.subnav a[aria-current="page"] { background: var(--pink); }

/* ---------- Boutons ---------- */
.actions { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .5em;
  min-height: 54px;
  padding: .5em 1.4em;
  background: var(--pink); color: var(--ink);
  border: var(--line) solid var(--ink); border-radius: 999px;
  box-shadow: 0 4px 0 var(--ink);
  font-size: 1.08rem; font-weight: 500; line-height: 1.2;
  text-decoration: none;
  transition: transform .12s ease, box-shadow .12s ease;
}
.btn:hover { transform: translateY(-2px); box-shadow: 0 6px 0 var(--ink); }
.btn:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--ink); }
.btn--light { background: var(--paper); }
.btn--yellow { background: var(--yellow); }

/* Bouton App Store en attente (pas un lien tant que l'appli n'est pas publiée) */
.store {
  display: inline-flex; align-items: center; gap: 11px;
  min-height: 58px;
  padding: 8px 20px 8px 14px;
  background: var(--ink); color: var(--cream);
  border: var(--line) solid var(--ink); border-radius: 18px;
  text-decoration: none;
}
.store svg { width: 26px; flex: none; }
.store__txt { display: grid; line-height: 1.15; text-align: left; }
.store__txt small { font-size: .78rem; opacity: .9; }
.store__txt strong { color: var(--cream); font-size: 1.14rem; font-weight: 500; }
.store--soon { cursor: default; }
.store--soon .store__txt small { color: var(--yellow); opacity: 1; }
a.store { box-shadow: 0 4px 0 var(--pink); transition: transform .12s ease; }
a.store:hover { transform: translateY(-2px); }

/* Pastilles */
.chips { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.chips li {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 3px 12px 3px 10px;
  background: var(--yellow-soft);
  border: 2px solid var(--ink); border-radius: 999px;
  font-size: .92rem; font-weight: 500; color: var(--ink);
}
.chips li::before {
  content: ""; width: 9px; height: 9px; border-radius: 50%;
  background: var(--pink); border: 2px solid var(--ink);
}

/* ---------- Accueil ---------- */
.hero { padding: 6px 0 34px; }
.hero__grid { display: grid; gap: 8px; align-items: center; }
.eyebrow {
  display: inline-block;
  margin-bottom: 14px;
  padding: 3px 14px;
  background: var(--paper);
  border: 2px solid var(--ink); border-radius: 999px;
  font-size: .92rem; font-weight: 500; color: var(--ink);
}
.lead { font-size: 1.22rem; line-height: 1.5; max-width: 34ch; }
.hero .lead { margin-bottom: 24px; }

.hero-art {
  position: relative;
  width: min(210px, 56vw);
  aspect-ratio: 1;
  margin: 4px auto 10px;
}
.hero-art::before {
  content: ""; position: absolute; inset: 4%;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 45%, #FFE9F1 0 52%, var(--pink-soft) 53% 100%);
  border: var(--line) solid var(--ink);
  box-shadow: 0 0 0 10px var(--paper), 0 0 0 13px var(--ink);
}
.hero-art__main {
  position: absolute; left: 12%; top: 22%; width: 76%;
  animation: bob 3.2s ease-in-out infinite;
}
.hero-art__friend {
  position: absolute; right: -2%; bottom: -1%; width: 34%;
  transform: rotate(8deg);
}
.spark { position: absolute; width: 13%; animation: twinkle 2.6s ease-in-out infinite; }
.spark--1 { left: 0; top: 10%; }
.spark--2 { right: 4%; top: 2%; width: 9%; animation-delay: .9s; }
.spark--3 { left: 8%; bottom: 8%; width: 8%; animation-delay: 1.6s; }

@keyframes bob { 50% { transform: translateY(-6px) rotate(-2deg); } }
@keyframes twinkle { 50% { transform: scale(.78) rotate(18deg); } }

.section { padding: 26px 0 40px; }
.section--tight { padding-top: 6px; }
.section__lead { font-size: 1.12rem; max-width: 52ch; margin-bottom: 22px; }

.apps { display: grid; gap: 24px; align-items: stretch; }

.card {
  background: var(--paper);
  border: var(--line) solid var(--ink);
  border-radius: 30px;
  box-shadow: 0 6px 0 var(--ink);
}

.app-card {
  padding: 20px;
  display: grid;
  grid-template-columns: auto 1fr;
  grid-template-areas: "icon head" "body body";
  gap: 16px;
  align-items: center;
}
.app-card .app-icon { grid-area: icon; }
.app-card__head { grid-area: head; }
.app-card__body { grid-area: body; display: grid; gap: 16px; }
.app-card__body p { margin: 0; }
.app-card h3 { font-size: 2rem; margin: 0; }
.app-card h3 a { text-decoration: none; }
.app-card h3 a:hover { text-decoration: underline; text-decoration-color: var(--pink); }

.kind { margin: 0 0 2px; color: var(--muted); font-size: .95rem; font-weight: 500; }

.app-icon {
  width: 84px; height: 84px;
  border-radius: 22%;
  border: var(--line) solid var(--ink);
  box-shadow: 0 4px 0 var(--ink);
  object-fit: cover;
  background: var(--pink-soft);
}

.mini-links { display: flex; flex-wrap: wrap; gap: 6px 20px; font-weight: 500; }

.soon-card {
  display: grid; justify-items: center; align-content: center; gap: 6px;
  padding: 24px 22px;
  text-align: center;
  border: var(--line) dashed var(--ink);
  border-radius: 30px;
  background: rgba(255, 252, 246, .55);
}
.soon-card img { width: 86px; margin-bottom: 6px; opacity: .95; transform: rotate(-6deg); }
.soon-card h3 { margin: 0; }
.soon-card p { max-width: 30ch; color: var(--brown); }

.hello-card {
  display: grid; grid-template-columns: auto 1fr; gap: 14px; align-items: start;
  padding: 20px;
  background: var(--yellow-soft);
}
.hello-card h2 { font-size: 1.6rem; margin-bottom: .3em; }
.hello-card img { width: 38px; margin-top: 2px; }

/* ---------- Page d'une appli ---------- */
.app-hero { padding: 10px 0 30px; }
.app-hero__grid { display: grid; gap: 22px; align-items: center; }
.app-hero__head { display: flex; align-items: center; gap: 16px; margin-bottom: 14px; }
.app-hero__head h1 { margin: 0; }
.app-hero .app-icon { width: 92px; height: 92px; flex: none; }
.app-hero .lead { font-size: 1.32rem; color: var(--ink); font-weight: 500; margin-bottom: .6em; }
.app-hero .chips { margin: 20px 0 24px; }

.app-art {
  position: relative;
  display: none;
  width: 100%; max-width: 380px; aspect-ratio: 1;
  margin: 0 auto;
}
.app-art::before {
  content: ""; position: absolute; inset: 5%;
  border-radius: 50%;
  background: radial-gradient(circle at 50% 42%, #FFE9F1 0 50%, var(--pink-soft) 51% 100%);
  border: var(--line) solid var(--ink);
  box-shadow: 0 0 0 12px var(--paper), 0 0 0 15px var(--ink);
}
.app-art__main { position: absolute; left: 13%; top: 11%; width: 74%; animation: bob 3.4s ease-in-out infinite; }
.app-art__small { position: absolute; left: -2%; bottom: 2%; width: 26%; transform: rotate(-10deg); }
.app-art__tiny { position: absolute; right: 2%; bottom: 10%; width: 17%; transform: rotate(9deg); }

.evo {
  list-style: none; margin: 0;
  padding: 22px 14px 18px;
  display: grid; grid-template-columns: repeat(3, 1fr);
  gap: 18px 6px;
  align-items: end;
}
.evo li {
  display: flex; flex-direction: column; align-items: center; justify-content: flex-end;
  gap: 6px;
  text-align: center;
  font-size: .9rem; font-weight: 500; line-height: 1.2; color: var(--ink);
}
.evo img { width: calc(44px + var(--s) * 5.5px); }
.evo li:last-child span {
  padding: 1px 8px; background: var(--yellow); border: 2px solid var(--ink); border-radius: 999px;
}

.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 18px; }
.step {
  display: grid; grid-template-columns: auto 1fr; align-items: center; column-gap: 14px;
  padding: 18px 20px 20px;
}
.step h3 { margin: 0; }
.step p { grid-column: 1 / -1; margin: 12px 0 0; }
.step__num {
  display: grid; place-items: center;
  width: 46px; height: 46px;
  border-radius: 50%;
  background: var(--yellow);
  border: var(--line) solid var(--ink);
  font-size: 1.35rem; font-weight: 500; color: var(--ink);
}
.step:nth-child(3) .step__num { background: var(--pink); }

.facts { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.facts li {
  padding: 14px 16px 16px;
  background: var(--yellow-soft);
  border: var(--line) solid var(--ink); border-radius: 22px;
  font-size: .95rem; line-height: 1.4;
}
.facts li:nth-child(4n+2), .facts li:nth-child(4n+3) { background: var(--pink-soft); }
.facts strong { display: block; margin-bottom: 3px; font-size: 1.16rem; line-height: 1.2; }

.link-cards { display: grid; gap: 16px; }
.link-card {
  position: relative;
  display: grid; gap: 2px;
  padding: 18px 64px 20px 22px;
  text-decoration: none;
  transition: transform .12s ease, box-shadow .12s ease;
}
.link-card:hover { transform: translateY(-2px); box-shadow: 0 8px 0 var(--ink); }
.link-card strong { font-size: 1.3rem; }
.link-card span { color: var(--brown); }
.link-card::after {
  content: "";
  position: absolute; right: 18px; top: 50%;
  width: 34px; height: 34px; margin-top: -17px;
  border: var(--line) solid var(--ink); border-radius: 50%;
  background:
    linear-gradient(45deg, transparent 44%, var(--ink) 44% 58%, transparent 58%) 13px 7px / 10px 10px no-repeat,
    linear-gradient(-45deg, transparent 44%, var(--ink) 44% 58%, transparent 58%) 13px 14px / 10px 10px no-repeat,
    var(--yellow);
}

/* ---------- Pages de texte (confidentialité, support) ---------- */
.page-head { padding: 14px 0 20px; }
.page-head .kind { margin-bottom: 6px; }
.page-head h1 { font-size: clamp(2rem, 7vw, 3rem); }
.updated {
  display: inline-block;
  padding: 3px 12px;
  background: var(--paper);
  border: 2px solid var(--ink); border-radius: 999px;
  font-size: .92rem; font-weight: 500; color: var(--ink);
}

.tldr { padding: 20px 22px 22px; background: var(--yellow-soft); margin-bottom: 30px; }
.tldr h2 { font-size: 1.45rem; }
.tldr ul { margin: 0; padding-left: 1.2em; }
.tldr li + li { margin-top: .35em; }

.toc { padding: 18px 22px 20px; margin-bottom: 34px; }
.toc h2 { font-size: 1.25rem; margin-bottom: .5em; }
.toc ol { margin: 0; padding-left: 1.4em; columns: 1; }
.toc li { break-inside: avoid; padding: 2px 0; }
.toc li::marker { color: var(--muted); font-weight: 500; }

.prose { padding-bottom: 20px; }
.prose h2 { font-size: 1.5rem; margin: 1.7em 0 .5em; scroll-margin-top: 16px; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { font-size: 1.2rem; margin: 1.2em 0 .4em; }
.prose ul, .prose ol { padding-left: 1.3em; margin: 0 0 1em; }
.prose li + li { margin-top: .3em; }
.prose li::marker { color: var(--pink); }
.prose .note {
  padding: 14px 18px;
  background: var(--paper);
  border: 2px solid var(--ink); border-radius: 18px;
}

.faq details { margin-bottom: 12px; border-radius: 22px; box-shadow: 0 4px 0 var(--ink); }
.faq summary {
  position: relative;
  display: block;
  padding: 15px 60px 15px 20px;
  list-style: none;
  cursor: pointer;
  font-size: 1.1rem; font-weight: 500; line-height: 1.35; color: var(--ink);
  border-radius: 20px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: "";
  position: absolute; right: 16px; top: 50%;
  width: 30px; height: 30px; margin-top: -15px;
  border: 2px solid var(--ink); border-radius: 50%;
  background:
    linear-gradient(var(--ink), var(--ink)) center / 12px 3px no-repeat,
    linear-gradient(var(--ink), var(--ink)) center / 3px 12px no-repeat,
    var(--pink);
}
.faq details[open] summary::after {
  background: linear-gradient(var(--ink), var(--ink)) center / 12px 3px no-repeat, var(--yellow);
}
.faq summary:hover { background: #FFF6EC; }
.faq .answer { padding: 0 20px 18px; }

.contact-card {
  display: grid; gap: 14px; justify-items: start;
  padding: 22px;
  background: var(--pink-soft);
  margin: 10px 0 30px;
}
.contact-card h2 { margin: 0; font-size: 1.6rem; }
.contact-card p { margin: 0; }
.email { font-weight: 500; overflow-wrap: anywhere; }

/* ---------- 404 ---------- */
.nf { padding: 30px 0 60px; text-align: center; display: grid; justify-items: center; gap: 6px; }
.nf img { width: 150px; margin-bottom: 8px; transform: rotate(-6deg); }
.nf .actions { justify-content: center; margin-top: 14px; }

/* ---------- Pied de page ---------- */
.foot {
  position: relative;
  margin-top: 40px;
  padding: 34px 0 30px;
  background: var(--ink);
  color: var(--cream);
}
.foot::before {
  content: ""; position: absolute; left: 0; right: 0; top: -13px; height: 14px;
  background: radial-gradient(circle at 14px 14px, var(--ink) 13.5px, transparent 14px) repeat-x;
  background-size: 28px 14px;
}
.foot a { color: var(--cream); }
.foot a:hover { text-decoration-color: var(--cream); }
.foot :focus-visible { outline-color: var(--yellow); }
.foot__grid { display: grid; gap: 22px; }
.foot__brand { display: flex; align-items: center; gap: 12px; }
.foot__brand img { width: 52px; }
.foot__brand p { margin: 0; line-height: 1.35; }
.foot__brand strong { color: var(--cream); font-size: 1.2rem; }
.foot__links { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px 22px; font-weight: 500; }
.foot__links a { display: inline-block; padding: 4px 0; }
.foot__legal { margin: 0; font-size: .92rem; opacity: .9; }

/* ---------- Écrans plus larges ---------- */
@media (min-width: 640px) {
  .facts { grid-template-columns: repeat(3, 1fr); }
  .link-cards { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .hello-card { grid-template-columns: auto 1fr; padding: 26px 30px; gap: 22px; }
  .hello-card img { width: 70px; }
  .toc ol { columns: 2; column-gap: 32px; }
}

@media (min-width: 820px) {
  .top { padding-top: 22px; }
  .hero { padding: 26px 0 56px; }
  .hero__grid { grid-template-columns: 1.2fr .8fr; gap: 40px; }
  .hero-art { width: 100%; max-width: 340px; order: 2; }
  .apps { grid-template-columns: 1fr 300px; }
  .app-card {
    padding: 30px;
    grid-template-columns: 140px 1fr;
    grid-template-areas: "icon head" "icon body";
    gap: 6px 28px;
    align-items: start;
  }
  .app-card .app-icon { width: 140px; height: 140px; }
  .app-card__body { gap: 18px; }
  .app-hero { padding: 26px 0 40px; }
  .app-hero__grid { grid-template-columns: 1.1fr .9fr; gap: 48px; }
  .app-art { display: block; }
  .app-hero .app-icon { width: 110px; height: 110px; }
  .evo { grid-template-columns: repeat(9, 1fr); padding: 30px 20px 24px; gap: 8px; }
  .evo img { width: calc(30px + var(--s) * 7.5px); }
  .foot__grid { grid-template-columns: auto 1fr; align-items: center; column-gap: 48px; }
  .foot__links { justify-content: flex-end; }
  .foot__legal { grid-column: 1 / -1; }
  .section { padding: 34px 0 52px; }
}

@media (min-width: 1000px) {
  .steps { grid-template-columns: repeat(4, 1fr); }
  .doc {
    grid-template-columns: minmax(0, 720px) 300px;
    grid-template-areas: "head head" "lead side" "body side" "end side";
    column-gap: 56px;
    justify-content: space-between;
  }
  .doc__side { position: sticky; top: 24px; align-self: start; }
  .doc--support { grid-template-areas: "head head" "body side" "end side"; }
  .doc__side { margin-top: 0; }
  .toc.doc__side ol { columns: 1; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
