.home {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 16px 48px;
}

/* ---------- En-tête ---------- */

.hero {
  padding: 48px 0 28px;
  display: grid;
  gap: 14px;
}

.brand {
  font-family: var(--mono);
  font-size: 14px;
  color: var(--muted);
  text-decoration: none;
  width: fit-content;
}

.brand span {
  color: var(--accent);
}

.hero h1 {
  font-size: clamp(38px, 7vw, 68px);
  font-weight: 800;
  letter-spacing: -0.03em;
}

.lead {
  font-size: clamp(16px, 2.2vw, 19px);
  color: var(--muted);
  max-width: 560px;
}

.join {
  display: grid;
  gap: 6px;
  margin-top: 6px;
  width: min(100%, 340px);
}

.join label {
  font-size: 13px;
  font-weight: 650;
  color: var(--muted);
}

.join .join-row {
  display: flex;
  gap: 8px;
}

.join .input.code {
  flex: 1;
  min-width: 0;
}

/* ---------- DOBOAT ---------- */

.doboat {
  --d1: #ff4f8b;
  --d2: #8b6cff;
  --d3: #28c8ff;
  position: relative;
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 24px;
  padding: 24px 28px;
  border-radius: 22px;
  text-decoration: none;
  color: #fff;
  overflow: hidden;
  isolation: isolate;
  background: linear-gradient(120deg, #1b1033, #22123f 45%, #0f1f3d);
  box-shadow: var(--shadow);
  margin-bottom: 36px;
  transition: transform 0.2s;
}

.doboat::before {
  content: '';
  position: absolute;
  inset: -40%;
  z-index: -1;
  background:
    radial-gradient(closest-side at 20% 40%, color-mix(in srgb, var(--d1) 55%, transparent), transparent),
    radial-gradient(closest-side at 70% 70%, color-mix(in srgb, var(--d3) 40%, transparent), transparent),
    radial-gradient(closest-side at 85% 20%, color-mix(in srgb, var(--d2) 55%, transparent), transparent);
  filter: blur(20px);
  opacity: 0.8;
  animation: drift 14s ease-in-out infinite alternate;
}

.doboat:hover {
  transform: translateY(-2px);
}

@keyframes drift {
  to {
    transform: translate(6%, -4%) rotate(8deg);
  }
}

.doboat-art {
  display: flex;
  align-items: center;
  gap: 5px;
  height: 72px;
  padding: 0 6px;
}

.doboat-art span {
  width: 7px;
  border-radius: 4px;
  background: linear-gradient(var(--d1), var(--d3));
  animation: eq 1.1s ease-in-out infinite alternate;
}

.doboat-art span:nth-child(1) { height: 30%; animation-delay: -0.2s; }
.doboat-art span:nth-child(2) { height: 70%; animation-delay: -0.6s; }
.doboat-art span:nth-child(3) { height: 45%; animation-delay: -0.1s; }
.doboat-art span:nth-child(4) { height: 95%; animation-delay: -0.8s; }
.doboat-art span:nth-child(5) { height: 55%; animation-delay: -0.4s; }
.doboat-art span:nth-child(6) { height: 80%; animation-delay: -0.9s; }
.doboat-art span:nth-child(7) { height: 35%; animation-delay: -0.3s; }

@keyframes eq {
  to {
    transform: scaleY(0.35);
  }
}

.doboat-text {
  display: grid;
  gap: 4px;
}

.doboat .kicker {
  font-size: 12px;
  font-weight: 750;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #ffb3cf;
}

.doboat h2 {
  font-size: 30px;
  font-weight: 850;
  letter-spacing: 0.04em;
}

.doboat p {
  color: rgb(255 255 255 / 0.78);
  max-width: 560px;
  font-size: 15px;
}

.doboat .doboat-cta {
  background: #fff;
  color: #22123f;
}

/* ---------- Catalogue ---------- */

.catalog-head {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 18px;
}

.catalog-head .search {
  width: min(100%, 280px);
}

.grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 14px;
}

.game {
  display: grid;
  grid-template-rows: auto 1fr;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
  text-decoration: none;
  color: inherit;
  overflow: hidden;
  transition: transform 0.18s, border-color 0.18s, box-shadow 0.18s;
}

.game:hover {
  transform: translateY(-3px);
  border-color: color-mix(in srgb, var(--c) 55%, var(--line));
  box-shadow: var(--shadow);
}

.game .thumb {
  height: 128px;
  display: grid;
  place-items: center;
  color: var(--text);
  background:
    radial-gradient(circle at 30% 20%, color-mix(in srgb, var(--c) 30%, transparent), transparent 60%),
    color-mix(in srgb, var(--c) 12%, var(--surface-2));
}

.game .thumb svg {
  transition: transform 0.25s;
}

.game:hover .thumb svg {
  transform: scale(1.1) rotate(-3deg);
}

.game .body {
  padding: 14px 16px 16px;
  display: grid;
  gap: 6px;
  align-content: start;
}

.game h3 {
  font-size: 18px;
}

.game p {
  font-size: 14px;
  color: var(--muted);
}

.game .tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 4px;
}

.empty {
  color: var(--muted);
  padding: 24px 0;
}

/* ---------- Comment jouer ---------- */

.how {
  margin-top: 48px;
  padding: 24px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--line);
}

.how h2 {
  font-size: 20px;
  margin-bottom: 14px;
}

.how ol {
  margin: 0;
  padding: 0;
  list-style: none;
  counter-reset: step;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.how li {
  counter-increment: step;
  color: var(--muted);
  display: grid;
  grid-template-columns: 32px 1fr;
  gap: 10px;
  align-items: start;
}

.how li::before {
  content: counter(step);
  width: 32px;
  height: 32px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  font-weight: 800;
  background: color-mix(in srgb, var(--accent) 20%, transparent);
  color: var(--accent);
}

.how li b {
  color: var(--text);
}

.foot {
  margin-top: 36px;
  color: var(--faint);
  font-size: 14px;
  text-align: center;
}

@media (max-width: 720px) {
  .hero {
    padding-top: 32px;
  }
  .doboat {
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 22px;
  }
  .doboat-art {
    height: 44px;
    padding: 0;
  }
  .doboat .doboat-cta {
    width: 100%;
  }
  .catalog-head .segmented {
    width: 100%;
  }
  .catalog-head .search {
    width: 100%;
  }
  .grid {
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 10px;
  }
  .game .thumb {
    height: 96px;
  }
  .game .thumb svg {
    width: 56px;
    height: 56px;
  }
  .game .body {
    padding: 12px;
  }
  .game h3 {
    font-size: 16px;
  }
  .game p {
    font-size: 13px;
  }
}
