:root {
  --paper: #ffffff;
  --ink: #1b1a17;
  --muted: #9c968a;
  --accent: #ff6b2c;            /* logo — orange pop */
  --sans: "Fredoka", ui-rounded, "Segoe UI", system-ui, sans-serif;
  --hand: "Patrick Hand", "Comic Sans MS", cursive;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }

body {
  font-family: var(--sans);
  background: var(--paper);
  color: var(--ink);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  padding: clamp(2.5rem, 8vh, 6rem) clamp(1.2rem, 5vw, 3rem) 2rem;
}

/* --- Title --- */
.top {
  text-align: center;
  margin-bottom: clamp(2.5rem, 7vh, 4.5rem);
}
.wordmark {
  font-weight: 700;
  font-size: clamp(3rem, 11vw, 5.5rem);
  line-height: 1;
  letter-spacing: -0.01em;
  color: var(--accent);
}

/* --- Tiles grid --- */
.tiles {
  list-style: none;
  width: 100%;
  max-width: 900px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 270px), 1fr));
  gap: clamp(1.2rem, 2.6vw, 1.8rem);
}

.tile {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1rem;
  text-align: center;
  min-height: 200px;
  padding: 1.5rem;
  background: var(--tile, #fff);
  color: var(--tile-ink, var(--ink));
  text-decoration: none;
  border: 3px solid var(--ink);
  /* contour « dessiné à la main » : rayons irréguliers */
  border-radius: 235px 18px 225px 18px / 18px 210px 20px 235px;
  transition: transform 0.18s ease, border-radius 0.18s ease;
}
.tiles li:nth-child(even) .tile {
  border-radius: 18px 220px 20px 235px / 230px 18px 220px 18px;
}
.tile:hover,
.tile:focus-visible {
  transform: translateY(-6px) rotate(-1.2deg);
  border-radius: 20px 235px 18px 220px / 220px 20px 235px 18px;
  outline: none;
}

.tile-emoji {
  font-size: clamp(2.8rem, 8vw, 3.6rem);
  line-height: 1;
}

.tile-title {
  font-weight: 700;
  font-size: clamp(1.6rem, 4vw, 2.1rem);
  line-height: 1.05;
  letter-spacing: -0.01em;
}

/* soon tile */
.tile--soon {
  background: transparent;
  color: var(--muted);
  border-style: dashed;
  border-color: #d3ccbd;
}

/* --- Colophon --- */
.colophon {
  margin-top: auto;
  padding-top: 3rem;
  font-family: var(--hand);
  font-size: 1.05rem;
  color: var(--muted);
  text-align: center;
}

@media (prefers-reduced-motion: reduce) {
  .tile { transition: none; }
}
