/* La Garenne virtual tour — mobile-first UI */
:root {
  --accent: #e1001e;      /* La Garenne red (logo) */
  --on-accent: #ffffff;
  --navy: #1d1761;        /* La Garenne navy (logo) */
  --brand: #1d1761;
  --glass: rgba(20, 16, 66, 0.55);
  --glass-strong: rgba(20, 16, 66, 0.88);
  --line: rgba(255, 255, 255, 0.14);
  --text: #ffffff;
  --muted: rgba(255, 255, 255, 0.72);
  --radius: 16px;
  --btn: 44px;
  --safe-t: env(safe-area-inset-top, 0px);
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-l: env(safe-area-inset-left, 0px);
  --safe-r: env(safe-area-inset-right, 0px);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html, body {
  margin: 0; height: 100%; overflow: hidden;
  background: #000; color: var(--text); font-family: var(--font);
  -webkit-tap-highlight-color: transparent;
  -webkit-text-size-adjust: 100%;
  overscroll-behavior: none;
}
button { font: inherit; color: inherit; }
svg { width: 22px; height: 22px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

#pano { position: fixed; inset: 0; width: 100vw; height: 100vh; height: 100dvh; background: #000; touch-action: none; }
/* hide Pannellum's built-in chrome; we provide our own */
.pnlm-load-box, .pnlm-about-msg, .pnlm-panorama-info { display: none !important; }
.pnlm-container { background: #000 !important; }

/* ---------- buttons ---------- */
.btn {
  width: var(--btn); height: var(--btn); flex: none;
  display: inline-grid; place-items: center;
  border: 1px solid var(--line); border-radius: 50%;
  background: var(--glass); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  cursor: pointer; transition: background .2s, transform .15s, color .2s;
  touch-action: manipulation;
}
.btn:active { transform: scale(.92); }
.btn[aria-pressed="true"] { background: var(--accent); color: var(--on-accent); border-color: transparent; }
.btn--pill { width: auto; padding: 0 14px; border-radius: 999px; font-size: 14px; font-weight: 700; letter-spacing: .04em; }
.btn--ghost { background: transparent; border-color: transparent; backdrop-filter: none; }
.btn:focus-visible, .thumb:focus-visible, .scene-list button:focus-visible, a:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
@media (hover: hover) { .btn:hover { background: var(--glass-strong); } .btn[aria-pressed="true"]:hover { background: var(--accent); } }
/* pannellum hotspot wrapper: let our own children size themselves */
.pnlm-hotspot-base.hs-wrap { width: 0; height: 0; overflow: visible; }

/* ---------- top bar ---------- */
.topbar {
  position: fixed; z-index: 10; top: 0; left: 0; right: 0;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: calc(10px + var(--safe-t)) calc(12px + var(--safe-r)) 24px calc(12px + var(--safe-l));
  background: linear-gradient(to bottom, rgba(0,0,0,.55), rgba(0,0,0,0));
  pointer-events: none;
}
.topbar > * { pointer-events: auto; }
.brand { display: flex; align-items: center; gap: 10px; min-width: 0; color: inherit; text-decoration: none; }
.brand__logo { flex: none; display: grid; place-items: center; height: 46px; padding: 6px 12px; border-radius: 12px; background: rgba(255,255,255,.96); box-shadow: 0 2px 12px rgba(0,0,0,.25); }
.brand__logo img { display: block; height: 34px; width: auto; }
.brand__logo .logo--crest { display: none; }
/* small phones: crest only, so the room name has space */
@media (max-width: 430px) {
  .brand__logo { padding: 5px 8px; }
  .brand__logo .logo--full { display: none; }
  .brand__logo .logo--crest { display: block; }
}
.brand__text { display: flex; flex-direction: column; min-width: 0; line-height: 1.2; text-shadow: 0 1px 6px rgba(0,0,0,.5); }
.brand__text strong { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand__scene { font-size: 13px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar__actions { display: flex; gap: 8px; flex: none; }

/* ---------- dock ---------- */
.dock {
  position: fixed; z-index: 10; left: 0; right: 0; bottom: 0;
  padding: 28px calc(10px + var(--safe-r)) calc(10px + var(--safe-b)) calc(10px + var(--safe-l));
  background: linear-gradient(to top, rgba(0,0,0,.6), rgba(0,0,0,0));
  pointer-events: none;
  transition: transform .35s ease, opacity .35s;
}
.dock > * { pointer-events: auto; }
.controls { display: flex; justify-content: center; gap: 10px; margin-bottom: 10px; }
/* narrow phones: up to 7 buttons must fit on one row */
@media (max-width: 400px) { .controls { gap: 6px; } }
@media (max-width: 360px) { :root { --btn: 40px; } .controls { gap: 5px; } }
.thumbs {
  display: flex; gap: 10px; overflow-x: auto; overscroll-behavior-x: contain;
  scroll-snap-type: x proximity; scrollbar-width: none; padding: 2px 2px 4px;
  -webkit-overflow-scrolling: touch;
  transition: max-height .3s ease, opacity .3s;
  max-height: 120px;
}
.thumbs::-webkit-scrollbar { display: none; }
.dock.thumbs-hidden .thumbs { max-height: 0; opacity: 0; padding: 0; overflow: hidden; }
.thumb {
  flex: none; width: 112px; scroll-snap-align: center;
  border: 2px solid transparent; border-radius: 12px; overflow: hidden; padding: 0;
  background: var(--glass); cursor: pointer; position: relative; text-align: left;
  touch-action: manipulation;
}
.thumb img { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.thumb span {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 14px 7px 5px;
  font-size: 12px; font-weight: 600; line-height: 1.2;
  background: linear-gradient(to top, rgba(0,0,0,.8), transparent);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.thumb[aria-current="true"] { border-color: var(--accent); }
@media (min-width: 768px) {
  .thumbs { justify-content: safe center; }
  .thumb { width: 140px; }
  .controls { gap: 12px; }
}

/* landscape phones: compact layout so the panorama stays visible */
@media (max-height: 500px) and (orientation: landscape) {
  :root { --btn: 40px; }
  .topbar { padding-top: calc(6px + var(--safe-t)); padding-bottom: 12px; }
  .dock { padding-top: 12px; padding-bottom: calc(6px + var(--safe-b)); }
  .controls { margin-bottom: 6px; }
  .thumb { width: 92px; }
  .thumb span { font-size: 11px; }
}

/* ---------- hotspots ---------- */
.hs { position: absolute; width: 0; height: 0; }
.hs__btn {
  position: absolute; left: 0; top: 0; transform: translate(-50%, -50%);
  width: 56px; height: 56px; border-radius: 50%;
  display: grid; place-items: center; cursor: pointer;
  background: rgba(255,255,255,.94); color: var(--brand);
  box-shadow: 0 4px 18px rgba(0,0,0,.35);
  border: 3px solid rgba(255,255,255,.55);
  background-clip: padding-box;
}
.hs__btn svg { width: 28px; height: 28px; stroke-width: 2.6; }
.hs--scene .hs__btn::after {
  content: ""; position: absolute; inset: -8px; border-radius: 50%;
  border: 2px solid rgba(255,255,255,.8); animation: pulse 2.2s ease-out infinite;
}
.hs__label {
  position: absolute; left: 0; top: 36px; transform: translateX(-50%);
  white-space: nowrap; padding: 5px 10px; border-radius: 999px;
  background: var(--glass-strong); color: #fff; font-size: 13px; font-weight: 600;
  pointer-events: none;
}
@keyframes pulse { 0% { transform: scale(.85); opacity: 1; } 100% { transform: scale(1.35); opacity: 0; } }
@media (hover: hover) { .hs__btn:hover { transform: translate(-50%, -50%) scale(1.08); } }

/* "▶ Le Roc highlights" chip above the controls */
.chip {
  width: fit-content; display: flex; align-items: center; gap: 8px; margin: 0 auto 10px; padding: 8px 16px 8px 12px;
  border: 0; border-radius: 999px; background: var(--accent); color: #fff; font-weight: 700; font-size: 14px;
  box-shadow: 0 4px 16px rgba(0,0,0,.3); cursor: pointer; touch-action: manipulation;
}
.chip svg { width: 16px; height: 16px; fill: currentColor; stroke: none; }
.chip:active { transform: scale(.96); }

/* building highlights panel (re-uses the drawer shell) */
.bpanel .drawer__head { align-items: flex-start; }
.bpanel .drawer__sub { margin: 2px 0 12px; }
.bp-player { margin: 0 0 14px; border-radius: 14px; overflow: hidden; background: #000; }
.bp-player video { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; background: #000; }
.bp-player figcaption { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; background: rgba(255,255,255,.06); }
.bp-player strong { font-size: 16px; }
.bp-360 {
  flex: none; display: inline-flex; align-items: center; gap: 6px; padding: 8px 12px; border: 0; border-radius: 999px;
  background: #fff; color: var(--navy); font-weight: 700; font-size: 13px; cursor: pointer;
}
.bp-360 svg { width: 18px; height: 18px; }
.bp-parts { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.bp-parts button {
  position: relative; width: 100%; padding: 0; border: 2px solid transparent; border-radius: 12px; overflow: hidden;
  background: rgba(255,255,255,.06); cursor: pointer; text-align: left;
}
.bp-parts button[aria-current="true"] { border-color: var(--accent); }
.bp-parts img { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.bp-parts span { display: block; padding: 7px 9px 9px; font-size: 13px; font-weight: 600; line-height: 1.25; }
.bp-badge { position: absolute; top: 6px; right: 6px; padding: 2px 7px; border-radius: 999px; background: rgba(0,0,0,.65); font-style: normal; font-size: 11px; font-weight: 700; }
.bp-badge--all { left: 6px; right: auto; background: var(--accent); }
.bp-enter { width: 100%; border: 0; font: inherit; font-weight: 700; cursor: pointer; }
@media (min-width: 768px) { .bpanel { width: 440px; } .bp-parts { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* wide "video highlights" card at the top of each building in the menu */
.scene-list__video { grid-column: 1 / -1; }
.scene-list .scene-list__video button { position: relative; display: block; border-radius: 14px; }
.scene-list .scene-list__video img { display: block; width: 100%; height: 84px; aspect-ratio: auto; object-fit: cover; }
.scene-list__video button::after { content: ""; position: absolute; inset: 0; background: linear-gradient(to right, rgba(20,16,66,.95), rgba(20,16,66,.8) 55%, rgba(20,16,66,.1)); }
.scene-list__video .vplay {
  position: absolute; z-index: 1; left: 14px; top: 50%; transform: translateY(-50%);
  width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center; background: var(--accent); box-shadow: 0 4px 14px rgba(0,0,0,.35);
}
.scene-list__video .vplay svg { width: 20px; height: 20px; fill: #fff; stroke: none; margin-left: 2px; }
.scene-list .scene-list__video .vtext { position: absolute; z-index: 1; left: 72px; top: 50%; transform: translateY(-50%); padding: 0; display: flex; flex-direction: column; }
.scene-list__video strong { font-size: 16px; }
.scene-list__video small { font-size: 13px; font-weight: 500; color: var(--muted); }

/* group separators in the strip & drawer */
.thumbs__group {
  flex: none; align-self: stretch; display: flex; align-items: flex-end;
  writing-mode: vertical-rl; transform: rotate(180deg);
  padding: 6px 2px; font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase;
  color: #fff; border-left: 3px solid var(--accent);
}
.scene-list__group { grid-column: 1 / -1; margin-top: 10px; padding-left: 10px; border-left: 3px solid var(--accent); }
.scene-list__group:first-child { margin-top: 0; }
.scene-list__group h3 { margin: 0; font-size: 16px; }
.scene-list__group p { margin: 2px 0 0; font-size: 13px; color: var(--muted); }

/* aerial building pins */
.hs--pin .pin { position: absolute; left: 0; bottom: 0; display: flex; flex-direction: column; align-items: flex-start; pointer-events: auto; }
.hs--pin .pin__card {
  display: flex; flex-direction: column; padding: 7px 12px 8px; border-radius: 10px 10px 10px 0;
  background: var(--glass-strong); backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border-left: 3px solid var(--accent); white-space: nowrap; box-shadow: 0 4px 16px rgba(0,0,0,.35);
}
.hs--pin strong { font-size: 15px; line-height: 1.2; }
.hs--pin small { font-size: 12px; color: var(--muted); }
.hs--pin .pin__pole { position: relative; width: 3px; height: 48px; background: var(--accent); box-shadow: 0 0 6px rgba(0,0,0,.5); }
.hs--pin .pin__pole::after { content: ""; position: absolute; left: -4px; bottom: -5px; width: 11px; height: 11px; border-radius: 50%; background: var(--accent); border: 2px solid #fff; }
.hs--pin.is-link { cursor: pointer; }
/* tappable pins: small "tap" hand with a pulsing ring, so it is obvious they open something */
.hs--pin.is-link .pin__card { padding-right: 35px; position: relative; }
.hs--pin.is-link .pin__card::after {
  content: ""; position: absolute; right: 8px; top: 50%; width: 20px; height: 20px; margin-top: -10px; border-radius: 50%;
  background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M22 14a8 8 0 0 1-8 8'/%3E%3Cpath d='M18 11v-1a2 2 0 0 0-2-2a2 2 0 0 0-2 2'/%3E%3Cpath d='M14 10V9a2 2 0 0 0-2-2a2 2 0 0 0-2 2v1'/%3E%3Cpath d='M10 9.5V4a2 2 0 0 0-2-2a2 2 0 0 0-2 2v10'/%3E%3Cpath d='M18 11a2 2 0 1 1 4 0v3a8 8 0 0 1-8 8h-2c-2.8 0-4.5-.86-5.99-2.34l-3.6-3.6a2 2 0 0 1 2.83-2.82L7 15'/%3E%3C/svg%3E") center / 12px no-repeat;
}
.hs--pin.is-link .pin__card::before {
  content: ""; position: absolute; right: 8px; top: 50%; width: 20px; height: 20px; margin-top: -10px; border-radius: 50%;
  border: 2px solid #fff; animation: pulse 1.8s ease-out infinite; pointer-events: none;
}
@media (hover: hover) { .hs--pin.is-link:hover .pin__card { background: rgb(44, 36, 130); } }
/* label to the left of its pole (used when two pins are close together) */
.hs--pin-left .pin { left: auto; right: 0; align-items: flex-end; }
.hs--pin-left .pin__card { border-left: 0; border-right: 3px solid var(--accent); border-radius: 10px 10px 0 10px; text-align: right; }
.hs--pin-new .pin__card strong::after {
  content: "NEW"; margin-left: 6px; padding: 1px 6px; border-radius: 999px; vertical-align: 2px;
  background: var(--accent); color: #fff; font-size: 10px; letter-spacing: .06em;
}
@media (max-width: 480px) {
  .hs--pin strong { font-size: 13px; }
  .hs--pin small { font-size: 11px; }
  .hs--pin .pin__card { padding: 5px 10px 6px 9px; }
  .hs--pin.is-link .pin__card { padding-right: 33px; }
  .hs--pin .pin__pole { height: 34px; }
}

/* ---------- loader ---------- */
.loader {
  position: fixed; inset: 0; z-index: 30; display: grid; place-content: center; justify-items: center; gap: 14px;
  background: radial-gradient(circle at center, #2b2580, #0c0a2e);
  transition: opacity .5s ease, visibility .5s;
}
.loader.is-done { opacity: 0; visibility: hidden; }
.loader.is-soft { background: rgba(0,0,0,.25); }
.loader.is-soft .loader__text { display: none; }
.loader__ring { width: 52px; height: 52px; border-radius: 50%; border: 4px solid rgba(255,255,255,.2); border-top-color: var(--accent); animation: spin .9s linear infinite; }
.loader__text { margin: 0; color: var(--muted); font-size: 15px; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- hint ---------- */
.hint {
  position: fixed; z-index: 11; left: 50%; top: 50%; transform: translate(-50%, -50%);
  display: flex; align-items: center; gap: 10px; max-width: calc(100vw - 32px);
  padding: 12px 18px; border-radius: 999px; background: var(--glass-strong);
  font-size: 14px; pointer-events: none; animation: fadeHint 4.5s ease forwards;
}
.hint svg { flex: none; animation: drag 1.6s ease-in-out infinite; }
@keyframes drag { 0%,100% { transform: translateX(-5px); } 50% { transform: translateX(5px); } }
@keyframes fadeHint { 0%,80% { opacity: 1; } 100% { opacity: 0; } }

/* ---------- drawer ---------- */
.scrim { position: fixed; inset: 0; z-index: 20; background: rgba(0,0,0,.45); }
.drawer {
  position: fixed; z-index: 21; left: 0; right: 0; bottom: 0;
  max-height: 78dvh; overflow-y: auto; overscroll-behavior: contain;
  padding: 8px calc(16px + var(--safe-r)) calc(18px + var(--safe-b)) calc(16px + var(--safe-l));
  background: var(--glass-strong); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px);
  border-radius: 22px 22px 0 0; border-top: 1px solid var(--line);
  transform: translateY(105%); transition: transform .35s cubic-bezier(.2,.8,.2,1);
  visibility: hidden;
}
.drawer.is-open { transform: none; visibility: visible; }
.drawer__handle { width: 40px; height: 5px; border-radius: 3px; background: rgba(255,255,255,.35); margin: 4px auto 8px; }
.drawer__head { display: flex; align-items: center; justify-content: space-between; }
.drawer__head h2 { margin: 0; font-size: 20px; }
.drawer__sub { margin: 2px 0 14px; color: var(--muted); font-size: 14px; }
/* quick-jump chips: stay at the top of the menu while it scrolls */
.jump {
  position: sticky; top: -8px; z-index: 3; display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none;
  margin: 0 -16px 12px; padding: 10px 16px; background: rgb(24, 19, 74); border-bottom: 1px solid var(--line);
}
.jump::-webkit-scrollbar { display: none; }
.jump__chip {
  flex: none; padding: 8px 14px; border: 1px solid var(--line); border-radius: 999px; background: rgba(255,255,255,.07);
  color: #fff; font: inherit; font-size: 14px; font-weight: 600; cursor: pointer; touch-action: manipulation; white-space: nowrap;
}
.jump__chip[aria-current="true"] { background: var(--accent); border-color: transparent; }
.jump__close {
  position: sticky; right: -6px; flex: none; margin-left: auto; width: 38px; height: 38px; display: grid; place-items: center;
  border: 0; border-radius: 50%; background: rgb(24, 19, 74); color: #fff; cursor: pointer; box-shadow: -10px 0 10px rgb(24, 19, 74);
}
.scene-list { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.scene-list button {
  width: 100%; padding: 0; border: 2px solid transparent; border-radius: 14px; overflow: hidden;
  background: rgba(255,255,255,.06); cursor: pointer; text-align: left;
}
.scene-list button[aria-current="true"] { border-color: var(--accent); }
.scene-list img { display: block; width: 100%; aspect-ratio: 16 / 10; object-fit: cover; }
.scene-list span { display: block; padding: 8px 10px 10px; font-size: 14px; font-weight: 600; }
.drawer__site { display: block; margin-top: 16px; padding: 14px; text-align: center; border-radius: 12px; background: var(--accent); color: var(--on-accent); font-weight: 700; text-decoration: none; }
@media (min-width: 768px) {
  .drawer {
    left: auto; top: 0; width: 380px; max-height: none; border-radius: 0; border-top: 0; border-left: 1px solid var(--line);
    padding-top: calc(16px + var(--safe-t));
    transform: translateX(105%);
  }
  .drawer__handle { display: none; }
}


.noscript { position: fixed; inset: 0; display: grid; place-items: center; margin: 0; }
[hidden] { display: none !important; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
