/* Mini-sites clients — feuille commune. Clair seulement : les logos des lieux sont faits pour
   un fond clair. La couleur du site arrive par --accent (core/sites.js, thème). */
:root {
  --accent: #1d1d1b;
  --bg: #f4f3f0;
  --card: #ffffff;
  --ink: #1d1f23;
  --muted: #6a6f78;
  --line: #e3e1dc;
  --ok: #1f7a46;
  --ok-bg: #e6f4ec;
  --wait: #8a5a00;
  --wait-bg: #fdf3dc;
  --bad: #a3262c;
  --bad-bg: #fbe9ea;
  --radius: 14px;
  --gut: 16px;
  color-scheme: light;
}

* { box-sizing: border-box; }

html, body { margin: 0; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  font-size: 16px;
  line-height: 1.45;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

button, input, select, textarea { font: inherit; color: inherit; }

.wrap { max-width: 640px; margin: 0 auto; padding: 0 var(--gut) 48px; }

/* ── accueil ── */
.home {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 36px;
  padding: 32px var(--gut);
  background: #fff;
  text-align: center;
}
.home img { width: min(320px, 78vw); height: auto; }
.home-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; }
.home .contact { color: var(--muted); font-size: 0.92rem; }
.home .contact a { text-decoration: none; }

/* ── en-tête de la réservation ── */
.top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 0;
}
.top a.logo img { height: 44px; width: auto; display: block; }
.top-right { display: flex; flex-wrap: wrap; justify-content: flex-end; align-items: center; gap: 8px 12px; }
.top .who { font-size: 0.85rem; color: var(--muted); text-align: right; }
.upcoming {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 38px;
  padding: 0 14px;
  border-radius: 999px;
  border: 1px solid var(--accent);
  background: #fff;
  color: var(--accent);
  font-size: 0.85rem;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
.upcoming .dot { width: 8px; height: 8px; border-radius: 999px; background: var(--ok); }
.upcoming .dot.waitlist { background: var(--wait); }
.card > p.hint { color: var(--muted); font-size: 0.85rem; margin: 12px 0 0; }
.done-line { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.done-line .btn { flex: 0 0 auto; min-height: 40px; padding: 0 16px; }
.top .who button { border: 0; background: none; padding: 0; color: var(--accent); text-decoration: underline; cursor: pointer; }

h1 { font-size: 1.6rem; margin: 8px 0 4px; letter-spacing: -0.01em; }
h2 { font-size: 1.05rem; margin: 0 0 12px; }
.lead { color: var(--muted); margin: 0 0 20px; }

.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  margin-bottom: 14px;
}

/* ── boutons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 0 22px;
  border-radius: 999px;
  border: 1px solid var(--accent);
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
}
.btn.ghost { background: transparent; color: var(--accent); }
.btn.block { width: 100%; }
.btn:disabled { opacity: 0.45; cursor: not-allowed; }

/* ── jours ── */
.days {
  display: flex;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 2px 8px;
  margin: 0 -2px;
  scrollbar-width: none;
}
.days::-webkit-scrollbar { display: none; }
.day {
  flex: 0 0 auto;
  min-width: 64px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  text-align: center;
  cursor: pointer;
}
.day .dow { display: block; font-size: 0.72rem; text-transform: uppercase; color: var(--muted); letter-spacing: 0.04em; }
.day .num { display: block; font-size: 1.25rem; font-weight: 700; }
.day .mon { display: block; font-size: 0.72rem; color: var(--muted); }
.day[aria-pressed='true'] { background: var(--accent); border-color: var(--accent); color: #fff; }
.day[aria-pressed='true'] .dow, .day[aria-pressed='true'] .mon { color: rgba(255, 255, 255, 0.8); }

/* ── choix segmenté (Restaurant / Club / les deux, soirée) ── */
.seg { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 0; }
.seg button {
  flex: 1 1 auto;
  min-height: 42px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  cursor: pointer;
}
.seg button[aria-pressed='true'] { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); font-weight: 600; }

/* ── formulaire ── */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field:last-child { margin-bottom: 0; }
.field label { font-size: 0.85rem; font-weight: 600; }
.field .hint { font-size: 0.8rem; color: var(--muted); }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
@media (max-width: 420px) { .row { grid-template-columns: 1fr; } }

input[type='text'], input[type='email'], input[type='tel'], input[type='number'], select, textarea {
  width: 100%;
  min-height: 46px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
}
textarea { min-height: 72px; resize: vertical; }
input:focus, select:focus, textarea:focus, button:focus-visible { outline: 2px solid var(--accent); outline-offset: 1px; }

.phone { display: grid; grid-template-columns: 112px 1fr; gap: 8px; }
.inline { display: flex; gap: 8px; }
.inline > input { flex: 1; }
.inline > .btn { flex: 0 0 auto; }

.check { display: flex; gap: 10px; align-items: flex-start; font-size: 0.9rem; margin: 10px 0; }
.check input { margin-top: 3px; width: 18px; height: 18px; accent-color: var(--accent); flex: 0 0 auto; }

details.cond { margin-top: 10px; font-size: 0.85rem; color: var(--muted); }
details.cond summary { cursor: pointer; color: var(--ink); }
details.cond p { white-space: pre-line; margin: 8px 0 0; }

.service-title { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.service-title h2 { margin: 0; }
.service-title .when { font-size: 0.85rem; color: var(--muted); }
.seg + .row { margin-top: 14px; }
#mine-section h2 { margin-top: 28px; }

/* ── messages ── */
.note { padding: 10px 12px; border-radius: 10px; font-size: 0.88rem; margin: 10px 0 0; }
.note.wait { background: var(--wait-bg); color: var(--wait); }
.note.bad { background: var(--bad-bg); color: var(--bad); }
.note + .field { margin-top: 14px; }
.note.ok { background: var(--ok-bg); color: var(--ok); }
.empty { color: var(--muted); text-align: center; padding: 24px 0; }

.badge { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: 0.78rem; font-weight: 600; }
.badge.confirmed { background: var(--ok-bg); color: var(--ok); }
.badge.waitlist { background: var(--wait-bg); color: var(--wait); }
.badge.cancelled { background: var(--bad-bg); color: var(--bad); }

/* ── mes réservations ── */
.mine { display: flex; flex-direction: column; gap: 10px; }
.resa { display: flex; justify-content: space-between; gap: 12px; align-items: center; }
.resa .what { font-weight: 600; }
.resa .meta { font-size: 0.85rem; color: var(--muted); }
.resa button { flex: 0 0 auto; }

.qr-overlay {
  position: fixed;
  inset: 0;
  background: rgba(16, 17, 19, 0.96);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 18px;
  padding: var(--gut);
  z-index: 10;
  color: #fff;
  text-align: center;
  overflow-y: auto;
}
.qr-card {
  background: #fff;
  color: var(--ink);
  border-radius: 18px;
  padding: 20px 20px 16px;
  width: min(340px, 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
}
.qr-card .qr { padding: 4px 4px 10px; }
.qr-card .qr svg { display: block; width: min(260px, 70vw); height: auto; }
.qr-name { font-size: 1.45rem; font-weight: 700; letter-spacing: -0.01em; line-height: 1.2; }
.qr-line { font-size: 0.95rem; color: var(--ink); }
.qr-ref { font-size: 0.8rem; color: var(--muted); margin-top: 6px; }
.qr-hint { font-size: 0.95rem; opacity: 0.85; }

.foot { text-align: center; color: var(--muted); font-size: 0.8rem; margin-top: 28px; }
.foot a { text-decoration: none; }

.socials { display: flex; justify-content: center; gap: 12px; margin-top: 14px; }
.socials a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 999px;
  border: 1px solid var(--line);
  background: #fff;
  color: var(--accent);
}
.socials a:hover { border-color: var(--accent); }
.socials svg { width: 22px; height: 22px; }
.home .socials { margin-top: 0; }

[hidden] { display: none !important; }
.loading { text-align: center; color: var(--muted); padding: 32px 0; }
