/* ==========================================================================
   BASE — reset, typographie de fond, accessibilité, textures
   ========================================================================== */

/* --- Reset ---------------------------------------------------------------- */
*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  /* Les ancres (#reservation, #antipasti…) ne doivent pas passer sous le
     bandeau démo ni sous le header collant. */
  scroll-padding-top: calc(var(--demo-bar-h) + var(--header-h) + var(--sp-4));
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background-color: var(--bg-page);
  color: var(--text-main);
  font-family: var(--font-body);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  font-synthesis-weight: none;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

h1, h2, h3, h4, h5, h6, p, figure, blockquote, dl, dd { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }

img, svg, video {
  display: block;
  max-width: 100%;
  height: auto;
}

button, input, select, textarea {
  font: inherit;
  color: inherit;
}

button { cursor: pointer; }

a { color: inherit; }

/* --- Texture papier -------------------------------------------------------
   Grain généré en SVG (aucune image à charger). Posé en overlay fixe sur
   toute la page, il donne au crème une matière de papier de menu.
   -------------------------------------------------------------------------- */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: var(--z-watermark);
  pointer-events: none;
  opacity: 0.5;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.82' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='220' height='220' filter='url(%23n)' opacity='0.28'/%3E%3C/svg%3E");
}

/* --- Filigrane DÉMO -------------------------------------------------------
   Trame diagonale très pâle, purement décorative, jamais cliquable et
   retirée à l'impression. Elle rappelle le statut de modèle sans gêner
   la lecture.
   -------------------------------------------------------------------------- */
.demo-watermark {
  position: fixed;
  inset: 0;
  z-index: var(--z-watermark);
  pointer-events: none;
  opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='260' height='260'%3E%3Ctext x='130' y='130' font-family='Georgia,serif' font-size='26' font-weight='700' letter-spacing='5' fill='%232b2118' text-anchor='middle' transform='rotate(-30 130 130)'%3EDÉMO%3C/text%3E%3C/svg%3E");
}

/* --- Titres ---------------------------------------------------------------- */
h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 500;
  color: var(--text-heading);
  line-height: var(--lh-title);
  font-variation-settings: "SOFT" 30, "WONK" 0, "opsz" 40;
}

h1 { font-size: var(--fs-h1); letter-spacing: var(--ls-display); }
h2 { font-size: var(--fs-h2); letter-spacing: -0.018em; }
h3 { font-size: var(--fs-h3); letter-spacing: -0.01em; }
h4 { font-size: var(--fs-h4); }

/* Italique « wonky » de Fraunces : réservée aux mots mis en avant dans les
   titres (noms de plats en italien, mots clés). */
.italic-accent {
  font-style: italic;
  font-variation-settings: "SOFT" 60, "WONK" 1, "opsz" 40;
  color: var(--c-terracotta-deep);
}

/* --- Éléments de texte récurrents ------------------------------------------ */
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-3);
  font-size: var(--fs-xs);
  font-weight: 700;
  letter-spacing: var(--ls-eyebrow);
  text-transform: uppercase;
  color: var(--c-olive);
}

.eyebrow::before {
  content: "";
  width: 28px;
  height: 1px;
  background: currentColor;
  opacity: 0.7;
}

.eyebrow--center::after {
  content: "";
  width: 28px;
  height: 1px;
  background: currentColor;
  opacity: 0.7;
}

.eyebrow--on-dark { color: var(--c-terracotta-soft); }

.lead {
  font-size: var(--fs-lead);
  color: var(--text-muted);
  max-width: 62ch;
}

.muted { color: var(--text-muted); }

strong, b { font-weight: 700; }

code {
  padding: 1px 5px;
  background: var(--c-cream-3);
  border-radius: 2px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.9em;
  color: var(--c-ink);
}

/* --- Accessibilité --------------------------------------------------------- */
:focus-visible {
  outline: 2px solid var(--c-terracotta-deep);
  outline-offset: 3px;
  border-radius: 2px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: var(--sp-4);
  z-index: 400;
  padding: var(--sp-3) var(--sp-5);
  background: var(--c-wood);
  color: var(--text-on-dark);
  font-size: var(--fs-sm);
  letter-spacing: 0.04em;
  text-decoration: none;
  border-radius: 0 0 var(--radius) var(--radius);
  transition: top var(--dur-fast) var(--ease-out);
}

.skip-link:focus { top: 0; }

/* --- Impression -----------------------------------------------------------
   La carte est la page la plus souvent imprimée : on retire le décor et on
   passe le texte en noir sur blanc.
   -------------------------------------------------------------------------- */
@media print {
  body::before,
  .demo-watermark,
  .demo-bar,
  .site-header,
  .site-footer,
  .mobile-menu { display: none !important; }

  body { background: #fff; color: #000; }
}
