/* Le Bistrot d'Augustin — charte « bistrot de marché » : crème chaud, brique,
   titres serif. Contenu de DÉMONSTRATION : tout se rebrande pour un vrai client
   (couleurs ici, textes dans les pages). Mobile-first, cibles ≥ 44px. */
:root {
  --accent: #8a3324;
  --accent-dark: #6e2214;
  --cream: #faf6f0;
  --cream-deep: #f1e7da;
  --ink: #26221f;
  --muted: #6f6558;
  --ok: #0da152;
  --err: #b42318;
  --serif: Georgia, "Times New Roman", serif;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--cream); color: var(--ink);
  font: 16px/1.65 system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}
img { max-width: 100%; display: block; }
a { color: var(--accent); }
h1, h2, h3 { font-family: var(--serif); line-height: 1.15; }
h1 { font-size: clamp(2rem, 5.4vw, 3.3rem); margin: 0 0 .4em; }
h2 { font-size: clamp(1.45rem, 3.4vw, 2.1rem); margin: 0 0 .5em; }
.wrap { width: min(1080px, 100% - 40px); margin: 0 auto; }
.eyebrow {
  display: inline-block; font-size: .78rem; letter-spacing: .18em; text-transform: uppercase;
  color: var(--accent); font-weight: 700; margin-bottom: 10px;
}
.lead { font-size: 1.08rem; color: var(--muted); max-width: 60ch; }

/* ── Topbar ── */
.topbar {
  position: sticky; top: 0; z-index: 30; background: rgba(250, 246, 240, .92);
  backdrop-filter: blur(8px); border-bottom: 1px solid var(--cream-deep);
}
.topbar .wrap { display: flex; align-items: center; gap: 18px; min-height: 62px; }
.brand { font-family: var(--serif); font-size: 1.22rem; font-weight: 700; color: var(--ink); text-decoration: none; }
.brand em { color: var(--accent); font-style: normal; }
.nav { display: flex; gap: 4px; margin-left: auto; align-items: center; }
.nav a {
  text-decoration: none; color: var(--ink); font-weight: 600; font-size: .95rem;
  padding: 10px 12px; border-radius: 999px; min-height: 44px; display: inline-flex; align-items: center;
}
.nav a:hover { background: var(--cream-deep); }
.nav a.is-active { color: var(--accent); }
.nav a.cta {
  background: var(--accent); color: #fff; padding: 10px 20px; margin-left: 6px;
}
.nav a.cta:hover { background: var(--accent-dark); }
/* Sur la page de réservation, le CTA porte aussi is-active : sans cette règle
   (plus spécifique), la couleur accent d'is-active le rendrait illisible sur
   son propre fond accent. */
.nav a.cta.is-active { color: #fff; }
.burger {
  display: none; margin-left: auto; background: none; border: 0; cursor: pointer;
  width: 44px; height: 44px; border-radius: 10px; position: relative;
}
.burger span, .burger span::before, .burger span::after {
  content: ""; position: absolute; left: 10px; right: 10px; height: 2px;
  background: var(--ink); border-radius: 2px; transition: transform .2s, opacity .2s;
}
.burger span { top: 21px; }
.burger span::before { content: ""; top: -7px; left: 0; right: 0; }
.burger span::after { content: ""; top: 7px; left: 0; right: 0; }
body.nav-open .burger span { transform: rotate(45deg); }
body.nav-open .burger span::before { transform: rotate(-90deg) translateX(7px); }
body.nav-open .burger span::after { opacity: 0; }

/* ── Hero ── */
.hero { padding: 72px 0 56px; }
.hero .wrap { display: grid; gap: 36px; grid-template-columns: 1.1fr .9fr; align-items: center; }
.hero-actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 26px; }
.btn {
  display: inline-flex; align-items: center; justify-content: center; min-height: 48px;
  padding: 12px 26px; border-radius: 999px; font-weight: 700; text-decoration: none;
  border: 2px solid transparent; font-size: 1rem;
}
.btn--primary { background: var(--accent); color: #fff; }
.btn--primary:hover { background: var(--accent-dark); }
.btn--ghost { border-color: var(--ink); color: var(--ink); }
.btn--ghost:hover { background: var(--ink); color: var(--cream); }
.hero-note { margin-top: 14px; font-size: .9rem; color: var(--muted); }

/* Visuel du hero : composition CSS (aucune image binaire dans le template —
   les photos du vrai client remplaceront ces aplats). */
.hero-art { position: relative; aspect-ratio: 4/4.6; }
.hero-art .plate {
  position: absolute; inset: 8% 6% 22% 10%; border-radius: 50%;
  background: radial-gradient(circle at 38% 32%, #fff 0 38%, var(--cream-deep) 39% 62%, #fff 63%);
  box-shadow: 0 30px 60px rgba(60, 30, 15, .18);
}
.hero-art .plate::after {
  content: ""; position: absolute; inset: 26%; border-radius: 50%;
  background: radial-gradient(circle at 40% 35%, #c96f3a 0 30%, var(--accent) 60%, var(--accent-dark));
}
.hero-art .card-tag {
  position: absolute; right: 0; bottom: 6%; background: #fff; border: 1px solid var(--cream-deep);
  border-radius: 14px; padding: 14px 18px; box-shadow: 0 16px 40px rgba(60, 30, 15, .14);
  font-family: var(--serif);
}
.hero-art .card-tag b { display: block; font-size: 1.05rem; }
.hero-art .card-tag span { color: var(--muted); font-size: .85rem; }

/* ── Sections ── */
section { padding: 56px 0; }
section.alt { background: #fff; border-block: 1px solid var(--cream-deep); }
.grid-3 { display: grid; gap: 22px; grid-template-columns: repeat(3, 1fr); margin-top: 30px; }
.card {
  background: #fff; border: 1px solid var(--cream-deep); border-radius: 18px; padding: 26px 24px;
}
section.alt .card { background: var(--cream); }
.card h3 { margin: 0 0 8px; font-size: 1.15rem; }
.card p { margin: 0; color: var(--muted); font-size: .96rem; }
.card .price { font-family: var(--serif); color: var(--accent); font-weight: 700; }

/* ── Carte (menu) ── */
.menu-block { margin-top: 34px; }
.menu-block h2 { border-bottom: 2px solid var(--accent); display: inline-block; padding-bottom: 6px; }
.menu-list { list-style: none; margin: 18px 0 0; padding: 0; max-width: 720px; }
.menu-list li {
  display: flex; align-items: baseline; gap: 10px; padding: 12px 0;
  border-bottom: 1px dashed var(--cream-deep);
}
.menu-list .dish b { display: block; font-size: 1.02rem; }
.menu-list .dish span { color: var(--muted); font-size: .9rem; }
.menu-list .dots { flex: 1; border-bottom: 2px dotted var(--cream-deep); transform: translateY(-4px); }
.menu-list .price { font-family: var(--serif); font-weight: 700; color: var(--accent); white-space: nowrap; }
.menu-note { margin-top: 22px; color: var(--muted); font-size: .9rem; }

/* ── Infos pratiques ── */
.info-grid { display: grid; gap: 22px; grid-template-columns: repeat(3, 1fr); margin-top: 26px; }
.hours { list-style: none; margin: 10px 0 0; padding: 0; font-size: .95rem; }
.hours li { display: flex; justify-content: space-between; gap: 12px; padding: 4px 0; }
.hours .closed { color: var(--muted); }

/* ── Bandeau CTA ── */
.band { background: var(--accent); color: #fff; text-align: center; }
.band h2 { color: #fff; }
.band .btn--primary { background: #fff; color: var(--accent); }
.band p { color: rgba(255, 255, 255, .85); }

/* ── Formulaire de réservation (démo : rempli par resa.js, ids st-*) ── */
.resa-layout { display: grid; gap: 34px; grid-template-columns: 1.05fr .95fr; align-items: start; }
form#st-form label { display: block; font-weight: 600; font-size: .9rem; margin: 14px 0 5px; }
form#st-form input, form#st-form select, form#st-form textarea {
  width: 100%; padding: 12px 14px; border-radius: 12px; border: 1.5px solid var(--cream-deep);
  font: inherit; background: #fff; color: var(--ink); min-height: 46px;
}
form#st-form textarea { min-height: 110px; resize: vertical; }
form#st-form input:focus, form#st-form select:focus, form#st-form textarea:focus {
  outline: none; border-color: var(--accent);
}
.form-row { display: grid; gap: 0 16px; grid-template-columns: 1fr 1fr; }
/* Piège [hidden] : une règle d'auteur qui pose un display bat l'attribut.
   resa.js masque les champs date libre ([data-free-date]) quand le
   calendrier est actif — sans cette règle, display:grid les laisserait
   visibles. */
.form-row[hidden], [data-free-date][hidden] { display: none; }
.st-hp { position: absolute !important; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.st-status { margin-top: 16px; padding: 12px 16px; border-radius: 12px; font-weight: 600; }
.st-status--ok { background: #e7f6ec; color: #0b7a3e; border: 1px solid #cdead8; }
.st-status--err { background: #fdecec; color: var(--err); border: 1px solid #f6c9cc; }
.st-status[hidden] { display: none; }

/* Calendrier de services (généré par resa.js : disponibilités simulées) */
#st-slots { margin: 16px 0 4px; }
#st-slots[hidden] { display: none; }
.st-slot-days { display: flex; gap: 8px; flex-wrap: wrap; }
.st-slot-day {
  border: 1.5px solid var(--cream-deep); background: #fff; border-radius: 999px;
  padding: 9px 15px; font-weight: 600; font-size: .9rem; cursor: pointer; min-height: 44px;
}
.st-slot-day.is-on { background: var(--ink); border-color: var(--ink); color: var(--cream); }
.st-slot-day.is-full { opacity: .45; }
.st-slot-times { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.st-slot-time {
  border: 1.5px solid var(--accent); background: #fff; color: var(--accent);
  border-radius: 12px; padding: 10px 14px; font-weight: 700; cursor: pointer; min-height: 44px;
}
.st-slot-time.is-on { background: var(--accent); color: #fff; }
.st-slot-time.is-full, .st-slot-time:disabled { border-color: var(--cream-deep); color: var(--muted); cursor: default; }
.st-slot-hint { color: var(--muted); font-size: .9rem; margin: 10px 0 0; }

/* ── Footer ── */
footer { background: var(--ink); color: #d8d2c8; padding: 44px 0 30px; margin-top: 40px; }
footer .wrap { display: grid; gap: 26px; grid-template-columns: 1.2fr 1fr 1fr; }
footer h4 { color: #fff; font-family: var(--serif); margin: 0 0 10px; }
footer a { color: #d8d2c8; }
footer ul { list-style: none; margin: 0; padding: 0; font-size: .93rem; }
footer li { padding: 3px 0; }
.foot-legal { grid-column: 1 / -1; border-top: 1px solid #3d3831; padding-top: 16px; font-size: .82rem; color: #9d968a; }

/* ── Apparition au scroll (progressive enhancement, cf. main.js) ── */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .5s ease, transform .5s ease; }
.reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ── Responsive ── */
@media (max-width: 880px) {
  .hero .wrap, .resa-layout { grid-template-columns: 1fr; }
  .grid-3, .info-grid { grid-template-columns: 1fr; }
  footer .wrap { grid-template-columns: 1fr; }
  .burger { display: block; }
  .nav {
    display: none; position: absolute; top: 62px; left: 0; right: 0;
    background: var(--cream); border-bottom: 1px solid var(--cream-deep);
    flex-direction: column; align-items: stretch; padding: 10px 16px 16px; gap: 2px;
  }
  body.nav-open .nav { display: flex; }
  .nav a { min-height: 48px; }
  .form-row { grid-template-columns: 1fr; }
}

/* ── Couche démo (demosites/resto-bistrot) ──────────────────────────────────
   Accorde le bandeau « site de démonstration » mutualisé (../_shared/demo.css)
   à la charte du bistrot, et habille les éléments simulés côté client. */
:root {
  --ds-bg: #6e2214;
  --ds-fg: #faf6f0;
  --ds-accent: #faf6f0;
  --ds-accent-fg: #6e2214;
}
button.btn { background: none; cursor: pointer; font: inherit; }
.st-slot-hint[aria-live] { min-height: 1.4em; }
