/* Le First Restaurant — maquette « Bento premium » */
:root {
  --bg: #F4F5F2;
  --card: #FFFFFF;
  --ink: #15171A;
  --muted: #5E635F;
  --line: #E3E6E1;
  --accent: #23784B;        /* vert du diamant du logo, assombri pour le contraste AA */
  --accent-soft: #E2F0E7;
  --warn: #9A5B00;
  --warn-soft: #FBEFD9;
  --red: #B3261E;
  --red-soft: #F9E3E1;
  --r: 24px;
  --r-sm: 14px;
  --shadow: 0 1px 2px rgba(21, 23, 26, .04), 0 12px 32px -12px rgba(21, 23, 26, .14);
  --shadow-hi: 0 2px 4px rgba(21, 23, 26, .05), 0 24px 48px -16px rgba(21, 23, 26, .22);
  --ease: cubic-bezier(.2, .8, .2, 1);
  --font: "Space Grotesk", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 1rem/1.55 var(--font); overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3, p, figure, dl, dd, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; border-radius: 10px; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 12px; top: -60px; z-index: 100; background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 12px; }
.skip:focus { top: 12px; }

.wrap { width: min(1200px, 100% - 32px); margin-inline: auto; }

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 48px; padding: 0 22px; border-radius: 999px; border: 1px solid transparent;
  font: 600 1rem/1 var(--font); text-decoration: none; cursor: pointer;
  transition: transform .25s var(--ease), background-color .25s, box-shadow .25s;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0) scale(.98); }
.btn--accent { background: var(--accent); color: #fff; box-shadow: 0 8px 20px -8px rgba(35, 120, 75, .55); }
.btn--accent:hover { background: #1C6640; }
.btn--ghost { background: var(--card); color: var(--ink); border-color: var(--line); }
.btn--ghost:hover { border-color: #C9CEC8; }
.btn--sm { min-height: 40px; padding: 0 16px; font-size: .9375rem; }

/* ---------- Navigation ---------- */
.nav { position: sticky; top: 0; z-index: 50; padding: 10px 0; }
.nav__inner {
  width: min(1200px, 100% - 24px); margin-inline: auto;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 6px 6px 6px 10px; border-radius: 999px;
  background: rgba(255, 255, 255, .78); backdrop-filter: saturate(1.6) blur(16px); -webkit-backdrop-filter: saturate(1.6) blur(16px);
  border: 1px solid rgba(227, 230, 225, .9); box-shadow: 0 6px 24px -12px rgba(21, 23, 26, .18);
}
.nav__brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 600; letter-spacing: -.01em; }
.nav__brand img { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; border: 1px solid var(--line); }
.nav__links { display: none; gap: 4px; }
.nav__links a { display: block; padding: 8px 14px; border-radius: 999px; text-decoration: none; font-weight: 500; color: var(--muted); transition: color .2s, background-color .2s; }
.nav__links a:hover { color: var(--ink); background: var(--bg); }
@media (min-width: 720px) { .nav__links { display: flex; } }

/* ---------- Cartes + spotlight (Magic UI MagicCard, porté) ---------- */
.card {
  position: relative; background: var(--card); border-radius: var(--r);
  box-shadow: var(--shadow); border: 1px solid rgba(227, 230, 225, .7);
  overflow: hidden; isolation: isolate;
}
.spot { --mx: -400px; --my: -400px; }
.spot::after {
  content: ""; position: absolute; inset: 0; z-index: 3; pointer-events: none; border-radius: inherit;
  background: radial-gradient(260px circle at var(--mx) var(--my), rgba(35, 120, 75, .10), transparent 70%);
  transition: opacity .3s;
}
.spot::before {
  content: ""; position: absolute; inset: 0; z-index: 4; pointer-events: none; border-radius: inherit; padding: 1px;
  background: radial-gradient(220px circle at var(--mx) var(--my), rgba(35, 120, 75, .55), transparent 70%);
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
}

/* ---------- Hero ---------- */
.hero { display: grid; gap: 12px; padding-top: 8px; }
.hero__text { padding: 28px 22px 24px; display: flex; flex-direction: column; gap: 20px; }
.status-chip {
  align-self: flex-start; display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 12px; border-radius: 999px; font-size: .875rem; font-weight: 500;
  background: var(--bg); color: var(--muted);
}
.dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; flex: none; }
[data-state="open"].status-chip { background: var(--accent-soft); color: var(--accent); }
[data-state="soon"].status-chip { background: var(--warn-soft); color: var(--warn); }
[data-state="closed"].status-chip { background: var(--red-soft); color: var(--red); }
[data-state="open"] .dot { animation: beat 2s infinite; }

.hero__title {
  font-size: clamp(2.6rem, 11vw, 5.4rem); line-height: .94; letter-spacing: -.045em; font-weight: 600;
}
.hero__title .line { display: block; overflow: hidden; padding-bottom: .06em; }
.hero__title .line > span { display: inline-block; }
.hero__lede { max-width: 46ch; color: var(--muted); font-size: 1.0625rem; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 10px; }
.hero__logo { display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 28px 24px 22px; gap: 10px; }
.hero__logo img { width: min(240px, 70%); }
.hero__logo figcaption { font-size: .9375rem; color: var(--muted); text-align: center; }

.js .hero__title .line > span { animation: rise 1s var(--ease) both; }
.js .hero__title .line:nth-child(2) > span { animation-delay: .08s; }
.js .hero__title .line:nth-child(3) > span { animation-delay: .16s; }
.js .hero__logo img { animation: pop 1.1s .2s var(--ease) both; }

@media (min-width: 900px) {
  .hero { grid-template-columns: 3fr 1fr; padding-top: 16px; }
  .hero__text { padding: 48px 48px 40px; justify-content: space-between; min-height: 520px; }
  .hero__logo { padding: 32px 24px; }
  .hero__logo img { width: 100%; max-width: 240px; }
}

/* ---------- Bento ---------- */
.bento { display: grid; gap: 12px; margin-top: 12px; grid-template-columns: 1fr 1fr; grid-template-areas:
  "dish dish" "hours hours" "call wa" "social social" "menu loc"; }
.tile { display: flex; flex-direction: column; text-decoration: none; padding: 20px; min-height: 180px; }
.tile__kicker { font-size: .875rem; font-weight: 500; color: var(--muted); }
.tile__big { font-size: clamp(1.5rem, 4.4vw, 2.25rem); font-weight: 600; letter-spacing: -.03em; line-height: 1.02; }
.tile__mid { font-size: 1.25rem; font-weight: 600; letter-spacing: -.02em; line-height: 1.15; margin-top: 4px; }
.tile__fine { font-size: .8125rem; color: var(--muted); }
.tile__cta { margin-top: auto; padding-top: 14px; font-weight: 600; color: var(--accent); }
.tile__icon {
  width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent); margin-bottom: auto; transition: transform .4s var(--ease);
}
a.tile { transition: transform .35s var(--ease), box-shadow .35s var(--ease); }
a.tile:hover { transform: translateY(-3px); box-shadow: var(--shadow-hi); }
a.tile:hover .tile__icon { transform: rotate(-8deg) scale(1.06); }

.tile--dish { grid-area: dish; padding: 0; aspect-ratio: 4 / 3.4; min-height: 0; }
.tile--dish img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.tile--dish:hover img { transform: scale(1.03); }
.tile--dish figcaption {
  position: relative; z-index: 2; margin-top: auto; padding: 56px 20px 20px; display: grid; gap: 4px; color: #fff;
  background: linear-gradient(to top, rgba(10, 12, 11, .78), rgba(10, 12, 11, 0));
}
.tile--dish .tile__kicker { color: rgba(255, 255, 255, .82); }

.tile--hours { grid-area: hours; gap: 6px; }
.hours__state { font-size: clamp(2rem, 8vw, 2.75rem); font-weight: 600; letter-spacing: -.035em; line-height: 1; margin-top: 8px; }
[data-state="open"] .hours__state { color: var(--accent); }
[data-state="soon"] .hours__state { color: var(--warn); }
[data-state="closed"] .hours__state { color: var(--red); }
.hours__clock { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; margin-top: auto; }
.hours__clock span { font-size: clamp(3.5rem, 15vw, 5.5rem); font-weight: 500; letter-spacing: -.05em; line-height: .9; font-variant-numeric: tabular-nums; }
.hours__clock small { font-size: .8125rem; color: var(--muted); }
.hours__next { font-weight: 500; }

.tile--call { grid-area: call; background: var(--ink); color: #fff; border-color: var(--ink); }
.tile--call .tile__kicker { color: rgba(255, 255, 255, .72); }
.tile--call .tile__icon { background: rgba(255, 255, 255, .12); color: #fff; }
.tile--call .tile__cta { color: #9FD9B6; }
.tile--wa { grid-area: wa; }

.tile--social { grid-area: social; gap: 14px; }
.social { display: grid; grid-template-columns: 1fr 1fr; gap: 16px 20px; margin-top: auto; }
.social a { display: grid; text-decoration: none; border-radius: 12px; }
.social a:hover .social__label { color: var(--ink); }
.num { font-weight: 600; letter-spacing: -.05em; font-variant-numeric: tabular-nums; }
.social .num { font-size: clamp(2.4rem, 11vw, 4.25rem); line-height: .95; }
.social__label { font-size: .875rem; color: var(--muted); transition: color .2s; }
.social__tt { grid-column: 1 / -1; }
.social__tt a { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.social__handle { font-weight: 600; font-size: 1.0625rem; }

.tile--menu, .tile--loc { padding: 0; min-height: 220px; }
.tile--menu { grid-area: menu; }
.tile--loc { grid-area: loc; }
.tile--menu img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease); }
.tile--menu:hover img { transform: scale(1.04); }
.tile__overlay {
  position: relative; z-index: 2; margin-top: auto; display: flex; flex-direction: column; padding: 48px 16px 16px; color: #fff;
  background: linear-gradient(to top, rgba(10, 12, 11, .82), rgba(10, 12, 11, 0));
}
.tile__overlay .tile__kicker { color: rgba(255, 255, 255, .82); }
.tile__overlay .tile__cta { color: #9FD9B6; padding-top: 8px; }
.tile__overlay .num { font-size: 1.25rem; letter-spacing: -.02em; }
.tile__overlay--light { color: var(--ink); background: linear-gradient(to top, rgba(255, 255, 255, .97) 55%, rgba(255, 255, 255, 0)); }
.tile__overlay--light .tile__kicker { color: var(--muted); }
.minimap { position: absolute; inset: 0; width: 100%; height: 100%; }
.pulse { transform-box: fill-box; transform-origin: center; animation: ping 2.4s var(--ease) infinite; }

@media (min-width: 720px) {
  .bento { grid-template-columns: repeat(4, 1fr); grid-auto-rows: minmax(210px, auto); grid-template-areas:
    "dish dish hours hours" "dish dish call wa" "social social menu loc"; }
  .tile--dish { aspect-ratio: auto; }
  .tile { padding: 24px; }
}
@media (min-width: 1040px) {
  .bento { gap: 16px; grid-auto-rows: 228px; grid-template-areas:
    "dish dish hours call" "dish dish hours wa" "social social menu loc"; }
  .hero { gap: 16px; }
  .bento { margin-top: 16px; }
}

/* Révélation au scroll (une seule fois, discrète) */
.js .reveal { opacity: 0; transform: translateY(18px) scale(.985); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.js .reveal.is-in { opacity: 1; transform: none; }
.bento .reveal:nth-child(2) { transition-delay: .06s; }
.bento .reveal:nth-child(3) { transition-delay: .12s; }
.bento .reveal:nth-child(4) { transition-delay: .16s; }
.bento .reveal:nth-child(5) { transition-delay: .06s; }
.bento .reveal:nth-child(6) { transition-delay: .12s; }
.bento .reveal:nth-child(7) { transition-delay: .18s; }

/* ---------- En-têtes de section ---------- */
.section-head { display: grid; gap: 10px; margin-bottom: 24px; }
.h2 { font-size: clamp(2.25rem, 8vw, 4.5rem); font-weight: 600; letter-spacing: -.045em; line-height: .95; }
.section-head__lede { color: var(--muted); max-width: 52ch; }
@media (min-width: 900px) {
  .section-head { grid-template-columns: 1fr 1fr; align-items: end; margin-bottom: 32px; }
  .section-head__lede { justify-self: end; }
}

/* ---------- Carte ---------- */
.menu { padding-top: 96px; scroll-margin-top: 72px; }
.menu__tools { display: grid; gap: 14px; }
.search {
  display: flex; align-items: center; gap: 10px; padding: 0 18px; min-height: 56px; border-radius: 999px;
  background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); color: var(--muted);
}
.search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
.search input { flex: 1; min-width: 0; border: 0; outline: 0; background: none; font: 500 1rem var(--font); color: var(--ink); }
.search input::placeholder { color: #8A8F8A; }
.pills { display: flex; gap: 8px; overflow-x: auto; padding: 4px 2px 6px; scrollbar-width: none; margin-inline: -2px; }
.pills::-webkit-scrollbar { display: none; }
.pill {
  flex: none; min-height: 40px; padding: 0 16px; border-radius: 999px; border: 1px solid var(--line);
  background: var(--card); color: var(--ink); font: 500 .9375rem var(--font); cursor: pointer;
  transition: background-color .2s, color .2s, border-color .2s;
}
.pill:hover { border-color: #BFC5BE; }
.pill[aria-pressed="true"] { background: var(--ink); color: #fff; border-color: var(--ink); }
.menu__count { margin: 18px 0 12px; font-size: .875rem; color: var(--muted); }
.menu__grid { display: grid; gap: 12px; grid-template-columns: 1fr; }
@media (min-width: 640px) { .menu__grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 1040px) { .menu__grid { grid-template-columns: repeat(3, 1fr); gap: 16px; } .menu__tools { grid-template-columns: 380px 1fr; align-items: center; } .pills { flex-wrap: wrap; overflow: visible; } }
.dish { padding: 20px; display: flex; flex-direction: column; gap: 6px; min-height: 168px; }
.dish[hidden] { display: none; }
.dish__cat { font-size: .8125rem; font-weight: 500; color: var(--accent); }
.dish__name { font-size: 1.3125rem; font-weight: 600; letter-spacing: -.02em; line-height: 1.15; }
.dish__detail { color: var(--muted); font-size: .9375rem; }
.dish__price { margin-top: auto; padding-top: 12px; font-size: .875rem; color: var(--muted); }
.dish__num { font-size: 2rem; font-weight: 600; letter-spacing: -.04em; color: var(--ink); font-variant-numeric: tabular-nums; }
.dish__ask { display: inline-block; padding: 4px 10px; border-radius: 999px; background: var(--bg); }
.menu__empty { padding: 32px 24px; border-radius: var(--r); border: 1px dashed #C9CEC8; display: grid; gap: 14px; justify-items: start; }

/* ---------- Scrollytelling ---------- */
.story { padding-top: 112px; scroll-margin-top: 72px; }
.story__media { display: none; }
.story__steps { display: grid; gap: 16px; }
.story__step { background: var(--card); border-radius: var(--r); padding: 12px 12px 22px; box-shadow: var(--shadow); }
.story__inline { width: 100%; aspect-ratio: 4 / 3.6; object-fit: cover; border-radius: 16px; margin-bottom: 18px; }
.story__n { display: block; padding-inline: 8px; font-size: 3.5rem; font-weight: 500; letter-spacing: -.06em; line-height: 1; color: var(--accent); }
.story__step h3 { padding-inline: 8px; font-size: 1.75rem; font-weight: 600; letter-spacing: -.03em; margin-top: 6px; }
.story__step p { padding-inline: 8px; color: var(--muted); margin-top: 8px; max-width: 44ch; }

@media (min-width: 900px) {
  .story__grid { display: grid; grid-template-columns: minmax(0, 400px) 1fr; gap: 72px; }
  .story__media { display: block; }
  .story__frame { position: sticky; top: 96px; height: min(640px, calc(100vh - 128px)); }
  .story__frame img {
    position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
    opacity: 0; transform: scale(1.04); transition: opacity .7s var(--ease), transform 1.2s var(--ease);
  }
  .story__frame img.is-active { opacity: 1; transform: none; }
  .story__progress { position: absolute; left: 20px; right: 20px; bottom: 20px; height: 4px; border-radius: 4px; background: rgba(255, 255, 255, .35); overflow: hidden; z-index: 2; }
  .story__progress span { display: block; height: 100%; background: #fff; transform-origin: left; transform: scaleX(.33); transition: transform .6s var(--ease); }
  .story__steps { gap: 0; }
  .story__inline { display: none; }
  .story__step {
    background: none; box-shadow: none; border-radius: 0; padding: 0;
    min-height: 78vh; display: flex; flex-direction: column; justify-content: center;
    opacity: .28; transition: opacity .5s var(--ease);
  }
  .story__step.is-active { opacity: 1; }
  .story__n { font-size: 7.5rem; padding: 0; }
  .story__step h3 { font-size: 3rem; padding: 0; }
  .story__step p { font-size: 1.1875rem; padding: 0; }
}

/* ---------- Contact ---------- */
.contact { padding-top: 112px; display: grid; gap: 12px; scroll-margin-top: 72px; }
.contact__info { padding: 28px 22px; display: grid; gap: 24px; align-content: start; }
.contact__list { display: grid; gap: 18px; }
.contact__list dt { font-size: .875rem; color: var(--muted); font-weight: 500; }
.contact__list dd { margin-top: 2px; font-weight: 500; }
.contact__list a { text-decoration-color: rgba(35, 120, 75, .4); text-underline-offset: 3px; }
.contact__list a:hover { color: var(--accent); }
.hours-list { display: grid; gap: 2px; max-width: 320px; }
.hours-list li { display: flex; justify-content: space-between; gap: 16px; padding: 4px 0; font-weight: 400; font-variant-numeric: tabular-nums; }
.hours-list li span:first-child { text-transform: capitalize; }
.hours-list .is-today { font-weight: 600; color: var(--accent); }
.contact__map { min-height: 360px; }
.contact__map iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; filter: saturate(.85); }
@media (min-width: 900px) {
  .contact { grid-template-columns: 5fr 7fr; gap: 16px; }
  .contact__info { padding: 44px; }
  .contact__map { min-height: 560px; }
}

/* ---------- Pied de page ---------- */
.footer { padding: 64px 0 40px; display: grid; gap: 20px; }
.footer__row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 16px; border-top: 1px solid var(--line); padding-top: 28px; }
.footer__links { display: flex; gap: 6px; flex-wrap: wrap; }
.footer__links a { display: inline-block; padding: 8px 12px; border-radius: 999px; text-decoration: none; color: var(--muted); font-weight: 500; }
.footer__links a:hover { color: var(--ink); background: var(--card); }
.footer__demo { font-size: .875rem; color: var(--muted); }

/* ---------- Animations ---------- */
@keyframes rise { from { transform: translateY(105%); } to { transform: none; } }
@keyframes pop { from { opacity: 0; transform: scale(.86) rotate(-6deg); } to { opacity: 1; transform: none; } }
@keyframes beat { 0%, 100% { box-shadow: 0 0 0 0 rgba(35, 120, 75, .45); } 50% { box-shadow: 0 0 0 6px rgba(35, 120, 75, 0); } }
@keyframes ping { 0% { transform: scale(.6); opacity: .5; } 100% { transform: scale(2.2); opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition-duration: .01ms !important; transition-delay: 0s !important; }
  .js .reveal { opacity: 1; transform: none; }
}

/* Correctifs QA */
.tile.tile--dish, .tile.tile--menu, .tile.tile--loc { padding: 0; }
.menu__empty[hidden] { display: none; }
.tile--loc .minimap { height: 64%; }
.dish { min-height: 0; }
@media (min-width: 640px) { .dish { min-height: 168px; } }
@media (max-width: 899px) { .hero__logo img { width: min(180px, 55%); } }
