/* CVVM public UI. Hand-written, mobile-first, no build step. */
:root {
  --c-bg: #f3f7fb;
  --c-surface: #ffffff;
  --c-text: #14232f;
  --c-muted: #4d6071;
  --c-primary: #0b6fb8;
  --c-primary-dark: #08568e;
  --c-primary-soft: #e3f1fb;
  --c-confirmed: #1c7a3f;
  --c-confirmed-soft: #e2f4e8;
  --c-pending: #a85a00;
  --c-pending-soft: #fff0da;
  --c-danger: #b3261e;
  --c-danger-soft: #fde8e6;
  --c-border: #d3dee8;
  --s-1: .25rem;
  --s-2: .5rem;
  --s-3: .75rem;
  --s-4: 1rem;
  --s-5: 1.5rem;
  --s-6: 2.5rem;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(20, 35, 47, .06), 0 4px 14px rgba(20, 35, 47, .06);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { font-size: 17px; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--font); line-height: 1.55; color: var(--c-text);
  background: var(--c-bg); overflow-wrap: anywhere;
}
.wrap { max-width: 40rem; margin: 0 auto; padding: 0 var(--s-4); }
main.wrap { padding-bottom: var(--s-6); }
h1, h2 { line-height: 1.2; margin: 0 0 var(--s-3); }
h1 { font-size: 1.85rem; letter-spacing: -.02em; }
h2 { font-size: 1.25rem; margin-top: var(--s-4); }
p { margin: 0 0 var(--s-3); }
a { color: var(--c-primary-dark); }
:focus-visible { outline: 3px solid var(--c-primary); outline-offset: 2px; }

.skip-link { position: absolute; left: -999px; top: 0; background: var(--c-surface); padding: var(--s-2) var(--s-3); z-index: 10; }
.skip-link:focus { left: var(--s-2); top: var(--s-2); }

/* Header / footer */
.site-header { background: var(--c-surface); border-bottom: 1px solid var(--c-border); position: sticky; top: 0; z-index: 5; }
.site-header__inner { display: flex; align-items: center; min-height: 56px; }
.brand { display: inline-flex; align-items: center; gap: var(--s-2); min-height: 44px; text-decoration: none; color: var(--c-text); }
.brand__mark { display: block; width: 40px; height: 40px; flex: none; }
.brand__mark img { display: block; width: 100%; height: 100%; border-radius: 50%; object-fit: contain; }
.brand__text { display: flex; flex-direction: column; line-height: 1.15; }
.brand__text small { color: var(--c-muted); font-size: .8rem; }
.site-footer { background: #0e2a3f; color: #dbe8f2; padding: var(--s-5) 0; font-size: .95rem; }
.site-footer a { color: #fff; display: inline-block; padding: var(--s-1) 0; min-height: 28px; }
.site-footer p:last-child { margin-bottom: 0; }

/* Hero */
.hero {
  margin: var(--s-4) calc(var(--s-4) * -1) var(--s-4); padding: var(--s-5) var(--s-4);
  background: linear-gradient(165deg, #0b6fb8 0%, #0a4f86 60%, #0e2a3f 100%); color: #fff;
}
.hero h1 { color: #fff; }
.hero .eyebrow { text-transform: uppercase; letter-spacing: .08em; font-size: .78rem; font-weight: 600; opacity: .85; margin-bottom: var(--s-2); }
.hero .lead { font-size: 1.05rem; opacity: .95; margin-bottom: var(--s-4); }
@media (min-width: 42rem) {
  .hero { margin-inline: 0; border-radius: var(--radius); }
}

.cta-row { display: flex; flex-direction: column; gap: var(--s-3); }
.cta-row--end { margin-top: var(--s-5); }
@media (min-width: 30rem) { .cta-row { flex-direction: row; } .cta-row > * { flex: 1; } }

/* Button */
.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: var(--s-2) var(--s-5);
  border-radius: 999px; border: 2px solid transparent; font: inherit; font-weight: 650; text-decoration: none;
  cursor: pointer; text-align: center; transition: background-color .15s, transform .05s;
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--c-primary); color: #fff; }
.btn--primary:hover { background: var(--c-primary-dark); }
.btn--secondary { background: transparent; color: var(--c-primary-dark); border-color: var(--c-primary); }
.btn--secondary:hover { background: var(--c-primary-soft); }
.btn--danger { background: var(--c-danger); color: #fff; }
.hero .btn--primary { background: #fff; color: var(--c-primary-dark); }
.hero .btn--secondary { color: #fff; border-color: rgba(255, 255, 255, .8); }
.hero .btn--secondary:hover { background: rgba(255, 255, 255, .15); }

/* Card */
.card { background: var(--c-surface); border: 1px solid var(--c-border); border-radius: var(--radius); box-shadow: var(--shadow); padding: var(--s-4); margin-top: var(--s-4); }
.card__title { margin: 0 0 var(--s-3); font-size: 1.2rem; }
.card__body > :last-child { margin-bottom: 0; }
.card h2 { margin-top: 0; }
.card h2:not(:first-child) { margin-top: var(--s-5); }
.checklist { margin: 0 0 var(--s-3); padding-left: 1.2rem; }
.checklist li { margin-bottom: var(--s-2); }

/* Badge */
.badge { display: inline-block; padding: 2px var(--s-3); border-radius: 999px; font-size: .85rem; font-weight: 650; background: var(--c-primary-soft); color: var(--c-primary-dark); }
.badge--pending { background: var(--c-pending-soft); color: var(--c-pending); }
.badge--confirmed { background: var(--c-confirmed-soft); color: var(--c-confirmed); }
.badge--cancelled { background: var(--c-danger-soft); color: var(--c-danger); }
.badge--done { background: #e8edf2; color: var(--c-muted); }

/* Slot chip */
.chip {
  display: inline-flex; align-items: center; justify-content: center; min-width: 76px; min-height: 44px; padding: 0 var(--s-4);
  border: 2px solid var(--c-primary); border-radius: 999px; font-weight: 650; text-decoration: none; color: var(--c-primary-dark); background: var(--c-surface);
}
.chip:hover { background: var(--c-primary-soft); }

/* Notice */
.notice { border-left: 5px solid var(--c-primary); background: var(--c-primary-soft); padding: var(--s-3) var(--s-4); border-radius: 8px; margin: var(--s-3) 0; }
.notice--warning { border-color: var(--c-pending); background: var(--c-pending-soft); }
.notice--error { border-color: var(--c-danger); background: var(--c-danger-soft); }
.notice--success { border-color: var(--c-confirmed); background: var(--c-confirmed-soft); }

/* Form field */
.field { margin-bottom: var(--s-4); }
.field__label { display: block; font-weight: 650; margin-bottom: var(--s-1); }
.field__help { color: var(--c-muted); font-size: .9rem; margin-bottom: var(--s-2); }
.field input:not([type=checkbox]):not([type=radio]), .field select, .field textarea {
  width: 100%; min-height: 48px; padding: var(--s-2) var(--s-3); font: inherit; color: inherit;
  background: #fff; border: 2px solid var(--c-border); border-radius: 10px;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--c-primary); outline: none; box-shadow: 0 0 0 3px var(--c-primary-soft); }
.field--invalid input, .field--invalid select, .field--invalid textarea { border-color: var(--c-danger); }
.field__error { color: var(--c-danger); font-weight: 600; margin: var(--s-1) 0 0; }

/* Calendar */
.chips { display: flex; flex-wrap: wrap; gap: var(--s-2); }

/* Booking forms */
.messages { margin-top: var(--s-4); }
.field-row { display: grid; gap: 0 var(--s-3); }
@media (min-width: 30rem) { .field-row { grid-template-columns: 1fr 1fr; } }
.field--check { display: grid; grid-template-columns: auto 1fr; gap: 0 var(--s-3); align-items: start; }
.field--check input { width: 24px; height: 24px; margin: 2px 0 0; accent-color: var(--c-primary); }
.field--check label { font-weight: 650; }
.field--check .field__help { grid-column: 2; margin: 0; }
.summary { display: flex; flex-wrap: wrap; gap: var(--s-1) var(--s-3); align-items: baseline; }
.summary__date { font-size: 1.15rem; font-weight: 700; }
.summary__date::first-letter { text-transform: uppercase; }
.summary__time { font-size: 1.15rem; color: var(--c-primary-dark); font-weight: 650; }
.quote__lines { display: grid; grid-template-columns: 1fr auto; gap: var(--s-1) var(--s-3); margin: 0 0 var(--s-4); }
.quote__lines dd { margin: 0; text-align: right; }
.quote__total { font-weight: 700; font-size: 1.15rem; border-top: 1px solid var(--c-border); padding-top: var(--s-2); }
.booking-form .btn[type=submit] { width: 100%; }
.multidate-cal { max-width: 100%; margin-bottom: var(--s-2); }
.multidate-cal__head { display: flex; align-items: center; justify-content: space-between; gap: var(--s-2); margin-bottom: var(--s-2); }
.multidate-cal__title { text-transform: capitalize; }
.multidate-cal__nav { min-width: 44px; min-height: 44px; padding: 0; }
.multidate-cal__grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; margin-bottom: var(--s-2); }
.multidate-cal__dow { text-align: center; font-size: .8rem; color: var(--c-muted); }
.multidate-cal__day { min-height: 44px; padding: 0; font: inherit; font-weight: 650; cursor: pointer; color: var(--c-primary-dark);
  background: var(--c-surface); border: 2px solid var(--c-border); border-radius: 10px; }
.multidate-cal__day:hover:not(:disabled) { background: var(--c-primary-soft); }
.multidate-cal__day[aria-pressed=true] { background: var(--c-primary); border-color: var(--c-primary); color: #fff; }
.multidate-cal__day:disabled { opacity: .35; cursor: not-allowed; }
.multidate-cal__day:focus-visible, .multidate-cal__nav:focus-visible { outline: 3px solid var(--c-primary); outline-offset: 2px; }
.multidate__list { list-style: none; padding: 0; margin: 0; }
.chip--removable { font: inherit; font-weight: 650; cursor: pointer; }

/* "Ma réservation" */
.booking-head { display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-3); align-items: center; }
.inline-form { display: inline; margin: 0; }
.chips .inline-form .chip { font: inherit; font-weight: 650; cursor: pointer; }
.qr { max-width: 220px; margin: 0 auto; background: #fff; padding: var(--s-2); border-radius: 8px; }
.qr svg { display: block; width: 100%; height: auto; }
.card h3 { font-size: 1.05rem; margin: var(--s-4) 0 var(--s-2); }

/* Back-office */
.bo-nav { display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-4); align-items: center; padding: var(--s-3) 0; border-bottom: 1px solid var(--c-border); }
.bo-nav a { text-decoration: none; font-weight: 650; min-height: 44px; display: inline-flex; align-items: center; }
.bo-nav__logout { font: inherit; background: none; border: 0; color: var(--c-primary-dark); cursor: pointer; min-height: 44px; text-decoration: underline; }
.bo-slots { list-style: none; padding: 0; margin: 0 0 var(--s-3); }
.bo-slots li { padding: var(--s-2) 0; border-bottom: 1px solid var(--c-border); }
.bo-search { margin: var(--s-4) 0; display: flex; flex-wrap: wrap; gap: var(--s-3); align-items: end; }
.bo-search .field { flex: 1 1 14rem; margin: 0; }
.bo-slottime { margin: var(--s-4) 0 var(--s-1); font-weight: 700; font-size: 1.1rem; }
.bcard { background: var(--c-surface); border: 1px solid var(--c-border); border-radius: 12px; padding: var(--s-4); margin-bottom: var(--s-3); }
.bcard__head { display: flex; flex-wrap: wrap; gap: var(--s-2) var(--s-3); align-items: center; }
.bcard__name { font-size: 1.2rem; }
.bcard__ref { color: var(--c-muted); font-size: .9rem; }
.bcard__facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); gap: var(--s-2) var(--s-4); margin: var(--s-3) 0; }
.bcard__facts dt { color: var(--c-muted); font-size: .85rem; }
.bcard__facts dd { margin: 0; font-weight: 600; }
.bcard__actions { display: flex; flex-wrap: wrap; gap: var(--s-3); }
.bcard__actions .btn { min-height: 52px; }
.badge--checked_in { background: var(--c-primary-soft); color: var(--c-primary-dark); }
.muted { color: var(--c-muted); }
.chip[aria-current] { background: var(--c-primary); color: #fff; }

/* Gift voucher, printable bon and back-office voucher pages */
.voucher { border: 3px double var(--c-primary); border-radius: var(--radius); background: var(--c-surface); padding: var(--s-5); text-align: center; }
.voucher__code { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 1.8rem; font-weight: 700; letter-spacing: .06em; word-break: break-all; }
.voucher__logo { display: block; width: 64px; height: 64px; max-width: 128px; margin: 0 auto var(--s-3); object-fit: contain; }
.voucher__qr { width: 160px; height: 160px; margin: var(--s-4) auto 0; }
.voucher__qr svg { width: 100%; height: 100%; }
.voucher__legal { font-weight: 700; }
.verify-unknown { color: var(--c-danger); font-size: 2rem; font-weight: 800; }
.code { font-family: ui-monospace, Menlo, Consolas, monospace; }
@media print {
  .site-header, .site-footer, .no-print, .messages, .bo-nav { display: none !important; }
  body { background: #fff; }
}

.stat-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(11rem, 1fr)); gap: var(--s-2); }
.stat { font-size: 2rem; font-weight: 700; margin: 0; }

/* Demo control panel */
.demo-grid { display: grid; gap: 0 var(--s-4); }
.demo-grid select, .demo-grid input { max-width: 100%; }
.demo-timeline { list-style: none; padding: 0; margin: 0; max-height: 28rem; overflow-y: auto; font-size: .92rem; }
.demo-timeline li { padding: var(--s-1) 0; border-bottom: 1px solid var(--c-border); }
.demo-timeline time { font-variant-numeric: tabular-nums; color: var(--c-muted); margin-right: var(--s-2); }
.demo-mail { width: 100%; min-height: 70vh; border: 1px solid var(--c-border); border-radius: 8px; background: #fff; }

/* Calendar windows */
.windows { list-style: none; padding: 0; margin: 0; }
.windows__row { display: flex; align-items: center; justify-content: space-between; gap: var(--s-3); padding: var(--s-2) 0; }
.windows__row + .windows__row { border-top: 1px solid var(--c-border); }
.windows__full { color: var(--c-muted); }

/* Back-office schedule */
.badge--ok { background: var(--c-confirmed-soft); color: var(--c-confirmed); }
.badge--short { background: var(--c-pending-soft); color: var(--c-pending); }
.badge--none { background: var(--c-danger-soft); color: var(--c-danger); }
.bcard__edit { margin-top: var(--s-3); }
.bcard__schedule { display: flex; flex-wrap: wrap; gap: var(--s-3); align-items: flex-end; margin-top: var(--s-2); }
.day-actions { display: flex; flex-wrap: wrap; gap: var(--s-3); align-items: flex-end; }

/* Group bookings */
.default-submit { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.passenger-remove { margin-top: var(--s-2); }
.windows__short { font-size: .9rem; text-align: right; }
.party-size select { max-width: 8rem; }
.badge--group { background: #e8edf2; color: var(--c-text); }
.bo-group { list-style: none; border-left: 3px solid var(--c-primary); padding-left: var(--s-2); margin: var(--s-2) 0; }
.bo-group > ul { padding-left: 0; list-style: none; }
.group-block { border-left: 3px solid var(--c-primary); padding-left: var(--s-2); margin-bottom: var(--s-3); }
.passengers { padding-left: 1.2rem; }
