* { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --bg: #f3e7d7;
  --paper: #f8f2ea;
  --line: rgba(75, 57, 43, 0.22);
  --text: #2a201a;
  --muted: #685949;
  --lime: #cfe57d;
  --lime-deep: #a7c75c;
  --tan: #d7b48d;
}

html { scroll-behavior: smooth; }

body {
  min-height: 100vh;
  padding: 0 8%;
  background: var(--bg);
  color: var(--text);
  font-family: "Segoe UI", system-ui, sans-serif;
  line-height: 1.6;
}

a { color: inherit; text-decoration: none; }

header {
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
}

.logo { font-size: 22px; font-weight: 700; }

nav { display: flex; gap: 22px; font-size: 14px; }
nav a { color: var(--muted); padding-bottom: 4px; }
nav a:hover, nav a.active { color: var(--text); }
nav a.active { border-bottom: 2px solid var(--lime-deep); }

main { max-width: 820px; min-height: 70vh; margin: auto; }
.page { display: none; padding: 60px 0; }
.page.active { display: block; }

h1 { font-size: clamp(38px, 8vw, 56px); line-height: 1.1; margin-bottom: 16px; }
h2 { font-size: 22px; margin: 42px 0 12px; }
p { max-width: 660px; color: var(--muted); margin-bottom: 12px; }
ul { padding-left: 20px; color: var(--muted); }
li { margin-bottom: 5px; }
strong { color: var(--text); }

.buttons { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }

.btn {
  display: inline-block;
  padding: 10px 18px;
  font: inherit;
  font-size: 14px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text);
  cursor: pointer;
}

.btn.primary {
  background: var(--lime);
  border-color: rgba(167, 199, 92, 0.85);
  color: #1e2517;
}

.contact { display: grid; gap: 10px; margin-top: 24px; }
.contact a {
  padding: 14px 16px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 14px;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.game-box {
  margin-top: 24px;
  padding: 20px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 16px;
}

.score { display: flex; justify-content: center; gap: 48px; margin-bottom: 16px; text-align: center; }
.score small { color: var(--muted); font-size: 11px; letter-spacing: 1px; }
.score strong { font-size: 30px; }

canvas {
  display: block;
  width: 100%;
  height: auto;
  background: #f6ebdc;
  border-radius: 12px;
  border: 1px solid rgba(90, 69, 52, 0.18);
  touch-action: none;
}

footer {
  max-width: 820px;
  margin: auto;
  padding: 22px 0;
  display: flex;
  justify-content: space-between;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 12px;
}

.sticker-field {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}

.sticker {
  position: absolute;
  display: block;
  width: var(--size);
  height: auto;
  opacity: 0.95;
  animation: drift var(--speed) ease-in-out infinite alternate;
}

.sticker-heart { --size: 68px; left: 6%; top: 12%; --speed: 7s; }
.sticker-star { --size: 58px; left: 82%; top: 14%; --speed: 6.5s; }
.sticker-eye { --size: 74px; left: 70%; top: 58%; --speed: 8s; }
.sticker-broc { --size: 64px; left: 12%; top: 68%; --speed: 7s; }
.sticker-orange { --size: 62px; left: 88%; top: 46%; --speed: 6.2s; }
.sticker-moon { --size: 72px; left: 50%; top: 12%; --speed: 8.5s; }
.sticker-skull { --size: 68px; left: 34%; top: 74%; --speed: 7.4s; }

@keyframes drift {
  0% { transform: translate3d(0, 0, 0) rotate(-4deg); }
  50% { transform: translate3d(8px, -10px, 0) rotate(4deg); }
  100% { transform: translate3d(-8px, 9px, 0) rotate(-3deg); }
}

@media (max-width: 650px) {
  body { padding: 0 5%; }
  nav { gap: 14px; font-size: 13px; }
  .page { padding: 40px 0; }
  .game-box { padding: 12px; }
  .sticker-heart { left: 3%; top: 10%; --size: 52px; }
  .sticker-star { left: 78%; top: 18%; --size: 42px; }
  .sticker-eye { left: 70%; top: 62%; --size: 56px; }
  .sticker-broc { left: 7%; top: 70%; --size: 50px; }
  .sticker-orange { left: 83%; top: 52%; --size: 44px; }
  .sticker-moon { left: 48%; top: 15%; --size: 56px; }
  .sticker-skull { left: 32%; top: 75%; --size: 54px; }
}
