/* ==========================================================================
   LE WOOK — Design tokens
   Direction : laque vietnamienne (sơn mài) + tampon-sceau + motif hồi văn
   (méandre grec-vietnamien présent sur les charpentes de đình et les bordures
   de laque). Pas de faux caractères asiatiques, pas de rouge-or de pagode
   générique — palette tirée du vrai nuancier laque : noir corbeau, cinabre,
   indigo chàm, jaune de gomme-laque.
   ========================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Yeseva+One&family=Be+Vietnam+Pro:wght@400;500;600;700;800&family=Space+Mono:wght@400;700&display=swap');

:root {
  --paper: #F1E6C8;
  --paper-dark: #E3D3A4;
  --card: #FAF3DF;
  --ink: #211812;
  --ink-soft: #5B4E3E;
  --lacquer: #A3311F;
  --lacquer-dark: #7C2417;
  --indigo: #2E3B52;
  --gold: #B9872E;
  --jade: #3F6449;
  --line: rgba(33, 24, 18, 0.16);

  --font-display: 'Yeseva One', serif;
  --font-body: 'Be Vietnam Pro', sans-serif;
  --font-mono: 'Space Mono', monospace;

  --radius: 3px;
  --container: 1120px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  /* texture papier très légère */
  background-image:
    radial-gradient(rgba(33,24,18,0.03) 1px, transparent 1px);
  background-size: 3px 3px;
}

a { color: inherit; }
img { max-width: 100%; display: block; }

h1, h2, h3 { font-family: var(--font-display); font-weight: 400; margin: 0; line-height: 1.12; }

.wrap { max-width: var(--container); margin: 0 auto; padding: 0 24px; }

:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

/* ---------------------------------------------------------------------- */
/* Motif hồi văn — méandre traditionnel, utilisé comme séparateur          */
/* Inspiré des frises sculptées sur les đình (maisons communales) et des   */
/* bordures de plateaux laqués. Simple bande répétée en SVG.               */
/* ---------------------------------------------------------------------- */

.motif-divider {
  height: 14px;
  width: 100%;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='14' viewBox='0 0 28 14'%3E%3Cpath d='M0 12 L0 2 L6 2 L6 8 L12 8 L12 2 L18 2 L18 8 L24 8 L24 2 L28 2' fill='none' stroke='%23A3311F' stroke-width='2'/%3E%3C/svg%3E");
  background-repeat: repeat-x;
  background-position: center;
  opacity: 0.85;
}
.motif-divider.on-dark {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='28' height='14' viewBox='0 0 28 14'%3E%3Cpath d='M0 12 L0 2 L6 2 L6 8 L12 8 L12 2 L18 2 L18 8 L24 8 L24 2 L28 2' fill='none' stroke='%23B9872E' stroke-width='2'/%3E%3C/svg%3E");
}

/* ---------------------------------------------------------------------- */
/* Header / navigation                                                    */
/* ---------------------------------------------------------------------- */

.site-header { position: sticky; top: 0; z-index: 50; background: var(--paper); border-bottom: 1px solid var(--line); }
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 78px; }

.logo { font-family: var(--font-display); font-size: 1.5rem; text-decoration: none; color: var(--ink); display: flex; align-items: center; gap: 10px; }
.logo .seal {
  width: 30px; height: 30px; border-radius: 50%;
  border: 1.5px solid var(--lacquer); color: var(--lacquer);
  display: flex; align-items: center; justify-content: center;
  font-family: var(--font-mono); font-size: 0.55rem; letter-spacing: 0.02em;
  flex-shrink: 0;
}

.main-nav { display: flex; align-items: center; gap: 30px; }
.main-nav a { text-decoration: none; font-size: 0.95rem; font-weight: 500; color: var(--ink-soft); position: relative; padding: 4px 0; }
.main-nav a:hover, .main-nav a.active { color: var(--lacquer); }
.main-nav a.active::after { content: ''; position: absolute; left: 0; right: 0; bottom: -3px; height: 2px; background: var(--lacquer); }

.btn-order {
  font-family: var(--font-body); font-weight: 600; font-size: 0.88rem;
  text-decoration: none; color: var(--paper); background: var(--lacquer);
  padding: 10px 18px; border-radius: var(--radius); white-space: nowrap;
}
.btn-order:hover { background: var(--lacquer-dark); }

.nav-toggle { display: none; background: none; border: 1px solid var(--ink); border-radius: var(--radius); cursor: pointer; font-family: var(--font-body); font-weight: 500; font-size: 0.85rem; color: var(--ink); padding: 8px 14px; }

@media (max-width: 760px) {
  .main-nav { display: none; }
  .nav-toggle { display: block; }
}

/* ---------------------------------------------------------------------- */
/* Hero — bandeau illustré + sceau                                        */
/* ---------------------------------------------------------------------- */

.hero { position: relative; display: grid; grid-template-columns: 1.05fr 0.95fr; min-height: 560px; border-bottom: 1px solid var(--line); background: var(--card); }

.hero-copy { display: flex; flex-direction: column; justify-content: center; padding: 60px 48px; gap: 20px; }
.hero-eyebrow { font-family: var(--font-mono); font-size: 0.78rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--jade); }
.hero-copy h1 { font-size: clamp(2.2rem, 4.6vw, 3.3rem); color: var(--ink); }
.hero-copy h1 .accent { color: var(--lacquer); }
.hero-copy p { max-width: 48ch; color: var(--ink-soft); font-size: 1.05rem; }
.hero-actions { display: flex; gap: 14px; margin-top: 6px; flex-wrap: wrap; }

.btn-primary, .btn-secondary {
  font-family: var(--font-body); font-weight: 600; font-size: 0.92rem;
  text-decoration: none; padding: 13px 24px; border-radius: var(--radius);
  display: inline-flex; align-items: center; gap: 8px;
}
.btn-primary { background: var(--lacquer); color: var(--paper); }
.btn-primary:hover { background: var(--lacquer-dark); }
.btn-secondary { background: transparent; border: 1.5px solid var(--ink); color: var(--ink); }
.btn-secondary:hover { background: var(--ink); color: var(--paper); }

.hero-media { position: relative; overflow: hidden; background: var(--paper-dark); }
.hero-media img { width: 100%; height: 100%; object-fit: cover; }

/* Sceau — tampon d'encre rond, élément signature */
.seal-stamp {
  position: absolute; bottom: 26px; left: 26px;
  width: 92px; height: 92px; border-radius: 50%;
  border: 2px solid var(--lacquer);
  display: flex; align-items: center; justify-content: center;
  text-align: center;
  color: var(--lacquer);
  background: rgba(250, 243, 223, 0.88);
  font-family: var(--font-mono); font-size: 0.6rem; letter-spacing: 0.06em;
  line-height: 1.3; text-transform: uppercase;
  transform: rotate(-8deg);
}
.seal-stamp span { display: block; }
.seal-stamp .big { font-size: 0.72rem; font-weight: 700; }

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; min-height: auto; }
  .hero-media { height: 300px; order: -1; }
  .hero-copy { padding: 40px 24px; }
}

/* ---------------------------------------------------------------------- */
/* Sections                                                                */
/* ---------------------------------------------------------------------- */

.section { padding: 64px 0; }
.section-alt { background: var(--indigo); color: var(--paper); }
.section-alt .section-head h2, .section-alt h2 { color: var(--paper); }
.section-alt .lede { color: rgba(241,230,200,0.75); }

.section-head { margin-bottom: 32px; }
.section-head .kicker { font-family: var(--font-mono); font-size: 0.76rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--jade); }
.section-alt .section-head .kicker { color: var(--gold); }
.section-head h2 { font-size: clamp(1.7rem, 3vw, 2.3rem); margin-top: 6px; }
.section-head .lede { color: var(--ink-soft); max-width: 50ch; margin-top: 8px; }
.section-head-row { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; }

/* ---------------------------------------------------------------------- */
/* Carte plat — sobre, sans numérotation décorative                       */
/* ---------------------------------------------------------------------- */

.dish {
  background: var(--card);
  border-top: 3px solid var(--lacquer);
  border-radius: var(--radius);
  padding: 22px 20px;
  display: flex; flex-direction: column; gap: 8px;
}
.dish-photo { margin: -22px -20px 4px; aspect-ratio: 4/3; overflow: hidden; }
.dish-photo img { width: 100%; height: 100%; object-fit: cover; }
.dish h3 { font-family: var(--font-body); font-weight: 700; font-size: 1.08rem; color: var(--ink); }
.dish .desc { color: var(--ink-soft); font-size: 0.92rem; flex-grow: 1; }
.dish .price-row { display: flex; justify-content: space-between; align-items: center; border-top: 1px solid var(--line); padding-top: 10px; margin-top: 4px; }
.dish .price { font-family: var(--font-mono); font-weight: 700; color: var(--lacquer); }

.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }
@media (max-width: 900px) { .grid-3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 620px) { .grid-3, .grid-2 { grid-template-columns: 1fr; } }

/* ---------------------------------------------------------------------- */
/* Menu de la semaine                                                     */
/* ---------------------------------------------------------------------- */

.weekly { background: var(--ink); color: var(--paper); border-radius: 4px; padding: 36px; }
.weekly-head { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 20px; flex-wrap: wrap; gap: 8px; }
.weekly-head h2 { color: var(--paper); font-size: 1.7rem; }
.weekly-head .dates { font-family: var(--font-mono); font-size: 0.78rem; color: var(--gold); }
.weekly-cat { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--jade); margin: 18px 0 8px; }
.weekly-item { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-bottom: 1px dotted rgba(241,230,200,0.22); }
.weekly-item .name { font-weight: 600; }
.weekly-item .name span { display: block; font-size: 0.82rem; color: rgba(241,230,200,0.6); font-weight: 400; }
.weekly-item .price { font-family: var(--font-mono); color: var(--gold); white-space: nowrap; }
.weekly-empty { color: var(--ink-soft); font-style: italic; }
.section-alt .weekly-empty, .weekly .weekly-empty { color: rgba(241,230,200,0.6); }

/* ---------------------------------------------------------------------- */
/* Histoire de famille                                                     */
/* ---------------------------------------------------------------------- */

.story { display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 48px; align-items: center; }
.story-media { position: relative; aspect-ratio: 4/5; overflow: hidden; border-radius: 3px; background: var(--paper-dark); }
.story-media img { width: 100%; height: 100%; object-fit: cover; }
.story-copy p { color: var(--ink-soft); font-size: 1.02rem; }
.section-alt .story-copy p { color: rgba(241,230,200,0.8); }
.section-alt .story-copy .names { color: var(--gold); }
.story-copy .names { font-family: var(--font-mono); font-size: 0.8rem; color: var(--jade); margin-top: 16px; }
@media (max-width: 820px) { .story { grid-template-columns: 1fr; } }

/* ---------------------------------------------------------------------- */
/* Infos pratiques / contact                                              */
/* ---------------------------------------------------------------------- */

.infos { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.infos-block h3 { font-family: var(--font-body); font-size: 1.05rem; margin-bottom: 12px; }
.infos-block .label { font-family: var(--font-mono); font-size: 0.72rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--jade); display: block; margin-bottom: 3px; }
.infos-block .val { margin-bottom: 16px; }
.hours-row { display: flex; justify-content: space-between; padding: 7px 0; border-bottom: 1px dotted var(--line); font-size: 0.94rem; }
.hours-row .day { font-weight: 600; }
.hours-row .time { font-family: var(--font-mono); color: var(--ink-soft); }
.map-embed { width: 100%; height: 100%; min-height: 260px; border: 0; border-radius: 3px; }
@media (max-width: 820px) { .infos { grid-template-columns: 1fr; } }

/* ---------------------------------------------------------------------- */
/* Footer                                                                  */
/* ---------------------------------------------------------------------- */

.site-footer { background: var(--ink); color: rgba(241,230,200,0.75); padding: 36px 0 26px; font-size: 0.88rem; }
.site-footer .wrap { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 16px; }
.site-footer a { text-decoration: none; color: var(--paper); }
.site-footer .social { display: flex; gap: 16px; }

/* ---------------------------------------------------------------------- */
/* Formulaires (admin)                                                     */
/* ---------------------------------------------------------------------- */

label { display: block; font-family: var(--font-mono); font-size: 0.75rem; letter-spacing: 0.05em; text-transform: uppercase; color: var(--ink-soft); margin-bottom: 6px; }
input, select, textarea {
  width: 100%; font-family: var(--font-body); font-size: 0.98rem;
  padding: 11px 12px; border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--card); color: var(--ink); margin-bottom: 16px;
}
input:focus, select:focus, textarea:focus { border-color: var(--lacquer); }
button { font-family: var(--font-body); font-weight: 600; cursor: pointer; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 620px) { .field-row { grid-template-columns: 1fr; } }

/* Page header (pages secondaires) */
.page-hero { padding: 52px 0 30px; border-bottom: 1px solid var(--line); background: var(--card); }
.page-hero h1 { font-size: clamp(2rem, 4vw, 2.7rem); }
.page-hero p { color: var(--ink-soft); max-width: 56ch; margin-top: 10px; }

/* ---------------------------------------------------------------------- */
/* Back-office — onglets et cartes                                        */
/* ---------------------------------------------------------------------- */

.admin-tabs {
  display: flex; gap: 6px; margin-bottom: 32px;
  border-bottom: 1px solid var(--line); padding-bottom: 0;
}
.admin-tab {
  font-family: var(--font-body); font-weight: 600; font-size: 0.92rem;
  background: none; border: none; cursor: pointer;
  padding: 12px 18px; color: var(--ink-soft);
  border-bottom: 3px solid transparent; margin-bottom: -1px;
}
.admin-tab:hover { color: var(--ink); }
.admin-tab.active { color: var(--lacquer); border-bottom-color: var(--lacquer); }

.admin-section { display: none; }
.admin-section.active { display: block; }

.admin-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 24px;
}
.admin-card + .admin-card { margin-top: -4px; }

.admin-actions {
  display: flex; align-items: center; gap: 12px; flex-wrap: wrap;
  margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line);
}

.admin-hint { color: var(--ink-soft); font-size: 0.88rem; margin: -8px 0 16px; }

details.admin-import {
  background: var(--paper-dark); border-radius: var(--radius);
  padding: 14px 18px; margin-bottom: 24px;
}
details.admin-import summary { cursor: pointer; font-family: var(--font-mono); font-size: 0.8rem; color: var(--jade); }
details.admin-import textarea { margin-top: 12px; }

.dish-editor {
  display: grid; grid-template-columns: 110px 1fr; gap: 16px;
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 16px; margin-bottom: 14px;
}

.menu-item-row {
  display: grid; grid-template-columns: 1fr 1fr 1fr 1fr auto; gap: 12px; align-items: end;
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 14px; margin-bottom: 10px;
}
@media (max-width: 820px) { .menu-item-row { grid-template-columns: 1fr 1fr; } }

.category-row {
  display: flex; align-items: center; gap: 10px;
  background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 10px 12px; margin-bottom: 8px;
}
.category-row input { margin-bottom: 0; flex-grow: 1; }
.category-row button { padding: 8px 12px; font-size: 0.8rem; white-space: nowrap; }
.category-row button:disabled { opacity: 0.3; cursor: not-allowed; }


.status-msg { font-family: var(--font-mono); font-size: 0.85rem; padding: 10px 12px; border-radius: var(--radius); margin-top: 10px; }
.status-ok { background: rgba(63,100,73,0.15); color: var(--jade); }
.status-err { background: rgba(163,49,31,0.12); color: var(--lacquer-dark); }
.cart-line { display: flex; justify-content: space-between; font-size: 0.92rem; border-bottom: 1px dotted var(--line); padding: 8px 0; }

.cart-panel {
  position: sticky; top: 96px;
  background: var(--ink); color: var(--paper);
  border-radius: 4px; padding: 26px;
  display: flex; flex-direction: column; gap: 12px;
}
.cart-panel h3 { color: var(--paper); font-size: 1.1rem; font-family: var(--font-display); font-weight: 400; }
.cart-panel .cart-line { border-bottom: 1px dotted rgba(241,230,200,0.25); }
.cart-panel .cart-line .qty { color: var(--gold); font-family: var(--font-mono); }
.cart-total { display: flex; justify-content: space-between; font-family: var(--font-mono); font-size: 1.05rem; padding-top: 10px; border-top: 1px solid rgba(241,230,200,0.35); }
.cart-empty { color: rgba(241,230,200,0.6); font-style: italic; font-size: 0.9rem; }
.cart-panel label { color: rgba(241,230,200,0.7); }
.qty-btn { background: none; border: 1px solid rgba(241,230,200,0.4); color: var(--paper); width: 30px; height: 30px; border-radius: var(--radius); font-size: 1rem; }
