/* Le Grilladin — palette tirée du logo et de la vraie devanture */
:root {
  --wine: #7A2B3C;
  --wine-2: #6E2436;
  --wine-3: #632031;
  --ink: #47141F;
  --ink-2: #4F1722;
  --cream: #F4EAD7;
  --paper: #EFE3CB;
  --paper-2: #F8F2E4;
  --sage: #9DBB86;
  --sage-d: #557A3E;
  --gold: #F2B04E;
  --r: 14px;
  --bd: 3px solid var(--ink);
  --hard: 5px 5px 0 var(--ink);
  --hard-s: 3px 3px 0 var(--ink);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: 'Nunito', system-ui, sans-serif;
  font-size: 16.5px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--paper);
}
img, svg { max-width: 100%; display: block; }
a { color: var(--wine-2); }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--gold);
  outline-offset: 2px;
}

h1, h2, h3 {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 900;
  line-height: 1.15;
  color: var(--ink);
  margin: 0 0 .5em;
}
h1 { font-size: clamp(1.9rem, 4vw, 2.9rem); }
h2 { font-size: clamp(1.4rem, 3vw, 2rem); }
h3 { font-size: 1.2rem; }
p { margin: 0 0 1em; }
small, .muted { color: #7a5a63; }
.center { text-align: center; }

.wrap { max-width: 1060px; margin: 0 auto; padding: 48px 20px; }
.wrap.narrow { max-width: 640px; }
.intro { max-width: 56ch; }

/* ---------- Boutons autocollants ---------- */
.btn {
  display: inline-block;
  font-family: 'Nunito', sans-serif;
  font-weight: 800;
  font-size: 1rem;
  padding: 12px 22px;
  border: var(--bd);
  border-radius: 999px;
  box-shadow: var(--hard-s);
  text-decoration: none;
  cursor: pointer;
  transition: transform .12s ease, box-shadow .12s ease;
  background: var(--cream);
  color: var(--ink);
}
.btn:hover { transform: translate(-2px, -2px); box-shadow: 5px 5px 0 var(--ink); }
.btn:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
.btn-primary { background: var(--wine-2); color: var(--cream); }
.btn-green { background: var(--sage); color: var(--ink); }
.btn-cream { background: var(--cream); }
.btn-small { padding: 6px 14px; font-size: .9rem; box-shadow: 2px 2px 0 var(--ink); }
.btn-row { display: flex; gap: 10px; flex-wrap: wrap; }

/* ---------- Barre du haut ---------- */
.topbar {
  background: var(--wine-2);
  border-bottom: 4px solid var(--ink);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 12px 22px;
  position: relative;
  z-index: 10;
}
.brand { text-decoration: none; line-height: 1.1; }
.brand-name {
  display: block;
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 700;
  font-size: 1.5rem;
  letter-spacing: 3px;
  color: var(--cream);
}
.brand-sub {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: .62rem;
  font-weight: 800;
  letter-spacing: 3px;
  color: var(--sage);
}
.brand-sub i { display: none; }
.brand-sub b { font-size: .5rem; }
.mainnav { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.mainnav a {
  color: var(--cream);
  text-decoration: none;
  font-weight: 700;
  border-bottom: 3px solid transparent;
  padding-bottom: 2px;
}
.mainnav a:hover { border-bottom-color: var(--sage); }
.mainnav .nav-admin { color: var(--gold); }
.langs { color: var(--cream); font-weight: 800; }
.langs a { border: none; padding: 0 3px; opacity: .65; }
.langs a.on, .langs a:hover { opacity: 1; border: none; }
.burger { display: none; background: none; border: none; cursor: pointer; padding: 8px; }
.burger span { display: block; width: 26px; height: 4px; background: var(--cream); border-radius: 2px; margin: 5px 0; }

/* ---------- Héros : la devanture ---------- */
.hero {
  background:
    radial-gradient(rgba(71, 20, 31, .06) 1.6px, transparent 1.6px) 0 0 / 26px 26px,
    var(--paper);
  padding: 40px 20px 56px;
  text-align: center;
}
.hero-inner { max-width: 880px; margin: 0 auto; }
.facade {
  width: 100%;
  height: auto;
  filter: drop-shadow(0 10px 0 rgba(71, 20, 31, .12));
  margin-bottom: 26px;
}
.hero h1 { max-width: 22ch; margin-left: auto; margin-right: auto; }
.hero-sub { font-size: 1.12rem; max-width: 52ch; margin: 0 auto 24px; }
.cta-row { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

.wave { line-height: 0; background: var(--paper); }
.wave svg { width: 100%; height: 60px; }

/* ---------- Bande bordeaux ---------- */
.band { background: var(--wine-2); padding: 8px 0 40px; }
.band .wrap { padding-top: 24px; padding-bottom: 12px; }
.band h3 { color: var(--wine-2); }

.cards3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; margin-bottom: 26px; }
.card {
  background: var(--cream);
  border: var(--bd);
  border-radius: var(--r);
  box-shadow: var(--hard);
  padding: 22px;
}
.card-flat { box-shadow: none; background: var(--paper-2); }
.infos h2 { margin-top: .4em; }

/* ---------- Carte (menu) ---------- */
.menu-page h1 { text-align: center; }
.menu-cat { margin: 40px 0; }
.menu-cat h2 span {
  display: inline-block;
  background: var(--wine-2);
  color: var(--cream);
  border: var(--bd);
  border-radius: 12px;
  box-shadow: var(--hard-s);
  padding: 6px 18px;
  font-size: 1.25rem;
}
.menu-note { font-style: italic; color: #7a5a63; margin-top: 10px; }
.menu-list { list-style: none; margin: 18px 0 0; padding: 0; }
.menu-list li { padding: 10px 0; }
.mi-head { display: flex; align-items: baseline; gap: 10px; }
.mi-name { font-weight: 800; font-size: 1.05rem; }
.dots { flex: 1; border-bottom: 3px dotted rgba(71, 20, 31, .35); transform: translateY(-4px); }
.mi-price { font-weight: 800; color: var(--wine-2); white-space: nowrap; }
.mi-desc { margin: 2px 0 0; color: #6d4a53; font-size: .95rem; }

/* ---------- Formulaires ---------- */
.form label { display: block; font-weight: 800; margin-bottom: 14px; }
.form input, .form select, .form textarea, .filter-bar input, .inline-form select {
  width: 100%;
  font: inherit;
  padding: 10px 12px;
  margin-top: 5px;
  border: 2.5px solid var(--ink);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
}
.form small { display: block; font-weight: 400; margin-top: 3px; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.grid4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0 16px; align-items: end; }
.form .btn { margin-top: 6px; }
.form-links { margin: 16px 0 0; font-size: .95rem; }
.checks span { display: block; font-weight: 700; margin-bottom: 6px; }
.checks input { width: auto; margin-right: 6px; }

/* ---------- À emporter ---------- */
.order-cat { margin-bottom: 22px; }
.order-line {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 10px 0;
  border-bottom: 2px dashed rgba(71, 20, 31, .2);
}
.order-line:last-child { border-bottom: none; }
.ol-info { flex: 1; }
.ol-info small { display: block; color: #6d4a53; }
.order-line .qty { width: 74px; padding: 8px; border: 2.5px solid var(--ink); border-radius: 10px; font: inherit; text-align: center; }
.order-total { font-size: 1.1rem; }

/* ---------- Compte ---------- */
.acc-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 30px; }
.row-card { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 14px 18px; margin-bottom: 14px; box-shadow: var(--hard-s); }
.tag {
  display: inline-block;
  font-size: .78rem;
  font-weight: 800;
  border: 2px solid var(--ink);
  border-radius: 999px;
  padding: 1px 10px;
  margin-left: 6px;
  background: var(--paper-2);
}
.tag-pending { background: var(--gold); }
.tag-confirmed, .tag-ready { background: var(--sage); }
.tag-cancelled { background: #e8b8b8; }
.tag-collected { background: var(--paper-2); }

/* ---------- Backoffice ---------- */
.admtabs { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 26px; }
.admtabs a {
  text-decoration: none;
  font-weight: 800;
  font-size: .95rem;
  padding: 7px 16px;
  border: var(--bd);
  border-radius: 999px;
  background: var(--cream);
  color: var(--ink);
  box-shadow: var(--hard-s);
}
.admtabs a.on { background: var(--wine-2); color: var(--cream); }
.stat { text-align: center; padding: 16px; }
.stat b { display: block; font-family: 'Fraunces', serif; font-size: 2.4rem; }
.filter-bar { display: flex; align-items: center; gap: 12px; margin-bottom: 20px; flex-wrap: wrap; }
.filter-bar input { width: auto; }
.table { width: 100%; border-collapse: collapse; background: var(--cream); border: var(--bd); border-radius: var(--r); box-shadow: var(--hard); overflow: hidden; }
.table th, .table td { text-align: left; padding: 10px 12px; border-bottom: 2px solid rgba(71, 20, 31, .15); vertical-align: top; }
.table th { background: var(--wine-2); color: var(--cream); font-size: .9rem; }
.table tr:last-child td { border-bottom: none; }
.inline-form { display: flex; gap: 8px; align-items: center; }
.inline-form select { width: auto; margin: 0; }
.cat-sep { margin: 34px 0 14px; }
.item-form { margin-bottom: 18px; }

/* ---------- Planning (backoffice) ---------- */
.chips { display: flex; gap: 10px; flex-wrap: wrap; margin: 6px 0 26px; }
.chip {
  font: inherit;
  font-weight: 800;
  padding: 8px 14px;
  border: var(--bd);
  border-radius: 12px;
  background: var(--sage);
  color: var(--ink);
  box-shadow: var(--hard-s);
  cursor: pointer;
  text-align: center;
  min-width: 84px;
}
.chip small { display: block; font-weight: 600; font-size: .72rem; }
.chip.off { background: #e8b8b8; text-decoration: line-through; }
.chip:disabled { opacity: .45; cursor: not-allowed; }
.chip { transition: opacity .15s ease, background .15s ease; }
.chip:hover:not(:disabled) { transform: translate(-1px, -1px); }

/* ---------- Live ---------- */
.live-dot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; background: #c33; border: 2px solid var(--ink); vertical-align: middle; }
.live-dot.on { background: var(--sage); }
.live-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; margin-bottom: 30px; }
.ltable { padding: 14px; }
.lt-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 4px; }
.lt-head b { font-size: 1.1rem; margin-right: auto; }
.lt-head .lt-timer { font-weight: 800; font-size: .85rem; background: var(--paper-2); border: 2px solid var(--ink); border-radius: 99px; padding: 1px 10px; }
.lt-head .lt-total { font-weight: 900; color: var(--wine); }
.lt-head .lt-party { font-weight: 700; }
.lt-actions { display: flex; gap: 6px; margin: 2px 0 10px; }
.li-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; column-gap: 7px; padding: 4px 0 0; font-weight: 700; }
.li-row label { display: flex; align-items: center; gap: 8px; min-width: 0; cursor: pointer; }
.li-row label span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.li-row.done label span { text-decoration: line-through; opacity: .5; }
.li-row input { width: 18px; height: 18px; flex: none; }
.li-sub { display: flex; flex-wrap: wrap; gap: 4px; align-items: center; margin: 1px 0 6px 26px; }
.li-price { font-weight: 800; font-size: .85rem; white-space: nowrap; text-align: right; font-variant-numeric: tabular-nums; }
.li-badge { font-weight: 900; font-size: .72rem; text-transform: uppercase; background: var(--gold); border: 2px solid var(--ink); border-radius: 99px; padding: 0 7px; white-space: nowrap; }
.li-tools { display: inline-flex; gap: 4px; }
.btn-mini { padding: 1px 6px; font-size: .76rem; border: 2px solid var(--ink); border-radius: 7px; background: var(--cream); font-weight: 900; cursor: pointer; line-height: 1.5; }
.li-tools .btn-mini { opacity: .85; }
.li-tools .btn-mini:hover { opacity: 1; background: var(--gold); }
.btn-mini:hover { background: var(--paper-2); }
.btn-mini.cooking { background: var(--gold); animation: cookpulse 1.6s ease-in-out infinite; }
@keyframes cookpulse { 50% { transform: scale(1.06); } }
@media (prefers-reduced-motion: reduce) { .btn-mini.cooking { animation: none; } }
.lt-add { display: flex; gap: 8px; margin-top: 10px; align-items: center; }
.lt-add select { flex: 1; min-width: 0; padding: 7px; border: 2px solid var(--ink); border-radius: 8px; font: inherit; }
.lt-add input { width: 62px; padding: 7px; border: 2px solid var(--ink); border-radius: 8px; font: inherit; text-align: center; }
.lorder { padding: 12px 16px; margin-bottom: 12px; }
.lorder-items { font-size: .95rem; margin-top: 4px; }
.add-form summary { cursor: pointer; font-weight: 800; font-family: 'Fraunces', serif; }
.add-form { margin-bottom: 20px; }
.add-form h4 { margin: 14px 0 2px; }
.tag-arrived { background: var(--sage); }

/* ---------- Archives / Stocks / Courses ---------- */
.row-done { opacity: .5; }
.row-tools { display: inline-flex; gap: 6px; vertical-align: middle; }
.table td { vertical-align: middle; }
.table td .inline-form { display: inline-flex; align-items: center; gap: 6px; margin: 2px 6px 2px 0; vertical-align: middle; }
.table td .inline-form select { padding: 6px 8px; }
.table td:last-child { min-width: 230px; }
.stock-chip .chip-tag { display: none; margin-left: 8px; font-size: .75rem; font-weight: 900; color: #fff; background: var(--wine); border-radius: 99px; padding: 1px 8px; }
.stock-chip.off { background: var(--red-soft, #E8B8B8); text-decoration: line-through; }
.stock-chip.off .chip-tag { display: inline-block; text-decoration: none; }
.shop-row { display: flex; align-items: center; gap: 10px; padding: 10px 14px; margin-bottom: 10px; }
.shop-row .shop-btns { margin-left: auto; display: inline-flex; gap: 6px; }
.mi-soldout { color: var(--wine); font-weight: 900; font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; border: 2px solid var(--wine); border-radius: 99px; padding: 1px 8px; margin-left: 8px; }
.mi-off .mi-name, .mi-off .mi-price, .mi-off .mi-desc { opacity: .45; }

/* ---------- Encaissement ---------- */
.pay-head { display: flex; gap: 22px; flex-wrap: wrap; font-size: 1.05rem; }
.pay-head .wine { color: var(--wine); }
.pay-line { display: flex; align-items: center; gap: 10px; padding: 6px 0; border-bottom: 2px dashed rgba(71,20,31,.15); }
.pay-line .pl-name { flex: 1; min-width: 0; font-weight: 700; }
.pay-line .pl-sel { display: inline-flex; align-items: center; gap: 8px; }
.pay-line .pl-n { min-width: 18px; text-align: center; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-top: 10px; }

/* ---------- Divers ---------- */
.flash {
  max-width: 1020px;
  margin: 20px auto 0;
  padding: 12px 18px;
  border: var(--bd);
  border-radius: var(--r);
  box-shadow: var(--hard-s);
  font-weight: 800;
}
.flash-ok { background: var(--sage); }
.flash-err { background: #e8b8b8; }

.footer { background: var(--ink); color: var(--cream); margin-top: 60px; padding: 40px 22px 20px; border-top: 4px solid var(--ink-2); }
.foot-grid { max-width: 1060px; margin: 0 auto; display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; }
.footer h4 { color: var(--sage); margin: 0 0 8px; letter-spacing: 2px; text-transform: uppercase; font-size: .85rem; }
.footer a { color: var(--cream); }
.foot-note { text-align: center; margin: 30px 0 0; font-size: .85rem; opacity: .7; }

/* ---------- Pré-commande & alertes ---------- */
.preorder summary { cursor: pointer; font-weight: 800; font-size: 1.05rem; font-family: 'Fraunces', serif; }
.preorder[open] summary { margin-bottom: 8px; }
.preorder h4 { margin: 16px 0 2px; }
.preorder { margin-bottom: 18px; }
.note-warn {
  background: var(--gold);
  border: var(--bd);
  border-radius: 10px;
  box-shadow: var(--hard-s);
  padding: 10px 14px;
  font-weight: 700;
  margin: 4px 0 14px;
}
.form + .btn, form > .btn { margin-top: 4px; }

/* ---------- Animations de la devanture ---------- */
.bulb {
  animation: twinkle 2.4s ease-in-out infinite;
  animation-delay: var(--d, 0s);
}
@keyframes twinkle {
  0%, 100% { opacity: 1; }
  50% { opacity: .45; }
}
.hangsign {
  transform-box: view-box;
  transform-origin: 865px 252px;
  animation: sway 4.5s ease-in-out infinite;
}
@keyframes sway {
  0%, 100% { transform: rotate(-2.5deg); }
  50% { transform: rotate(2.5deg); }
}

@media (prefers-reduced-motion: reduce) {
  .bulb, .hangsign { animation: none; }
  .btn, .btn:hover, .btn:active { transition: none; transform: none; }
  html { scroll-behavior: auto; }
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .burger { display: block; }
  .mainnav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--wine-2);
    border-bottom: 4px solid var(--ink);
    flex-direction: column;
    align-items: flex-start;
    padding: 16px 22px;
    gap: 14px;
  }
  .mainnav.open { display: flex; }
  .cards3, .grid2, .grid4, .acc-grid, .foot-grid { grid-template-columns: 1fr; }
  .wrap { padding: 32px 16px; }
  .table { display: block; overflow-x: auto; }
  .row-card { flex-direction: column; align-items: flex-start; }
}

/* u15 : filtres entrées/plats/desserts, groupes, notes d'article */
.live-filter { display: flex; gap: 8px; flex-wrap: wrap; margin: 0 0 14px; }
.live-filter .btn.on { background: var(--sage); }
.li-group-head { margin: 8px 0 2px; padding: 3px 8px; background: rgba(71, 20, 31, .06); border-radius: 8px; font-weight: 800; }
.li-group-head.all { background: var(--gold); border: 2px solid var(--ink); }
.li-group-head label { display: flex; align-items: center; gap: 7px; cursor: pointer; }
.li-note { font-size: .88rem; font-weight: 700; background: rgba(216, 164, 65, .28); border-left: 4px solid var(--wine); border-radius: 0 8px 8px 0; padding: 3px 9px; margin: 0 0 7px 26px; }

/* u16 : feu « Prêt » par section */
.li-group-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.li-fire { border: 2px solid var(--ink); border-radius: 99px; background: var(--cream); font-weight: 900; font-size: .74rem; padding: 1px 9px; cursor: pointer; white-space: nowrap; }
.li-fire { -webkit-touch-callout: none; user-select: none; }
.li-fire.on { background: var(--wine); color: var(--cream); animation: firepulse 1s ease-in-out infinite; }
@keyframes firepulse {
  0%, 100% { transform: scale(1); box-shadow: none; }
  50% { transform: scale(1.06); box-shadow: 0 0 0 4px rgba(110, 36, 54, .25); }
}
.li-sep { border: 0; border-top: 2px dashed rgba(71, 20, 31, .4); margin: 10px 0 2px; }
@media (prefers-reduced-motion: reduce) { .li-fire.on { animation: none; } }

/* u17 : bouton Prépa */
.li-firewrap { display: inline-flex; gap: 5px; }
.li-fire.prep.on { background: var(--sage); color: var(--ink); animation: firepulse 1s ease-in-out infinite; }
@media (prefers-reduced-motion: reduce) { .li-fire.prep.on { animation: none; } }

/* u18 : page Accès */
.tbl-scroll { overflow-x: auto; }

/* u20 : quantité de stock */
.stock-row { display: inline-flex; align-items: center; gap: 4px; }
.stock-qty { width: 62px; padding: 3px 6px; border: 2px solid var(--ink); border-radius: 8px; font-weight: 800; }

/* u21 : section servie */
.li-sent { font-weight: 900; font-size: .78rem; color: var(--sage); border: 2px solid var(--sage); border-radius: 99px; padding: 1px 9px; white-space: nowrap; }

/* u22 : sous-catégories + pastilles couleur */
.stock-sub { width: 100%; font-weight: 900; font-size: .78rem; color: rgba(71,20,31,.55); margin: 8px 0 0; text-transform: uppercase; letter-spacing: .04em; }
.li-dot { display: inline-block; width: 10px; height: 10px; border-radius: 50%; border: 1.5px solid var(--ink); margin-right: 5px; }

/* u24 : barre d'enregistrement fixe (Carte) */
.save-bar { position: sticky; bottom: 12px; z-index: 30; display: flex; justify-content: center; padding: 6px 0; }
.save-bar .btn { box-shadow: 0 4px 14px rgba(0,0,0,.28); font-size: 1.02rem; padding: 10px 26px; }
