:root {
  --cream: #fcf8f0;
  --paper: #fffdf8;
  --ink: #352825;
  --muted: #565e50;
  --red: #8d473e;
  --line: #ded8cb;
  --brick: #713d38;
  --heading: Georgia, serif;
  --sans: system-ui, sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--cream); color: var(--ink); font: 1rem/1.55 var(--sans); }
a { color: inherit; text-underline-offset: .24em; }
a:hover { text-decoration-thickness: .14em; }
button, input, select, textarea { font: inherit; }
button, summary { cursor: pointer; }
button:disabled { opacity: .55; cursor: not-allowed; }
:focus-visible { outline: 3px solid #b26a26; outline-offset: 3px; }
header, footer {
  display: flex;
  gap: 1.5rem;
  justify-content: space-between;
  align-items: center;
  padding: 1.2rem max(5vw, calc((100vw - 83rem) / 2));
}
header { background: var(--paper); border-bottom: 1px solid var(--line); }
nav { display: flex; flex-wrap: wrap; column-gap: 1.5rem; row-gap: .35rem; align-items: center; }
nav a { font-size: .9rem; font-weight: 650; text-decoration: none; padding-block: .55rem; }
nav a[aria-current=page]:not(.btn), nav a:hover:not(.btn) { color: var(--red); text-decoration: underline; }
.brand { font: bold clamp(1.25rem, 3vw, 1.8rem)/1.1 var(--heading); text-decoration: none; }
.brand small { display: block; font: 600 .875rem/1.3 var(--sans); margin-top: .32rem; }
.btn, .add, .config-actions button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: .6rem 1rem;
  text-decoration: none;
  border: 1px solid transparent;
  border-radius: .4rem;
  background: var(--red);
  color: white;
  font-size: .9rem;
  font-weight: 700;
}
.btn:hover:not(:disabled), .add:hover { filter: brightness(.9); }
.secondary, .config-actions button[type=button], .order-actions .btn.secondary {
  background: transparent;
  border-color: currentColor;
  color: inherit;
}
main > section, .home-details { padding: clamp(2.2rem, 6vw, 5rem) 0; width: min(90%, 76rem); margin-inline: auto; }
h1, h2, h3 { font-family: var(--heading); line-height: 1.12; margin: 0 0 .65em; }
h1 { font-size: clamp(2.5rem, 6vw, 4.5rem); letter-spacing: -.045em; }
h2 { font-size: clamp(1.8rem, 4.5vw, 3rem); letter-spacing: -.035em; }
h3 { font-size: 1.4rem; overflow-wrap: anywhere; }
p { margin: 0 0 1em; }
.eyebrow, .kind { color: var(--red); font-size: .875rem; font-weight: 750; }
.hero {
  display: grid;
  grid-template-columns: minmax(0, .92fr) minmax(0, 1.08fr);
  width: auto;
  padding: 0;
  background: var(--brick);
  color: #fff9ee;
}
.hero-copy { padding: clamp(2.1rem, 6vw, 7rem) max(1.35rem, 5vw); align-self: center; }
.hero h1 { font-size: clamp(3rem, 7vw, 7rem); margin: .25em 0; }
.hero .eyebrow, .opening { color: #f0c992; }
.hero-photo { min-height: 28rem; background: #3a3226; }
.hero-actions { display: flex; flex-wrap: wrap; gap: .75rem; margin-block: 1.5rem; }
.opening { margin: 0; font-size: .9rem; }
.home-details, .visit, .loyalty, .account-grid, .order-layout { display: grid; gap: clamp(1rem, 4vw, 3rem); grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
.featured { list-style: none; padding: 0; margin: 0; }
.featured li { padding: .8rem 0; border-top: 1px solid var(--line); }
.featured a { display: block; font-weight: 750; color: var(--red); }
.featured span, .notice, .cart-desc, .order-help { color: var(--muted); font-size: .9rem; }
.section-head { display: flex; align-items: start; justify-content: space-between; gap: 1rem; }
.section-head p { max-width: 32rem; }
.filters { display: flex; flex-wrap: wrap; gap: .5rem; margin: 1rem 0 1.5rem; }
.filters button {
  min-height: 44px;
  color: var(--ink);
  background: transparent;
  border: 1px solid var(--line);
  padding: .5rem .85rem;
  border-radius: 2rem;
  font-size: .9rem;
}
.filters button[aria-pressed=true] { color: white; background: var(--brick); border-color: var(--brick); }
.menu-search { display: block; max-width: 26rem; font-weight: 650; }
.menu-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; margin-bottom: 1.5rem; }
.dish, .order-box { background: var(--paper); border: 1px solid var(--line); border-radius: .65rem; padding: clamp(1rem, 2.4vw, 1.65rem); min-width: 0; }
.dish { display: flex; flex-direction: column; align-items: start; }
.dish h3 { margin: .4rem 0; }
.dish p { color: var(--muted); }
.dish .price { margin-top: auto; font-size: 1.12rem; font-weight: 750; }
.dish .add { margin-top: .7rem; }
.status-note, .personalization-rule, .loyal-status { background: #eee8dc; padding: .75rem 1rem; border-radius: .4rem; margin-bottom: 1.2rem; }
.cart-link { margin: 0 5% 2rem; }
label { font-weight: 650; }
.order-box label, #config-dialog label { display: block; margin-top: .8rem; }
input:not([type=checkbox]), select, textarea {
  display: block;
  width: 100%;
  min-height: 44px;
  padding: .55rem .7rem;
  margin: .35rem 0 .65rem;
  border: 1px solid #aaa99d;
  border-radius: .35rem;
  color: var(--ink);
  background: white;
}
.cart-row, .cart-total, .hours, .balance-row { display: flex; justify-content: space-between; gap: .75rem; padding: .65rem 0; border-bottom: 1px solid var(--line); }
.cart-total { font-weight: 750; margin-bottom: .75rem; }
.cart-desc, .delivery-banner small { display: block; }
.cart-row button { min-width: 36px; min-height: 36px; background: var(--cream); border: 1px solid var(--line); border-radius: .35rem; }
.contact { margin-top: 1rem; overflow-wrap: anywhere; }
details { border-bottom: 1px solid var(--line); padding-block: 1rem; }
details p { margin: .75rem 0 0; color: var(--muted); }
.loyal-card { background: var(--brick); color: #fff9ee; padding: 1.5rem; border-radius: .65rem; }
.loyal-card .eyebrow { color: #f0c992; }
.loyal-tabs, .config-actions, .order-actions { display: flex; flex-wrap: wrap; gap: .6rem; margin: 1rem 0; }
.loyal-tabs button { padding: .45rem .7rem; min-height: 44px; background: transparent; border: 1px solid var(--line); border-radius: .35rem; }
.loyal-tabs button[aria-pressed=true] { background: var(--brick); color: white; }
.stamps { display: grid; grid-template-columns: repeat(5, 1fr); gap: .6rem; margin-block: 1rem; }
.stamp { display: grid; place-items: center; aspect-ratio: 1; border: 1px solid #fff9ee80; border-radius: 50%; }
footer { background: var(--brick); color: #fff9ee; }
footer button { background: transparent; color: inherit; border: 0; padding: .3rem 0; text-decoration: underline; }
dialog { width: min(92vw, 39rem); max-height: 88vh; overflow: auto; color: var(--ink); background: var(--paper); padding: clamp(1rem, 3vw, 2rem); border: 1px solid var(--line); border-radius: .65rem; }
dialog::backdrop { background: #281817bb; }
fieldset { min-width: 0; margin: .8rem 0; border: 1px solid var(--line); border-radius: .35rem; }
#config-dialog fieldset label { display: flex; align-items: baseline; gap: .55rem; margin-block: .4rem; }
.config-error { color: var(--red); }
.disabled-pay { width: 100%; margin-top: .75rem; }
.order-filters { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 1rem; }
#admin-orders { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin: 1rem 0; }
.order-card-head { border-bottom: 1px solid var(--line); padding-bottom: .75rem; margin-bottom: .75rem; }
.order-card-head h3 { margin: .35rem 0; }
.order-card-meta { color: var(--muted); font-size: .9rem; }
.order-items { padding-left: 1.25rem; overflow-wrap: anywhere; }
.order-items li { margin-bottom: .4rem; }
.order-actions { margin-bottom: 0; }
@media (max-width: 820px) {
  header { flex-wrap: wrap; gap: .4rem; }
  nav { column-gap: 1rem; }
  .menu-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .hero-photo { min-height: 23rem; }
}
@media (max-width: 580px) {
  .hero, .home-details, .visit, .loyalty, .account-grid, .order-layout, .menu-grid, .order-filters, #admin-orders { grid-template-columns: minmax(0, 1fr); }
  .hero-photo { min-height: 15rem; }
  .section-head { flex-wrap: wrap; }
  .filters { gap: .35rem; }
  footer { align-items: start; flex-direction: column; }
}
/* Administration */
.staff { background: #f5eeea; }
.staff header { background: #61312e; color: #fffdf6; border-bottom: 0; }
.staff nav a[aria-current=page]:not(.btn), .staff nav a:hover:not(.btn) { color: #fed49d; }
.staff h1 { font-size: clamp(2.4rem, 5vw, 3.8rem); }
.management-grid, .finance-summary { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin-bottom: 1.25rem; }
.finance-summary { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.finance-summary strong { display: block; font-size: clamp(1.3rem, 2.4vw, 2rem); margin-top: .5rem; }
.editor-row {
  display: grid; grid-template-columns: minmax(0, 3fr) repeat(2, minmax(0, 1fr));
  align-items: center; gap: .75rem; border-top: 1px solid var(--line); padding: .5rem 0;
}
.editor-row label { font-size: .9rem; }
#hours-editor .editor-row { grid-template-columns: minmax(0, 1fr) repeat(2, minmax(0, 1.5fr)); }
.staff fieldset { margin: 0; }
.staff legend { font-weight: 750; padding: 0 .4rem; }
.staff input[type=checkbox] { width: 1.1rem; height: 1.1rem; margin: .55rem; vertical-align: middle; accent-color: var(--brick); }
.save-bar { position: sticky; bottom: 0; padding: .75rem 0; background: #f5eeeaf0; }
.period-buttons { display: flex; flex-wrap: wrap; align-items: center; gap: .5rem; }
#ledger details { margin-bottom: 1.8rem; }
#ledger details summary { font-weight: 750; padding: .4rem 0; }
.table-wrap { overflow-x: auto; margin-bottom: 2rem; }
.journal { width: 100%; background: var(--paper); border-collapse: collapse; text-align: left; }
.journal th, .journal td { padding: .8rem; border-bottom: 1px solid var(--line); }
.journal th { background: var(--brick); color: white; }
.journal td:nth-child(4) { overflow-wrap: anywhere; min-width: 9rem; }
.journal td:nth-last-child(-n+2) { white-space: nowrap; }
.service-hours { display: grid; grid-template-columns: max-content 1fr; gap: .45rem .8rem; }
.service-hours dt { font-weight: 700; }
.service-hours dd { margin: 0; }
@media (max-width: 760px) {
  .management-grid { grid-template-columns: minmax(0, 1fr); }
  .finance-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .editor-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .editor-row > strong { grid-column: 1 / -1; }
  #hours-editor .editor-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
.hero { background: #61312e; }
.hero-copy { padding-inline: max(5vw, calc((100vw - 83rem) / 2)); }
.hero h1 { font-size: clamp(3rem, 7.3vw, 7.5rem); letter-spacing: -.07em; }
.hero .hero-location { font-size: 1.15rem; font-weight: 650; color: #fee1aa; }
.hero .btn:not(.secondary) { background: #f3d09d; color: #512d29; }
.hero-photo { min-height: clamp(27rem, 42vw, 45rem); }
.home-details { grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); align-items: stretch; }
.home-menu { padding-block: 1.25rem; }
.home-menu .featured li { display: grid; grid-template-columns: minmax(6.5rem, .45fr) 1fr; gap: .85rem; }
.home-visit { padding: clamp(1.25rem, 3.75vw, 3rem); color: #fff9ee; background: var(--brick); border-radius: .65rem; }
.home-visit address { font-style: normal; font-weight: 700; margin-bottom: 1rem; }
.home-visit .btn { color: var(--ink); background: #f3d09d; }
.staff .section-head { align-items: center; }
@media (max-width: 760px) {
  .hero { grid-template-columns: minmax(0, 1fr); }
  .hero-photo { min-height: clamp(14rem, 70vw, 23rem); }
  .home-details { grid-template-columns: minmax(0, 1fr); }
}

.hero-photo { margin: 0; position: relative; overflow: hidden; }
.hero-photo img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.hero-photo figcaption { position: absolute; right: 1rem; bottom: 1rem; background: #61312eea; color: white; border-radius: .25rem; padding: .45rem .65rem; font-size: .85rem; }
#finance-details { margin-bottom: 1.5rem; }
.loyalty-intro {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: clamp(1.5rem, 5vw, 4rem);
  align-items: center;
}
.loyalty-intro > div:first-child > p:not(.eyebrow) { max-width: 34rem; }
.loyalty-page .loyal-card { padding: clamp(1.25rem, 4vw, 2.4rem); }
.loyalty-page .stamp { font-size: 1.4rem; }
.stamp.earned { background: #f3d09d; color: var(--brick); border-color: #f3d09d; font-weight: 750; }
.loyalty-explainer { border-top: 1px solid var(--line); }
.loyalty-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; margin-top: 1.5rem; }
.loyalty-steps > div { background: var(--paper); padding: 1.25rem; border: 1px solid var(--line); border-radius: .6rem; }
.loyalty-steps p { margin: 0; color: var(--muted); }
.account-gate { max-width: 40rem; }
.account #account-message { min-height: 1.5em; }
#profile-address { margin-bottom: 1rem; }
.checkout .order-layout { grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); align-items: start; }
.checkout .order-box h2 { font-size: clamp(1.55rem, 3vw, 2.25rem); }
.checkout-intro { color: var(--muted); }
#checkout-fields { border: 0; padding: 0; margin: 0; }
#checkout-feedback:empty { display: none; }
.checkout .cart-row > span:last-child { white-space: nowrap; }
.checkout .cart-row button { min-width: 42px; min-height: 42px; }
.checkout .cart-total { font-size: 1.2rem; }
@media (max-width: 720px) {
  .loyalty-intro, .loyalty-steps, .checkout .order-layout { grid-template-columns: minmax(0, 1fr); }
}
[data-account-label] {
  max-width: min(14rem, 80vw);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
#saisie-mouvement { scroll-margin-top: 1.5rem; }

header .brand, footer .brand {
  position: relative;
  padding-inline-start: 2.85rem;
  min-height: 2.35rem;
}
header .brand::before, footer .brand::before {
  content: "";
  position: absolute;
  inset-inline-start: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 2.25rem;
  height: 2.25rem;
  background: url('/favicon.svg') center / contain no-repeat;
}

@media (max-width: 580px) {
  header {
    display: block;
    padding: .8rem 5% .6rem;
  }
  header .brand { display: inline-block; }
  header nav {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: .25rem;
    margin-top: .65rem;
  }
  header nav a {
    display: flex;
    align-items: center;
    justify-content: center;
    min-width: 0;
    min-height: 44px;
    text-align: center;
    padding: .4rem .25rem;
    line-height: 1.2;
    overflow-wrap: anywhere;
  }
  header nav [data-account-label] {
    display: block;
    align-content: center;
  }
  .hero-copy { padding: 1.75rem 5%; }
  .hero h1 { font-size: clamp(2.5rem, 11vw, 3.65rem); }
  .hero-photo { min-height: clamp(12rem, 58vw, 19rem); }
  .hero-actions .btn { flex: 1 1 8rem; }
  .home-menu .featured li { grid-template-columns: minmax(0, 1fr); gap: .2rem; }
  .checkout .cart-row { align-items: start; }
  .checkout .cart-row > span:first-child { min-width: 0; overflow-wrap: anywhere; }
  .checkout .cart-row > span:last-child { display: flex; gap: .25rem; }
  .checkout .cart-row button { min-width: 44px; min-height: 44px; }
  .order-actions .btn { flex: 1 1 100%; }
}

#on-site-dialog { width: min(94vw, 52rem); }
.on-site-fields, .on-site-line { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .55rem; }
.on-site-line { grid-template-columns: minmax(0, 2fr) minmax(3.75rem, .45fr) minmax(0, 1fr) auto; align-items: center; }
@media (max-width: 580px) {
  .on-site-line { grid-template-columns: minmax(0, 1fr) auto; border-bottom: 1px solid var(--line); margin-bottom: .75rem; }
}
