@import url("https://fonts.googleapis.com/css2?family=Host+Grotesk:wght@400;500;700;800&display=swap");

:root {
  --navy: #03256c;
  --blue: #3694f7;
  --blue-2: #2563d6;
  --red: #ff3236;
  --green: #38bb33;
  --blue-15: rgba(54, 148, 247, 0.15);
  --red-15: rgba(255, 50, 54, 0.15);
  --green-15: rgba(56, 187, 51, 0.15);
  --bg: #f6f3ec;
  --card: #ffffff;
  --text: #0d1b3e;
  --muted: #5b6784;
  --line: #e4e0d6;
}
* { box-sizing: border-box; touch-action: manipulation; }
html, body { margin: 0; }
body {
  font-family: "Host Grotesk", system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--blue-2); }
h1, h2, h3 { color: var(--navy); font-weight: 800; letter-spacing: -0.01em; margin: 0; }
.hl { background: linear-gradient(transparent 55%, var(--blue-15) 55%); padding: 0 .1em; }

/* --- Carte centrée (login / invitation) --- */
.center { min-height: 100dvh; display: grid; place-items: center; padding: 24px 16px; }
.card {
  width: 100%; max-width: 400px; background: var(--card); border: 1px solid var(--line);
  border-radius: 20px; padding: 32px 28px; box-shadow: 0 12px 40px rgba(3, 37, 108, .08); text-align: center;
}
.card .mark { width: 56px; height: 56px; border-radius: 16px; background: var(--navy); color: #fff;
  display: grid; place-items: center; margin: 0 auto 18px; }
.card h1 { font-size: 26px; margin-bottom: 8px; }
.card p.sub { color: var(--muted); margin: 0 0 26px; line-height: 1.45; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px; width: 100%;
  font: inherit; font-weight: 700; font-size: 16px; border: 0; border-radius: 14px; padding: 15px 18px;
  cursor: pointer; background: var(--navy); color: #fff; transition: transform .08s, background .15s;
}
.btn:hover { background: var(--blue-2); }
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .55; cursor: default; }
.btn.ghost { background: transparent; color: var(--navy); border: 1px solid var(--line); }
.btn.ghost:hover { background: var(--blue-15); }
.btn.small { width: auto; padding: 8px 12px; font-size: 14px; border-radius: 10px; }
.btn.danger { background: transparent; color: var(--red); border: 1px solid var(--red-15); }
.btn.danger:hover { background: var(--red-15); }

.link { background: none; border: 0; font: inherit; color: var(--muted); cursor: pointer; margin-top: 18px; font-size: 14px; text-decoration: underline; }
.msg { min-height: 22px; margin-top: 14px; font-size: 14px; }
.msg.err { color: var(--red); }
.msg.ok { color: var(--green); }
input, select {
  width: 100%; font: inherit; font-size: 16px; padding: 13px 14px; border: 1px solid var(--line);
  border-radius: 12px; background: #fff; color: var(--text); outline: none;
}
input:focus, select:focus { border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-15); }
.stack { display: grid; gap: 10px; }
.hidden { display: none !important; }

/* --- Admin --- */
.wrap { max-width: 880px; margin: 0 auto; padding: 28px 16px 60px; }
.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 26px; flex-wrap: wrap; }
.top h1 { font-size: 28px; }
.top .who { color: var(--muted); font-size: 14px; }
.panel { background: var(--card); border: 1px solid var(--line); border-radius: 18px; padding: 22px; margin-bottom: 18px; }
.panel h2 { font-size: 18px; margin-bottom: 14px; }
.row { display: grid; grid-template-columns: 1fr 1fr 140px auto; gap: 10px; }
@media (max-width: 680px) { .row { grid-template-columns: 1fr; } }
.user { border-top: 1px solid var(--line); padding: 16px 0; }
.user:first-of-type { border-top: 0; padding-top: 0; }
.user-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.user-name { font-weight: 700; color: var(--navy); }
.user-mail { color: var(--muted); font-size: 14px; }
.tag { display: inline-block; font-size: 12px; font-weight: 700; padding: 3px 8px; border-radius: 999px; margin-left: 6px; }
.tag.admin { background: var(--blue-15); color: var(--blue-2); }
.tag.off { background: var(--red-15); color: var(--red); }
.tag.wait { background: var(--green-15); color: #23801f; }
.items { margin: 10px 0 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.items li { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 14px;
  background: var(--bg); border-radius: 10px; padding: 8px 10px; }
.items li .meta { color: var(--muted); font-size: 13px; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; }
.linkbox { display: flex; gap: 8px; margin-top: 12px; }
.linkbox input { font-size: 13px; }
.sub-title { font-size: 13px; font-weight: 700; color: var(--muted); margin-top: 12px; text-transform: uppercase; letter-spacing: .04em; }

/* --- Code de connexion --- */
input.code { text-align: center; font-size: 30px; font-weight: 700; letter-spacing: .32em; padding-left: .32em; font-variant-numeric: tabular-nums; color: var(--navy); }
