/* Slime Shift — site vitrine. Couleurs tirées du jeu : lagon turquoise, pierre calcaire, mousse,
   et les trois slimes (bleu, rose, jaune). Titres en Lilita One, texte en Fredoka (polices du jeu). */

@font-face { font-family: "Lilita One"; src: url("../fonts/lilita-one.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Fredoka"; src: url("../fonts/fredoka-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Fredoka"; src: url("../fonts/fredoka-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Fredoka"; src: url("../fonts/fredoka-600.woff2") format("woff2"); font-weight: 600 700; font-display: swap; }
@font-face { font-family: "Titres JA"; src: url("../fonts/titres-ja.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "Titres KO"; src: url("../fonts/titres-ko.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "Titres ZH"; src: url("../fonts/titres-zh-hant.woff2") format("woff2"); font-display: swap; }

:root {
  --ink: #073b45;
  --ink-2: #39666e;
  --lagoon: #0a8d9b;
  --lagoon-strong: #066b77;
  --foam: #ecfbf8;
  --shallow: #d2f4ee;
  --stone: #f7eedb;
  --stone-edge: #e0cb9f;
  --bark: #6b4b2a;
  --night: #083b45;
  --night-text: #c4ebe6;
  --blue: #1db8f2;
  --pink: #ff4fa0;
  --gold: #ffc42b;
  --display: "Lilita One", "Arial Rounded MT Bold", "Trebuchet MS", system-ui, sans-serif;
  --text: "Fredoka", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --ease: cubic-bezier(.2, .8, .2, 1);
}
html:lang(ja) { --display: "Lilita One", "Titres JA", "Hiragino Sans", "Noto Sans JP", sans-serif; --text: "Fredoka", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic", Meiryo, sans-serif; }
html:lang(ko) { --display: "Lilita One", "Titres KO", "Apple SD Gothic Neo", "Noto Sans KR", sans-serif; --text: "Fredoka", "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", sans-serif; }
html:lang(zh-Hant) { --display: "Lilita One", "Titres ZH", "PingFang TC", "Noto Sans TC", sans-serif; --text: "Fredoka", "PingFang TC", "Noto Sans TC", "Microsoft JhengHei", sans-serif; }

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--text); font-size: 1.0625rem; line-height: 1.6; color: var(--ink); background: var(--foam); overflow-x: clip; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--lagoon-strong); text-underline-offset: .18em; }
a:hover { color: var(--ink); }
h1, h2, h3 { font-family: var(--display); font-weight: 400; line-height: 1.05; margin: 0; letter-spacing: .005em; }
html:lang(ja) h1, html:lang(ja) h2, html:lang(ja) h3,
html:lang(ko) h1, html:lang(ko) h2, html:lang(ko) h3,
html:lang(zh-Hant) h1, html:lang(zh-Hant) h2, html:lang(zh-Hant) h3 { line-height: 1.25; letter-spacing: 0; }
html:lang(ko) body { word-break: keep-all; overflow-wrap: break-word; }
html:lang(ja) h1, html:lang(ja) h2, html:lang(ja) h3, html:lang(ja) .hero-lead, html:lang(ja) .release, html:lang(ja) .end-title, html:lang(ja) .end-text, html:lang(ja) .btn, html:lang(ja) .tip, html:lang(ja) .tab-title, html:lang(ja) .controls-hint { word-break: auto-phrase; }
p { margin: 0; }
button { font: inherit; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; border-radius: 10px; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.container { width: min(1180px, 100%); margin-inline: auto; padding-inline: 24px; }
.skip-link { position: absolute; left: -9999px; top: 10px; z-index: 300; padding: 10px 16px; border-radius: 12px; background: var(--gold); color: var(--ink); font-weight: 600; }
.skip-link:focus { left: 12px; }

/* boutons ---------------------------------------------------------------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 10px; padding: 12px 22px; border: 2px solid transparent; border-radius: 999px; font-family: var(--text); font-weight: 600; font-size: 1.02rem; line-height: 1.2; text-decoration: none; cursor: pointer; transition: background-color .2s, color .2s, border-color .2s, transform .15s; }
.btn svg { width: 20px; height: 20px; flex: none; }
.btn-ghost { color: var(--lagoon-strong); border-color: currentColor; background: transparent; }
.btn-ghost:hover { color: var(--ink); background: rgba(10, 141, 155, .1); }
.btn-solid { color: #fff; background: #077f8c; border-color: #077f8c; }
.btn-solid:hover { color: #fff; background: var(--lagoon-strong); border-color: var(--lagoon-strong); }
/* bouton vert du jeu (« Jouer », « Niveau suivant ») */
.btn-play { color: #fff; font-family: var(--display); font-weight: 400; font-size: 1.25rem; letter-spacing: .01em; padding: 11px 26px 12px; border: 3px solid #1d6517; background: linear-gradient(180deg, #7be35c 0%, #49c13a 55%, #34a12b 100%); box-shadow: 0 5px 0 #1d6517, inset 0 2px 0 rgba(255, 255, 255, .45); text-shadow: 0 2px 0 #1d6517, 0 0 3px #1d6517; }
.btn-play:hover { color: #fff; background: linear-gradient(180deg, #8aea6b 0%, #52c943 55%, #39a92f 100%); }
.btn-play:active { transform: translateY(3px); box-shadow: 0 2px 0 #1d6517, inset 0 2px 0 rgba(255, 255, 255, .45); }

/* en-tête ------------------------------------------------------------------ */
.site-header { position: sticky; top: 0; z-index: 50; background: rgba(236, 251, 248, .86); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); transition: box-shadow .25s; }
.site-header.scrolled { box-shadow: 0 1px 0 rgba(7, 59, 69, .1), 0 12px 30px -24px rgba(7, 59, 69, .5); }
.header-inner { display: flex; align-items: center; gap: 18px; min-height: 70px; }
.brand { display: inline-flex; align-items: center; gap: 10px; margin-right: auto; color: var(--ink); text-decoration: none; font-family: "Lilita One", var(--display); font-size: 1.45rem; line-height: 1; white-space: nowrap; }
.brand img { width: 40px; height: auto; }
.brand:hover { color: var(--lagoon-strong); }
.nav ul { list-style: none; display: flex; align-items: center; gap: 2px; margin: 0; padding: 0; }
.nav a { display: block; padding: 9px 14px; border-radius: 999px; color: var(--ink); font-weight: 500; text-decoration: none; }
.nav a:hover { background: var(--shallow); color: var(--ink); }
.nav-toggle { display: none; padding: 8px; border: 0; border-radius: 12px; background: none; color: var(--ink); cursor: pointer; }
.nav-toggle svg { width: 28px; height: 28px; display: block; }

/* menu des langues (même mécanique que les autres sites du studio) */
.lang-menu { position: relative; flex: none; }
.lang-btn { display: flex; align-items: center; gap: 6px; padding: 8px 12px; border-radius: 999px; color: var(--ink); font-weight: 600; font-size: .95rem; cursor: pointer; list-style: none; box-shadow: inset 0 0 0 2px rgba(7, 59, 69, .14); user-select: none; }
.lang-btn::-webkit-details-marker { display: none; }
.lang-btn::marker { content: ""; }
.lang-btn:hover, .lang-menu[open] .lang-btn { background: #fff; box-shadow: inset 0 0 0 2px var(--lagoon); }
.lang-globe { width: 18px; height: 18px; color: var(--lagoon); }
.lang-caret { width: 14px; height: 14px; opacity: .7; transition: rotate .2s var(--ease); }
.lang-menu[open] .lang-caret { rotate: 180deg; }
.lang-list { position: absolute; right: 0; top: calc(100% + 10px); z-index: 60; min-width: 200px; margin: 0; padding: 8px; list-style: none; border-radius: 18px; background: #fff; box-shadow: 0 0 0 1px rgba(7, 59, 69, .08), 0 24px 50px -20px rgba(7, 59, 69, .45); }
.lang-list a { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 9px 12px; border-radius: 12px; color: var(--ink); font-weight: 500; text-decoration: none; line-height: 1.3; }
.lang-list a:hover { background: var(--foam); }
.lang-list a[aria-current] { color: var(--lagoon-strong); font-weight: 600; }
.lang-list a[aria-current]::after { content: ""; width: 9px; height: 9px; border-radius: 50%; background: var(--lagoon); }
.lang-suggest { position: fixed; z-index: 80; left: 50%; bottom: 18px; translate: -50% 0; width: min(560px, calc(100% - 24px)); display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; padding: 14px 14px 14px 20px; border-radius: 20px; background: #fff; color: var(--ink); box-shadow: 0 0 0 1px rgba(7, 59, 69, .1), 0 24px 60px -20px rgba(7, 59, 69, .55); font-weight: 500; }
.lang-suggest p { flex: 1 1 220px; }
.lang-suggest-go { flex: none; padding: 9px 16px; border-radius: 999px; color: #fff; background: #077f8c; font-weight: 600; text-decoration: none; }
.lang-suggest-go:hover { color: #fff; background: var(--lagoon-strong); }
.lang-suggest-close { flex: none; display: grid; place-items: center; width: 36px; height: 36px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: var(--ink-2); cursor: pointer; }
.lang-suggest-close svg { width: 18px; height: 18px; }
.lang-suggest-close:hover { background: var(--foam); color: var(--ink); }

/* héros -------------------------------------------------------------------- */
.hero { position: relative; padding: 36px 0 84px; background:
  radial-gradient(60% 55% at 12% 18%, rgba(255, 255, 255, .9), rgba(255, 255, 255, 0) 70%),
  radial-gradient(50% 60% at 95% 85%, rgba(29, 184, 242, .14), rgba(29, 184, 242, 0) 70%),
  var(--foam); }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 500px); gap: 56px; align-items: center; }
.hero-logo { width: min(400px, 100%); margin: 0 0 22px -6px; filter: drop-shadow(0 14px 18px rgba(7, 59, 69, .22)); }
.hero h1 { font-size: clamp(2.5rem, 4.6vw, 4.1rem); max-width: 11.5em; color: var(--ink); }
.hero-lead { margin-top: 22px; max-width: 34em; font-size: 1.15rem; color: var(--ink-2); text-wrap: pretty; }
.release { margin: 28px 0 16px; font-weight: 600; text-wrap: balance; }
.release::before { content: ""; display: inline-block; vertical-align: .02em; width: 12px; height: 12px; margin: 0 12px 0 5px; border-radius: 50%; background: var(--lagoon); box-shadow: 0 0 0 5px rgba(10, 141, 155, .18); }

/* scène et démo jouable ----------------------------------------------------- */
.scene { position: relative; border-radius: 34px; padding: 22px 18px 20px; background: #35c4c9 url("../img/lagoon.webp") center 38% / cover no-repeat; box-shadow: 0 34px 70px -34px rgba(7, 59, 69, .6), inset 0 0 0 2px rgba(255, 255, 255, .35); }
.scene::before { content: ""; position: absolute; inset: 0; border-radius: inherit; background: linear-gradient(180deg, rgba(7, 59, 69, .28) 0%, rgba(7, 59, 69, 0) 22%, rgba(7, 59, 69, 0) 70%, rgba(7, 59, 69, .22) 100%); pointer-events: none; }
.demo { position: relative; --board: min(330px, calc(100vw - 112px)); }
.demo-title { text-align: center; color: #fff; font-size: 1.5rem; text-shadow: 0 2px 0 var(--ink), 0 0 2px var(--ink), 0 4px 14px rgba(7, 59, 69, .5); }
.hud { display: flex; justify-content: space-between; gap: 10px; width: calc(var(--board) + 40px); max-width: 100%; margin: 14px auto 0; }
.plaque { display: inline-flex; align-items: center; gap: 8px; min-height: 42px; padding: 6px 14px; border-radius: 14px; background: var(--stone); border: 2px solid var(--stone-edge); box-shadow: 0 3px 0 rgba(107, 75, 42, .35); color: var(--ink); font-family: var(--display); font-size: 1.05rem; line-height: 1.1; white-space: nowrap; }
.plaque b { display: inline-grid; place-items: center; min-width: 30px; height: 30px; padding: 0 6px; border-radius: 999px; background: linear-gradient(180deg, #ffd85c, #f2a91c); border: 2px solid #b8740e; color: #5a3405; font-weight: 400; font-size: 1.1rem; }
.plaque-moves.is-low b { background: linear-gradient(180deg, #ff9a8a, #e5503b); border-color: #9d2a18; color: #fff; }

.board-wrap { position: relative; width: var(--board); margin: calc(var(--board) * .135) auto calc(var(--board) * .1); }
.board { position: relative; width: var(--board); height: var(--board); border-radius: 6px; background: #d4bd93; touch-action: none; user-select: none; -webkit-user-select: none; cursor: grab; }
.board:active { cursor: grabbing; }
.board:focus-visible { outline-offset: calc(var(--board) * .1); border-radius: 18px; }
.frame { position: absolute; z-index: 4; width: calc(var(--board) * 1254 / 994); max-width: none; left: calc(var(--board) * -132 / 994); top: calc(var(--board) * -119 / 994); pointer-events: none; }
.cells { position: absolute; inset: 0; display: grid; grid-template-columns: repeat(var(--size, 4), 1fr); grid-template-rows: repeat(var(--size, 4), 1fr); }
.cell { position: relative; background: url("../img/tile.webp") center / 104% 104% no-repeat; }
.cell.is-wall::after { content: ""; position: absolute; inset: -4%; z-index: 2; background: url("../img/wall.webp") center / contain no-repeat; filter: drop-shadow(0 4px 3px rgba(40, 30, 10, .35)); }
.portal { position: absolute; inset: 2%; z-index: 1; background: center / contain no-repeat; animation: portal-spin 9s linear infinite; }
.portal.p0 { background-image: url("../img/portal-blue.webp"); }
.portal.p1 { background-image: url("../img/portal-pink.webp"); }
.portal.p2 { background-image: url("../img/portal-yellow.webp"); }
.portal.is-filled { animation: portal-flash .6s var(--ease) both, portal-spin 9s linear infinite; }
@keyframes portal-spin { to { rotate: 360deg; } }
@keyframes portal-flash { 0% { scale: 1; filter: brightness(1); } 35% { scale: 1.18; filter: brightness(1.8); } 100% { scale: .82; filter: brightness(1.1) saturate(.6); opacity: .55; } }
.pieces { position: absolute; inset: 0; z-index: 3; pointer-events: none; }
.slime { position: absolute; left: 0; top: 0; width: calc(100% / var(--size, 4)); height: calc(100% / var(--size, 4)); display: grid; place-items: center; will-change: transform; }
.slime img { width: 86%; translate: 0 -6%; transform-origin: 50% 92%; filter: drop-shadow(0 5px 3px rgba(7, 59, 69, .35)); animation: wobble 2.6s ease-in-out infinite; }
.slime:nth-child(2) img { animation-delay: -.9s; }
.slime:nth-child(3) img { animation-delay: -1.7s; }
@keyframes wobble { 0%, 100% { scale: 1 1; } 50% { scale: 1.035 .955; } }
.slime.is-landing img { animation: land .32s var(--ease); }
@keyframes land { 0% { scale: 1.14 .84; } 60% { scale: .95 1.06; } 100% { scale: 1 1; } }
.board-end { position: absolute; inset: calc(var(--board) * -.06) calc(var(--board) * -.06) auto; min-height: calc(var(--board) * 1.12); z-index: 6; display: grid; align-content: center; justify-items: center; gap: 6px; padding: 18px; border-radius: 26px; text-align: center; background: rgba(247, 238, 219, .94); border: 3px solid var(--stone-edge); box-shadow: 0 18px 40px -16px rgba(7, 59, 69, .6); }
.board-end[hidden] { display: none; }
.end-art { width: 46%; max-width: 160px; margin-bottom: 2px; }
.end-title { font-family: var(--display); font-size: 1.8rem; line-height: 1.1; color: var(--ink); }
.end-stars { display: flex; align-items: flex-end; gap: 4px; }
.end-stars:empty { display: none; }
.end-stars img { width: 38px; }
.end-stars img:nth-child(2) { translate: 0 -8px; width: 44px; }
.end-text { max-width: 24em; color: var(--ink-2); font-weight: 500; line-height: 1.4; font-size: .98rem; }
.end-title, .end-text, .tip, .demo-title { text-wrap: balance; }
.demo.is-over .tip { visibility: hidden; }
.board-end .btn-play { margin-top: 10px; }
.tip { max-width: 380px; min-height: calc(2 * 1.4em + 20px); margin: 0 auto; padding: 10px 16px; border-radius: 16px; background: rgba(255, 251, 241, .96); border: 2px solid var(--stone-edge); color: var(--ink); font-weight: 500; line-height: 1.4; text-align: center; display: grid; place-items: center; }
.tip.is-flash { background: #fff3c4; border-color: #e6b937; }
.pad { display: flex; justify-content: center; align-items: center; gap: 10px; margin-top: 14px; flex-wrap: wrap; }
.pad-btn, .pad-restart { display: inline-grid; place-items: center; height: 48px; border-radius: 16px; border: 2px solid var(--stone-edge); background: var(--stone); color: var(--ink); box-shadow: 0 4px 0 rgba(107, 75, 42, .4); cursor: pointer; transition: transform .1s, box-shadow .1s, background-color .15s; }
.pad-btn { width: 48px; padding: 0; }
.pad-restart { grid-auto-flow: column; gap: 8px; padding: 0 16px; font-weight: 600; }
.pad-btn svg, .pad-restart svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.pad-restart svg { width: 20px; height: 20px; stroke-width: 2.6; }
.pad-btn:hover, .pad-restart:hover { background: #fffaf0; }
.pad-btn:active, .pad-restart:active { transform: translateY(3px); box-shadow: 0 1px 0 rgba(107, 75, 42, .4); }
.controls-hint { width: fit-content; max-width: 100%; margin: 12px auto 0; padding: 4px 14px; border-radius: 999px; background: rgba(255, 251, 241, .88); text-align: center; font-size: .88rem; font-weight: 500; color: var(--ink); }
.demo-fallback { width: min(300px, 100%); margin: 16px auto 0; border-radius: 24px; }
html.js .demo-fallback { display: none; }

/* titres de section ------------------------------------------------------------- */
.section-head { max-width: 640px; }
.section-head h2 { font-size: clamp(2.1rem, 3.6vw, 3.1rem); }
.section-head p { margin-top: 14px; font-size: 1.12rem; color: var(--ink-2); }

/* mondes ------------------------------------------------------------------------- */
.worlds { padding: 104px 0 110px; background: linear-gradient(180deg, var(--foam) 0%, #d6f5ef 100%); }
.world-path { list-style: none; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 22px; margin: 54px 0 0; padding: 0; }
.world { position: relative; display: grid; justify-items: center; text-align: center; }
.world:nth-child(even) { margin-top: 72px; }
.world::before { content: ""; position: absolute; z-index: 0; top: 4%; left: 50%; width: 92%; aspect-ratio: 1; translate: -50% 0; border-radius: 50%; background: radial-gradient(circle, var(--glow) 0%, rgba(255, 255, 255, 0) 68%); }
.w1 { --glow: rgba(103, 232, 214, .75); }
.w2 { --glow: rgba(150, 222, 120, .7); }
.w3 { --glow: rgba(196, 178, 255, .75); }
.w4 { --glow: rgba(145, 210, 255, .8); }
.w5 { --glow: rgba(170, 148, 255, .7); }
.world img { position: relative; z-index: 1; width: 100%; max-width: 220px; aspect-ratio: 1; object-fit: contain; filter: drop-shadow(0 16px 14px rgba(7, 59, 69, .22)); }
.world h3 { position: relative; z-index: 1; margin-top: 10px; font-size: 1.35rem; color: var(--ink); }
.world p { position: relative; z-index: 1; margin-top: 6px; color: var(--ink-2); font-size: .98rem; line-height: 1.45; }
/* pierres de gué entre deux mondes, comme sur la carte du jeu */
.world:not(:last-child)::after { content: ""; position: absolute; z-index: 0; top: 34%; right: -30px; width: 38px; height: 22px; background:
  radial-gradient(ellipse 7px 4px at 7px 15px, #e9dcc0 96%, transparent 100%),
  radial-gradient(ellipse 7px 4px at 19px 9px, #e9dcc0 96%, transparent 100%),
  radial-gradient(ellipse 7px 4px at 31px 14px, #e9dcc0 96%, transparent 100%); filter: drop-shadow(0 2px 0 #c8b08a); }
.world:nth-child(odd):not(:last-child)::after { top: 52%; }
.world:nth-child(even)::after { top: 22%; }

/* visite du jeu ------------------------------------------------------------------- */
.tour { position: relative; padding: 108px 0 112px; color: var(--night-text); background:
  radial-gradient(48% 42% at 80% 40%, rgba(29, 184, 242, .22), rgba(29, 184, 242, 0) 70%),
  radial-gradient(40% 40% at 8% 90%, rgba(255, 79, 160, .12), rgba(255, 79, 160, 0) 70%),
  var(--night); }
.tour .section-head h2 { color: #fff; }
.tour .section-head p { color: var(--night-text); }
.tour-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 330px); gap: 72px; align-items: center; margin-top: 46px; }
.tour-tabs { display: grid; gap: 6px; max-width: 600px; }
.tour-tab { position: relative; display: grid; gap: 4px; width: 100%; padding: 15px 20px 15px 24px; border: 0; border-radius: 18px; background: transparent; color: inherit; text-align: start; cursor: pointer; transition: background-color .2s; }
.tour-tab::before { content: ""; position: absolute; left: 0; top: 16px; bottom: 16px; width: 4px; border-radius: 4px; background: transparent; transition: background-color .2s; }
.tour-tab:hover { background: rgba(255, 255, 255, .05); }
.tour-tab[aria-selected="true"] { background: rgba(255, 255, 255, .09); }
.tour-tab[aria-selected="true"]::before { background: var(--gold); }
.tab-title { font-family: var(--display); font-size: 1.3rem; line-height: 1.15; color: #fff; }
.tab-text { color: var(--night-text); line-height: 1.45; }
.tour-tab[aria-selected="false"] .tab-text { color: rgba(196, 235, 230, .72); }
.tour-screens { position: relative; }
.screen { margin: 0; }
html.js .screen:not(.is-active) { display: none; }
.screen-zoom { display: block; width: 100%; padding: 9px; border: 0; border-radius: 42px; background: #0f2329; box-shadow: 0 0 0 2px #2f5a63, 0 46px 80px -34px rgba(0, 0, 0, .75); cursor: zoom-in; }
.screen-zoom img { width: 100%; border-radius: 33px; }
.screen figcaption { display: none; }
html:not(.js) .tour-screens { display: grid; gap: 24px; }
.extras { list-style: none; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; margin: 96px 0 0; padding: 36px 0 0; border-top: 1px solid rgba(196, 235, 230, .18); }
.extras li { display: grid; grid-template-columns: 72px minmax(0, 1fr); grid-template-rows: auto 1fr; column-gap: 18px; row-gap: 6px; align-items: start; }
.extras img, .lang-stack { grid-row: 1 / 3; width: 72px; }
.extras h3 { color: #fff; font-size: 1.25rem; line-height: 1.2; }
.extras p { color: var(--night-text); line-height: 1.5; }
.lang-stack { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px; }
.lang-stack span { display: grid; place-items: center; height: 21px; border-radius: 6px; background: rgba(255, 255, 255, .1); color: #fff; font-size: .62rem; font-weight: 600; line-height: 1; white-space: nowrap; overflow: hidden; }
.lang-stack span:lang(ja), .lang-stack span:lang(ko), .lang-stack span:lang(zh-Hant) { font-size: .74rem; }
.lang-stack span:nth-child(3n+1) { background: rgba(29, 184, 242, .35); }
.lang-stack span:nth-child(3n+2) { background: rgba(255, 79, 160, .35); }
.lang-stack span:nth-child(3n) { background: rgba(255, 196, 43, .35); }

.zoom { width: min(440px, calc(100% - 32px)); max-height: calc(100dvh - 32px); padding: 0; border: 0; border-radius: 34px; background: transparent; overflow: visible; }
.zoom::backdrop { background: rgba(4, 30, 36, .82); }
.zoom img { width: 100%; max-height: calc(100dvh - 40px); object-fit: contain; border-radius: 30px; }
.zoom-close { position: absolute; top: -14px; right: -14px; z-index: 1; display: grid; place-items: center; width: 44px; height: 44px; padding: 0; border: 2px solid var(--stone-edge); border-radius: 50%; background: var(--stone); color: var(--ink); cursor: pointer; }
.zoom-close svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; }

/* questions et studio --------------------------------------------------------------- */
.info { padding: 104px 0 112px; }
.info-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 64px; align-items: start; }
.faq h2 { font-size: clamp(2.1rem, 3.6vw, 3.1rem); margin-bottom: 26px; }
.faq details { border-bottom: 2px solid #cdebe5; }
.faq details:first-of-type { border-top: 2px solid #cdebe5; }
.faq summary { position: relative; padding: 18px 48px 18px 0; font-weight: 600; font-size: 1.12rem; line-height: 1.35; cursor: pointer; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: ""; position: absolute; right: 6px; top: 50%; width: 22px; height: 22px; translate: 0 -50%; border-radius: 50%; background:
  linear-gradient(var(--lagoon-strong), var(--lagoon-strong)) center / 12px 2.5px no-repeat,
  linear-gradient(var(--lagoon-strong), var(--lagoon-strong)) center / 2.5px 12px no-repeat, var(--shallow); }
.faq details[open] summary::after { background:
  linear-gradient(var(--lagoon-strong), var(--lagoon-strong)) center / 12px 2.5px no-repeat, var(--shallow); }
.faq summary:hover { color: var(--lagoon-strong); }
.faq details p { padding: 0 48px 20px 0; color: var(--ink-2); max-width: 40em; }
.studio { position: relative; padding: 34px 32px 30px; border-radius: 30px; background: var(--stone); border: 2px solid var(--stone-edge); box-shadow: 0 6px 0 rgba(107, 75, 42, .22); }
.studio-mascot { width: 92px; margin-bottom: 14px; }
.studio h2 { font-size: 1.85rem; }
.studio > p { margin-top: 12px; color: var(--ink-2); }
.studio-links { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 22px; }
.studio-other { margin-top: 20px; font-weight: 600; }

/* pied de page ------------------------------------------------------------------- */
.site-footer { padding: 30px 0 34px; background: var(--ink); color: var(--night-text); font-size: .95rem; }
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 28px; }
.foot-brand { display: flex; align-items: center; gap: 10px; }
.foot-brand img { width: 32px; }
.foot-nav { display: flex; flex-wrap: wrap; gap: 6px 22px; }
.foot-nav a { color: #fff; text-decoration: none; }
.foot-nav a:hover { text-decoration: underline; color: #fff; }

/* page 404 -------------------------------------------------------------------------- */
.page-404 { min-height: 100vh; display: flex; flex-direction: column; }
.notfound { flex: 1; display: grid; place-items: center; padding: 40px 16px 64px; background: #35c4c9 url("../img/lagoon.webp") center 40% / cover no-repeat; }
.notfound-card { width: min(520px, 100%); padding: 30px 30px 34px; border-radius: 30px; text-align: center; background: rgba(247, 238, 219, .96); border: 3px solid var(--stone-edge); box-shadow: 0 30px 60px -28px rgba(7, 59, 69, .7); }
.notfound-slime { width: 200px; margin: -96px auto 4px; filter: drop-shadow(0 10px 10px rgba(7, 59, 69, .3)); }
.notfound-code { font-family: "Lilita One", var(--display); font-size: 1.1rem; letter-spacing: .3em; color: var(--lagoon-strong); }
.notfound h1 { margin-top: 6px; font-size: clamp(1.8rem, 5vw, 2.4rem); }
.notfound-card > p:not(.notfound-code) { margin: 12px 0 24px; color: var(--ink-2); }

/* écrans moyens ---------------------------------------------------------------------- */
@media (max-width: 1080px) {
  .hero-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 460px); gap: 36px; }
  .world-path { grid-template-columns: repeat(3, minmax(0, 1fr)); row-gap: 40px; }
  .world:nth-child(even) { margin-top: 0; }
  .world::after { display: none; }
  .tour-grid { gap: 44px; }
}
@media (max-width: 900px) {
  .nav-toggle { display: block; }
  .nav { position: absolute; top: calc(100% + 4px); left: 16px; right: 16px; padding: 8px; border-radius: 20px; background: #fff; box-shadow: 0 24px 50px -20px rgba(7, 59, 69, .5), 0 0 0 1px rgba(7, 59, 69, .08); opacity: 0; visibility: hidden; translate: 0 -8px; transition: opacity .2s, translate .2s var(--ease), visibility .2s; }
  .nav.open { opacity: 1; visibility: visible; translate: 0 0; }
  .nav ul { flex-direction: column; align-items: stretch; }
  .nav a { padding: 13px 16px; font-size: 1.05rem; }
  .hero { padding-top: 20px; }
  .hero-grid { grid-template-columns: minmax(0, 1fr); gap: 34px; }
  .hero-copy { text-align: center; display: grid; justify-items: center; }
  .hero-logo { margin: 0 0 16px; width: min(320px, 80%); }
  .hero h1 { max-width: 14em; }
  .hero-lead { max-width: 36em; }
  .hero-play { width: min(520px, 100%); justify-self: center; }
  .tour-grid { grid-template-columns: minmax(0, 1fr); gap: 28px; }
  .tour-tabs { display: flex; gap: 8px; overflow-x: auto; scroll-snap-type: x proximity; margin-inline: -24px; padding: 4px 24px 8px; scrollbar-width: none; }
  .tour-tabs::-webkit-scrollbar { display: none; }
  .tour-tab { flex: none; width: auto; padding: 10px 18px; border-radius: 999px; background: rgba(255, 255, 255, .06); scroll-snap-align: start; }
  .tour-tab::before { display: none; }
  .tour-tab[aria-selected="true"] { background: var(--gold); }
  .tour-tab[aria-selected="true"] .tab-title { color: var(--ink); }
  .tab-title { font-size: 1.08rem; white-space: nowrap; }
  .tab-text { display: none; }
  .tour-screens { width: min(330px, 100%); justify-self: center; }
  .screen figcaption { display: block; margin-top: 22px; text-align: center; line-height: 1.5; }
  .screen figcaption strong { display: block; margin-bottom: 2px; color: #fff; font-family: var(--display); font-weight: 400; font-size: 1.2rem; }
  .extras { grid-template-columns: minmax(0, 1fr); gap: 26px; margin-top: 70px; }
  .info-grid { grid-template-columns: minmax(0, 1fr); gap: 48px; }
}

/* téléphones --------------------------------------------------------------------------- */
@media (max-width: 640px) {
  body { font-size: 1rem; }
  .container { padding-inline: 16px; }
  .header-inner { min-height: 62px; gap: 10px; }
  .brand { font-size: 1.25rem; }
  .brand img { width: 34px; }
  .hero h1 { font-size: clamp(2.05rem, 9.2vw, 2.6rem); }
  .hero-lead { font-size: 1.05rem; }
  .hero-play { width: calc(100% + 32px); margin-inline: -16px; }
  .scene { border-radius: 0; padding: 22px 12px 20px; background-image: url("../img/lagoon-600.webp"); }
  .demo { --board: min(300px, calc(100vw - 96px)); }
  .demo-title { font-size: 1.35rem; }
  .plaque { font-size: .95rem; padding: 5px 10px; min-height: 38px; }
  .worlds, .tour, .info { padding: 76px 0 84px; }
  .world-path { grid-template-columns: minmax(0, 1fr); gap: 18px; margin-top: 34px; }
  .world { grid-template-columns: 116px minmax(0, 1fr); column-gap: 16px; align-items: center; justify-items: start; text-align: start; }
  .world::before { width: 116px; top: 50%; left: 58px; translate: -50% -50%; }
  .world img { grid-row: 1 / 3; max-width: 116px; }
  .world h3 { margin-top: 0; align-self: end; font-size: 1.25rem; }
  .world p { align-self: start; margin-top: 4px; }
  .tour-tabs { margin-inline: -16px; padding-inline: 16px; }
  .extras li { grid-template-columns: 60px minmax(0, 1fr); }
  .extras img, .lang-stack { width: 60px; }
  .studio { padding: 28px 22px 26px; }
  .faq details p { padding-right: 8px; }
  .footer-inner { flex-direction: column; align-items: flex-start; }
}
@media (max-width: 380px) {
  .lang-code { display: none; }
  .hud { gap: 6px; }
  .plaque { font-size: .88rem; gap: 6px; padding: 4px 8px; }
  .plaque b { min-width: 26px; height: 26px; font-size: 1rem; }
  .world { grid-template-columns: 96px minmax(0, 1fr); column-gap: 14px; }
  .world::before { width: 96px; left: 48px; }
  .world img { max-width: 96px; }
  .world h3 { font-size: 1.15rem; hyphens: manual; }
  .pad { gap: 8px; }
  .pad-btn { width: 44px; height: 44px; }
  .pad-restart { height: 44px; padding: 0 12px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
