/* Lutinerie : sobre, evenementiel (pas saisonnier). Jetons de couleur en :root, variante sombre selon le navigateur. */
:root {
  --bg: #fbf8f4;
  --surface: #ffffff;
  --ink: #2a2327;
  --muted: #6d6168;
  --line: #e7dfd8;
  --accent: #7a1f3d;
  --accent-ink: #ffffff;
  --gold: #c8963e;
  --radius: 14px;
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #17121a;
    --surface: #201a24;
    --ink: #f3ecef;
    --muted: #b3a6ae;
    --line: #342b39;
    --accent: #e0788f;
    --accent-ink: #17121a;
    --gold: #e0b45f;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
main { flex: 1; width: 100%; max-width: 62rem; margin: 0 auto; padding: 0 16px 3rem; }
a { color: var(--accent); }
.topbar { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .4rem 1rem; padding: 14px 16px; max-width: 62rem; width: 100%; margin: 0 auto; }
.brand { display: inline-flex; align-items: center; gap: .6rem; font-weight: 700; font-size: 1.15rem; letter-spacing: .01em; color: var(--ink); text-decoration: none; }
.brand-mark { width: 1.5rem; height: 1.5rem; border-radius: 7px; background: var(--accent); position: relative; }
.brand-mark::after { content: ""; position: absolute; inset: 6px; background: var(--gold); border-radius: 50%; }
.topbar-actions { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: .2rem .9rem; font-size: .95rem; color: var(--muted); }
.button { display: inline-block; padding: .7rem 1.3rem; border-radius: 999px; background: var(--accent); color: var(--accent-ink); font-weight: 600; text-decoration: none; border: 0; cursor: pointer; font: inherit; font-weight: 600; }
.button:hover { filter: brightness(1.08); }
.button.secondary { background: transparent; color: var(--accent); border: 1px solid var(--line); }
.hero { padding: clamp(2rem, 8vw, 5rem) 0 2rem; max-width: 40rem; }
.hero h1 { font-size: clamp(1.9rem, 5.5vw, 3rem); line-height: 1.12; margin: 0 0 1rem; letter-spacing: -.01em; }
.lead { font-size: 1.1rem; color: var(--muted); margin: 0 0 1.6rem; }
.hero-actions { display: flex; gap: .8rem; flex-wrap: wrap; margin: 0; }
.section { padding: 2rem 0; border-top: 1px solid var(--line); }
.section h2 { font-size: 1.25rem; margin: 0 0 1.2rem; }
.steps { list-style: none; counter-reset: step; padding: 0; margin: 0; display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(15rem, 1fr)); }
.steps li { counter-increment: step; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.2rem; }
.steps li::before { content: counter(step); display: inline-grid; place-items: center; width: 1.9rem; height: 1.9rem; border-radius: 50%; background: var(--gold); color: #2a2327; font-weight: 700; margin-bottom: .6rem; }
.steps h3 { margin: 0 0 .4rem; font-size: 1.05rem; }
.steps p { margin: 0; color: var(--muted); }
.trust ul { margin: 0; padding-left: 1.2rem; color: var(--muted); }
.trust li { margin: .35rem 0; }
.login-page { max-width: 28rem; padding-top: 2rem; }
.login-frame { min-height: 20rem; }
.legal { max-width: 42rem; padding-top: 2rem; }
.footer { padding: 1.5rem 0 calc(1.5rem + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); font-size: .9rem; }
.footer nav { max-width: 62rem; margin: 0 auto; padding: 0 16px; display: flex; gap: 1.2rem; flex-wrap: wrap; }
.footer a { color: var(--muted); }
@media (prefers-reduced-motion: no-preference) { .button { transition: filter .15s; } }

/* ---- pages de l'application : « Mes lutineries », page d'un evenement, console, assistant ---- */
.app-main h1 { font-size: clamp(1.5rem, 4vw, 2rem); margin: 1.2rem 0 .4rem; letter-spacing: -.01em; }
.app-main h2 { font-size: 1.15rem; margin: 0 0 .7rem; }
.app-main .lead { color: var(--muted); margin: 0 0 1.4rem; max-width: 42rem; }
.muted { color: var(--muted); }
.topbar-actions .who { color: var(--ink); font-weight: 600; }
.block { margin: 1.8rem 0; }
.cards { list-style: none; margin: 0 0 1rem; padding: 0; display: grid; gap: .8rem; grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.1rem; display: flex; flex-direction: column; gap: .8rem; }
.card-head { display: flex; align-items: flex-start; justify-content: space-between; gap: .6rem; }
.card-actions { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
.chip { display: inline-block; padding: .1rem .65rem; border-radius: 999px; font-size: .8rem; font-weight: 600; background: var(--line); color: var(--ink); white-space: nowrap; }
.chip.is-open { background: color-mix(in srgb, #2f8f5b 22%, var(--surface)); }
.chip.is-draft, .chip.is-pending { background: color-mix(in srgb, var(--gold) 28%, var(--surface)); }
.chip.is-blocked, .chip.is-refused { background: color-mix(in srgb, #c0392b 22%, var(--surface)); }
.button.small { padding: .4rem .9rem; font-size: .9rem; }
.button.secondary { background: transparent; color: var(--accent); border: 1px solid var(--line); }
.button[disabled] { opacity: .5; cursor: default; }
.notice { background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--gold); border-radius: var(--radius); padding: .8rem 1rem; }
.notice.is-error { border-left-color: #c0392b; }
.panel { max-width: 36rem; margin: 2rem auto; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1.4rem 1.5rem; }
.panel h1 { margin-top: 0; }
.actions { display: flex; flex-wrap: wrap; gap: .6rem; margin: 1.2rem 0 0; }
.form { display: flex; flex-direction: column; gap: 1rem; }
.field { display: flex; flex-direction: column; gap: .3rem; border: 0; padding: 0; margin: 0; min-width: 0; }
.field > span, .field > legend { font-weight: 600; }
.field small { color: var(--muted); font-weight: 400; display: block; }
.field.check { flex-direction: row; align-items: flex-start; gap: .6rem; }
.field.check input { margin-top: .25rem; }
.app-main input[type=text], .app-main input[type=email], .app-main textarea, .app-main select {
  width: 100%; padding: .6rem .75rem; border: 1px solid var(--line); border-radius: 10px; background: var(--bg); color: var(--ink); font: inherit;
}
.app-main textarea { resize: vertical; min-height: 7rem; }
.app-main :focus-visible, .topbar a:focus-visible, .button:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }
.page-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .8rem; }
.tabs { display: flex; gap: .3rem; border-bottom: 1px solid var(--line); margin: .6rem 0 1rem; overflow-x: auto; }
.tab { background: none; border: 0; border-bottom: 3px solid transparent; padding: .6rem 1rem; font: inherit; color: var(--muted); cursor: pointer; white-space: nowrap; }
.tab.is-active { color: var(--ink); border-bottom-color: var(--accent); font-weight: 600; }
.admin-host { min-width: 0; }
.stepper { list-style: none; display: flex; flex-wrap: wrap; gap: .5rem 1.4rem; padding: 0; margin: 0 0 1.4rem; color: var(--muted); }
.step { display: flex; align-items: center; gap: .5rem; }
.step-n { display: inline-grid; place-items: center; width: 1.7rem; height: 1.7rem; border-radius: 50%; background: var(--line); color: var(--ink); font-weight: 700; font-size: .9rem; }
.step.is-current { color: var(--ink); font-weight: 600; }
.step.is-current .step-n { background: var(--accent); color: var(--accent-ink); }
.step.is-done .step-n { background: var(--gold); color: #2a2327; }
.themes { display: grid; gap: .6rem; grid-template-columns: repeat(auto-fill, minmax(9.5rem, 1fr)); }
.theme { display: flex; flex-direction: column; gap: .4rem; align-items: flex-start; padding: .7rem; border: 1px solid var(--line); border-radius: 12px; cursor: pointer; background: var(--bg); }
.theme:has(input:checked) { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent); }
.theme input { position: absolute; opacity: 0; pointer-events: none; }
.theme:has(input:focus-visible) { outline: 3px solid var(--gold); outline-offset: 2px; }
.swatches { display: flex; gap: 3px; }
.swatches i { width: 1.4rem; height: 1.4rem; border-radius: 6px; display: block; }
.linkbox { background: var(--surface); border: 1px dashed var(--line); border-radius: var(--radius); padding: 1rem; margin: 1.2rem 0; }
.linkbox h3 { margin: 0 0 .3rem; font-size: 1rem; }
.linkrow { display: flex; gap: .5rem; flex-wrap: wrap; }
.linkrow input { flex: 1 1 14rem; }
.launches { list-style: none; padding: 0; margin: 0 0 1rem; display: flex; flex-direction: column; gap: .8rem; }
.launch { display: flex; gap: .9rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem; }
.launch.is-done { border-color: color-mix(in srgb, #2f8f5b 50%, var(--line)); }
.launch-n { flex: none; display: grid; place-items: center; width: 2rem; height: 2rem; border-radius: 50%; background: var(--accent); color: var(--accent-ink); font-weight: 700; }
.launch.is-done .launch-n { background: #2f8f5b; color: #fff; }
.launch-body p { margin: .2rem 0 .6rem; }
.toast { position: fixed; left: 50%; bottom: calc(1.2rem + env(safe-area-inset-bottom)); transform: translateX(-50%); z-index: 2000; max-width: calc(100vw - 2rem); background: var(--ink); color: var(--bg); padding: .7rem 1.1rem; border-radius: 12px; box-shadow: 0 6px 24px rgba(0, 0, 0, .3); }
.toast.is-error { background: #a53030; color: #fff; }
/* la page d'un evenement affiche le tableau du paquet, qui porte son propre theme : toute la largeur */
main.app-board { max-width: none; padding: 0; }
main.app-board .lutinerie { min-height: calc(100vh - 4rem); }
/* les ecrans de l'organisateur (paquet) prennent les couleurs de l'application */
body.app .lt-admin {
  --lt-admin-surface: var(--surface);
  --lt-admin-ink: var(--ink);
  --lt-admin-muted: var(--muted);
  --lt-admin-border: var(--line);
  --lt-admin-accent: var(--accent);
  --lt-admin-accent-ink: var(--accent-ink);
  --lt-admin-danger: #c0392b;
  padding: 0;
}
body.app .lt-admin .lt-admin-title { font-size: 1.25rem; }
body.app .lt-admin dialog.lt-dialog { background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: var(--radius); max-width: min(34rem, calc(100vw - 2rem)); }
