/* ==========================================================================
   Mauvais Choix / Red Mullet — built from Figma "RED_Mullet" › Website
   Desktop reproduces the 1920 × 1093 slides  → 1 design px = var(--u)
   Mobile reproduces the 402 px iPhone frames  → 1 design px = var(--m)
   ========================================================================== */

@font-face {
  font-family: "Silverknife";
  src: url("../fonts/Silverknife-Bold.woff2") format("woff2"),
       url("../fonts/Silverknife-Bold.woff") format("woff");
  font-weight: 700;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Silverknife";
  src: url("../fonts/Silverknife-Regular.woff2") format("woff2"),
       url("../fonts/Silverknife-Regular.woff") format("woff");
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Silverknife";
  src: url("../fonts/Silverknife-Light.woff2") format("woff2"),
       url("../fonts/Silverknife-Light.woff") format("woff");
  font-weight: 300;
  font-style: normal;
  font-display: swap;
}

:root {
  --cream: #f9f0e1;
  --cream-2: #fae7cb;
  --cream-btn: #f7efe1;
  --navy: #06205c;
  --blue: #0043d4;
  --red: #d80303;
  --black: #000;

  --font: "Silverknife", "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
  --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);

  --u: min(calc(100vw / 1920), calc(100vh / 1093));
  --m: min(calc(100vw / 402), 1.4px);

  /* Prototype keyframe timeline (Figma: 6716.853 ms) */
  --intro: 6.716853s;
}

@supports (height: 100svh) {
  :root { --u: min(calc(100vw / 1920), calc(100svh / 1093)); }
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  background: var(--black);
}

body {
  margin: 0;
  font-family: var(--font);
  font-weight: 700;
  color: var(--cream);
  background: var(--black);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

html.is-locked,
html.is-locked body { overflow: hidden; }

img { display: block; max-width: none; }

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

h1, h2, p { margin: 0; font-weight: 700; }

a { color: inherit; }

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

/* ==========================================================================
   Pages + slide-out transition (Figma: SLIDE_OUT, ease-out, 300 ms — JS)
   ========================================================================== */

.site { position: relative; }

.page {
  position: relative;
  display: flex;
  width: 100%;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
}

.page[hidden] { display: none; }

/* Figma FINAL: the Red Mullet page uses the warmer cream */
.page--rm { --cream: #fae7cb; }

/* The page being left is pinned above the incoming one, then slid away. */
.page.is-leaving {
  position: fixed;
  left: 0;
  right: 0;
  z-index: 20;
  will-change: transform;
}

/* ==========================================================================
   Panels — each half keeps a centred "frame" holding the Figma coordinates
   ========================================================================== */

.panel {
  position: relative;
  height: 100%;
  overflow: hidden;
}

.panel--mc-left  { flex: 0 0 calc(963 / 1920 * 100%); background: var(--cream); --fw: 963; overflow: visible; z-index: 1; }
.panel--mc-right { flex: 1 1 auto; background: var(--navy); --fw: 957; }
.panel--rm-left  { flex: 0 0 50%; background: var(--red); --fw: 960; }
.panel--rm-right { flex: 1 1 auto; background: var(--black); --fw: 960; }

.panel__frame {
  position: absolute;
  left: 50%;
  top: 50%;
  width: calc(var(--fw) * var(--u));
  height: calc(1093 * var(--u));
  transform: translate(-50%, -50%);
}

/* absolutely placed element at Figma (x, y) inside its frame */
.at {
  position: absolute;
  left: calc(var(--x) * var(--u));
  top: calc(var(--y) * var(--u));
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  font-size: calc(22.754 * var(--u));
  line-height: calc(25 * var(--u));
  letter-spacing: calc(2.2754 * var(--u));
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
  transition: transform 0.6s var(--ease-out-expo), filter 0.3s ease;
}
.btn:hover { transform: scale(1.04); }
.btn:active { transform: scale(0.98); transition-duration: 0.15s; }

.btn--blue { background: var(--blue); color: #fff; padding: calc(24.337 * var(--u)) calc(41.373 * var(--u)); }
/* every CTA shares the height of "Reservez votre table" (73.67 design px) */
.btn--cream { background: var(--cream); color: #000; padding: calc(24.337 * var(--u)) calc(53.175 * var(--u)); }

.btn--blue:hover { filter: brightness(1.12); }

/* ==========================================================================
   Circle links (Catering ↔ Restaurant) — page bottom-right, partly off-canvas
   ========================================================================== */

.circle-link {
  position: absolute;
  z-index: 3;
  right: calc(-71 * var(--u));
  bottom: calc(-45 * var(--u));
  width: calc(301 * var(--u));
  height: calc(292 * var(--u));
  border: max(1px, calc(1 * var(--u))) solid var(--cream);
  border-radius: calc(189 * var(--u));
  color: var(--cream);
  text-decoration: none;
  transition: background-color 0.6s var(--ease-out-expo);
}
.circle-link:hover { background-color: rgba(249, 240, 225, 0.07); }

.circle-link__inner {
  position: absolute;
  left: calc(50% - 17 * var(--u));
  top: calc(50 * var(--u));
  height: calc(140 * var(--u));
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: calc(24 * var(--u));
}

.circle-link__group {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: calc(11 * var(--u));
}

.circle-link--catering .circle-link__symbol   { width: calc(41 * var(--u)); height: calc(45 * var(--u)); }
.circle-link--restaurant .circle-link__symbol { width: calc(37.001 * var(--u)); height: calc(37.4287 * var(--u)); }

.circle-link__label {
  font-size: calc(32.05 * var(--u));
  line-height: 0.8;
  text-transform: uppercase;
  white-space: nowrap;
}

.circle-link__arrow {
  width: calc(31 * var(--u));
  height: calc(14.7279 * var(--u));
  transition: transform 0.6s var(--ease-out-expo);
}
.circle-link:hover .circle-link__arrow { transform: translateX(calc(10 * var(--u))); }

.circle-link__symbol { transition: transform 0.8s var(--ease-out-expo); }
.circle-link:hover .circle-link__symbol { transform: rotate(-8deg); }

/* ==========================================================================
   PAGE 1 — Mauvais Choix
   ========================================================================== */

.mc-logo { width: calc(587.77 * var(--u)); }
.mc-logo img { width: 100%; height: auto; }

/* info block — every line break is the designer's own, so lines never re-wrap */
.mc-text {
  --fs: 18;   /* desktop size */
  --mfs: 18;  /* mobile size */
  width: calc(var(--w) * var(--u));
  color: var(--cream-2);
  font-size: calc(var(--fs) * var(--u));
  line-height: 1.2;
  letter-spacing: 0.1em;
  font-weight: 400;
  text-align: center;
  white-space: nowrap;
}
.mc-text strong { font-weight: 700; }
.mc-menu { --fs: 24; --mfs: 20; text-transform: uppercase; }
.mc-address { --fs: 17.38; --mfs: 17.38; font-weight: 700; }

.mc-text a,
.rm-contact a { text-decoration: none; }
.mc-text a:hover,
.rm-contact a:hover { text-decoration: underline; text-underline-offset: 0.18em; text-decoration-thickness: 1px; }

/* ---------- Animated illustration (Figma Frame 1 + 16 animated layers) ---------- */

.illu {
  --k: var(--u);
  position: absolute;
  /* the drawn card (Cadre, centre at 367.5 / 488.2 in the artwork) sits in the
     exact centre of the cream panel, whatever the window proportions */
  left: calc(50% - 367.535 * var(--k));
  top: calc(50% - 488.17 * var(--k));
  width: calc(691.33 * var(--k));
  height: calc(977.74 * var(--k));
}

.illu__camera,
.illu__clip {
  position: absolute;
  inset: 0;
}

.illu__camera { transform-origin: 50% 50%; }
.illu__clip { overflow: hidden; }

.illu__layer {
  position: absolute;
  left: calc(var(--x) * var(--k));
  top: calc(var(--y) * var(--k));
  width: calc(var(--w) * var(--k));
  height: calc(var(--h) * var(--k));
  transform-origin: 50% 50%;
}

/* Animations are attached paused; JS plays them once every layer is decoded
   (and restarts them each time the page is shown, like the prototype). */
.illu__camera,
.illu__layer {
  animation-duration: var(--intro);
  animation-timing-function: linear;
  animation-fill-mode: both;
  animation-iteration-count: 1;
  animation-play-state: paused;
}

/* Values below come from Figma get_motion_context (desktop frame). The mobile
   frame uses the same timing with every offset × 0.647 — i.e. the same
   keyframes expressed in --k units. Mask reveals use the literal Figma
   mask widths (they end slightly wider than the artwork). */

/* Camera: zoom out from 2.4× */
.illu__camera { animation-name: k-camera; }
@keyframes k-camera {
  0%      { translate: calc(34.877 * var(--k)) calc(-198.421 * var(--k)); rotate: 3deg;    scale: 2.4;  animation-timing-function: cubic-bezier(0.45, 0, 0.25, 1); }
  19.354% { translate: calc(-20.929 * var(--k)) calc(-88.514 * var(--k)); rotate: -1.5deg; scale: 1.65; animation-timing-function: cubic-bezier(0.45, 0, 0.25, 1); }
  32.009% { translate: calc(-17.758 * var(--k)) calc(-26.839 * var(--k)); rotate: 1deg;    scale: 1.4;  animation-timing-function: cubic-bezier(0.45, 0, 0.25, 1); }
  55.085%, 100% { translate: 0 0; rotate: 0deg; scale: 1; }
}

/* Fond_BG */
[data-layer="fond-bg"] { animation-name: k-fondbg-o, k-fondbg-s; }
@keyframes k-fondbg-o { 0%, 53.597% { opacity: 0; animation-timing-function: ease; } 62.529%, 100% { opacity: 1; } }
@keyframes k-fondbg-s { 0%, 53.597% { scale: 0.97; animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1); } 65.507%, 100% { scale: 1; } }

/* Fond */
[data-layer="fond"] { animation-name: k-fond-o, k-fond-s; }
@keyframes k-fond-o { 0%, 53.597% { opacity: 0; animation-timing-function: ease; } 64.018%, 100% { opacity: 1; } }
@keyframes k-fond-s { 0%, 53.597% { scale: 1.02; animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1); } 65.507%, 100% { scale: 1; } }

/* Cadre */
[data-layer="cadre"] { animation-name: k-cadre-o, k-cadre-s; }
@keyframes k-cadre-o { 0%, 53.597% { opacity: 0; animation-timing-function: ease; } 62.529%, 100% { opacity: 1; } }
@keyframes k-cadre-s { 0%, 53.597% { scale: 1.025; animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1); } 66.996%, 100% { scale: 1; } }

/* Shape2 — line reveal (mask width 1 → 60.842, left anchored) */
[data-layer="shape2"] { animation-name: k-shape2-o, k-shape2-m; }
@keyframes k-shape2-o { 0%, 36.475% { opacity: 0; animation-timing-function: step-end; } 36.773%, 100% { opacity: 1; } }
@keyframes k-shape2-m { 0%, 36.475% { clip-path: inset(0 calc(55 * var(--k)) 0 0); animation-timing-function: cubic-bezier(0.55, 0, 0.2, 1); } 42.431%, 100% { clip-path: inset(0 calc(-4.842 * var(--k)) 0 0); } }

/* Feuillage_1 */
[data-layer="feuillage1"] { animation-name: k-feuil1-o, k-feuil1-rs, k-leaves-t; }
@keyframes k-feuil1-o  { 0%, 14.888% { opacity: 0; animation-timing-function: ease; } 20.843%, 100% { opacity: 1; } }
@keyframes k-feuil1-rs { 0%, 14.888% { rotate: -14deg; scale: 0.7; animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1); } 25.309%, 100% { rotate: 0deg; scale: 1; } }

/* Feuillage_2 */
[data-layer="feuillage2"] { animation-name: k-feuil2-o, k-feuil2-rs, k-leaves-t; }
@keyframes k-feuil2-o  { 0%, 16.377% { opacity: 0; animation-timing-function: ease; } 22.332%, 100% { opacity: 1; } }
@keyframes k-feuil2-rs { 0%, 16.377% { rotate: 14deg; scale: 0.7; animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1); } 26.798%, 100% { rotate: 0deg; scale: 1; } }

@keyframes k-leaves-t { 0%, 22.332% { translate: 0 calc(181.443 * var(--k)); animation-timing-function: cubic-bezier(0.5, 0, 0.12, 1); } 30.52%, 100% { translate: 0 0; } }

/* Shape_4 — reveal growing from the right (mask x 192.829 → 0) */
[data-layer="shape4"] { animation-name: k-shape4-o, k-shape4-m; }
@keyframes k-shape4-o { 0%, 47.641% { opacity: 0; animation-timing-function: step-end; } 47.939%, 100% { opacity: 1; } }
@keyframes k-shape4-m { 0%, 47.641% { clip-path: inset(0 calc(0.171 * var(--k)) 0 calc(192.829 * var(--k))); animation-timing-function: cubic-bezier(0.55, 0, 0.2, 1); } 55.085%, 100% { clip-path: inset(0 calc(-19.551 * var(--k)) 0 0); } }

/* Gros-Crosnes */
[data-layer="gros-crosnes"] { animation-name: k-gros-o, k-gros-s, k-gros-t; }
@keyframes k-gros-o { 0%, 11.166% { opacity: 0; animation-timing-function: ease; } 17.121%, 100% { opacity: 1; } }
@keyframes k-gros-s { 0%, 11.166% { scale: 0.85; animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1); } 21.587%, 100% { scale: 1; } }
@keyframes k-gros-t {
  0%, 11.166%      { translate: 0 calc(244.948 * var(--k)); animation-timing-function: cubic-bezier(0.5, 0, 0.12, 1); }
  19.354%, 22.332% { translate: 0 calc(181.443 * var(--k)); animation-timing-function: cubic-bezier(0.5, 0, 0.12, 1); }
  30.52%, 100%     { translate: 0 0; }
}

/* Panneau */
[data-layer="panneau"] { animation-name: k-panneau-o, k-panneau-s; }
@keyframes k-panneau-o { 0%, 45.408% { opacity: 0; animation-timing-function: ease; } 51.363%, 100% { opacity: 1; } }
@keyframes k-panneau-s { 0%, 45.408% { scale: 0.9; animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1); } 55.83%, 100% { scale: 1; } }

/* Choux_2 */
[data-layer="choux2"] { animation-name: k-choux-o, k-choux-s, k-choux-t; }
@keyframes k-choux-o { 0%, 22.332% { opacity: 0; animation-timing-function: ease; } 28.287%, 100% { opacity: 1; } }
@keyframes k-choux-s { 0%, 22.332% { scale: 0.85; animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1); } 32.753%, 100% { scale: 1; } }
@keyframes k-choux-t {
  0%, 22.332%     { translate: 0 calc(-27.216 * var(--k)); animation-timing-function: cubic-bezier(0.5, 0, 0.12, 1); }
  30.52%, 43.175% { translate: 0 calc(-99.793 * var(--k)); animation-timing-function: cubic-bezier(0.65, 0, 0.35, 1); }
  52.108%, 100%   { translate: 0 0; }
}

/* REDMU (medallion) */
[data-layer="redmu"] { animation-name: k-redmu-o, k-redmu-rs; }
@keyframes k-redmu-o  { 0%, 52.108% { opacity: 0; animation-timing-function: ease; } 57.319%, 100% { opacity: 1; } }
@keyframes k-redmu-rs { 0%, 52.108% { rotate: -15deg; scale: 0.6; animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1); } 62.529%, 100% { rotate: 0deg; scale: 1; } }

/* Symbole (top medallion) */
[data-layer="symbole"] { animation-name: k-symbole-o, k-symbole-rs; }
@keyframes k-symbole-o  { 0%, 49.875% { opacity: 0; animation-timing-function: ease; } 55.085%, 100% { opacity: 1; } }
@keyframes k-symbole-rs { 0%, 49.875% { rotate: 45deg; scale: 0.6; animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1); } 60.296%, 100% { rotate: 0deg; scale: 1; } }

/* Buddha_Original (first element on screen) */
[data-layer="buddha"] { animation-name: k-buddha-o, k-buddha-s, k-buddha-t; }
@keyframes k-buddha-o { 0%, 0.744% { opacity: 0; animation-timing-function: ease; } 7.444%, 100% { opacity: 1; } }
@keyframes k-buddha-s { 0%, 0.744% { scale: 0.85; animation-timing-function: cubic-bezier(0.16, 1, 0.3, 1); } 12.655%, 100% { scale: 1; } }
@keyframes k-buddha-t {
  0%, 11.166%      { translate: 0 calc(344.741 * var(--k)); animation-timing-function: cubic-bezier(0.5, 0, 0.12, 1); }
  19.354%, 22.332% { translate: 0 calc(181.443 * var(--k)); animation-timing-function: cubic-bezier(0.5, 0, 0.12, 1); }
  30.52%, 100%     { translate: 0 0; }
}

/* Shape1 — line reveal, left anchored (mask width 1 → 279.293) */
[data-layer="shape1"] { animation-name: k-shape1-o, k-shape1-m; }
@keyframes k-shape1-o { 0%, 31.265% { opacity: 0; animation-timing-function: step-end; } 31.562%, 100% { opacity: 1; } }
@keyframes k-shape1-m { 0%, 31.265% { clip-path: inset(0 calc(253 * var(--k)) 0 0); animation-timing-function: cubic-bezier(0.55, 0, 0.2, 1); } 40.197%, 100% { clip-path: inset(0 calc(-25.293 * var(--k)) 0 0); } }

/* Shape3 — reveal growing from the right (mask x 295.658 → 0) */
[data-layer="shape3"] { animation-name: k-shape3-o, k-shape3-m; }
@keyframes k-shape3-o { 0%, 33.498% { opacity: 0; animation-timing-function: step-end; } 33.796%, 100% { opacity: 1; } }
@keyframes k-shape3-m { 0%, 33.498% { clip-path: inset(0 calc(0.342 * var(--k)) 0 calc(295.658 * var(--k))); animation-timing-function: cubic-bezier(0.55, 0, 0.2, 1); } 42.431%, 100% { clip-path: inset(0 calc(-29.897 * var(--k)) 0 0); } }

/* Shape5 — line reveal, left anchored (mask width 1 → 137.985) */
[data-layer="shape5"] { animation-name: k-shape5-o, k-shape5-m; }
@keyframes k-shape5-o { 0%, 49.13% { opacity: 0; animation-timing-function: step-end; } 49.428%, 100% { opacity: 1; } }
@keyframes k-shape5-m { 0%, 49.13% { clip-path: inset(0 calc(125 * var(--k)) 0 0); animation-timing-function: cubic-bezier(0.55, 0, 0.2, 1); } 56.574%, 100% { clip-path: inset(0 calc(-11.985 * var(--k)) 0 0); } }

/* ==========================================================================
   PAGE 2 — Red Mullet
   ========================================================================== */

/* ---------- Red Mullet logo intro (Figma keyframes, played once) ----------
   Fish: fades in, spins from 25° and pops from 0.3× with an overshoot (100 → 750 ms).
   Letters R-E-D / M-U-L-L-E-T: appear one by one every 80 ms (700 → 1580 ms),
   dropping from 1.25× and −6 px. Desktop only: contact line rises 12 px (1710 → 2110 ms).
   --lu = 1 desktop-logo px (751 × 377); mobile uses the same layout × 0.35278. */

.rm-logo {
  --lu: var(--u);
  width: calc(751.043 * var(--lu));
  height: calc(377 * var(--lu));
}
.rm-logo__anim { position: absolute; inset: 0; }

.rm-logo__part {
  position: absolute;
  left: calc(var(--px) * var(--lu));
  top: calc(var(--py) * var(--lu));
  width: calc(var(--pw) * var(--lu));
  height: calc(var(--ph) * var(--lu));
  transform-origin: 50% 50%;
}

.rm-logo__fish {
  animation:
    k-rm-fish-o 150ms ease 100ms both,
    k-rm-fish-r 650ms cubic-bezier(0.45, 1.45, 0.8, 1) 100ms both,
    k-rm-fish-s 600ms cubic-bezier(0.45, 1.45, 0.8, 1) 100ms both,
    k-rm-fish-t 600ms cubic-bezier(0.16, 1, 0.3, 1) 100ms both;
  animation-play-state: paused;
}
@keyframes k-rm-fish-o { from { opacity: 0; } to { opacity: 1; } }
@keyframes k-rm-fish-r { from { rotate: 25deg; } to { rotate: 0deg; } }
@keyframes k-rm-fish-s { from { scale: 0.3; } to { scale: 1; } }
@keyframes k-rm-fish-t { from { translate: 0 calc(40 * var(--lu)); } to { translate: 0 0; } }

.rm-logo__letter {
  animation:
    k-rm-letter-o 10ms step-end var(--d) both,
    k-rm-letter-st 120ms cubic-bezier(0.2, 0.8, 0.3, 1) var(--d) both;
  animation-play-state: paused;
}
@keyframes k-rm-letter-o { from { opacity: 0; } to { opacity: 1; } }
@keyframes k-rm-letter-st { from { scale: 1.25; translate: 0 calc(-6 * var(--lu)); } to { scale: 1; translate: 0 0; } }

.rm-contact {
  animation:
    k-rm-contact-o 400ms ease 1710ms both,
    k-rm-contact-t 400ms cubic-bezier(0.16, 1, 0.3, 1) 1710ms both;
  animation-play-state: paused;
}
@keyframes k-rm-contact-o { from { opacity: 0; } to { opacity: 1; } }
@keyframes k-rm-contact-t { from { translate: 0 calc(12 * var(--u)); } to { translate: 0 0; } }

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

.rm-contact {
  font-size: calc(32 * var(--u));
  line-height: calc(36 * var(--u));
  letter-spacing: 0.1em;
  color: var(--black);
  white-space: nowrap;
}

.rm-symbol { width: calc(93 * var(--u)); height: calc(105 * var(--u)); }

.rm-title {
  transform: translateX(-50%);
  font-size: calc(69.137 * var(--u));
  line-height: 0.8;
  text-align: center;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--cream);
}

/* ---------- Events form ---------- */

.rm-form {
  --fs: calc(24 * var(--u));
  --field-h: calc(38 * var(--u));
  --gap: calc(40.08 * var(--u));
  --area-h: calc(188 * var(--u));
  --area-gap: calc(-5.39 * var(--u)); /* box sits 34.69 below the phone line */
  --area-pad: calc(23 * var(--u)) calc(24 * var(--u));
  --line: max(1px, calc(1.30942 * var(--u)));
  --lift: calc(-26 * var(--u));
  width: calc(412.466 * var(--u));
  display: flex;
  flex-direction: column;
  margin: 0;
}

.rm-form__fields {
  display: flex;
  flex-direction: column;
  gap: var(--gap);
}

.field {
  position: relative;
  height: calc(var(--field-h) + var(--line));
  border-bottom: var(--line) solid var(--cream);
}

.field__label {
  position: absolute;
  left: 0;
  top: 0;
  font-size: var(--fs);
  line-height: 0.8;
  text-transform: uppercase;
  color: var(--cream);
  white-space: nowrap;
  pointer-events: none;
  transform-origin: 0 100%;
  transition: transform 0.55s var(--ease-out-expo), opacity 0.3s ease;
}

.field__input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: var(--field-h);
  margin: 0;
  padding: 0 0 calc(var(--field-h) - var(--fs) * 0.8) 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--cream);
  font-size: var(--fs);
  line-height: 0.8;
  letter-spacing: 0.02em;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  color-scheme: dark;
}
.field__input::placeholder { color: transparent; }
.field__input::-webkit-outer-spin-button,
.field__input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.field__input[type="number"] { -moz-appearance: textfield; }
.field__input::-webkit-calendar-picker-indicator { opacity: 0.7; cursor: pointer; }
.field--select .field__input { cursor: pointer; }
.field--select .field__input option { background: var(--black); color: var(--cream); }

/* chevron for the select */
.field--select::after {
  content: "";
  position: absolute;
  right: 4px;
  top: calc(var(--fs) * 0.8 * 0.5 - 6px);
  width: 8px;
  height: 8px;
  border-right: 1.3px solid var(--cream);
  border-bottom: 1.3px solid var(--cream);
  transform: rotate(45deg);
  pointer-events: none;
}

/* floating label once the field is focused or filled */
.field:focus-within .field__label,
input.field__input:not(:placeholder-shown) + .field__label,
.field.is-filled .field__label {
  transform: translateY(var(--lift)) scale(0.55);
  opacity: 0.75;
}

.field::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(-1 * var(--line));
  height: var(--line);
  background: var(--red);
  transform: scaleX(0);
  transform-origin: 0 50%;
  transition: transform 0.6s var(--ease-out-expo);
}
.field:focus-within::before { transform: scaleX(1); }
.field.is-invalid { border-bottom-color: var(--red); }

/* "Your request" — a bordered box; its label stays at the top as a caption */
.field--area {
  height: var(--area-h);
  margin-top: var(--area-gap);
  border: var(--line) solid var(--cream);
}
.field--area::before { display: none; }
.field--area:focus-within { border-color: var(--red); }
.field--area.is-invalid { border-color: var(--red); }
.field--area .field__label {
  top: auto;
  left: 0;
  padding: var(--area-pad);
  position: absolute;
  inset: 0 auto auto 0;
  transform: none !important;
  opacity: 1 !important;
}
.field--area .field__input {
  height: 100%;
  padding: calc(var(--fs) * 0.8 + var(--fs) * 1.6) var(--area-pad-x, calc(24 * var(--u))) calc(16 * var(--u));
  line-height: 1.25;
  resize: none;
  font-weight: 400;
  letter-spacing: 0.03em;
}

.rm-form__submit {
  align-self: center;
  margin-top: calc(58 * var(--u));
}

.rm-form__status {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 18 * var(--u));
  text-align: center;
  font-size: calc(18 * var(--u));
  line-height: 1.1;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--cream);
  opacity: 0.8;
}

/* ==========================================================================
   Booking popup (DinnerTogether)
   ========================================================================== */

.booking {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 24px;
  border: 0;
  background: rgba(3, 14, 42, 0);
  color: var(--cream);
  overflow: hidden;
  transition: background-color 0.5s ease, backdrop-filter 0.5s ease;
}
.booking[open] { display: grid; place-items: center; }
.booking::backdrop { background: transparent; }
.booking.is-open {
  background: rgba(3, 14, 42, 0.72);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

.booking__panel {
  display: flex;
  flex-direction: column;
  width: min(560px, 100%);
  height: min(800px, 100%);
  background: var(--navy);
  border: 1px solid rgba(249, 240, 225, 0.28);
  border-radius: 32px;
  overflow: hidden;
  box-shadow: 0 40px 120px rgba(0, 0, 0, 0.45);
  opacity: 0;
  transform: translateY(56px) scale(0.97);
  transition: opacity 0.45s ease, transform 0.8s var(--ease-out-expo);
}
.booking.is-open .booking__panel { opacity: 1; transform: none; }

.booking__header {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 18px 18px 16px 24px;
}
.booking__symbol { width: 30px; height: auto; }
.booking__title {
  flex: 1;
  padding-top: 4px;
  font-size: 26px;
  line-height: 0.8;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.booking__close {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid rgba(249, 240, 225, 0.5);
  border-radius: 50%;
  background: transparent;
  color: var(--cream);
  cursor: pointer;
  transition: background-color 0.3s ease, transform 0.6s var(--ease-out-expo);
}
.booking__close:hover { background: rgba(249, 240, 225, 0.1); transform: rotate(90deg); }

.booking__body {
  position: relative;
  flex: 1;
  margin: 0 8px 8px;
  border-radius: 24px;
  background: #fff;
  overflow: hidden;
}

.booking__frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
  opacity: 0;
  transition: opacity 0.5s ease;
}
.booking.is-loaded .booking__frame { opacity: 1; }

.booking__loader {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  transition: opacity 0.4s ease;
}
.booking__loader img { width: 44px; height: auto; animation: booking-spin 1.6s cubic-bezier(0.65, 0, 0.35, 1) infinite; }
.booking.is-loaded .booking__loader,
.booking.is-missing .booking__loader { opacity: 0; pointer-events: none; }
@keyframes booking-spin { to { rotate: 360deg; } }

.booking__missing {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 12px;
  padding: 32px;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  font-weight: 400;
  font-size: 15px;
  line-height: 1.5;
  color: var(--navy);
  text-align: center;
}
.booking__missing[hidden] { display: none; }
.booking__missing code { font-size: 13px; background: #eef1f8; padding: 1px 5px; border-radius: 4px; }

/* always-available way out if the booking page refuses to load inside the popup */
.booking__footer { display: flex; justify-content: center; padding: 4px 16px 14px; }
.booking__external {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px 9px;
  border: 1px solid rgba(249, 240, 225, 0.45);
  border-radius: 999px;
  font-size: 14px;
  line-height: 1;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cream);
  text-decoration: none;
  transition: background-color 0.3s ease, border-color 0.3s ease;
}
.booking__external:hover { background: rgba(249, 240, 225, 0.1); border-color: var(--cream); }

/* ==========================================================================
   MOBILE — Figma "iPhone 16 & 17 Pro" frames (402 px wide)
   Panels stack; each keeps a 402-unit frame centred on the screen.
   ========================================================================== */

@media (max-width: 899.98px), (max-height: 559.98px) {

  .page {
    flex-direction: column;
    height: auto;
    min-height: 100vh;
    min-height: 100svh;
  }
  .page--mc { background: var(--navy); }
  .page--rm { background: var(--red); }

  .panel { flex: 0 0 auto; height: auto; overflow: visible; }

  .panel__frame {
    left: 50%;
    top: 0;
    width: calc(402 * var(--m));
    height: 100%;
    transform: translateX(-50%);
  }

  .at {
    left: calc(var(--mx) * var(--m));
    top: calc(var(--my) * var(--m));
  }

  /* ---------- Buttons ---------- */
  .btn {
    padding: 0;
    font-size: calc(24 * var(--m));
    line-height: calc(27 * var(--m));
    letter-spacing: calc(2.4 * var(--m));
    z-index: 4;
  }

  /* ---------- Bands replacing the circle links ---------- */
  .circle-link {
    left: 0;
    right: 0;
    width: auto;
    height: calc(144 * var(--m));
    border: 0;
    border-top: 1px solid var(--cream);
    border-radius: 0;
  }
  .circle-link--catering   { bottom: 0; --cream: #fae7cb; } /* mobile band uses the warmer cream */
  .circle-link--restaurant { bottom: 0; }

  .circle-link__inner {
    left: 50%;
    top: 50%;
    height: auto;
    transform: translate(-50%, -50%);
    flex-direction: row;
    gap: calc(8 * var(--m));
  }
  .circle-link__group { flex-direction: row; gap: calc(12.941 * var(--m)); }
  .circle-link--catering .circle-link__symbol   { width: calc(48.235 * var(--m)); height: calc(52.941 * var(--m)); }
  .circle-link--restaurant .circle-link__symbol { width: calc(37.001 * var(--m)); height: calc(37.4287 * var(--m)); }
  .circle-link__label { font-size: calc(37.71 * var(--m)); }
  .circle-link__arrow { width: calc(36.47 * var(--m)); height: calc(17.33 * var(--m)); }
  .circle-link:hover .circle-link__arrow { transform: translateX(calc(8 * var(--m))); }

  /* ---------- Page 1 (cream 702 + navy 696 = 1398) ---------- */
  /* Cream section = Figma height (702), but never taller than the screen minus the
     part of "Reservez votre table" that hangs below it (26.67) and a 16px margin:
     the CTA is always above the fold; the artwork scales down with the section. */
  .panel--mc-left {
    --mc-top: max(300px, min(calc(702 * var(--m)), calc(100vh - 26.67 * var(--m) - 16px)));
    height: var(--mc-top);
  }
  @supports (height: 100svh) {
    .panel--mc-left { --mc-top: max(300px, min(calc(702 * var(--m)), calc(100svh - 26.67 * var(--m) - 16px))); }
  }
  .panel--mc-right { height: calc(696 * var(--m)); z-index: 2; } /* button straddles the cream panel */

  .illu {
    /* Figma FINAL mobile artwork: 390.76 wide in a 702-high section (× 0.565237),
       scaled with the section when the screen is shorter */
    --k: calc(var(--mc-top) * 0.565237 / 702);
  }

  .mc-logo { width: calc(298.18 * var(--m)); }

  .mc-reserve {
    width: calc(359 * var(--m));
    height: calc(75.67 * var(--m));
    color: var(--cream);
  }

  .mc-text {
    width: calc(var(--mw) * var(--m));
    font-size: calc(var(--mfs) * var(--m));
  }

  /* ---------- Page 2 (red 743 on top — glitch area — then black 862) ---------- */
  /* Red section = Figma height (743), but never taller than the screen, with the
     logo and e-mail anchored to its bottom: the logo animation is always above the fold */
  .panel--rm-left  { height: max(420px, min(calc(743 * var(--m)), 100vh)); }
  @supports (height: 100svh) {
    .panel--rm-left { height: max(420px, min(calc(743 * var(--m)), 100svh)); }
  }
  .panel--rm-right { height: calc(862 * var(--m)); }

  .rm-logo { --lu: calc(0.458876 * var(--m)); }
  .rm-contact { animation: none; } /* not animated in the mobile frame */

  .rm-contact {
    font-size: calc(23.78 * var(--m));
    line-height: calc(26 * var(--m));
    text-transform: uppercase;
  }
  .rm-contact__phone { display: none; } /* mobile shows the e-mail only */
  .rm-logo    { top: auto; bottom: calc(81 * var(--m)); } /* Figma: 743 − 662 */
  .rm-contact { top: auto; bottom: calc(33 * var(--m)); } /* Figma: 743 − 710 */

  .rm-symbol { width: calc(61.97 * var(--m)); height: auto; }

  .rm-title { font-size: calc(52.81 * var(--m)); }

  .rm-form {
    --fs: max(16px, calc(18 * var(--m)));
    --field-h: calc(28.7 * var(--m));
    --gap: calc(31.3 * var(--m));
    --line: 1px;
    --lift: calc(-19 * var(--m));
    --area-h: calc(188 * var(--m));
    --area-gap: calc(-4 * var(--m)); /* box sits 27.3 below the phone line */
    --area-pad: calc(21 * var(--m)) calc(16 * var(--m));
    --area-pad-x: calc(16 * var(--m));
    width: calc(315 * var(--m));
  }

  /* same height and type as "Reservez votre table" */
  .rm-form__submit {
    width: calc(354 * var(--m));
    height: calc(75.67 * var(--m));
    margin-top: calc(39.05 * var(--m));
  }

  /* status sits between the request box and the button */
  .rm-form__status {
    top: calc(312 * var(--m));
    font-size: max(12px, calc(13 * var(--m)));
  }

  /* Booking popup becomes a full-screen sheet */
  .booking { padding: 0; }
  .booking__panel {
    width: 100%;
    height: 100%;
    border: 0;
    border-radius: 0;
    transform: translateY(100%);
    transition: opacity 0.2s ease, transform 0.7s var(--ease-out-expo);
  }
  .booking__body { margin: 0; border-radius: 20px 20px 0 0; }
}

/* ==========================================================================
   GLITCH TEST — canvas over the left panel (drawn by assets/js/glitch.js)
   ========================================================================== */

.glitch-layer {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 5;
  pointer-events: none;
}

/* the panel's own content shakes during a burst (--gx set by glitch.js) */
.illu,
.panel--rm-left .panel__frame { translate: var(--gx, 0px) 0; }

/* ==========================================================================
   Reduced motion — no intro, no slide; final state shown at once
   ========================================================================== */

@media (prefers-reduced-motion: reduce) {
  .illu__camera,
  .illu__layer,
  .rm-logo__part,
  .rm-contact { animation: none !important; }
  .booking__panel { transform: none !important; }
  * { transition-duration: 0.01ms !important; }
}
