/* Murigny Pizza — identité : voir design-system.md (fond « Four à bois ») */

@font-face {
  font-family: "EB Garamond";
  src: url("../fonts/eb-garamond-latin-800.woff2") format("woff2");
  font-weight: 800;
  font-display: swap;
}
@font-face {
  font-family: "Schibsted Grotesk";
  src: url("../fonts/schibsted-grotesk-latin-wght.woff2") format("woff2");
  font-weight: 400 900;
  font-display: swap;
}

:root {
  --charbon: #18120e;
  --creme: #f3e9d8;
  --kraft: #ebddc3;
  --encre: #2a1f16;
  --bleu: #253580;
  --rouge: #e7273c;
  --gris-c: #bfb09c;
  --gris-k: #6b5a48;
  --filet-c: rgba(243, 233, 216, .2);
  --filet-k: rgba(42, 31, 22, .18);
  --vert: #2bb24c;

  --titre: "EB Garamond", Garamond, "Times New Roman", serif;
  --texte: "Schibsted Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif;

  --pad: 16px;
  --tabs-h: 48px;
  --dock-h: 64px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --ease: cubic-bezier(.2, .7, .2, 1);
}

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

html {
  background: var(--charbon);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}
@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--charbon);
  color: var(--creme);
  font: 400 16px/1.5 var(--texte);
  -webkit-font-smoothing: antialiased;
  /* Le dock ne doit jamais cacher la fin de la page. */
  padding-bottom: calc(var(--dock-h) + var(--safe-b));
}

img { display: block; max-width: 100%; }
a { color: inherit; }
p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
button { font: inherit; }

.skip {
  position: absolute; left: -9999px; top: 12px; z-index: 100;
  background: var(--creme); color: var(--charbon); padding: 10px 14px; text-decoration: none;
}
.skip:focus { left: 12px; }

:focus-visible { outline: 3px solid currentColor; outline-offset: 3px; }

.vh {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap;
}

.label {
  font: 650 12px/1.35 var(--texte);
  letter-spacing: .16em;
  text-transform: uppercase;
}

.ico { flex: none; display: block; }

/* Les heures s'écrivent dans la voix titre (bar.md R5). */
.t {
  font-family: var(--titre);
  font-weight: 800;
  font-style: normal;
  font-variant-numeric: lining-nums tabular-nums;
  font-size: 1.12em;
  letter-spacing: 0;
  white-space: nowrap;      /* « 18h–22h » ne se coupe jamais en deux */
}

/* ---------- Le registre : la seule façon de délimiter un bloc (design-system §6) ---------- */

.reg { display: block; border-bottom: 1px solid currentColor; }
.reg__head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-bottom: 8px;
  border-bottom: 2px solid currentColor;
}
.reg__head a { text-underline-offset: 3px; }
.reg__row { display: block; padding: 10px 0; }
.reg__row + .reg__row,
.reg ul > .reg__row + .reg__row { border-top: 1px solid var(--filet-k); }
.reg--c .reg__row + .reg__row,
.reg--c ul > .reg__row + .reg__row { border-top-color: var(--filet-c); }

/* ---------- Statut ---------- */

.status { display: flex; align-items: center; gap: 10px; min-width: 0; }
.status__dot {
  flex: none;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--gris-c);
}
.status[data-open="true"] .status__dot { background: var(--vert); }
.status[data-open="false"] .status__dot { background: var(--rouge); }
.status__txt { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.status__txt b { font-weight: 650; }
.status__txt span { color: var(--gris-c); }

.status--big { gap: 12px; }
.status--big .status__dot { width: 12px; height: 12px; }
.status--big .status__txt b { font-size: 19px; }
.status--big .status__txt span { font-size: 15px; color: var(--creme); }
.status--big .status__txt .t { font-size: 26px; line-height: 1; }

/* ---------- Hero : un seul écran, tout ce qu'il faut savoir ---------- */

.hero {
  background: var(--charbon);
  color: var(--creme);
  --logo: clamp(104px, 15svh, 168px);
}

.hero__in {
  min-height: calc(100svh - var(--tabs-h) - var(--dock-h) - var(--safe-b));
  padding: 14px var(--pad) 12px;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  grid-template-rows: auto 1fr auto auto;
  grid-template-areas:
    "logo  today"
    "title title"
    "proof proof"
    "addr  addr";
  column-gap: 16px;
}

.hero__logo { grid-area: logo; width: auto; height: var(--logo); }
.hero__today { grid-area: today; align-self: end; }

.hero__title {
  grid-area: title;
  align-self: center;
  margin: 10px 0;
  font: 800 min(14.5vw, 7.2svh, 72px)/.98 var(--titre);
  letter-spacing: -.01em;
}

.hero__proof { grid-area: proof; }
.hero__proof li {
  font: 800 min(7.4vw, 3.5svh, 30px)/1.1 var(--titre);
  padding: 3px 0;
}

.hero__mode { font-size: 15px; color: var(--gris-c); }
.hero__addr { grid-area: addr; margin-top: 10px; }
.hero__addr .reg__row { font-size: 15px; line-height: 1.4; }

/* Arrivée : les blocs montent l'un après l'autre, une seule fois. */
@keyframes monte { from { opacity: 0; transform: translateY(18px); } }
.motion .hero__in > * { animation: monte .8s var(--ease) both; }
.motion .hero__in > :nth-child(2) { animation-delay: .08s; }
.motion .hero__in > :nth-child(3) { animation-delay: .16s; }
.motion .hero__in > :nth-child(4) { animation-delay: .26s; }
.motion .hero__in > :nth-child(5) { animation-delay: .36s; }

/* ---------- Fond du hero : la lueur du four + le monogramme en filigrane ---------- */

.hero { position: relative; overflow: hidden; }
.hero__in { position: relative; z-index: 1; }
.hero::before, .hero::after { content: ""; position: absolute; inset: 0; pointer-events: none; }
/* le monogramme du logo, derrière le texte */
.hero::before {
  background: url("../img/logo.png") no-repeat;
  background-size: auto 190%;
  background-position: 145% 38%;
  opacity: .1;
}
/* la chaleur du four, qui monte du bas à gauche */
.hero::after {
  background: radial-gradient(135% 85% at 10% 112%, rgba(230, 126, 40, .42), rgba(24, 18, 14, 0) 64%);
}

/* ---------- Onglets : en haut dès l'arrivée, collés pendant tout le défilement ---------- */

.tabs {
  position: sticky;
  top: 0;
  z-index: 40;
  background: var(--charbon);
  border-bottom: 1px solid var(--filet-c);
}
.tabs::after {
  content: "";
  position: absolute;
  top: 0; right: 0; bottom: 0;
  width: 36px;
  background: linear-gradient(to right, rgba(24, 18, 14, 0), var(--charbon));
  pointer-events: none;
}
.tabs__in {
  display: flex;
  max-width: 1360px;
  margin: 0 auto;
  padding: 0 24px 0 6px;
  overflow-x: auto;
  scrollbar-width: none;
  -webkit-overflow-scrolling: touch;
}
.tabs__in::-webkit-scrollbar { display: none; }
.tabs a {
  flex: none;
  display: flex;
  align-items: center;
  height: var(--tabs-h);
  padding: 0 11px;
  color: var(--gris-c);
  font: 600 15px/1 var(--texte);
  text-decoration: none;
  white-space: nowrap;
  -webkit-tap-highlight-color: transparent;
}
.tabs a.is-on { color: var(--creme); box-shadow: inset 0 -3px 0 var(--rouge); }

/* Une cible d'onglet arrive juste sous la barre. */
.sec, .carte__reg { scroll-margin-top: var(--tabs-h); }

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

.sec {
  position: relative;
  padding: 72px var(--pad);
}
.sec--kraft { background: var(--kraft); color: var(--encre); }
.sec--charbon { background: var(--charbon); color: var(--creme); }

.wrap { max-width: 640px; margin: 0 auto; }
.sec__head { margin-bottom: 40px; }
.sec--kraft .sec__head .label { color: var(--gris-k); }
.sec--charbon .sec__head .label { color: var(--gris-c); }

.h2 {
  margin: 10px 0 0;
  font: 800 44px/1 var(--titre);
  letter-spacing: -.005em;
}

/* La plaque tricolore : marque chaque changement de fond. */
.plaque {
  position: absolute;
  top: 0; left: 50%;
  transform: translate(-50%, -50%);
  width: 96px; height: 20px;
  background: var(--charbon);
  display: flex; align-items: center; justify-content: center;
  z-index: 1;
}
.plaque i { display: block; width: 24px; height: 6px; }
.plaque i:nth-child(1) { background: var(--bleu); }
.plaque i:nth-child(2) { background: #fff; }
.plaque i:nth-child(3) { background: var(--rouge); }

/* Arrivée des blocs sous le hero. */
.motion [data-arrive] > * {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity .7s var(--ease), transform .7s var(--ease);
}
.motion [data-arrive].in > * { opacity: 1; transform: none; }
.motion [data-arrive].in > *:nth-child(2) { transition-delay: .08s; }
.motion [data-arrive].in > *:nth-child(3) { transition-delay: .16s; }

.btn { gap: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 18px;
  border: 2px solid currentColor;
  border-radius: 0;
  background: transparent;
  color: inherit;
  font: 650 14px/1.2 var(--texte);
  letter-spacing: .04em;
  text-decoration: none;
  cursor: pointer;
}
.btn--plein { background: var(--encre); border-color: var(--encre); color: var(--kraft); }

/* ---------- La carte ---------- */

.carte { --col: 60px; --colgap: 8px; }

/* Recherche : étiquette, puis saisie sur un filet plein de 2 px. */
.find { margin-top: 28px; }
.find .label { display: block; margin-bottom: 6px; color: var(--gris-k); }
.find__box { position: relative; }
.find__in {
  display: block;
  width: 100%;
  margin: 0;
  padding: 10px 44px 12px 0;
  border: 0;
  border-bottom: 2px solid currentColor;
  border-radius: 0;
  background: transparent;
  color: inherit;
  font: 400 18px/1.3 var(--texte);
  -webkit-appearance: none;
  appearance: none;
}
.find__in::placeholder { color: var(--gris-k); opacity: 1; }
.find__in:focus { outline: none; border-bottom-color: var(--bleu); }
.find__in::-webkit-search-cancel-button { -webkit-appearance: none; }
.find__x {
  position: absolute;
  right: -10px; top: 50%;
  transform: translateY(-50%);
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  border: 0;
  background: none;
  color: inherit;
  cursor: pointer;
}
.find__x[hidden], .find__n[hidden] { display: none; }
.find__n { margin-top: 12px; font: 650 15px/1.3 var(--texte); }

.carte__reg + .carte__reg,
.carte__none + .carte__duo,
.carte__reg + .carte__none,
.carte__reg + .carte__duo { margin-top: 48px; }
.carte__duo { display: grid; gap: 48px; align-items: start; }
.carte__duo > .carte__reg { margin-top: 0; }
.carte__reg[hidden], .plat[hidden] { display: none; }

/* En-tête collé sous les onglets pendant sa liste. Fond plein sur toute la largeur ;
   une fois collé, un fondu dessous efface les lignes au lieu de les trancher. */
.carte__head {
  position: sticky;
  top: var(--tabs-h);
  z-index: 2;
  padding-top: 12px;
  background: var(--kraft);
  box-shadow: calc(-1 * var(--pad)) 0 0 var(--kraft), var(--pad) 0 0 var(--kraft);
}
.carte__head::after {
  content: "";
  position: absolute;
  top: calc(100% + 2px);
  left: calc(-1 * var(--pad)); right: calc(-1 * var(--pad));
  height: 36px;
  background: linear-gradient(var(--kraft) 25%, rgba(235, 221, 195, 0));
  pointer-events: none;
  opacity: 0;
  transition: opacity .15s linear;
}
.carte__head.is-stuck::after { opacity: 1; }
.carte__cols {
  display: grid;
  grid-template-columns: repeat(2, var(--col));
  column-gap: var(--colgap);
  text-align: right;
  letter-spacing: .1em;
}
.carte__cols--bis, .carte__gap { display: none; }

.carte__list { margin-top: -1px; }
.plat {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  column-gap: var(--colgap);
  align-items: baseline;
  padding: 14px 0;
  border-top: 1px solid var(--filet-k);
  break-inside: avoid;
}
.carte__list--2 .plat { grid-template-columns: minmax(0, 1fr) var(--col) var(--col); }
.plat__nom {
  margin: 0;
  font: 800 22px/1.15 var(--titre);
  letter-spacing: -.005em;
  text-wrap: balance;
}
.plat__p {
  font: 800 22px/1 var(--titre);
  font-variant-numeric: lining-nums tabular-nums;
  text-align: right;
  white-space: nowrap;
}
.plat__ing {
  grid-column: 1 / -1;
  margin: 4px 0 0;
  font-size: 15px;
  line-height: 1.45;
  color: var(--gris-k);
}
.carte__none { font: 400 17px/1.45 var(--texte); }
.carte__none[hidden] { display: none; }

/* ---------- Horaires ---------- */

.horaires .reg + .reg { margin-top: 40px; }
.jour { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.jour__nom { font: 600 17px/1.3 var(--texte); }
.jour__h {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  font: 800 20px/1.25 var(--titre);
  font-variant-numeric: lining-nums tabular-nums;
}
.jour__h--ferme { font: 600 16px/1.3 var(--texte); color: var(--gris-c); }
.jour.is-today .jour__nom { font-weight: 700; }
.jour.is-today .jour__nom::after {
  content: "aujourd'hui";
  display: block;
  margin-top: 2px;
  color: var(--gris-c);
  font: 650 11px/1.3 var(--texte);
  letter-spacing: .16em;
  text-transform: uppercase;
}

/* ---------- Accès ---------- */

.adr { font: 600 19px/1.4 var(--texte); }
.plan__src { margin-top: 8px; font-size: 13px; color: var(--gris-k); }
.lien-plan { display: inline-flex; align-items: center; gap: 6px; }
.plan iframe { display: block; width: 100%; height: 320px; border: 0; background: #e9e4dc; }

/* ---------- Fidélité ---------- */

.fid { display: grid; grid-template-columns: 112px minmax(0, 1fr); align-items: center; column-gap: 16px; padding: 18px 0; }
.fid__n {
  font: 800 56px/1 var(--titre);
  font-variant-numeric: lining-nums tabular-nums;
}
.fid__t { font-size: 16px; line-height: 1.35; color: var(--gris-c); }
.fid__t b { display: block; margin-top: 2px; font: 800 24px/1.15 var(--titre); color: var(--creme); }

/* ---------- Pied de page ---------- */

.pied {
  padding: 56px var(--pad) 32px;
  background: var(--charbon);
  color: var(--creme);
  border-top: 1px solid var(--filet-c);
}
.pied__in { display: grid; gap: 28px; }
.pied__logo { width: auto; height: 128px; }
.pied__tel { font: 800 26px/1.2 var(--titre); text-decoration: none; }
.pied__c { font-size: 13px; color: var(--gris-c); }

/* ---------- Dock : statut + appel ---------- */

.dock {
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: calc(var(--dock-h) + var(--safe-b));
  padding: 8px var(--pad) calc(8px + var(--safe-b));
  background: var(--charbon);
  color: var(--creme);
  border-top: 1px solid var(--filet-c);
}
.dock__where { display: none; }
.dock .status { flex: 1; }
.dock .status__txt { font-size: 13px; }
.dock .status__txt b { font-size: 15px; }
.dock .status__txt .t { font-size: 17px; line-height: 1; }

.call {
  flex: none;
  display: flex;
  align-items: center;
  gap: 10px;
  min-height: 48px;
  padding: 0 14px;
  background: var(--rouge);
  color: #fff;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
  transition: transform .15s var(--ease);
}
.call:active { transform: translateY(1px); }
.call__num {
  font: 800 22px/1 var(--titre);
  font-variant-numeric: lining-nums tabular-nums;
  white-space: nowrap;
}

/* ---------- Grand écran ---------- */

@media (min-width: 900px) {
  :root { --pad: 48px; }

  .hero { --logo: clamp(150px, 22svh, 210px); }
  .hero__in {
    min-height: 0;
    max-width: calc(1080px + 2 * var(--pad));
    margin: 0 auto;
    padding-top: 56px;
    padding-bottom: 72px;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-rows: auto 1fr auto;
    grid-template-areas:
      "logo  today"
      "title proof"
      "title addr";
    column-gap: 64px;
    row-gap: 32px;
  }
  .hero__today { align-self: end; }
  .hero__title { align-self: end; margin: 0; font-size: clamp(72px, 7vw, 112px); }
  .hero__proof { align-self: end; }
  .hero__addr { margin-top: 0; }

  .wrap, .carte .wrap { max-width: 1080px; }
  .wrap > .sec__head, .wrap > .reg:not(.carte__reg) { max-width: 640px; }
  .tabs__in { max-width: calc(1080px + 2 * var(--pad)); padding-left: calc(var(--pad) - 11px); }
  .dock { padding-left: max(var(--pad), calc((100vw - 1080px) / 2)); padding-right: max(var(--pad), calc((100vw - 1080px) / 2)); }
  .hero__proof li { font-size: clamp(28px, 2.4vw, 36px); }

  .plaque { width: 152px; height: 28px; }
  .plaque i { width: 40px; height: 8px; }

  .h2 { font-size: 64px; }

  /* Barre pleine largeur : adresse à gauche, statut collé au bouton à droite. */
  .dock { gap: 24px; }
  .dock__where { display: block; flex: 1; color: var(--gris-c); }
  .dock .status { flex: none; }
}

@media (min-width: 1100px) {
  .carte__list--2 { columns: 2; column-gap: 64px; }
  .carte__reg:has(.carte__list--2) .carte__head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto 64px minmax(0, 1fr) auto;
    column-gap: 0;
  }
  .carte__cols--bis { display: grid; grid-column: 5; }
  .carte__gap { display: block; }
  .carte__duo { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); column-gap: 64px; }
}
