/* Monocraft : https://github.com/IdreesInc/Monocraft */
@font-face {
  font-family: "Monocraft";
  src: url("public/fonts/Monocraft.ttf") format("truetype");
  font-weight: 400;
  font-display: swap;
}

@font-face {
  font-family: "Monocraft";
  src: url("public/fonts/Monocraft-Bold.ttf") format("truetype");
  font-weight: 700;
  font-display: swap;
}

:root {
  --paper: #efece6;
  --ink: #1c1426;
  --ink-soft: #5c5560;
  --orange: #f5701d;
  --outline: #0d0a12;
  --line: rgba(28, 20, 38, 0.15);
  --font-pixel: "Monocraft", monospace;
  --font-text: "Inter", system-ui, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  color: var(--ink);
  font-family: var(--font-text);
  font-size: 17px;
  line-height: 1.6;
  /* Papier froissé généré en SVG (remplaçable par une image : url("public/paper.jpg")) */
  background-color: var(--paper);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='1400' height='1400'%3E%3Cfilter id='p'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.0045' numOctaves='5' seed='7' stitchTiles='stitch'/%3E%3CfeDiffuseLighting lighting-color='%23fff' surfaceScale='7'%3E%3CfeDistantLight azimuth='45' elevation='60'/%3E%3C/feDiffuseLighting%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23p)'/%3E%3C/svg%3E");
  background-blend-mode: multiply;
  overflow-x: hidden;
}

h1, h2, h3 { font-family: var(--font-pixel); line-height: 1.15; }

a { color: var(--orange); }

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

/* ---------- ITEMS (fixés, suivent le scroll) ---------- */
.items {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.item {
  position: absolute;
  width: var(--size);
  transform: translate(var(--tx, 0), var(--ty, 0)) rotate(var(--rot));
  transition: transform 0.25s ease-out;
}

.item img {
  display: block;
  width: 100%;
  image-rendering: pixelated;
  animation: float var(--dur) ease-in-out infinite alternate;
}

@keyframes float {
  to { transform: translateY(-10px); }
}

/* ---------- HERO ---------- */
.hero {
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 48px 16px;
}

.hero-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
  max-width: 820px;
  text-align: center;
}

.logo { margin: 0; width: 100%; }

.logo img {
  display: block;
  width: min(100%, 432px);
  height: auto;
  margin: 0 auto;
}

.tagline {
  margin: -8px 0 0;
  font-size: clamp(1.15rem, 3.2vw, 1.6rem);
  font-weight: 600;
}

/* Compte à rebours */
.countdown { text-align: center; }

.countdown-label {
  margin: 0 0 4px;
  font-size: 0.85rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--ink-soft);
}

.countdown-time {
  display: flex;
  justify-content: center;
  gap: 20px;
  font-family: var(--font-pixel);
  font-size: 1.1rem;
  color: var(--ink-soft);
}

.countdown-time b {
  font-size: clamp(2.2rem, 7vw, 3.2rem);
  color: var(--orange);
}

/* Boutons */
.btn {
  display: inline-block;
  padding: 14px 32px;
  font-family: var(--font-pixel);
  font-size: 1.25rem;
  font-weight: 700;
  text-decoration: none;
  /* Contour épais sombre, comme celui du logo */
  border: 4px solid var(--outline);
  transition: background 0.15s, color 0.15s;
}

.btn-primary { background: var(--orange); color: #fff; }
.btn-primary:hover { background: var(--paper); color: var(--orange); }

.btn-secondary { background: var(--paper); color: var(--orange); }
.btn-secondary:hover { background: var(--orange); color: #fff; }

/* ---------- SECTIONS ---------- */
.section {
  max-width: 760px;
  margin: 0 auto;
  padding: 72px 16px;
}

.section h2 {
  margin: 0 0 24px;
  font-size: clamp(1.7rem, 6vw, 2.6rem);
}

.section h3 {
  margin: 48px 0 16px;
  font-size: 1.6rem;
}

.lead { font-size: 1.15rem; }

.theme-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin: 32px 0;
  padding: 24px;
  text-align: center;
  /* border: 2px solid var(--orange); */
}

.theme-label { font-size: 0.85rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--ink-soft); }
.theme-value { font-family: var(--font-pixel); font-size: clamp(2rem, 8vw, 3rem); color: var(--orange); }
.theme-note { font-size: 0.95rem; color: var(--ink-soft); }

.categories, .rules, .timeline { list-style: none; margin: 0; padding: 0; }

.categories li {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
  font-weight: 600;
}

.categories img {
  flex: none;
  width: 48px;
  height: 48px;
  object-fit: contain;
  image-rendering: pixelated;
}

.categories small { font-weight: 400; color: var(--ink-soft); }

.cat-name {
  font-family: var(--font-pixel);
  font-size: clamp(1.0rem, 3.8vw, 1.6rem);
  line-height: 1.2;
  font-weight: 400;
}

/* Intro : texte + skin à droite */
.intro {
  display: flex;
  align-items: center;
  gap: 32px;
}

.intro .lead { flex: 1; margin: 0; }

.skin {
  flex: none;
  width: clamp(120px, 22vw, 190px);
  height: auto;
}

@media (max-width: 600px) {
  .intro { flex-direction: column; }
}

.tag {
  display: block;
  font-family: var(--font-pixel);
  font-size: 0.9rem;
  color: var(--orange);
}

.timeline li {
  position: relative;
  padding: 0 0 20px 28px;
  border-left: 2px solid var(--line);
}

.timeline li:last-child { border-left-color: transparent; }

.timeline li::before {
  content: "";
  position: absolute;
  left: -7px;
  top: 6px;
  width: 12px;
  height: 12px;
  background: var(--paper);
  border: 2px solid var(--orange);
}

.timeline li.done::before { background: var(--orange); }
.timeline li.done { color: var(--ink-soft); }

.timeline time {
  display: block;
  margin-bottom: 4px;
  font-family: var(--font-pixel);
  font-size: clamp(1.5rem, 5vw, 2.3rem);
  line-height: 1.1;
  color: var(--orange);
}

.rules li {
  position: relative;
  padding: 12px 0 12px 28px;
  border-bottom: 1px solid var(--line);
}

.rules li::before {
  content: "■";
  position: absolute;
  left: 2px;
  color: var(--orange);
}

/* CTA */
.cta { text-align: center; }

.cta-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 16px;
  margin: 32px 0 24px;
}

.hint { color: var(--ink-soft); font-size: 0.95rem; }

/* Footer */
.footer {
  padding: 32px 16px;
  text-align: center;
  border-top: 1px solid var(--line);
  color: var(--ink-soft);
}

.footer p { margin: 0 0 8px; }
.footer nav { display: flex; justify-content: center; gap: 24px; }
.footer a { font-weight: 600; text-decoration: none; }

/* Écrans étroits : items plus discrets derrière le contenu */
@media (max-width: 1100px) {
  .item { opacity: 0.35; }
}

/* Petits écrans : items masqués */
@media (max-width: 950px) {
  .items { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .item, .item img { animation: none; transition: none; }
}
