/* ABCB Conciergerie · boutique d'extras
   Une colonne étroite façon carte de room service : filets fins, prix en Lora, un seul accent or. */

@font-face { font-family: "Lora"; font-style: normal; font-weight: 500; font-display: swap; src: url("fonts/lora-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Lora"; font-style: normal; font-weight: 600; font-display: swap; src: url("fonts/lora-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Lora"; font-style: italic; font-weight: 400; font-display: swap; src: url("fonts/lora-latin-400-italic.woff2") format("woff2"); }
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 400; font-display: swap; src: url("fonts/poppins-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 500; font-display: swap; src: url("fonts/poppins-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Poppins"; font-style: normal; font-weight: 600; font-display: swap; src: url("fonts/poppins-latin-600-normal.woff2") format("woff2"); }

:root {
  color-scheme: light dark;
  --bg: #f2ece0;
  --surface: #e8dfcd;
  --fg: #1c1a16;
  --muted: #6b6355;
  --line: #d4c9b2;
  --accent: #c9a267;
  --accent-ink: #7d5f2b;
  --btn-bg: #1c1a16;
  --btn-fg: #f2ece0;
  --bar-bg: #1c1a16;
  --bar-fg: #f2ece0;
  --bar-btn-bg: #c9a267;
  --bar-btn-fg: #1c1a16;
  --danger: #a3361f;
  --ok: #2f6b3a;
  --warn-bg: #f6e3b4;
  --warn-fg: #5c4410;
  --serif: "Lora", Georgia, "Times New Roman", serif;
  --sans: "Poppins", system-ui, -apple-system, "Segoe UI", sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #1c1a16;
    --surface: #26231d;
    --fg: #f2ece0;
    --muted: #a89f8d;
    --line: #3a352b;
    --accent-ink: #c9a267;
    --btn-bg: #c9a267;
    --btn-fg: #1c1a16;
    --bar-bg: #332f26;
    --bar-fg: #f2ece0;
    --danger: #e58a72;
    --ok: #8fc79a;
    --warn-bg: #4a3a12;
    --warn-fg: #f2dfa6;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--sans);
  font-size: 15px;
  line-height: 1.55;
  padding-block: 28px 120px;
  padding-left: max(16px, env(safe-area-inset-left, 0px));
  padding-right: max(16px, env(safe-area-inset-right, 0px));
}
img { max-width: 100%; height: auto; }
a { color: inherit; text-underline-offset: 3px; }
[hidden] { display: none !important; }
.wrap { max-width: 640px; margin-inline: auto; }
.wrap.wide { max-width: 760px; }

.logo { width: 150px; }
.logo a { display: block; }
.logo img { display: block; width: 150px; height: auto; }

/* ---------- Boutique ---------- */

.hero { margin-top: 28px; }
.eyebrow { font-size: 11px; font-weight: 500; letter-spacing: 0.2em; text-transform: uppercase; color: var(--accent-ink); }
h1 { font-family: var(--serif); font-weight: 500; font-size: 34px; line-height: 1.15; margin: 8px 0 14px; text-wrap: balance; }
h2 { font-family: var(--serif); font-weight: 500; font-size: 24px; line-height: 1.2; margin: 0; }
.intro { color: var(--muted); margin: 0; max-width: 52ch; }
.intro span { display: block; }
.reassure { margin: 16px 0 0; padding: 12px 14px; background: var(--surface); border-radius: 3px; font-size: 14px; max-width: 52ch; }

.section-title {
  display: flex; align-items: center; gap: 14px;
  font-size: 11px; font-weight: 600; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--accent-ink); margin: 40px 0 4px;
}
.section-title::after { content: ""; flex: 1; height: 1px; background: var(--line); }

.item { padding: 20px 0; border-top: 1px solid var(--line); display: grid; grid-template-columns: 44px minmax(0, 1fr); column-gap: 14px; row-gap: 12px; }
.section-title + main .item:first-child { border-top: 0; }
.emoji { font-size: 32px; line-height: 1.1; }
.item-body { min-width: 0; }
.name { font-family: var(--serif); font-weight: 500; font-size: 18px; line-height: 1.3; margin: 0; }
.desc { color: var(--muted); font-size: 14px; margin: 4px 0 0; max-width: 46ch; }
.incl { list-style: none; margin: 8px 0 0; padding: 0; font-size: 14px; display: grid; gap: 2px; }
.incl li { padding-left: 20px; position: relative; }
.incl li::before { content: "✓"; position: absolute; left: 0; color: var(--accent-ink); font-weight: 600; }
.note { font-size: 12px; color: var(--muted); margin: 6px 0 0; font-style: italic; }

.buy { grid-column: 2; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.price { font-family: var(--serif); font-size: 18px; color: var(--accent-ink); white-space: nowrap; font-variant-numeric: tabular-nums; }
.price small { font-family: var(--sans); font-size: 11px; color: var(--muted); margin-left: 4px; }
@media (min-width: 560px) {
  .item { grid-template-columns: 44px minmax(0, 1fr) auto; }
  .buy { grid-column: 3; grid-row: 1; flex-direction: column; align-items: flex-end; justify-content: flex-start; }
}

.stepper { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 3px; }
.stepper button { width: 44px; height: 44px; background: transparent; color: var(--fg); border: 0; font-size: 20px; cursor: pointer; font-family: var(--sans); }
.stepper output { min-width: 52px; text-align: center; font-variant-numeric: tabular-nums; font-size: 14px; font-weight: 500; }

.btn {
  min-height: 44px; padding: 0 22px; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: var(--btn-bg); color: var(--btn-fg);
  border: 1px solid var(--btn-bg); border-radius: 3px; cursor: pointer; text-decoration: none;
  font-family: var(--sans); font-size: 12px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; text-align: center;
}
.btn.ghost { background: transparent; color: var(--fg); border-color: var(--line); }
.btn.on { background: transparent; color: var(--accent-ink); border-color: var(--accent); }
.btn.danger { background: transparent; color: var(--danger); border-color: var(--danger); }
.btn[disabled] { opacity: 0.55; cursor: not-allowed; }
.btn.small { min-height: 36px; padding: 0 14px; font-size: 11px; }
.stepper button:focus-visible, .btn:focus-visible, .bar button:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible, a:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.request { margin-top: 44px; background: var(--surface); border-radius: 4px; padding: 22px 18px 24px; }
.request > p { color: var(--muted); font-size: 14px; margin: 6px 0 18px; }
.lines { margin: 0 0 4px; padding: 0; list-style: none; border-top: 1px solid var(--line); }
.lines li { display: flex; justify-content: space-between; gap: 16px; padding: 10px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.lines li span:last-child { font-variant-numeric: tabular-nums; white-space: nowrap; }
.lines .empty { color: var(--muted); font-style: italic; }
.total { display: flex; justify-content: space-between; align-items: baseline; padding: 12px 0 18px; font-family: var(--serif); font-size: 20px; }
.total span:last-child { color: var(--accent-ink); font-variant-numeric: tabular-nums; }

.fields { display: grid; gap: 14px; }
.row2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(168px, 1fr)); gap: 14px; }
.field { display: grid; gap: 6px; min-width: 0; }
.field label { font-size: 11px; font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--muted); }
.field input, .field textarea, .field select {
  width: 100%; min-width: 0; min-height: 44px; padding: 10px 12px;
  background: var(--bg); color: var(--fg); border: 1px solid var(--line); border-radius: 3px;
  font-family: var(--sans); font-size: 16px;
}
.field textarea { min-height: 80px; resize: vertical; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.actions { display: grid; gap: 10px; margin-top: 20px; }
.status { margin: 14px 0 0; font-size: 14px; min-height: 1.5em; }
.status.err, .notice.err { color: var(--danger); }
.notice { margin: 20px 0 0; padding: 12px 14px; background: var(--surface); border-radius: 3px; font-size: 14px; }
.fine { font-size: 12px; color: var(--muted); margin: 14px 0 0; }

.foot { margin-top: 44px; padding-top: 22px; border-top: 1px solid var(--line); display: grid; gap: 14px; }
.contact { margin: 0; font-size: 14px; }
.contact span { display: block; }
.contact a { font-weight: 600; }
.pillars { font-family: var(--serif); font-style: italic; color: var(--muted); font-size: 14px; margin: 0; }

.bar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  background: var(--bar-bg); color: var(--bar-fg);
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding-top: 12px; padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px));
}
.bar-info { font-size: 14px; min-width: 0; }
.bar-info strong { font-family: var(--serif); font-size: 18px; font-weight: 500; margin-left: 6px; font-variant-numeric: tabular-nums; }
.bar button {
  min-height: 44px; padding: 0 20px; background: var(--bar-btn-bg); color: var(--bar-btn-fg); border: 0; border-radius: 3px; cursor: pointer;
  font-family: var(--sans); font-size: 12px; font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; white-space: nowrap;
}

/* ---------- Pages simples (merci, 404) ---------- */

.centered { min-height: 70vh; display: grid; align-content: center; gap: 14px; }
.centered p { color: var(--muted); max-width: 48ch; margin: 0; }
.tick { font-size: 40px; line-height: 1; }

/* ---------- Page de validation ---------- */

.admin-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.admin-head .logo, .admin-head .logo img { width: 96px; }
.admin-tools { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.admin h2, .page-admin h2 { margin-top: 34px; display: flex; align-items: baseline; gap: 10px; }
.count { font-family: var(--sans); font-size: 13px; font-weight: 600; color: var(--accent-ink); }
.login { margin-top: 36px; max-width: 420px; display: grid; gap: 14px; }
.banner { margin-top: 22px; padding: 10px 14px; background: var(--warn-bg); color: var(--warn-fg); border-radius: 3px; font-size: 13px; font-weight: 500; }
.empty-state { margin: 14px 0 0; padding: 22px 16px; border: 1px dashed var(--line); border-radius: 4px; color: var(--muted); text-align: center; }

.order { background: var(--surface); border-radius: 4px; padding: 18px 16px; margin-top: 14px; display: grid; gap: 14px; }
.order-top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px 14px; flex-wrap: wrap; }
.order-title { font-family: var(--serif); font-weight: 500; font-size: 21px; margin: 0; }
.pill { display: inline-block; padding: 2px 10px; border: 1px solid var(--line); border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.pill.warn { color: var(--danger); border-color: var(--danger); }
.pill.ok { color: var(--ok); border-color: var(--ok); }
.pill.test { background: var(--warn-bg); color: var(--warn-fg); border-color: transparent; }
.guest { display: grid; gap: 2px; font-size: 14px; }
.guest .who { font-weight: 600; }
.guest .quote { color: var(--muted); font-style: italic; }
.guest .links { display: flex; gap: 14px; flex-wrap: wrap; margin-top: 4px; }
.choices { border-top: 1px solid var(--line); }
.choice { display: grid; grid-template-columns: 24px 30px minmax(0, 1fr) auto; gap: 10px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); cursor: pointer; }
.choice input { width: 22px; height: 22px; margin: 0; accent-color: var(--accent-ink); }
.choice .c-name { min-width: 0; font-size: 14px; }
.choice .c-price { font-family: var(--serif); font-variant-numeric: tabular-nums; white-space: nowrap; }
.choice.off .c-name, .choice.off .c-price { text-decoration: line-through; color: var(--muted); }
.sum { display: flex; justify-content: space-between; align-items: baseline; gap: 10px; flex-wrap: wrap; font-family: var(--serif); font-size: 18px; }
.sum small { font-family: var(--sans); font-size: 12px; color: var(--muted); }
.sum .amount { color: var(--accent-ink); font-variant-numeric: tabular-nums; }
.order .actions { margin-top: 0; }
.order .msg { margin: 0; font-size: 14px; }
.order .msg.err { color: var(--danger); }

.pills { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.login h1 { margin: 0; }
.login form { display: grid; gap: 14px; }
.order .confirm { margin: 0; font-size: 14px; font-weight: 500; }
.setup { margin-top: 34px; padding-top: 6px; border-top: 1px solid var(--line); display: grid; gap: 10px; font-size: 14px; }
.setup h2 { margin-top: 20px; }
.setup-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.fine.err { color: var(--danger); }
.toast-link { font-weight: 600; }

.history { margin-top: 14px; border-top: 1px solid var(--line); }
.hrow { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 12px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 14px; }
.hrow .h-main { min-width: 0; }
.hrow .h-main strong { font-weight: 600; }
.hrow .h-sub { color: var(--muted); font-size: 13px; }
.hrow .h-side { text-align: right; display: grid; gap: 4px; justify-items: end; align-content: start; }
.hrow .h-amount { font-family: var(--serif); font-variant-numeric: tabular-nums; }

/* ---------- Affiche à imprimer ---------- */
/* Toutes les tailles de l'affiche sont en cqw (unité de la largeur de la feuille) :
   l'aperçu à l'écran et l'impression A5 ont exactement la même mise en page. */

.poster-tools { display: flex; flex-wrap: wrap; gap: 12px; align-items: end; margin: 22px 0; }
.poster-tools .field { min-width: 220px; flex: 1; }
.poster-link { display: flex; gap: 8px; align-items: end; flex-wrap: wrap; margin: 0 0 22px; }
.poster-link .field { flex: 1; min-width: 240px; }
.sheet-wrap { display: grid; justify-items: center; }
.sheet {
  width: min(100%, 420px); aspect-ratio: 148 / 210; display: grid;
  container-type: inline-size;
  background: #f2ece0; color: #1c1a16; border: 1px solid var(--line);
  -webkit-print-color-adjust: exact; print-color-adjust: exact;
}
.sheet-in {
  display: grid; grid-template-rows: auto 1fr auto; justify-items: center; align-items: center;
  gap: 2.4cqw; padding: 7cqw 9cqw 6cqw; text-align: center; min-height: 0;
}
.sheet .p-logo { width: 26cqw; }
.sheet .p-logo img { display: block; width: 100%; }
.sheet .p-mid { display: grid; gap: 2.4cqw; justify-items: center; align-content: center; }
.sheet .p-eyebrow { font-size: 2.5cqw; font-weight: 600; letter-spacing: 0.22em; text-transform: uppercase; color: #7d5f2b; }
.sheet .p-title { font-family: var(--serif); font-weight: 500; font-size: 7cqw; line-height: 1.15; margin: 0; text-wrap: balance; }
.sheet .p-sub { font-size: 3.2cqw; line-height: 1.5; color: #5b5346; margin: 0; max-width: 76cqw; text-wrap: balance; }
.sheet .p-qr { background: #fff; padding: 2.2cqw; border-radius: 1.5cqw; border: 1px solid #d4c9b2; width: 46cqw; }
.sheet .p-qr svg { display: block; width: 100%; height: auto; }
.sheet .p-url { font-size: 2.4cqw; color: #5b5346; word-break: break-all; margin: 0; }
.sheet .p-bottom { display: grid; gap: 1cqw; justify-items: center; }
.sheet .p-foot { font-family: var(--serif); font-style: italic; font-size: 2.9cqw; color: #5b5346; margin: 0; }
.sheet .p-small { font-size: 2.4cqw; color: #5b5346; margin: 0; letter-spacing: 0.08em; }

@media print {
  @page { size: A5 portrait; margin: 0; }
  html, body { background: #f2ece0 !important; margin: 0; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  body { padding: 0 !important; }
  .no-print { display: none !important; }
  .wrap { max-width: none; margin: 0; }
  .sheet-wrap { display: block; }
  /* 1 mm de marge : Chrome arrondit la page A5 à 594,96 pt, une feuille de 210 mm déborderait sur une 2e page */
  .sheet { width: 148mm; height: 209mm; aspect-ratio: auto; border: 0; margin: 0; break-after: avoid; overflow: hidden; }
}
