/* Visite — interface de présentation */

body { overflow: hidden; }

.stage { position: fixed; inset: 0; }

.scrim {
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(to bottom, rgba(34, 26, 21, 0.5), rgba(34, 26, 21, 0) 22%),
    linear-gradient(to top, rgba(34, 26, 21, 0.42), rgba(34, 26, 21, 0) 26%);
  transition: opacity 0.4s;
}

.chrome { transition: opacity 0.35s; }
body.ui-hidden .chrome { opacity: 0; pointer-events: none; }
body.ui-hidden .chrome * { pointer-events: none; }

/* ---------- titre ---------- */
.head {
  position: fixed;
  top: 26px;
  left: 30px;
  max-width: min(560px, calc(100vw - 160px));
  pointer-events: none;
  text-shadow: 0 1px 14px rgba(30, 22, 16, 0.6);
}
.head-title {
  margin: 0 0 6px;
  font-size: 13.5px;
  font-weight: 450;
  letter-spacing: 0.03em;
  color: var(--stone-2);
}
.head-scene {
  margin: 0;
  font-size: clamp(26px, 3.1vw, 38px);
  font-weight: 300;
  line-height: 1.08;
  letter-spacing: -0.01em;
  transition: opacity 0.25s, transform 0.25s;
}
.head-scene.is-swapping { opacity: 0; transform: translateY(4px); }

/* ---------- outils ---------- */
.tools {
  position: fixed;
  top: 22px;
  right: 22px;
  display: flex;
  gap: 8px;
}

/* ---------- barre du bas ---------- */
.dock {
  position: fixed;
  left: 22px;
  bottom: 22px;
  max-width: calc(100vw - 44px);
  display: flex;
  align-items: stretch;
  padding: 8px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: var(--glass);
  backdrop-filter: blur(16px) saturate(1.1);
  -webkit-backdrop-filter: blur(16px) saturate(1.1);
}

.floors {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  gap: 3px;
  padding-right: 8px;
  margin-right: 8px;
  border-right: 1px solid var(--line);
}
.floor-btn {
  min-width: 58px;
  height: 27px;
  padding: 0 11px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: var(--stone-2);
  font-size: 13.5px;
  font-weight: 500;
  text-align: left;
  cursor: pointer;
  transition: background-color 0.2s, color 0.2s;
}
.floor-btn:hover { color: var(--stone); background: rgba(236, 229, 216, 0.08); }
.floor-btn[aria-current='true'] { background: var(--stone); color: var(--walnut); }

.strip {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  scrollbar-width: none;
  scroll-behavior: smooth;
  overscroll-behavior: contain;
}
.strip::-webkit-scrollbar { display: none; }
.dock.is-collapsed .strip { display: none; }

.strip-item {
  flex: 0 0 auto;
  width: 128px;
  padding: 0;
  border: 0;
  background: none;
  color: var(--stone-2);
  font-size: 12.5px;
  line-height: 1.25;
  text-align: left;
  cursor: pointer;
}
.strip-item .thumb {
  outline: 2px solid transparent;
  outline-offset: -2px;
  filter: saturate(0.8) brightness(0.86);
  transition: outline-color 0.2s, filter 0.2s;
}
.strip-item .label {
  display: block;
  padding: 6px 2px 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.strip-item:hover .thumb { filter: none; }
.strip-item:hover .label { color: var(--stone); }
.strip-item[aria-current='true'] .thumb { outline-color: var(--brass); filter: none; }
.strip-item[aria-current='true'] .label { color: var(--stone); }
.strip.is-scrollable { mask-image: linear-gradient(to right, #000 calc(100% - 40px), transparent); -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 40px), transparent); }
.strip.is-scrollable.at-end { mask-image: none; -webkit-mask-image: none; }

.dock-toggle {
  align-self: flex-end;
  width: 28px;
  height: 28px;
  margin-left: 6px;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  border-radius: 6px;
  background: none;
  color: var(--stone-2);
  cursor: pointer;
}
.dock-toggle:hover { color: var(--stone); background: rgba(236, 229, 216, 0.08); }
.dock-toggle svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; transition: transform 0.25s; }
.dock.is-collapsed .dock-toggle svg { transform: rotate(180deg); }

/* ---------- aide de départ ---------- */
.hint {
  position: fixed;
  left: 50%;
  top: 50%;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px 10px 14px;
  border-radius: 999px;
  background: var(--glass);
  backdrop-filter: blur(12px);
  font-size: 14.5px;
  pointer-events: none;
  transform: translate(-50%, -50%);
  transition: opacity 0.5s;
}
.hint svg { width: 22px; height: 22px; fill: none; stroke: var(--brass-hi); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.hint.is-gone { opacity: 0; }

/* ---------- chargement haute définition ---------- */
.progress {
  position: fixed;
  left: 0;
  top: 0;
  height: 2px;
  width: calc(var(--p, 0) * 100%);
  background: var(--brass);
  opacity: 0;
  transition: width 0.2s, opacity 0.5s;
}
.progress.is-on { opacity: 1; }

/* ---------- ouverture ---------- */
.intro {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  background: var(--walnut);
  transition: opacity 1s ease 0.15s, visibility 1s ease 0.15s;
}
.intro.is-done { opacity: 0; visibility: hidden; }
.intro-title {
  margin: 0 0 22px;
  font-size: clamp(32px, 5.4vw, 64px);
  font-weight: 300;
  letter-spacing: 0.05em;
  text-align: center;
}
.intro-line {
  position: relative;
  width: 160px;
  height: 1px;
  margin: 0 auto;
  overflow: hidden;
  background: var(--line);
}
.intro-line::after {
  content: '';
  position: absolute;
  inset: 0;
  width: 40%;
  background: var(--brass);
  animation: slide 1.3s ease-in-out infinite;
}
@keyframes slide { from { transform: translateX(-100%); } to { transform: translateX(250%); } }

.notice {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: grid;
  place-items: center;
  padding: 24px;
  background: var(--walnut);
}
.notice div { max-width: 460px; }
.notice h2 { margin: 0 0 10px; font-size: 24px; font-weight: 400; }
.notice p { margin: 0 0 10px; color: var(--stone-2); line-height: 1.55; }
.notice code { color: var(--brass-hi); font-size: 0.95em; }

/* ---------- petits écrans ---------- */
@media (max-width: 640px) {
  .head { top: 16px; left: 16px; max-width: calc(100vw - 120px); }
  .head-title { font-size: 12.5px; margin-bottom: 3px; }
  .tools { top: 14px; right: 16px; gap: 6px; }
  .dock { left: 12px; right: 12px; bottom: 12px; max-width: none; padding: 6px; }
  .floors { padding-right: 6px; margin-right: 6px; }
  .floor-btn { min-width: 46px; height: 24px; padding: 0 8px; font-size: 12.5px; }
  .strip-item { width: 96px; font-size: 12px; }
}
