
@font-face {
  font-family: "Open Sans";
  src: url("assets/fonts/open-sans-regular.woff2") format("woff2");
  font-style: normal;
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Open Sans";
  src: url("assets/fonts/open-sans-bold.woff2") format("woff2");
  font-style: normal;
  font-weight: 700;
  font-display: swap;
}
@font-face {
  font-family: "Open Sans";
  src: url("assets/fonts/open-sans-light.woff2") format("woff2");
  font-style: normal;
  font-weight: 300;
  font-display: swap;
}
@font-face {
  font-family: "Raleway";
  src: url("assets/fonts/raleway-medium.woff2") format("woff2");
  font-style: normal;
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: "Josefin Sans";
  src: url("assets/fonts/josefin-sans-medium.woff2") format("woff2");
  font-style: normal;
  font-weight: 500;
  font-display: swap;
}

:root {
  --paper: #e8e6df;
  --ink: #5f5f5f;
  --pink: #e80092;
  --gold: #cda782;
  --glass: rgba(255, 255, 255, 0.81);
  --round-height: 100px;
  --map-ratio: 1200 / 1146;
}

* { box-sizing: border-box; }
html {
  scroll-behavior: smooth;
  background: var(--paper);
  scroll-padding-top: 0;
}
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Open Sans", Arial, sans-serif;
  line-height: 1.7;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
button, input { font: inherit; }
a { color: inherit; }
main { width: 100%; }

.hero {
  min-height: 100svh;
  height: 100vh;
  display: grid;
  place-items: start center;
  padding: 40px 4vw 0;
  background: var(--paper);
}
.medallion-link {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  width: 100%;
  height: 100%;
  text-decoration: none;
  outline-offset: 8px;
}
.medallion-link img {
  width: auto;
  height: auto;
  max-width: min(903px, 92vw);
  max-height: calc(100svh - 40px);
  object-fit: contain;
}

.preamble {
  min-height: 100svh;
  height: 100vh;
  padding: 7vh 5vw 3vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 34px;
  background: var(--paper);
}
.intro-card {
  position: relative;
  width: min(1100px, 76vw);
  padding: 49px 52px 42px;
  background: #f5f5f5;
  box-shadow: 0 12px 18px -6px rgba(0,0,0,.30);
  text-align: center;
  font-size: clamp(14px, .95vw, 17px);
}
.intro-card p {
  margin: 0 0 12px;
}
.intro-card p:last-child { margin-bottom: 0; }
.magnifier {
  position: absolute;
  width: 55px;
  height: 55px;
  left: 50%;
  top: -29px;
  transform: translateX(-50%);
  border: 4px solid #656565;
  border-radius: 50%;
  background: #f5f5f5;
}
.magnifier::after {
  content: "";
  position: absolute;
  width: 29px;
  height: 5px;
  left: -18px;
  bottom: -10px;
  border-radius: 4px;
  background: #656565;
  transform: rotate(-47deg);
  transform-origin: right center;
}
.map-button,
.return-button {
  display: inline-flex;
  align-items: center;
  gap: .45em;
  min-height: 43px;
  padding: 7px 12px;
  border: 2px solid currentColor;
  border-radius: 30px;
  background: transparent;
  text-decoration: none;
  font-size: 15px;
  line-height: 1;
  transition: background-color .25s ease, transform .25s ease, color .25s ease;
}
.map-button { color: var(--pink); }
.return-button { color: var(--gold); margin-top: 32px; }
.map-button:hover,
.return-button:hover {
  background: rgba(255,255,255,.18);
  transform: translateY(-1px);
}
.circle-chevron {
  position: relative;
  flex: 0 0 auto;
  width: 17px;
  height: 17px;
  border: 1.7px solid currentColor;
  border-radius: 50%;
}
.circle-chevron::before,
.circle-chevron::after {
  content: "";
  position: absolute;
  top: 6px;
  width: 6px;
  height: 1.7px;
  border-radius: 2px;
  background: currentColor;
}
.circle-chevron::before { left: 3px; transform: rotate(45deg); }
.circle-chevron::after { right: 3px; transform: rotate(-45deg); }
.circle-chevron.up { transform: rotate(180deg); }

.map-section {
  min-height: 100svh;
  box-sizing: border-box;
  padding: 24px;
  display: grid;
  place-items: center;
  background: var(--paper);
  overflow: visible;
}
.map-shell {
  position: relative;
  width: min(
    calc(100vw - 48px),
    calc(104.7120419svh - 50.2617801px),
    1200px
  );
  aspect-ratio: var(--map-ratio);
  flex: 0 0 auto;
  background: var(--paper);
  container-type: inline-size;
}
.map-fallback {
  position: absolute;
  z-index: 1;
  inset: 0;
  display: block;
  overflow: visible;
  background: var(--paper);
}
.map-fallback > img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: fill;
  user-select: none;
  -webkit-user-drag: none;
}
.fallback-markers {
  position: absolute;
  z-index: 2;
  inset: 0;
  pointer-events: none;
}
.fallback-marker {
  position: absolute;
  width: clamp(24px, 4.166667%, 50px);
  height: clamp(24px, 4.363002%, 50px);
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  transform: translate3d(-50%, -50%, 0);
  cursor: pointer;
  pointer-events: auto;
  filter: drop-shadow(0 2px 5px rgba(0,0,0,.40));
  backface-visibility: hidden;
  -webkit-tap-highlight-color: transparent;
}
.fallback-marker img {
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: none;
  user-select: none;
  -webkit-user-drag: none;
}
.fallback-marker:focus-visible {
  outline: 3px solid rgba(232,0,146,.48);
  outline-offset: 3px;
}
.fallback-marker-tooltip {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 10px);
  transform: translateX(-50%) translateY(6px);
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(245,245,245,.97);
  color: #173858;
  box-shadow: 0 4px 12px rgba(0,0,0,.18);
  font-size: clamp(11px, 1.08cqw, 13px);
  line-height: 1.2;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .16s ease, transform .16s ease, visibility .16s ease;
}
.fallback-marker-tooltip::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 100%;
  width: 10px;
  height: 10px;
  background: inherit;
  transform: translateX(-50%) rotate(45deg);
  box-shadow: 2px 2px 4px rgba(0,0,0,.05);
}
.fallback-marker:hover .fallback-marker-tooltip,
.fallback-marker:focus-visible .fallback-marker-tooltip,
.fallback-marker:focus .fallback-marker-tooltip {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}
@media (hover: none) and (pointer: coarse) {
  .fallback-marker-tooltip {
    display: none;
  }
}
.locate-control {
  position: absolute;
  z-index: 20;
  left: max(14px, env(safe-area-inset-left));
  top: max(14px, env(safe-area-inset-top));
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 39px;
  padding: 8px 13px;
  border: 1px solid rgba(28,56,86,.38);
  border-radius: 22px;
  background: rgba(245,245,245,.90);
  color: #173858;
  box-shadow: 0 4px 14px rgba(0,0,0,.14);
  cursor: pointer;
  backdrop-filter: blur(5px);
}
.locate-control:hover { background: #fff; }
.locate-control:focus-visible { outline: 3px solid rgba(232,0,146,.35); outline-offset: 2px; }
.locate-crosshair {
  width: 15px;
  height: 15px;
  border: 2px solid currentColor;
  border-radius: 50%;
  position: relative;
}
.locate-crosshair::before,
.locate-crosshair::after {
  content: "";
  position: absolute;
  background: currentColor;
}
.locate-crosshair::before { width: 21px; height: 2px; left: -5px; top: 5px; }
.locate-crosshair::after { width: 2px; height: 21px; left: 5px; top: -5px; }
.location-status {
  position: absolute;
  z-index: 20;
  left: 50%;
  bottom: 14px;
  transform: translateX(-50%);
  max-width: min(86%, 560px);
  padding: 8px 13px;
  border-radius: 20px;
  background: rgba(245,245,245,.92);
  color: #424242;
  box-shadow: 0 4px 14px rgba(0,0,0,.14);
  font-size: 13px;
  text-align: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s ease;
}
.location-status.is-visible { opacity: 1; }
.fallback-user-position {
  position: absolute;
  z-index: 4;
  display: none;
  width: 22px;
  height: 22px;
  border: 4px solid #fff;
  border-radius: 50%;
  background: #e80092;
  box-shadow: 0 0 0 3px rgba(232,0,146,.28), 0 3px 10px rgba(0,0,0,.35);
  transform: translate3d(-50%, -50%, 0);
}
.fallback-user-position::after {
  content: "";
  position: absolute;
  inset: -11px;
  border: 2px solid rgba(232,0,146,.34);
  border-radius: 50%;
  animation: location-pulse 2s ease-out infinite;
}
@keyframes location-pulse {
  0% { transform: scale(.55); opacity: .9; }
  100% { transform: scale(1.45); opacity: 0; }
}

.story-section {
  position: relative;
  min-height: 100svh;
  width: 100%;
  padding: calc(var(--round-height) + 15vh + 35px) 0 calc(var(--round-height) + 34px);
  background: #082844 url("assets/fond-section.jpg") center center / cover repeat;
  overflow: hidden;
}
.round-divider {
  position: absolute;
  z-index: 2;
  left: 0;
  width: 100%;
  height: var(--round-height);
  background: url("assets/div-ronde.svg") center top / cover no-repeat;
  pointer-events: none;
}
.round-divider--top { top: -1px; }
.round-divider--bottom { bottom: -1px; transform: scaleY(-1); }
.story-inner {
  position: relative;
  z-index: 3;
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
}
.player-cartouche,
.credits-cartouche {
  width: min(72.8vw, 1400px);
  background: var(--glass);
  box-shadow: inset 0 0 16px rgba(0,0,0,.30);
  overflow: hidden;
}
.player-cartouche {
  min-height: 218px;
  border-radius: 20px 20px 0 0;
  display: grid;
  grid-template-columns: 20.875% 5.5% 73.625%;
  align-items: stretch;
}
.story-icon {
  grid-column: 1;
  display: grid;
  place-items: center;
  padding: 24px;
}
.story-icon img {
  width: clamp(80px, 5.7vw, 104px);
  height: auto;
}
.audio-panel {
  grid-column: 3;
  display: flex;
  min-width: 0;
  flex-direction: column;
  justify-content: center;
  padding: 24px 52px 29px 50px;
}
.audio-panel h2 {
  margin: 0 0 9px;
  color: #474747;
  font-family: "Josefin Sans", Arial, sans-serif;
  font-variant: small-caps;
  font-size: clamp(24px, 1.78vw, 34px);
  font-weight: 500;
  line-height: 1.2;
  letter-spacing: .02em;
}
.audio-controls {
  display: grid;
  grid-template-columns: 25px minmax(110px, 1fr) 62px 27px 75px;
  gap: 10px;
  align-items: center;
  width: 100%;
  color: #747474;
}
.audio-controls audio { display: none; }
.play-button,
.mute-button {
  width: 25px;
  height: 30px;
  padding: 0;
  border: 0;
  background: transparent;
  color: #707070;
  cursor: pointer;
}
.play-symbol {
  display: block;
  margin-left: 4px;
  width: 0;
  height: 0;
  border-top: 9px solid transparent;
  border-bottom: 9px solid transparent;
  border-left: 11px solid currentColor;
}
.play-button.is-playing .play-symbol {
  width: 12px;
  height: 18px;
  margin-left: 5px;
  border: 0;
  background:
    linear-gradient(90deg, currentColor 0 4px, transparent 4px 8px, currentColor 8px 12px);
}
.seek,
.volume {
  --value: 0%;
  width: 100%;
  height: 18px;
  margin: 0;
  appearance: none;
  background: transparent;
  cursor: pointer;
}
.seek::-webkit-slider-runnable-track,
.volume::-webkit-slider-runnable-track {
  height: 4px;
  border-radius: 4px;
  background: linear-gradient(to right, #707070 0 var(--value), #b5b5b5 var(--value) 100%);
}
.seek::-moz-range-track,
.volume::-moz-range-track {
  height: 4px;
  border-radius: 4px;
  background: #b5b5b5;
}
.seek::-moz-range-progress,
.volume::-moz-range-progress {
  height: 4px;
  border-radius: 4px;
  background: #707070;
}
.seek::-webkit-slider-thumb,
.volume::-webkit-slider-thumb {
  width: 12px;
  height: 12px;
  margin-top: -4px;
  appearance: none;
  border: 0;
  border-radius: 50%;
  background: #707070;
}
.seek::-moz-range-thumb,
.volume::-moz-range-thumb {
  width: 12px;
  height: 12px;
  border: 0;
  border-radius: 50%;
  background: #707070;
}
.time {
  white-space: nowrap;
  color: #8a8a8a;
  font-size: 17px;
  font-variant-numeric: tabular-nums;
}
.speaker-icon {
  position: relative;
  display: block;
  width: 11px;
  height: 12px;
  margin-left: 2px;
  background: currentColor;
  clip-path: polygon(0 31%, 40% 31%, 100% 0, 100% 100%, 40% 69%, 0 69%);
}
.speaker-icon::after {
  content: "";
  position: absolute;
  width: 8px;
  height: 12px;
  left: 9px;
  top: 0;
  border-right: 2px solid currentColor;
  border-radius: 50%;
}
.mute-button.is-muted .speaker-icon::before {
  content: "";
  position: absolute;
  z-index: 2;
  width: 20px;
  height: 2px;
  left: -3px;
  top: 5px;
  background: #707070;
  transform: rotate(-45deg);
}
.credits-cartouche {
  min-height: 96px;
  margin-top: 86px;
  border-radius: 0 0 20px 20px;
  display: grid;
  place-items: center;
  padding: 12px 28px;
  font-family: "Raleway", Arial, sans-serif;
  font-size: clamp(14px, .92vw, 17px);
  line-height: 1.45;
  text-align: center;
  box-shadow: inset 0 0 18px rgba(0,0,0,.30);
}
.credits-cartouche p { margin: 0; }
.section-gap {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 5vh;
  min-height: 44px;
  background: var(--paper);
}

@media (max-width: 980px) {
  :root { --round-height: 88px; }
  .intro-card { width: min(86vw, 900px); }
  .map-section { padding: 12px; }
  .map-shell {
    width: min(
      calc(100vw - 24px),
      calc(104.7120419svh - 25.1308901px),
      1200px
    );
  }
  .player-cartouche,
  .credits-cartouche { width: min(88vw, 900px); }
  .player-cartouche {
    min-height: 190px;
    grid-template-columns: 20.875% 5.5% 73.625%;
  }
  .audio-panel { padding-right: 34px; padding-left: 34px; }
  .story-icon img { width: clamp(76px, 10vw, 105px); }
}

@media (max-width: 767px) {
  :root { --round-height: 72px; }
  .hero { padding-top: 20px; }
  .medallion-link img {
    max-width: 94vw;
    max-height: calc(100svh - 20px);
  }
  .preamble {
    min-height: 75svh;
    height: auto;
    padding: 110px 5vw 90px;
  }
  .intro-card {
    width: 100%;
    padding: 48px 22px 34px;
    font-size: 14px;
  }
  .intro-card p { margin-bottom: 11px; }
  .map-section { min-height: auto; padding: 0; }
  .map-shell { width: min(100vw, 104.7120419svh, 1200px); }
  .locate-control {
    left: 10px;
    top: 10px;
    min-height: 36px;
    padding: 7px 10px;
    font-size: 13px;
  }
  .story-section {
    min-height: 100svh;
    padding: calc(var(--round-height) + 10vh) 0 calc(var(--round-height) + 44px);
  }
  .player-cartouche,
  .credits-cartouche { width: 90vw; }
  .player-cartouche {
    min-height: 0;
    display: flex;
    flex-direction: column;
  }
  .story-icon { grid-column: auto; padding: 26px 20px 5px; }
  .story-icon img { width: 82px; }
  .audio-panel {
    grid-column: auto;
    align-items: stretch;
    padding: 8px 22px 31px;
  }
  .audio-panel h2 {
    margin-bottom: 17px;
    text-align: center;
    font-size: 25px;
  }
  .audio-controls {
    grid-template-columns: 25px minmax(80px, 1fr) 52px 25px;
    gap: 8px;
  }
  .audio-controls .volume {
    grid-column: 2 / 5;
    width: 68%;
    justify-self: end;
  }
  .time { font-size: 14px; }
  .credits-cartouche {
    min-height: 0;
    margin-top: 48px;
    padding: 17px 18px;
    font-size: 13px;
  }
  .return-button { margin-top: 28px; }
  .section-gap { min-height: 34px; }
}

@media (max-width: 430px) {
  .audio-panel h2 { font-size: 22px; }
  .player-cartouche,
  .credits-cartouche { width: 92vw; }
  .story-icon img { width: 72px; }
}

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