:root {
  --bg: #f6efe6;
  --card: #fffdf9;
  --ink: #2b2118;
  --muted: #7a6a58;
  --line: #e8dccb;
  --red: #9b1c1c;
  --red-dark: #7a1414;
  --green: #1f5137;
  --gold: #c08a2b;
  --radius: 18px;
  --shadow: 0 10px 30px rgba(80, 40, 10, 0.08);
}

* { box-sizing: border-box; }

html, body { margin: 0; }

body {
  min-height: 100dvh;
  background: var(--bg);
  background-image:
    radial-gradient(circle at 12% 8%, rgba(155, 28, 28, 0.08), transparent 40%),
    radial-gradient(circle at 90% 95%, rgba(31, 81, 55, 0.09), transparent 45%);
  color: var(--ink);
  font-family: "Nunito", system-ui, -apple-system, sans-serif;
  font-size: 17px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  max-width: 460px;
  margin: 0 auto;
  padding: 28px 16px 48px;
}

header { text-align: center; margin-bottom: 22px; }

.logo { font-size: 52px; line-height: 1; }

h1 {
  font-family: "Fraunces", Georgia, serif;
  font-weight: 700;
  font-size: 34px;
  line-height: 1.1;
  margin: 12px 0 6px;
  color: var(--red);
  letter-spacing: -0.5px;
}

.sub { color: var(--muted); margin: 0; }

.date-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  padding: 7px 14px;
  border-radius: 999px;
  background: var(--green);
  color: #fff;
  font-weight: 700;
  font-size: 14px;
}

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 22px 18px;
}

.card + .card { margin-top: 16px; }

h2 {
  font-family: "Fraunces", Georgia, serif;
  font-size: 21px;
  margin: 0 0 14px;
}

.names {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.name-btn {
  appearance: none;
  border: 2px solid var(--line);
  background: #fff;
  color: var(--ink);
  border-radius: 14px;
  padding: 16px 10px;
  font: inherit;
  font-weight: 800;
  font-size: 18px;
  cursor: pointer;
  transition: border-color .15s, transform .1s, background .15s;
  min-height: 60px;
}

.name-btn:hover { border-color: var(--gold); }
.name-btn:active { transform: scale(0.97); }
.name-btn small { display: block; font-weight: 600; font-size: 12px; color: var(--green); margin-top: 2px; }

label { display: block; font-weight: 700; margin-bottom: 6px; }

input[type="email"], input[type="password"] {
  width: 100%;
  font: inherit;
  font-size: 18px;
  padding: 14px 14px;
  border: 2px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
}

input:focus { outline: none; border-color: var(--red); }

.btn {
  appearance: none;
  display: block;
  width: 100%;
  margin-top: 14px;
  border: 0;
  border-radius: 14px;
  padding: 16px;
  font: inherit;
  font-weight: 800;
  font-size: 18px;
  background: var(--red);
  color: #fff;
  cursor: pointer;
  transition: background .15s;
}

.btn:hover { background: var(--red-dark); }
.btn:disabled { opacity: .6; cursor: wait; }

.btn.secondary { background: transparent; color: var(--muted); font-weight: 700; font-size: 16px; padding: 10px; }
.btn.secondary:hover { color: var(--ink); background: transparent; }
.btn.green { background: var(--green); }
.btn.green:hover { background: #163c29; }
.btn.outline { background: transparent; color: var(--red); border: 2px solid var(--red); }
.btn.outline:hover { background: rgba(155, 28, 28, .06); }

.hint { color: var(--muted); font-size: 15px; margin: 10px 0 0; }

.error {
  margin-top: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  background: #fdecec;
  color: var(--red-dark);
  font-weight: 700;
  font-size: 15px;
}

.big-emoji { font-size: 56px; text-align: center; line-height: 1; margin-bottom: 8px; }
.center { text-align: center; }
.hidden { display: none !important; }

.who { font-size: 15px; color: var(--muted); margin: 0 0 14px; }
.who strong { color: var(--ink); }

footer { text-align: center; color: var(--muted); font-size: 13px; margin-top: 28px; }

/* Neige légère */
.snow { position: fixed; inset: 0; pointer-events: none; overflow: hidden; z-index: -1; }
.snow i {
  position: absolute; top: -10px; width: 6px; height: 6px; border-radius: 50%;
  background: rgba(155, 28, 28, 0.13);
  animation: fall linear infinite;
}
@keyframes fall { to { transform: translateY(105vh); } }
@media (prefers-reduced-motion: reduce) { .snow { display: none; } }

/* Admin */
table { width: 100%; border-collapse: collapse; font-size: 15px; }
td { padding: 10px 4px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr:last-child td { border-bottom: 0; }
td.name { font-weight: 800; }
td.mail { color: var(--muted); overflow-wrap: anywhere; }
td.mail div { white-space: nowrap; }
td.act { text-align: right; white-space: nowrap; }
.link-btn { background: none; border: 0; color: var(--red); font: inherit; font-weight: 700; cursor: pointer; padding: 4px; }
.badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 13px; font-weight: 800; }
.badge.ok { background: #e3f1e8; color: var(--green); }
.badge.no { background: #f3ece2; color: var(--muted); }
.toast { margin-top: 12px; padding: 10px 12px; border-radius: 10px; background: #e3f1e8; color: var(--green); font-weight: 700; font-size: 15px; }
.check { display: flex; gap: 10px; align-items: flex-start; margin-top: 12px; font-weight: 600; font-size: 15px; }
.check input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--red); }
