/* ==========================================================================
   ARDOISE · Espace restaurant (admin/)
   Feuille autonome : polices, couleurs, mise en page, impression.
   Polices : Bodoni Moda et Albert Sans (SIL Open Font License), hébergées ici.
   ========================================================================== */
@font-face { font-family: 'Bodoni Moda'; src: url(../fonts/bodoni-moda.woff2) format('woff2'); font-weight: 400 700; font-style: normal; font-display: swap }
@font-face { font-family: 'Bodoni Moda'; src: url(../fonts/bodoni-moda-italic.woff2) format('woff2'); font-weight: 400 700; font-style: italic; font-display: swap }
@font-face { font-family: 'Albert Sans'; src: url(../fonts/albert-sans.woff2) format('woff2'); font-weight: 300 800; font-style: normal; font-display: swap }
@font-face { font-family: 'Albert Sans'; src: url(../fonts/albert-sans-italic.woff2) format('woff2'); font-weight: 300 800; font-style: italic; font-display: swap }

:root {
  --bg: #F4F1EA; --bg2: #EBE6DB; --surface: #FFFDF8; --ink: #1E1D1A; --muted: #6A665E; --line: #DED8CC; --line2: #C9C1B2;
  --field: #958E81; /* bordure des champs et des interrupteurs : contraste 3:1 sur le blanc */
  --accent: #8A6332; --accent-dark: #6F4F27; --accent-soft: #F1E8DB; /* bronze */
  --ok: #4F6B47; --ok-dark: #3F5639; --ok-soft: #E4EBDF; /* disponible, confirmée, en ligne */
  --new: #2F5F8A; --new-soft: #E3ECF5; /* demande de réservation à confirmer */
  --danger: #A3432B; --danger-dark: #86361F; --danger-soft: #F7E6E0;
  --warn: #85561A; --warn-soft: #F5E8CF;
  --walnut: #3E2B1F;
  --serif: 'Bodoni Moda', 'Didot', 'Bodoni 72', Georgia, 'Times New Roman', serif;
  --sans: 'Albert Sans', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  --r: 14px; --top-h: 56px; --nav-h: 64px; --side-w: 244px; --safe-b: env(safe-area-inset-bottom, 0px);
  --ease: cubic-bezier(.2, .7, .2, 1);
  color-scheme: light;
}
*, *::before, *::after { box-sizing: border-box }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100% }
body { margin: 0; min-height: 100vh; min-height: 100dvh; background: var(--bg); color: var(--ink); font: 400 16px/1.5 var(--sans); -webkit-font-smoothing: antialiased; overflow-x: hidden }
img, svg { display: block; max-width: 100% }
button, input, select, textarea { font: inherit; color: inherit }
a { color: inherit }
h1, h2, h3, p { margin: 0 }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px }
[tabindex="-1"]:focus { outline: none }
[hidden] { display: none !important }
.sr { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0 }
code { font: 500 .88em/1.4 ui-monospace, Menlo, Consolas, monospace; background: var(--bg2); padding: 1px 6px; border-radius: 6px; overflow-wrap: anywhere }
.muted { color: var(--muted) }
.boot { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 24px; color: var(--muted); font-size: 15px; text-align: center }

/* ---------- Boutons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 9px 18px; border: 1px solid var(--accent); border-radius: 10px; background: var(--accent); color: #fff; font: 600 15px/1.2 var(--sans); text-decoration: none; cursor: pointer; white-space: nowrap; -webkit-tap-highlight-color: transparent; transition: background-color .15s, border-color .15s, color .15s }
.btn:hover { background: var(--accent-dark); border-color: var(--accent-dark) }
.btn:disabled { opacity: .55; cursor: progress }
.btn svg { width: 18px; height: 18px; flex: none }
.btn.ghost { background: transparent; color: var(--ink); border-color: var(--line2) }
.btn.ghost:hover { background: var(--bg2); border-color: var(--field) }
.btn.ghost[aria-pressed="true"] { background: var(--ink); border-color: var(--ink); color: #fff }
.btn.danger { background: var(--danger); border-color: var(--danger); color: #fff }
.btn.danger:hover { background: var(--danger-dark); border-color: var(--danger-dark) }
.btn.ghost.danger { background: transparent; color: var(--danger); border-color: rgba(163, 67, 43, .45) }
.btn.ghost.danger:hover { background: var(--danger-soft) }
.btn.plein { width: 100% }
.lien { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 2px; border: 0; background: none; font: 600 15px/1.3 var(--sans); color: var(--accent-dark); text-decoration: none; text-underline-offset: 3px; cursor: pointer; justify-self: start }
.lien:hover { text-decoration: underline }
.lien svg { width: 18px; height: 18px; flex: none }
.lien.centre { justify-self: center }
.ico { width: 44px; height: 44px; flex: none; display: inline-grid; place-items: center; padding: 0; border: 0; border-radius: 10px; background: transparent; color: var(--muted); text-decoration: none; cursor: pointer; transition: background-color .15s, color .15s }
.ico:hover { background: var(--bg2); color: var(--ink) }
.ico:disabled { opacity: .28; cursor: default; background: transparent }
.ico svg { width: 20px; height: 20px }
.ico.danger:hover { background: var(--danger-soft); color: var(--danger) }

/* ---------- Champs ---------- */
.form { display: grid; gap: 18px }
.f { display: grid; gap: 6px; min-width: 0; margin: 0; padding: 0; border: 0; align-content: start }
.f > span, .f > legend, .f .lbl { padding: 0; font: 600 14.5px/1.35 var(--sans); color: var(--ink) }
.f > legend { margin-bottom: 6px }
.f small, .f > span small, .f > legend small { font-size: 13px; font-weight: 400; color: var(--muted) }
.f > span small, .f > legend small, .f .lbl small { margin-left: 4px }
input:not([type=checkbox]):not([type=range]):not([type=file]), select, textarea {
  display: block; width: 100%; min-height: 48px; padding: 11px 13px; border: 1px solid var(--field); border-radius: 10px; background: #fff;
  font: 400 16px/1.4 var(--sans); color: var(--ink); -webkit-appearance: none; appearance: none; transition: border-color .15s, box-shadow .15s
}
textarea { resize: vertical; line-height: 1.5; field-sizing: content; min-height: 4.2em }
select { background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' fill='none' stroke='%236A665E' stroke-width='1.6'%3E%3Cpath d='M1 1.5l5 5 5-5'/%3E%3C/svg%3E") no-repeat right 14px center; padding-right: 38px; cursor: pointer }
input[type=date], input[type=time] { min-width: 0 }
input::-webkit-date-and-time-value { text-align: left }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(138, 99, 50, .28) }
input::placeholder, textarea::placeholder { color: #8A8478; opacity: 1 }
.bad input:not([type=checkbox]), .bad textarea, .bad select, .svc.inverse input { border-color: var(--danger) }
.f-err { display: block; color: var(--danger); font-size: 13.5px; font-weight: 600; line-height: 1.4 }
.suf { position: relative; display: block }
.suf input { padding-right: 36px }
.suf em { position: absolute; right: 13px; top: 50%; transform: translateY(-50%); font-style: normal; color: var(--muted); pointer-events: none }
.row2 { display: grid; gap: 18px; grid-template-columns: minmax(0, 1fr) }
@media (min-width: 560px) { .row2 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) } }

/* interrupteur (case à cocher) */
.sw { position: relative; display: flex; align-items: center; gap: 12px; width: fit-content; max-width: 100%; min-height: 44px; cursor: pointer }
.sw input { position: absolute; left: 0; top: 50%; width: 1px; height: 1px; margin: 0; opacity: 0 }
.sw i { position: relative; flex: none; width: 46px; height: 28px; border-radius: 999px; background: var(--field); transition: background-color .2s }
.sw i::after { content: ''; position: absolute; left: 3px; top: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: transform .2s var(--ease) }
.sw input:checked + i { background: var(--accent) }
.sw input:checked + i::after { transform: translateX(18px) }
.sw input:focus-visible + i { outline: 2px solid var(--ink); outline-offset: 2px }
.sw > span { font-weight: 500; line-height: 1.35 }
.sw-sm { gap: 9px }
.sw-sm i { width: 40px; height: 24px }
.sw-sm i::after { width: 18px; height: 18px }
.sw-sm input:checked + i::after { transform: translateX(16px) }

/* pastilles à cocher (pictos, allergènes) */
.chips { display: flex; flex-wrap: wrap; gap: 8px }
.chip { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 8px 14px; border: 1px solid var(--line2); border-radius: 999px; background: #fff; font: 500 15px/1.2 var(--sans); color: var(--ink); cursor: pointer; transition: background-color .15s, border-color .15s, color .15s }
.chip:hover { border-color: var(--field) }
.chip svg { display: none; width: 16px; height: 16px; flex: none }
.chip[aria-pressed="true"] { background: var(--accent); border-color: var(--accent); color: #fff }
.chip[aria-pressed="true"] svg { display: block }

/* ---------- Écrans de connexion ---------- */
.gate { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; align-content: center; gap: 14px; padding: 32px 16px }
.gate-card { width: min(420px, 100%); display: grid; gap: 16px; padding: 28px 22px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface) }
.gate-nom { font: 700 13px/1.2 var(--sans); letter-spacing: .14em; text-transform: uppercase; color: var(--accent-dark) }
.gate h1 { font: 500 36px/1.08 var(--serif); letter-spacing: -.01em }
.gate .lead { font-size: 16px }
.gate .muted { font-size: 15px }
.gate .form { gap: 14px }
.msg { padding: 11px 13px; border-radius: 10px; background: var(--danger-soft); color: #6E2716; font-size: 14.5px; line-height: 1.45 }
.msg.ok { background: var(--ok-soft); color: var(--ink) }
.essai { display: grid; gap: 12px; padding-top: 18px; border-top: 1px solid var(--line) }
.essai p { font-size: 14.5px; color: var(--muted) }
.gate-back { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; color: var(--muted); font-size: 14.5px; font-weight: 600; text-decoration: none }
.gate-back:hover { color: var(--ink) }
.gate-back svg { width: 18px; height: 18px }

/* ---------- Le cadre (téléphone d'abord) ---------- */
.shell { min-height: 100vh; min-height: 100dvh }
.side { display: contents }
.top { position: sticky; top: 0; z-index: 30; height: var(--top-h); display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 0 6px 0 16px; background: var(--bg); border-bottom: 1px solid var(--line) }
.marque { display: grid; min-width: 0; text-decoration: none }
.marque b { font: 700 17px/1.2 var(--sans); white-space: nowrap; overflow: hidden; text-overflow: ellipsis }
.marque small { font-size: 12.5px; line-height: 1.2; color: var(--muted) }
.top-acts { display: flex; align-items: center; gap: 2px }
.top-a { position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-width: 44px; min-height: 44px; padding: 0 10px; border: 0; border-radius: 10px; background: none; color: var(--ink); font: 600 14.5px/1.2 var(--sans); text-decoration: none; cursor: pointer }
.top-a:hover { background: var(--bg2) }
.top-a svg { width: 21px; height: 21px; flex: none }
.top-a span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap }
.qui { display: none }
.tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); height: calc(var(--nav-h) + var(--safe-b)); padding-bottom: var(--safe-b); background: var(--surface); border-top: 1px solid var(--line) }
.tabs a { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-width: 0; color: var(--muted); font: 600 11.5px/1.15 var(--sans); text-decoration: none; -webkit-tap-highlight-color: transparent }
.tabs a svg { width: 24px; height: 24px; padding: 3px 14px; box-sizing: content-box; border-radius: 999px; transition: background-color .2s }
.tabs a[aria-current="page"] { color: var(--accent-dark) }
.tabs a[aria-current="page"] svg { background: var(--accent-soft) }
.tabs .tab-imprimer { display: none }
.tab-l { max-width: 100%; padding: 0 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap }
.tab-n { position: absolute; top: 5px; left: calc(50% + 7px); min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--danger); color: #fff; font: 700 12px/20px var(--sans); text-align: center }
.tab-dot { position: absolute; top: 7px; left: calc(50% + 11px); width: 10px; height: 10px; border-radius: 50%; background: var(--warn); box-shadow: 0 0 0 2px var(--surface) }
.col { min-width: 0 }
.demo { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0 16px; padding: 4px 16px; background: var(--accent-soft); font-size: 14px; line-height: 1.4 }
.demo p:first-child { padding: 6px 0 }
.demo b { color: var(--accent-dark) }
.demo-acts { display: flex; flex-wrap: wrap; gap: 0 18px }
.demo .lien { font-size: 14px; text-decoration: underline }
.main { display: flex; flex-direction: column; gap: 16px; max-width: 760px; margin: 0 auto; padding: 20px 16px calc(var(--nav-h) + var(--safe-b) + 32px) }
body.avec-barre .main { padding-bottom: calc(var(--nav-h) + var(--safe-b) + 150px) }
.main > * { min-width: 0 }
.page-hd { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; flex-wrap: wrap }
.page-hd h1 { font: 500 32px/1.08 var(--serif); letter-spacing: -.01em }
.page-sub { margin-top: 4px; color: var(--muted); font-size: 15px }

/* la barre d'enregistrement, quand il reste des modifications */
.savebar { position: fixed; left: 0; right: 0; bottom: calc(var(--nav-h) + var(--safe-b)); z-index: 35; padding: 10px 16px; background: var(--ink); color: #fff; box-shadow: 0 -8px 24px -12px rgba(0, 0, 0, .45); animation: monte .25s var(--ease) }
.savebar-in { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 14px; max-width: 760px; margin: 0 auto }
.sb-t { flex: 1 1 220px; font-size: 14px; line-height: 1.4 }
.sb-btns { display: flex; gap: 8px; margin-left: auto }
.savebar .btn { background: #fff; border-color: #fff; color: var(--ink) }
.savebar .btn:hover { background: var(--bg2); border-color: var(--bg2) }
.savebar .btn.ghost { background: transparent; border-color: rgba(255, 255, 255, .45); color: #fff }
.savebar .btn.ghost:hover { background: rgba(255, 255, 255, .12) }
.savebar :focus-visible { outline-color: #fff }
@keyframes monte { from { transform: translateY(100%); opacity: 0 } }

/* ---------- Cartes, messages ---------- */
.card { padding: 16px; border: 1px solid var(--line); border-radius: var(--r); background: var(--surface) }
.card h2 { font: 700 18px/1.3 var(--sans) }
.card-hd { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 8px 12px; margin-bottom: 14px }
.card > .aide { margin: -6px 0 14px }
.card-ft { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 14px; margin: 4px -16px -16px; padding: 12px 16px; border-top: 1px solid var(--line); border-radius: 0 0 var(--r) var(--r); background: var(--surface) }
.card-ft.collant { position: sticky; bottom: calc(var(--nav-h) + var(--safe-b)); z-index: 3 }
.ft-etat { font-size: 14px; color: var(--muted) }
.ft-etat.att { color: var(--warn); font-weight: 600 }
.ft-btns { display: flex; gap: 8px; margin-left: auto }
.pill { display: inline-flex; align-items: center; gap: 7px; padding: 5px 11px; border-radius: 999px; background: var(--bg2); color: var(--muted); font: 600 13px/1.2 var(--sans) }
.pill:empty { display: none }
.pill::before { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor }
.pill.ok { background: var(--ok-soft); color: var(--ok-dark) }
.pill.att { background: var(--warn-soft); color: var(--warn) }
.aide { color: var(--muted); font-size: 14.5px; line-height: 1.5 }
.aide.att { color: var(--warn); font-weight: 600 }
.aide a { color: var(--accent-dark); font-weight: 600 }
.note { padding: 12px 14px; border-radius: 10px; background: var(--accent-soft); font-size: 14.5px; line-height: 1.5 }
.note.att { background: var(--warn-soft); color: #5B3A0E }
.note-card { display: grid; gap: 10px; justify-items: start; background: var(--accent-soft); border-color: transparent }
.alerte { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 16px; padding: 12px 14px; border-radius: 10px; background: var(--warn-soft); color: #5B3A0E; font-size: 15px; line-height: 1.45 }
.alerte svg { width: 20px; height: 20px; flex: none; margin-top: 1px }
.vide { display: grid; justify-items: center; gap: 14px; padding: 36px 20px; border: 1px dashed var(--line2); border-radius: var(--r); color: var(--muted); text-align: center }
.charge { display: flex; align-items: center; gap: 10px; color: var(--muted) }
.spin { width: 22px; height: 22px; flex: none; border: 2px solid var(--line); border-top-color: var(--accent); border-radius: 50%; animation: tourne .8s linear infinite }
@keyframes tourne { to { transform: rotate(360deg) } }
.seg { display: inline-flex; align-self: flex-start; gap: 4px; padding: 4px; border-radius: 12px; background: var(--bg2) }
.seg button { min-height: 44px; padding: 0 16px; border: 0; border-radius: 9px; background: none; color: var(--muted); font: 600 15px/1.2 var(--sans); cursor: pointer }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: 0 1px 3px rgba(30, 29, 26, .16) }

/* ---------- Aujourd'hui ---------- */
.etat { display: grid; padding: 0; overflow: hidden }
.etat-site { padding: 16px }
.pastille { flex: none; width: 12px; height: 12px; border-radius: 50%; background: #A39C90 }
.pastille.on { background: var(--ok); box-shadow: 0 0 0 4px var(--ok-soft) }
.etiq { font: 700 12px/1.3 var(--sans); letter-spacing: .08em; text-transform: uppercase; color: var(--muted) }
.etat-txt { display: flex; align-items: center; gap: 10px; margin-top: 3px; font: 600 19px/1.3 var(--sans) }
.etat-motif { margin-top: 2px; color: var(--muted); font-size: 14.5px }
.etat-resa { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 14px 16px; border-top: 1px solid var(--line); text-decoration: none; transition: background-color .15s }
.etat-resa:hover { background: var(--bg) }
.etat-resa > span { display: grid; gap: 2px }
.etat-l { font-size: 15px }
.etat-l b { font-weight: 600 }
.a-confirmer { color: var(--new); font-weight: 600 }
.etat-resa > svg { width: 20px; height: 20px; flex: none; color: var(--muted) }
.prix-ls { display: grid; gap: 10px }
.prix-ls:empty { display: none }
.prix-l { display: grid; grid-template-columns: minmax(0, 1fr) 104px 44px; align-items: start; gap: 8px }
.prix-l > .ico { margin-top: 2px }
@media (max-width: 479px) {
  .prix-l { grid-template-columns: minmax(0, 1fr) 44px; gap: 6px 8px; padding-bottom: 10px; border-bottom: 1px solid var(--line) }
  .prix-l .prix-f { grid-column: 1; grid-row: 2; max-width: 150px }
  .prix-l > .ico { grid-column: 2; grid-row: 1 / span 2; align-self: center }
}
.photo { display: grid; justify-items: start; gap: 10px }
.photo-v { width: 100%; max-width: 320px; aspect-ratio: 4 / 3; overflow: hidden; border-radius: 12px; background: var(--bg2) }
.photo-v img { width: 100%; height: 100%; object-fit: cover }
.photo-acts { display: flex; flex-wrap: wrap; gap: 8px }
.photo > small { font-size: 13px; color: var(--muted); line-height: 1.45 }
.photo.charge { display: flex; min-height: 64px; font-size: 15px }
.fichier { position: relative }
.fichier:focus-within { outline: 2px solid var(--ink); outline-offset: 2px }
.disque { display: grid; place-items: center; width: 148px; height: 148px; border-radius: 50%; background: var(--walnut) }
.disque img { width: 80%; height: 80% }
.b-apercu { display: grid; gap: 6px }
.b-strip { display: flex; flex-wrap: wrap; justify-content: center; gap: 2px 10px; padding: 11px 14px; border-radius: 10px; background: #1B1612; color: #E9DCC6; font-size: 14px; line-height: 1.45; text-align: center }
.b-strip span { overflow-wrap: anywhere }
.b-strip u { color: #C6A06A; font-weight: 600; text-underline-offset: 4px }
.b-strip.eteint { opacity: .45 }
.b-apercu small { font-size: 13px; color: var(--muted) }

/* ---------- La carte et la cave ---------- */
.outils { display: flex; flex-wrap: wrap; gap: 8px }
.groupes { display: grid; gap: 16px }
.grp { padding: 0; overflow: hidden }
.grp-hd { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 58px; padding: 8px 10px 8px 16px; border-bottom: 1px solid var(--line) }
.grp-hd h2 { font: 700 17px/1.3 var(--sans) }
.grp-n { padding-right: 6px; color: var(--muted); font-size: 14px; white-space: nowrap }
.grp-nom { flex: 1 1 auto }
.ord { display: flex; flex: none; gap: 2px }
.items { margin: 0; padding: 0; list-style: none }
.item { display: flex; align-items: center; gap: 4px; padding: 4px 8px 4px 4px; border-bottom: 1px solid var(--line) }
.item:last-child { border-bottom: 0 }
.item-o { flex: 1 1 auto; display: flex; align-items: center; gap: 12px; min-width: 0; min-height: 60px; padding: 6px 8px; border: 0; border-radius: 10px; background: none; text-align: left; cursor: pointer; transition: background-color .15s }
.item-o:hover { background: var(--bg) }
/* l'aperçu de l'ardoise : la page du site, dans un cadre */
.a-apercu { border: 1px solid var(--line); border-radius: 12px; background: var(--bg2); overflow: hidden }
.a-apercu summary { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; padding: 12px 14px; cursor: pointer; list-style: none }
.a-apercu summary::-webkit-details-marker { display: none }
.a-apercu summary::after { content: ''; margin-left: auto; width: 8px; height: 8px; border-right: 1.5px solid var(--muted); border-bottom: 1.5px solid var(--muted); transform: rotate(45deg) translateY(-3px); transition: transform .3s var(--ease) }
.a-apercu[open] summary::after { transform: rotate(-135deg) translateY(-3px) }
.a-apercu summary small { color: var(--muted); font-size: .82rem }
.a-apercu .lbl { font: 600 14.5px/1.35 var(--sans); color: var(--ink) }
.a-ecran { padding: 0 10px 10px }
.a-ecran iframe { display: block; width: 100%; height: 520px; border: 0; border-radius: 8px; background: #F2EBE0 }
.vign { position: relative; flex: none; display: grid; place-items: center; width: 48px; height: 48px; overflow: hidden; border-radius: 10px; background: var(--bg2); color: #ADA699 }
.vign svg { width: 24px; height: 24px }
.vign img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover }
.vign:has(img) { border-radius: 50% } /* l'assiette vue de dessus est un disque */
.item-t { display: grid; gap: 2px; min-width: 0 }
.item-t b { font-size: 16px; font-weight: 600; line-height: 1.3; overflow-wrap: anywhere }
.item-s { display: flex; align-items: baseline; gap: 8px; min-width: 0; overflow: hidden; color: var(--muted); font-size: 14px; white-space: nowrap }
.item-s em { flex: none; font-style: normal; font-weight: 600; color: var(--ink) }
.item-s span { min-width: 0; overflow: hidden; text-overflow: ellipsis }
.item-s .tag-table { flex: none; padding: 1px 8px; border-radius: 999px; background: var(--walnut); color: #F2E6D6; font-size: 12px; font-weight: 600; line-height: 1.5 }
.item.off .item-t b { color: var(--muted) }
.item.off .vign { opacity: .5 }
.dispo { flex: none; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; width: 78px; min-height: 56px; padding: 4px 0; border: 0; border-radius: 10px; background: none; color: var(--ok-dark); font: 700 12px/1.1 var(--sans); cursor: pointer }
.dispo:hover { background: var(--bg) }
.dispo i { position: relative; width: 42px; height: 24px; border-radius: 999px; background: var(--ok); transition: background-color .2s }
.dispo i::after { content: ''; position: absolute; left: 3px; top: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .25); transform: translateX(18px); transition: transform .2s var(--ease) }
.dispo[aria-checked="false"] { color: var(--danger) }
.dispo[aria-checked="false"] i { background: var(--danger) }
.dispo[aria-checked="false"] i::after { transform: none }
.ajout { display: flex; align-items: center; gap: 8px; width: 100%; min-height: 52px; padding: 0 16px; border: 0; border-top: 1px dashed var(--line2); background: none; color: var(--accent-dark); font: 600 15px/1.2 var(--sans); text-align: left; cursor: pointer }
.ajout:hover { background: var(--bg) }
.ajout svg { width: 20px; height: 20px }
.grp-vide { padding: 14px 16px; color: var(--muted); font-size: 14.5px }
@media (min-width: 640px) {
  .dispo { flex-direction: row; justify-content: flex-start; gap: 10px; width: auto; min-width: 132px; padding: 0 10px; font-size: 14px }
}

/* ---------- Fenêtres ---------- */
dialog { max-width: calc(100vw - 32px); padding: 0; border: 0; background: var(--surface); color: var(--ink) }
dialog::backdrop { background: rgba(30, 29, 26, .5) }
.dlg { width: min(440px, calc(100vw - 32px)); border-radius: 16px; box-shadow: 0 24px 60px -20px rgba(0, 0, 0, .45); animation: apparait .2s var(--ease) }
.dlg-in { display: grid; gap: 12px; padding: 22px 20px 18px }
.dlg h2 { font: 700 19px/1.3 var(--sans) }
.dlg-in > p { color: var(--muted); font-size: 15px; line-height: 1.5 }
.dlg-btns { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; margin-top: 8px }
.sheet { width: 100%; max-width: 100%; max-height: 94dvh; margin: auto 0 0; border-radius: 18px 18px 0 0; box-shadow: 0 -12px 40px -16px rgba(0, 0, 0, .4); animation: glisse .28s var(--ease) }
.sheet-in { display: flex; flex-direction: column; max-height: 94dvh }
.sheet-hd { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 8px 8px 18px; border-bottom: 1px solid var(--line) }
.sheet-hd h2 { font: 700 18px/1.3 var(--sans) }
.sheet-bd { display: grid; gap: 20px; padding: 18px; overflow-y: auto; overscroll-behavior: contain }
.sheet-ft { display: flex; gap: 8px; padding: 12px 18px calc(12px + var(--safe-b)); border-top: 1px solid var(--line); background: var(--surface) }
.sheet-ft .btn { flex: 1 1 0 }
.sheet-suppr { padding-top: 6px; border-top: 1px solid var(--line) }
.sheet-suppr .btn { margin-top: 12px }
.table-bloc { padding: 14px; border: 1px solid var(--line) !important; border-radius: 12px; background: var(--bg); gap: 10px }
.table-bloc > legend { padding: 0 6px; margin: 0 0 0 -6px; background: var(--bg); border-radius: 6px }
@keyframes apparait { from { opacity: 0; transform: translateY(8px) } }
@keyframes glisse { from { transform: translateY(40px); opacity: 0 } }
@media (min-width: 640px) {
  .sheet { width: min(600px, calc(100vw - 48px)); max-height: 88dvh; margin: auto; border-radius: 16px; box-shadow: 0 24px 60px -20px rgba(0, 0, 0, .45) }
  .sheet-in { max-height: 88dvh }
  .sheet-ft { justify-content: flex-end; padding-bottom: 12px }
  .sheet-ft .btn { flex: none; min-width: 120px }
}
/* détourage de l'assiette */
.detour { width: min(500px, calc(100vw - 16px)); max-width: calc(100vw - 16px) }
.detour .dlg-in { padding: 18px 16px 16px }
.scene { position: relative; width: 100%; max-width: 440px; aspect-ratio: 1; margin: 0 auto; overflow: hidden; border-radius: 12px; background: #2A2622; touch-action: none; cursor: grab; user-select: none; -webkit-user-select: none }
.scene.prise { cursor: grabbing }
.scene canvas { position: absolute; inset: 0; width: 100%; height: 100% }
.masque { position: absolute; left: 7%; top: 7%; width: 86%; height: 86%; border-radius: 50%; box-shadow: 0 0 0 100vmax rgba(20, 18, 16, .62); outline: 2px solid rgba(255, 255, 255, .9); pointer-events: none }
.scene:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px }
.zoom input { width: 100%; min-height: 44px; margin: 0; accent-color: var(--accent); cursor: pointer }
.zoom input:focus { box-shadow: none }
.zoom input:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; border-radius: 6px }

/* ---------- Horaires ---------- */
.h-cols { display: grid; gap: 16px }
.h-form { display: grid; gap: 16px; min-width: 0 }
.h-form .card > .aide { margin: 4px 0 6px }
.jours { display: grid }
.jour { display: grid; gap: 8px; padding: 12px 0; border-top: 1px solid var(--line) }
.jour:first-child { border-top: 0 }
.jour-hd { display: flex; align-items: center; justify-content: space-between; gap: 12px }
.jour-hd b { font-size: 16px; font-weight: 600 }
.svcs { display: grid; gap: 8px; justify-items: start }
.svcs > p { font-size: 14.5px }
.svc { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr) 44px; align-items: center; gap: 6px; width: 100%; max-width: 360px }
.svc label { min-width: 0 }
.svc input { padding-left: 10px; padding-right: 6px }
.svc-a { color: var(--muted); font-size: 14.5px }
.svc .f-err { grid-column: 1 / -1 }
.ferms { display: grid; gap: 12px; margin: 12px 0 14px }
.ferms > p { font-size: 14.5px }
.ferm { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 44px; align-items: end; gap: 10px; padding: 12px; border-radius: 12px; background: var(--bg) }
.ferm-m { grid-column: 1 / 3 }
.ferm > .ico { grid-column: 3; grid-row: 1 / span 2; align-self: center }
.h-apercu { display: grid; align-content: start; gap: 6px }
.h-apercu h2.etiq { font: 700 12px/1.3 var(--sans); letter-spacing: .08em }
.h-apercu .etat-txt { margin-bottom: 12px }
.semaine { display: grid; margin: 0; padding: 0; list-style: none }
.semaine li { display: flex; justify-content: space-between; gap: 12px; padding: 7px 0; border-top: 1px solid var(--line); font-size: 14.5px }
.semaine li span { color: var(--muted) }
.semaine li b { font-weight: 600; text-align: right }
@media (min-width: 720px) {
  .ferm { grid-template-columns: 170px 170px minmax(0, 1fr) 44px }
  .ferm-m { grid-column: auto }
  .ferm > .ico { grid-column: auto; grid-row: auto; align-self: end; margin-bottom: 2px }
}

/* ---------- Réservations ---------- */
.rgpd { display: grid; justify-items: start; gap: 6px }
.r-liste { display: grid; gap: 26px }
.r-jour h2 { display: flex; flex-wrap: wrap; align-items: baseline; gap: 2px 12px; margin-bottom: 10px; font: 700 18px/1.3 var(--sans) }
.r-jour h2 small { color: var(--muted); font-size: 14px; font-weight: 500 }
.r-jour h2 small b { color: var(--new); font-weight: 700 }
.resas { display: grid; gap: 10px; margin: 0; padding: 0; list-style: none }
.resa { display: grid; gap: 6px; padding: 12px 12px 10px 14px; border: 1px solid var(--line); border-left: 4px solid var(--line2); border-radius: 12px; background: var(--surface) }
.resa.s-nouvelle { border-left-color: var(--new) }
.resa.s-confirmee { border-left-color: var(--ok) }
.resa.s-annulee { background: #FAF8F3 }
.resa.s-annulee .resa-h, .resa.s-annulee .resa-nom { color: var(--muted); text-decoration: line-through; text-decoration-thickness: 1px }
.resa-l1 { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px }
.resa-h { font: 700 20px/1.2 var(--sans) }
.resa-c { font-size: 15px; font-weight: 600 }
.st { margin-left: auto; padding: 3px 10px; border-radius: 999px; font: 700 12.5px/1.4 var(--sans) }
.st-nouvelle { background: var(--new-soft); color: var(--new) }
.st-confirmee { background: var(--ok-soft); color: var(--ok-dark) }
.st-annulee { background: var(--danger-soft); color: var(--danger) }
.resa-nom { font-size: 16.5px; font-weight: 600; overflow-wrap: anywhere }
.resa-msg { padding: 8px 10px; border-radius: 8px; background: var(--bg); font-size: 15px; line-height: 1.45; overflow-wrap: anywhere }
.resa-msg.allergie { background: var(--danger-soft) }
.resa-alerte { display: inline-flex; align-items: center; gap: 4px; margin-right: 8px; color: var(--danger); font-size: 13.5px; font-weight: 700; vertical-align: 1px }
.resa-alerte svg { width: 16px; height: 16px }
.resa-note { font-size: 14.5px }
.resa-coord { display: flex; flex-wrap: wrap; gap: 0 14px; color: var(--muted); font-size: 14.5px; overflow-wrap: anywhere }
.resa-acts { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding-top: 4px }
.resa-acts > .btn { padding: 9px 14px }
.resa-ico { display: flex; gap: 2px; margin-left: auto }
.resa-recue { color: var(--muted); font-size: 12.5px }

/* ---------- Imprimer ---------- */
.imp-outils { display: grid; gap: 10px }
.imp-btns { display: flex; flex-wrap: wrap; gap: 8px }
.apercu-imp { position: relative; overflow: hidden }
.feuille { width: 210mm; background: #fff; color: #1E1D1A; transform-origin: 0 0; box-shadow: 0 1px 2px rgba(30, 29, 26, .08), 0 10px 30px -14px rgba(30, 29, 26, .35); -webkit-print-color-adjust: exact; print-color-adjust: exact }
.qr svg { width: 100%; height: 100% }
.f-menu { display: flex; flex-direction: column; height: 297mm; padding: 15mm 15mm 11mm; font: 400 var(--fs, 10.5pt)/1.36 var(--sans) }
.f-menu.mesure { height: auto !important; min-height: 0 !important }
.f-menu.long { height: auto; min-height: 297mm }
.fm-hd { margin-bottom: 6mm; padding-bottom: 5mm; border-bottom: .3mm solid #1E1D1A; text-align: center }
.fm-nom { font: 500 3em/1 var(--serif); letter-spacing: -.01em }
.fm-type { margin-top: 2.2mm; color: #6A665E; font-size: .88em; letter-spacing: .14em; text-transform: uppercase }
.fm-cols { columns: 2; column-gap: 11mm }
.fm-cat { margin: 0 0 5mm }
.fm-cat h2 { margin-bottom: 2.4mm; color: #8A6332; font: italic 500 1.5em/1.15 var(--serif); break-after: avoid }
.fm-plat { margin-bottom: 2.6mm; break-inside: avoid }
.fm-l { display: flex; align-items: baseline; gap: 1.6mm }
.fm-l b { font-weight: 600 }
.fm-pt { flex: 1 1 4mm; min-width: 4mm; border-bottom: .25mm dotted #8F887C; transform: translateY(-.7mm) }
.fm-prix { font-weight: 600; white-space: nowrap }
.fm-d { margin-top: .5mm; color: #3F3C36 }
.fm-a { margin-top: .5mm; color: #6A665E; font-size: .82em }
.fm-vide { color: #6A665E }
.fm-ft { display: flex; align-items: flex-end; gap: 7mm; margin-top: auto; padding-top: 4mm; border-top: .3mm solid #DED8CC; color: #3F3C36; font-size: .8em }
.fm-leg { flex: 1; display: grid; gap: 1.2mm }
.fm-adr { color: #6A665E }
.fm-qr { flex: none; width: 30mm; font-size: .92em; line-height: 1.25; text-align: center }
.fm-qr .qr { width: 25mm; height: 25mm; margin: 0 auto 1.6mm }
.f-tables { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; height: 297mm }
.tc { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 10mm; border: .25mm dashed #C9C1B2; text-align: center }
.tc-nom { font: 500 26pt/1 var(--serif) }
.tc-t { margin: 6mm 0 7mm; font: 600 13pt/1.3 var(--sans) }
.tc .qr { width: 50mm; height: 50mm }
.tc-s { margin-top: 6mm; color: #6A665E; font: 400 9pt/1.4 var(--sans) }

/* ---------- Petit message en bas de l'écran ---------- */
.toast { position: fixed; left: 50%; bottom: calc(var(--nav-h) + var(--safe-b) + 16px); z-index: 200; width: max-content; max-width: calc(100vw - 32px); padding: 12px 18px; border-radius: 12px; background: var(--ink); color: #fff; font: 500 15px/1.4 var(--sans); text-align: center; box-shadow: 0 12px 30px -12px rgba(0, 0, 0, .5); opacity: 0; transform: translate(-50%, 16px); pointer-events: none; transition: opacity .25s, transform .25s var(--ease) }
.toast.on { opacity: 1; transform: translate(-50%, 0) }
.toast.err { background: var(--danger) }
body.avec-barre .toast { bottom: calc(var(--nav-h) + var(--safe-b) + 104px) }
dialog .toast { top: calc(12px + env(safe-area-inset-top, 0px)); bottom: auto }
img.casse { visibility: hidden }

/* ---------- Grand écran : les rubriques passent dans une colonne à gauche ---------- */
@media (min-width: 900px) {
  :root { --nav-h: 0px }
  .shell { display: grid; grid-template-columns: var(--side-w) minmax(0, 1fr) }
  .side { position: sticky; top: 0; display: flex; flex-direction: column; height: 100vh; height: 100dvh; padding: 22px 14px 16px; overflow-y: auto; border-right: 1px solid var(--line); background: var(--surface) }
  .top { display: contents }
  .marque { order: 0; padding: 0 12px 24px }
  .marque b { font-size: 19px }
  .tabs { order: 1; position: static; display: flex; flex-direction: column; gap: 2px; height: auto; padding: 0; border: 0; background: none }
  .tabs a { flex-direction: row; justify-content: flex-start; gap: 12px; min-height: 46px; padding: 0 12px; border-radius: 10px; color: var(--ink); font-size: 15px }
  .tabs a svg { width: 22px; height: 22px; padding: 0; background: none !important }
  .tabs a:hover { background: var(--bg2) }
  .tabs a[aria-current="page"] { background: var(--accent-soft); color: var(--accent-dark) }
  .tabs .tab-imprimer { display: flex }
  .tab-n { position: static; margin-left: auto }
  .tab-dot { position: static; margin-left: auto; box-shadow: none }
  .top-acts { order: 2; flex-direction: column; align-items: stretch; gap: 2px; margin-top: auto; padding-top: 14px; border-top: 1px solid var(--line) }
  .top-a { justify-content: flex-start; padding: 0 12px; color: var(--muted) }
  .top-a:hover { color: var(--ink) }
  .top-a span { position: static; width: auto; height: auto; overflow: visible; clip: auto }
  .qui { display: block; padding: 0 12px 8px; overflow: hidden; color: var(--muted); font-size: 13px; text-overflow: ellipsis; white-space: nowrap }
  .demo { padding: 4px 40px }
  .main { max-width: 840px; padding: 36px 40px 64px }
  .m-imprimer { max-width: 960px }
  body.avec-barre .main { padding-bottom: 130px }
  .page-hd h1 { font-size: 40px }
  .card { padding: 22px 24px }
  .card-ft { margin: 6px -24px -22px; padding: 14px 24px }
  .savebar { left: var(--side-w); padding: 12px 40px }
  .savebar-in { max-width: 760px }
}
@media (min-width: 1180px) {
  .m-horaires { max-width: 1120px }
  .h-cols { grid-template-columns: minmax(0, 1fr) 320px; align-items: start }
  .h-apercu { position: sticky; top: 24px }
}

/* ---------- Mouvements réduits ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important }
}

/* ---------- Impression : seule la feuille sort ---------- */
@page { size: A4 portrait; margin: 0 }
@media print {
  html, body { min-height: 0; background: #fff !important }
  .side, .top, .tabs, .demo, .savebar, .toast, dialog { display: none !important }
  .shell { display: block !important; min-height: 0 }
  .main { display: block !important; max-width: none !important; margin: 0 !important; padding: 0 !important }
  body[data-section="imprimer"] .main > :not(#apercu) { display: none !important }
  #apercu { height: auto !important; overflow: visible !important }
  .feuille { transform: none !important; box-shadow: none !important }
  .f-menu:not(.long), .f-tables { height: 296.5mm }
}
