:root {
  --yellow: #ffd23f;
  --purple: #7b2ff7;
  --pink: #ff4f6d;
  --green: #3ddc84;
  --ink: #1b1b2f;
  --paper: #fff8e7;
  --shadow: 6px 6px 0 var(--ink);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: ui-rounded, "SF Pro Rounded", "Nunito", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  color: var(--ink);
  background: var(--yellow);
  background-image: radial-gradient(var(--ink) 1.2px, transparent 1.2px);
  background-size: 22px 22px;
  overflow-x: hidden;
  line-height: 1.45;
}

/* Emojis qui tombent */
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 0; }
.confetti span {
  position: absolute; top: -10vh; font-size: 2rem; opacity: .85;
  animation: fall 11s linear infinite;
}
.confetti span:nth-child(1) { left: 5%;  animation-delay: 0s; }
.confetti span:nth-child(2) { left: 18%; animation-delay: 4s;  animation-duration: 13s; }
.confetti span:nth-child(3) { left: 33%; animation-delay: 7s; }
.confetti span:nth-child(4) { left: 50%; animation-delay: 2s;  animation-duration: 9s; }
.confetti span:nth-child(5) { left: 65%; animation-delay: 5s; }
.confetti span:nth-child(6) { left: 78%; animation-delay: 1s;  animation-duration: 14s; }
.confetti span:nth-child(7) { left: 88%; animation-delay: 8s; }
.confetti span:nth-child(8) { left: 95%; animation-delay: 3s;  animation-duration: 10s; }
@keyframes fall {
  to { transform: translateY(120vh) rotate(540deg); }
}

header, main, footer { position: relative; z-index: 1; }

.hero { text-align: center; padding: 48px 16px 32px; }
.face {
  width: 150px; height: 150px; margin: 0 auto;
  background: var(--paper); border: 5px solid var(--ink); border-radius: 50%;
  position: relative; box-shadow: var(--shadow);
  animation: bob 3s ease-in-out infinite;
}
.eye {
  position: absolute; top: 40px; width: 38px; height: 44px;
  background: #fff; border: 4px solid var(--ink); border-radius: 50%; overflow: hidden;
}
.eye.left { left: 28px; }
.eye.right { right: 28px; animation: blink 5s infinite; }
.pupil {
  width: 16px; height: 16px; background: var(--ink); border-radius: 50%;
  position: absolute; top: 50%; left: 50%; margin: -8px 0 0 -8px;
  transition: transform .08s;
}
.mouth {
  position: absolute; left: 50%; bottom: 26px; width: 60px; height: 28px; margin-left: -30px;
  border: 5px solid var(--ink); border-top: none; border-radius: 0 0 60px 60px;
  transition: all .3s;
}
.face.happy { background: var(--green); animation: jump .5s; }
.face.happy .mouth { height: 36px; background: var(--ink); }
.face.grumpy { background: var(--pink); animation: shake .5s; }
.face.grumpy .mouth { border-radius: 60px 60px 0 0; border-top: 5px solid var(--ink); border-bottom: none; bottom: 18px; }
@keyframes bob { 50% { transform: translateY(-8px) rotate(-3deg); } }
@keyframes blink { 0%, 92%, 100% { height: 44px; top: 40px; } 95% { height: 4px; top: 60px; } }
@keyframes jump { 40% { transform: translateY(-30px) scale(1.1); } }
@keyframes shake { 20%, 60% { transform: translateX(-12px) rotate(-8deg); } 40%, 80% { transform: translateX(12px) rotate(8deg); } }

h1 {
  font-size: clamp(4rem, 18vw, 8rem); margin: 16px 0 0; line-height: 1;
  font-weight: 900; letter-spacing: -.03em; color: var(--purple);
  text-shadow: 5px 5px 0 var(--ink);
  transform: rotate(-3deg);
}
h1 span { display: inline-block; color: var(--pink); animation: spin 4s ease-in-out infinite; }
@keyframes spin { 0%, 70% { transform: rotate(0); } 85% { transform: rotate(360deg) scale(1.3); } 100% { transform: rotate(360deg); } }

.tagline { font-size: 1.35rem; margin: 18px auto 28px; max-width: 30ch; }

.download {
  display: inline-flex; flex-direction: column; align-items: center;
  background: var(--pink); color: #fff; text-decoration: none;
  padding: 18px 36px; border: 4px solid var(--ink); border-radius: 22px;
  box-shadow: var(--shadow); transform: rotate(2deg);
  transition: transform .15s, box-shadow .15s;
  animation: pulse 2.2s ease-in-out infinite;
}
.download:hover, .download:focus-visible { transform: rotate(-2deg) scale(1.06); box-shadow: 10px 10px 0 var(--ink); outline: none; }
.download:active { transform: translate(6px, 6px) rotate(0); box-shadow: 0 0 0 var(--ink); }
.download .big { font-size: 1.7rem; font-weight: 900; }
.download .small { font-size: .9rem; opacity: .9; }
@keyframes pulse { 50% { scale: 1.04; } }

.disclaimer { font-size: .85rem; max-width: 40ch; margin: 18px auto 0; opacity: .75; }

main { max-width: 960px; margin: 0 auto; padding: 0 16px; }
section { margin: 40px 0; }
h2 {
  display: inline-block; font-size: clamp(1.4rem, 6vw, 1.8rem); font-weight: 900; margin: 0 0 20px;
  background: var(--ink); color: var(--yellow); padding: 6px 16px; border-radius: 12px;
  transform: rotate(-1.5deg);
}
.steps ol {
  list-style: none; padding: 0; margin: 0;
  display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 20px;
}
.card {
  background: var(--paper); border: 4px solid var(--ink); border-radius: 20px;
  padding: 18px; box-shadow: var(--shadow); transition: transform .2s;
}
.card:hover { transform: rotate(0) scale(1.04); }
.tilt-l { transform: rotate(-1.5deg); }
.tilt-r { transform: rotate(1.5deg); }
.card .emoji { font-size: 2.6rem; display: block; }
.card h3 { margin: 6px 0; font-size: 1.3rem; }
.card p { margin: 0; }
em { font-style: normal; font-weight: 800; color: var(--purple); }

.demo { text-align: center; }
.buttons { display: flex; flex-wrap: wrap; gap: 16px; justify-content: center; }
.sound {
  font: inherit; font-size: 1.4rem; font-weight: 900; color: #fff; cursor: pointer;
  padding: 14px 28px; border: 4px solid var(--ink); border-radius: 18px; box-shadow: var(--shadow);
}
.sound.good { background: var(--green); transform: rotate(-2deg); }
.sound.bad { background: var(--pink); transform: rotate(2deg); }
.sound:active { box-shadow: 0 0 0 var(--ink); translate: 6px 6px; }
.sound.boing { animation: boing .45s; }
@keyframes boing { 30% { scale: 1.25 .8; } 60% { scale: .9 1.15; } }

.install {
  background: var(--paper); border: 4px solid var(--ink); border-radius: 20px;
  padding: 22px; box-shadow: var(--shadow);
}
.install h2 { margin-top: 0; }
.plain { padding-left: 1.3em; margin: 0; }
.plain li { margin: 6px 0; }
.hash { font-size: .8rem; margin: 16px 0 0; overflow-wrap: anywhere; opacity: .7; }

footer { text-align: center; padding: 24px 16px 40px; font-size: .9rem; }
footer a { color: var(--purple); font-weight: 800; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .confetti { display: none; }
}
