/* ==========================================================================
   PILI PIZZA - BASE
   Reset, typographie, primitives de mise en page, accessibilite.
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 1rem);
}

body {
  margin: 0;
  background: var(--surface);
  color: var(--ink);
  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;
}

img, picture, video, svg { display: block; max-width: 100%; }
img { height: auto; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 800;
  line-height: var(--lh-title);
  letter-spacing: -0.022em;
  margin: 0;
  text-wrap: balance;
}
h1 { font-size: var(--fs-display-xl); line-height: var(--lh-display); letter-spacing: -0.034em; }
h2 { font-size: var(--fs-display-l); letter-spacing: -0.03em; }
/* Un titre de transition ne doit pas peser autant qu'un titre de section majeure. */
h2.is-alt { font-size: var(--fs-display-alt); letter-spacing: -0.022em; }
h3 { font-size: var(--fs-display-m); }
h4 { font-size: var(--fs-display-s); font-weight: 700; }

p { margin: 0; }
p + p { margin-top: var(--sp-4); }

ul, ol { margin: 0; padding: 0; list-style: none; }

a { color: inherit; text-decoration-color: color-mix(in srgb, currentColor 42%, transparent); text-underline-offset: 0.22em; }
a:hover { text-decoration-color: currentColor; }

strong, b { font-weight: 700; }

address { font-style: normal; }

/* --- Focus : visible partout, contraste verifie -------------------------- */
:focus { outline: none; }
:focus-visible {
  outline: 3px solid var(--ink);
  outline-offset: 3px;
  border-radius: var(--r-sm);
}
.paper :focus-visible { outline-color: var(--paper-ink); }

::selection { background: var(--brand-primary); color: var(--brand-on-primary); }

/* --- Lien d'evitement ---------------------------------------------------- */
.skip-link {
  position: absolute;
  left: var(--sp-4);
  top: -100%;
  z-index: var(--z-modal);
  padding: var(--sp-3) var(--sp-5);
  background: var(--ink);
  color: var(--surface);
  font-weight: 700;
  border-radius: var(--r-md);
  transition: top var(--dur-fast) var(--ease-out);
}
.skip-link:focus-visible { top: var(--sp-4); }

/* --- Garde-fou de debordement -------------------------------------------
   Un enfant de grille a min-width:auto par defaut : son contenu insecable
   (un bouton en nowrap, un prix, une URL) peut elargir la piste au-dela du
   viewport. On neutralise cela partout ou une grille porte du contenu.       */
.hero__inner, .hero__content,
.distrib__grid > *, .find__grid > *, .reviews__grid > *,
.house__grid > *, .menu-grid > *, .menu__note > *,
.facts > *, .hours > *, .footer__grid > * { min-width: 0; }

/* --- Primitives ---------------------------------------------------------- */
.shell {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.shell--narrow { max-width: var(--maxw-narrow); }

.section { padding-block: var(--section-y); position: relative; }
.section--flush { padding-block: 0; }
.section--tight { padding-block: var(--section-y-tight); }
.section--tight-bottom { padding-bottom: var(--section-y-tight); }
.section--tight-top { padding-top: var(--section-y-tight); }


.eyebrow {
  font-family: var(--font-display);
  font-size: var(--fs-eyebrow);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: var(--ls-eyebrow);
  color: var(--gold);
  margin: 0 0 var(--sp-4);
  display: block;
}
.paper .eyebrow { color: var(--brand-primary); }

.lede {
  font-size: var(--fs-body-l);
  color: var(--ink-muted);
  max-width: var(--measure);
}
.paper .lede { color: var(--paper-muted); }

.mention { font-size: var(--fs-mention); color: var(--ink-faint); }
.paper .mention { color: var(--paper-muted); }

/* Chiffres tabulaires : les prix doivent s'aligner a la colonne pres. */
.num { font-variant-numeric: tabular-nums; font-feature-settings: 'tnum' 1; }

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.rule { height: 1px; background: var(--line); border: 0; margin: 0; }

/* --- La surface papier : unique basculement de theme de la page ---------- */
.paper {
  background: var(--paper);
  color: var(--paper-ink);
}
.paper h1, .paper h2, .paper h3, .paper h4 { color: var(--paper-ink); }
.paper .rule { background: var(--paper-line); }

