:root {
  --red: #b3001b;
  --green: #1f6f43;
  --gold: #e8b923;
  --cream: #fffaf0;
  --text: #2b2b2b;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { background: #0f3d2a; }

body {
  margin: 0;
  font-family: 'Nunito', sans-serif;
  color: var(--text);
  background: linear-gradient(160deg, #0f3d2a, #7a0f1f) fixed;
  background-size: cover;
  background-position: center;
  background-attachment: fixed;
  min-height: 100vh;
}

a { color: var(--red); font-weight: 700; }

/* --- En-tête --- */
.hero {
  text-align: center;
  padding: 48px 16px 24px;
  color: #fff;
  text-shadow: 0 2px 8px rgba(0, 0, 0, .6);
}
.hero h1 {
  font-family: 'Mountains of Christmas', cursive;
  font-size: clamp(2.4rem, 7vw, 4.5rem);
  margin: 0;
}
.hero p { font-size: 1.2rem; margin: 8px 0 0; }
.hero a { color: var(--gold); }

main { max-width: 1100px; margin: 0 auto; padding: 0 16px 48px; position: relative; z-index: 1; }

/* --- Cartes --- */
.card {
  background: var(--cream);
  border-radius: 16px;
  border-top: 6px solid var(--red);
  box-shadow: 0 8px 24px rgba(0, 0, 0, .25);
  padding: 20px;
  margin-bottom: 24px;
}
.card h2 { margin-top: 0; color: var(--green); }

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

.item { padding: 0; overflow: hidden; display: flex; flex-direction: column; margin: 0; }
.item img, .item .placeholder { width: 100%; height: 200px; object-fit: cover; background: #fff; }
.item .placeholder { display: grid; place-items: center; font-size: 4rem; }
.item .body { padding: 16px; display: flex; flex-direction: column; gap: 6px; flex: 1; }
.item h3 { margin: 0; }
.item p { margin: 0; }
.item .price { color: var(--green); font-weight: 700; }
.item .badge { color: var(--green); font-weight: 700; }
.item.taken { border-top-color: var(--green); }
.item.taken img { filter: grayscale(.7); opacity: .7; }

.check { display: flex; align-items: center; gap: 8px; font-weight: 700; cursor: pointer; margin-top: auto; padding-top: 8px; }
.check input { width: 22px; height: 22px; accent-color: var(--green); }

.empty { color: #fff; text-align: center; font-size: 1.2rem; }

/* --- Formulaires --- */
.row { display: flex; gap: 12px; flex-wrap: wrap; }
.row > * { flex: 1 1 180px; }
label { display: block; margin-bottom: 12px; font-weight: 700; }
label.check { margin-bottom: 12px; }
input:not([type=checkbox]), textarea {
  display: block;
  width: 100%;
  margin-top: 4px;
  padding: 10px 12px;
  border: 2px solid #ddd;
  border-radius: 10px;
  font: inherit;
}
input:focus, textarea:focus { outline: none; border-color: var(--gold); }

button {
  padding: 10px 18px;
  border: 0;
  border-radius: 10px;
  background: var(--red);
  color: #fff;
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
button.secondary { background: var(--green); }
button.danger { background: #555; }
button:hover { filter: brightness(1.1); }

table { width: 100%; border-collapse: collapse; }
td, th { text-align: left; padding: 8px; border-bottom: 1px solid #eee; }
.actions { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.actions button { padding: 6px 12px; }

footer { text-align: center; padding: 16px; position: relative; z-index: 1; }
footer a { color: rgba(255, 255, 255, .7); font-weight: 400; }

/* --- Neige --- */
.snow { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: 0; }
.snow span { position: absolute; top: -20px; color: #fff; opacity: .8; animation: fall linear infinite; }
@keyframes fall { to { transform: translateY(110vh) rotate(360deg); } }
