/* Immo Tep — l'héliodon
   Mise en page : la scène 3D occupe tout l'écran, sans page ni défilement. Les instruments flottent
   sur ses bords : la boucle du soleil au centre, les saisons et la journée en accéléré en haut,
   les manières de regarder à droite, les points de vue et le passage d'une propriété à l'autre en bas.
   Le nom de la propriété se pose en très grand, en bas à gauche ; sa graisse suit la hauteur du soleil. */

:root {
  --ink: #0b1412;
  --paper: #eef0ea;
  --glass: rgba(238, 240, 234, 0.76);
  --line: rgba(11, 20, 18, 0.24);
  --soft: rgba(11, 20, 18, 0.66);
  --halo: rgba(238, 240, 234, 0.6);
  --signal: #ff5a2b; /* orange de géomètre : le soleil, la coupe, l'action */
  --on-signal: #170a04;
  --sky-0: #3166b8;
  --sky-1: #9fb8dc;
  --sky-2: #efd9b4;
  --f-display: 'Anybody', 'Arial Narrow', 'Helvetica Neue', Arial, sans-serif;
  --f-mono: 'DM Mono', ui-monospace, 'SF Mono', Menlo, monospace;
  --gx: clamp(16px, 2.6vw, 40px);
  --ease: cubic-bezier(0.2, 0.7, 0.1, 1);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme='light']) {
    --ink: #f2f1ea;
    --paper: #0a1012;
    --glass: rgba(10, 16, 18, 0.72);
    --line: rgba(242, 241, 234, 0.26);
    --soft: rgba(242, 241, 234, 0.7);
    --halo: rgba(10, 16, 18, 0.65);
    --signal: #ff6a3a;
    --on-signal: #170a04;
    --sky-0: #0b1434;
    --sky-1: #1c2752;
    --sky-2: #3a3a66;
    color-scheme: dark;
  }
}

:root[data-theme='dark'] {
  --ink: #f2f1ea;
  --paper: #0a1012;
  --glass: rgba(10, 16, 18, 0.72);
  --line: rgba(242, 241, 234, 0.26);
  --soft: rgba(242, 241, 234, 0.7);
  --halo: rgba(10, 16, 18, 0.65);
  --signal: #ff6a3a;
  --on-signal: #170a04;
  --sky-0: #0b1434;
  --sky-1: #1c2752;
  --sky-2: #3a3a66;
  color-scheme: dark;
}

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

html,
body {
  height: 100%;
}

[hidden] {
  display: none !important;
}

body {
  background: var(--paper);
  color: var(--ink);
  font: 400 1rem/1.5 var(--f-display);
  font-variation-settings: 'wght' 420, 'wdth' 100;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

h1,
h2,
h3,
p,
ol,
ul,
dl,
dd {
  margin: 0;
}

ol,
ul {
  padding: 0;
  list-style: none;
}

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

:focus-visible {
  outline: 2px solid var(--signal);
  outline-offset: 3px;
}

.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.mono,
.pill,
.seasons button,
.rail button,
.pager button,
.views button,
.chip,
.sun__data,
.sun__hint,
.cutbar label,
.title__meta,
.h {
  font: 400 0.72rem/1.3 var(--f-mono);
  font-variation-settings: normal;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 40px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--glass);
  backdrop-filter: blur(12px);
  white-space: nowrap;
  cursor: pointer;
  transition: border-color 0.3s, background-color 0.3s;
}

.pill:hover {
  border-color: var(--ink);
}

.pill--signal {
  background: var(--signal);
  border-color: transparent;
  color: var(--on-signal);
}

/* ---------- La scène ---------- */

.app {
  position: relative;
  height: 100%;
  overflow: hidden;
  isolation: isolate;
}

.backdrop {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, var(--sky-0), var(--sky-1) 58%, var(--sky-2));
}

.app.is-flat .backdrop {
  background: var(--flat, linear-gradient(to bottom, var(--sky-0), var(--sky-1) 58%, var(--sky-2))) center / cover no-repeat;
}

.scene {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  touch-action: none;
  cursor: grab;
  opacity: 0;
  outline-offset: -5px;
  transition: opacity 1.4s ease;
}

.scene:active {
  cursor: grabbing;
}

.app.is-live .scene {
  opacity: 1;
}

.app.is-swapping .scene {
  opacity: 0;
  transition-duration: 0.28s;
}

.app.is-flat .scene,
.app.is-flat .sky,
.app.is-flat .sun,
.app.is-flat .top__mid,
.app.is-flat .rail button[data-mode],
.app.is-flat .rail__clay,
.app.is-flat .views {
  display: none;
}

/* Le bas de la scène se fond dans le papier, comme une maquette posée sur sa planche : le titre y reste lisible. */
.wash {
  position: absolute;
  inset: 0;
  z-index: 1;
  background: radial-gradient(
    115% 85% at 0% 100%,
    color-mix(in srgb, var(--paper) 92%, transparent) 0%,
    color-mix(in srgb, var(--paper) 68%, transparent) 30%,
    transparent 64%
  );
  pointer-events: none;
  opacity: 0;
  transition: opacity 1s ease 0.4s;
}

.app.is-live .wash {
  opacity: 1;
}

.app[data-mode='plan'] .wash,
.app[data-mode='cut'] .wash,
.app[data-mode='tech'] .wash {
  opacity: 0.4;
}

.app.has-index .wash {
  opacity: 0;
}

/* ---------- La boucle du soleil ---------- */

.sky {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  color: var(--ink);
  pointer-events: none;
  opacity: 0;
  transition: opacity 1s ease 0.5s;
}

.app.is-live .sky {
  opacity: 1;
}

.app.has-index .sky,
.app.has-index .sun {
  opacity: 0.25;
}

.sky__day,
.sky__night {
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
}

.sky__day {
  stroke-width: 1.5;
  stroke-dasharray: 0.1 7;
  stroke-opacity: 0.8;
}

.sky__night {
  stroke-width: 1.2;
  stroke-dasharray: 0.1 9;
  stroke-opacity: 0.45;
}

/* Le chemin déjà parcouru depuis le lever. */
.sky__lit {
  fill: none;
  stroke: var(--signal);
  stroke-width: 2.5;
  stroke-linecap: round;
}

.sky__lit.is-night {
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-opacity: 0.8;
}

.sky__ticks circle {
  fill: currentColor;
}

.sky__ticks text {
  fill: currentColor;
  stroke: var(--halo);
  stroke-width: 3px;
  paint-order: stroke;
  font: 500 10px var(--f-mono);
  letter-spacing: 0.08em;
}

.sky__hit {
  fill: none;
  stroke: transparent;
  stroke-width: 36;
  pointer-events: stroke;
  cursor: pointer;
}

.sun {
  position: absolute;
  left: 0;
  top: 0;
  z-index: 5;
  width: 0;
  height: 0;
  padding: 0;
  border: 0;
  background: none;
  cursor: grab;
  touch-action: none;
  opacity: 0;
  transition: opacity 1s ease 0.5s;
  will-change: transform;
}

.app.is-live .sun {
  opacity: 1;
}

.sun::before {
  content: '';
  position: absolute;
  left: -30px;
  top: -30px;
  width: 60px;
  height: 60px;
  border-radius: 50%;
}

.sun__disc {
  position: absolute;
  left: -17px;
  top: -17px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--signal);
  box-shadow: 0 0 0 7px color-mix(in srgb, var(--signal) 26%, transparent), 0 0 46px 12px color-mix(in srgb, var(--signal) 52%, transparent);
  transition: transform 0.3s var(--ease), box-shadow 0.5s, background-color 0.5s;
}

/* Tant que personne n'a touché au soleil, un anneau s'en échappe pour dire qu'il se prend. */
.sun__disc::after {
  content: '';
  position: absolute;
  inset: -9px;
  border: 1.5px solid var(--signal);
  border-radius: 50%;
  opacity: 0;
}

.sun:has(.sun__hint.is-on) .sun__disc::after {
  animation: ring 1.9s ease-out infinite;
}

@keyframes ring {
  from {
    transform: scale(0.75);
    opacity: 0.9;
  }
  to {
    transform: scale(2.3);
    opacity: 0;
  }
}

.sun:hover .sun__disc,
.sun.is-held .sun__disc {
  transform: scale(1.2);
}

.sun.is-held {
  cursor: grabbing;
}

.sun.is-moon .sun__disc {
  background: transparent;
  box-shadow: inset -9px -3px 0 0 var(--ink), 0 0 30px 6px var(--halo);
}

.sun:focus-visible {
  outline: none;
}

.sun:focus-visible .sun__disc {
  outline: 2px solid var(--ink);
  outline-offset: 5px;
}

.sun__read {
  position: absolute;
  left: 36px;
  top: calc(clamp(1.3rem, 2.2vw, 2.1rem) / -2);
  display: grid;
  gap: 6px;
  white-space: nowrap;
  text-align: left;
  text-shadow: 0 0 18px var(--halo), 0 0 4px var(--halo), 0 0 2px var(--halo);
}

.sun.is-left .sun__read {
  left: auto;
  right: 36px;
  justify-items: end;
  text-align: right;
}

.sun__hour {
  font: 500 clamp(1.3rem, 2.2vw, 2.1rem) / 1 var(--f-display);
  font-variation-settings: 'wght' 620, 'wdth' 78;
  font-variant-numeric: tabular-nums;
}

.sun__hint {
  display: none;
  width: max-content;
  padding: 0.5em 0.8em;
  background: var(--ink);
  color: var(--paper);
  text-shadow: none;
}

.sun__hint.is-on {
  display: block;
}

/* ---------- Barre du haut ---------- */

.top {
  position: absolute;
  inset: 0 0 auto 0;
  z-index: 24;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: calc(14px + env(safe-area-inset-top, 0px)) max(var(--gx), env(safe-area-inset-right, 0px)) 0 max(var(--gx), env(safe-area-inset-left, 0px));
  pointer-events: none;
  transition: right 0.5s var(--ease);
}

.top > * {
  pointer-events: auto;
}

.brand {
  display: grid;
  grid-template-columns: auto auto;
  justify-content: start;
  align-items: baseline;
  gap: 5px 14px;
  padding: 6px 0;
  text-align: left;
  background: none;
  border: 0;
  cursor: pointer;
  text-shadow: 0 0 16px var(--halo);
}

.brand__name {
  font: 800 1.7rem/1 var(--f-display);
  font-variation-settings: 'wght' 880, 'wdth' 132;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

/* La devise de la maison, sous son nom */
.brand__tag {
  grid-column: 1 / -1;
  max-width: 36ch;
  font: 400 0.64rem/1.4 var(--f-mono);
  font-variation-settings: normal;
  letter-spacing: 0.05em;
}

.brand__idx {
  padding-bottom: 2px;
  border-bottom: 1px solid currentColor;
  font: 400 0.72rem/1.3 var(--f-mono);
  font-variation-settings: normal;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
}

.brand__idx b {
  font-weight: 500;
}

.top__mid {
  display: flex;
  align-items: center;
  gap: 8px;
}

.seasons {
  display: flex;
  gap: 2px;
  padding: 3px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--glass);
  backdrop-filter: blur(12px);
}

.seasons button {
  padding: 9px 14px;
  border: 0;
  border-radius: 999px;
  background: none;
  cursor: pointer;
  transition: background-color 0.3s, color 0.3s;
}

.seasons button[aria-pressed='true'] {
  background: var(--ink);
  color: var(--paper);
}

/* Une journée en accéléré */
.play {
  gap: 9px;
  padding: 0 15px;
}

.play__icon {
  width: 9px;
  height: 11px;
  background: currentColor;
  clip-path: polygon(0 0, 100% 50%, 0 100%);
}

.play[aria-pressed='true'] {
  background: var(--signal);
  border-color: transparent;
  color: var(--on-signal);
}

.play[aria-pressed='true'] .play__icon {
  height: 9px;
  clip-path: none;
}

.app.has-index .top__mid,
.app.has-index #open-rdv {
  visibility: hidden;
}

/* Fiche ouverte : la barre se resserre sur la partie libre de l'écran. */
.app.has-sheet .top {
  right: min(460px, 100%);
}

.app.has-sheet #open-rdv {
  display: none;
}

/* ---------- Le titre, dont la graisse suit la lumière ---------- */

.title {
  position: absolute;
  left: max(var(--gx), env(safe-area-inset-left, 0px));
  bottom: calc(clamp(72px, 11vh, 108px) + env(safe-area-inset-bottom, 0px));
  z-index: 3;
  max-width: calc(100% - 2 * var(--gx));
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.8s ease 0.5s;
}

.app.is-live .title {
  opacity: 1;
}

.app.has-index .title,
.app.is-swapping .title {
  opacity: 0;
  transition-delay: 0s;
  transition-duration: 0.25s;
}

.title__meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 12px;
  margin-bottom: 12px;
}

.flag {
  padding: 0.35em 0.6em;
  background: var(--signal);
  color: var(--on-signal);
}

/* --kw et --kd viennent du soleil : à midi le nom est dense et serré, au couchant il s'affine et s'étire.
   --fit borne le corps pour que la ligne la plus longue tienne toujours dans l'écran. */
.title__name {
  font-family: var(--f-display);
  font-size: min(clamp(2.5rem, 8.4vw, 9.2rem), var(--fit, 100rem));
  font-weight: 700;
  font-variation-settings: 'wght' var(--kw, 700), 'wdth' var(--kd, 80);
  line-height: 0.8;
  letter-spacing: -0.012em;
  text-transform: uppercase;
  transition: font-size 0.7s var(--ease);
}

.title__name span {
  display: block;
  width: max-content;
  white-space: nowrap;
}

.title.is-in .title__name span {
  animation: rise 0.95s var(--ease) both;
}

.title.is-in .title__name span:nth-child(2) {
  animation-delay: 0.08s;
}

@keyframes rise {
  from {
    transform: translateY(42%);
    opacity: 0;
  }
  to {
    transform: none;
    opacity: 1;
  }
}

.title__data {
  margin-top: 16px;
  font-size: clamp(0.9rem, 1.2vw, 1.05rem);
  line-height: 1.3;
}

.title__data b {
  font-size: 1.3em;
  font-variation-settings: 'wght' 780, 'wdth' 96;
  font-variant-numeric: tabular-nums;
}

/* Maison éclatée ou tranchée : le nom se range dans le coin et laisse la place au dessin. */
.app[data-mode='plan'] .title__name,
.app[data-mode='cut'] .title__name,
.app[data-mode='tech'] .title__name {
  font-size: min(clamp(1.6rem, 3vw, 2.8rem), var(--fit, 100rem));
}

.app[data-mode='plan'] .title__data,
.app[data-mode='cut'] .title__data,
.app[data-mode='tech'] .title__data {
  display: none;
}

/* Plan technique : la source des cotes, sous le nom de la propriété */
.title__note {
  display: none;
  max-width: 58ch;
  margin: 0.7em 0 0;
  font: 400 0.64rem/1.55 var(--f-mono);
  font-variation-settings: normal;
  letter-spacing: 0.04em;
}

.app[data-mode='tech'] .title__note {
  display: block;
}

/* ---------- Manières de regarder ---------- */

.rail {
  position: absolute;
  right: max(var(--gx), env(safe-area-inset-right, 0px));
  top: 50%;
  z-index: 6;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  transform: translateY(-50%);
  transition: right 0.5s var(--ease);
}

.rail button {
  padding: 11px 15px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--glass);
  backdrop-filter: blur(12px);
  cursor: pointer;
  white-space: nowrap;
  transition: background-color 0.3s, color 0.3s, padding 0.45s var(--ease), border-color 0.3s;
}

.rail button:hover {
  border-color: var(--ink);
}

.rail button[aria-pressed='true'] {
  padding-right: 30px;
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}

.rail .rail__clay {
  margin-top: 10px;
}

.rail .rail__sheet {
  margin-top: 10px;
  background: var(--signal);
  border-color: transparent;
  color: var(--on-signal);
}

/* Le bas de l'écran : points de vue (ou réglette de coupe) à gauche, propriété précédente et suivante à droite. */
.dock {
  position: absolute;
  left: max(var(--gx), env(safe-area-inset-left, 0px));
  right: max(var(--gx), env(safe-area-inset-right, 0px));
  bottom: calc(20px + env(safe-area-inset-bottom, 0px));
  z-index: 6;
  display: flex;
  align-items: flex-end;
  gap: 12px;
  pointer-events: none;
  transition: right 0.5s var(--ease);
}

.dock > * {
  pointer-events: auto;
}

/* Pied de page : une mention discrète, sous les commandes, tout en bas de l'écran. */
.credit {
  position: absolute;
  left: 0;
  right: 0;
  bottom: calc(5px + env(safe-area-inset-bottom, 0px));
  z-index: 5;
  font: 400 0.6rem/1 var(--f-mono);
  letter-spacing: 0.08em;
  text-align: center;
  color: var(--soft);
  text-shadow: 0 0 6px var(--halo), 0 0 2px var(--halo);
  opacity: 0.8;
  pointer-events: none;
}

.credit a {
  color: inherit;
  text-decoration: none;
  pointer-events: auto;
  transition: color 0.2s;
}

.credit a:hover,
.credit a:focus-visible {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.views {
  display: flex;
  gap: 6px;
  min-width: 0;
  margin: -4px;
  padding: 4px 30px 4px 4px;
  overflow-x: auto;
  scrollbar-width: none;
  /* les points de vue en trop s'estompent vers la droite ; ils défilent au doigt ou à la molette */
  mask-image: linear-gradient(90deg, #000 calc(100% - 30px), transparent);
  opacity: 0;
  transition: opacity 0.8s ease 0.8s;
}

.app.is-live .views {
  opacity: 1;
}

.cutbar {
  flex: 0 1 520px;
  display: grid;
  gap: 2px;
  min-width: 0;
  padding: 10px 18px 5px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--glass);
  backdrop-filter: blur(14px);
}

.views button,
.pager button,
.chip {
  flex: none;
  padding: 9px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--glass);
  backdrop-filter: blur(12px);
  cursor: pointer;
  white-space: nowrap;
  transition: border-color 0.3s;
}

.views button:hover,
.pager button:hover,
.chip:hover {
  border-color: var(--ink);
}

/* Choix de l'étage, en vue éclatée : un niveau à la fois, vu de dessus */
.levels {
  display: flex;
  gap: 6px;
  min-width: 0;
  overflow-x: auto;
  scrollbar-width: none;
}

.levels button {
  flex: none;
  padding: 9px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--glass);
  backdrop-filter: blur(12px);
  color: inherit;
  font: 400 0.72rem/1.3 var(--f-mono);
  font-variation-settings: normal;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
  cursor: pointer;
  transition: border-color 0.3s, background 0.3s, color 0.3s;
}

.levels button:hover {
  border-color: var(--ink);
}

.levels button[aria-pressed='true'] {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}

.pager {
  display: flex;
  flex: none;
  gap: 6px;
  margin-left: auto;
}

.pager span {
  display: inline-block;
  max-width: 13ch;
  overflow: hidden;
  text-overflow: ellipsis;
  vertical-align: bottom;
}

.app.has-sheet .rail,
.app.has-sheet .dock {
  right: calc(min(460px, 100%) + 16px);
}

.app.has-index .rail,
.app.has-index .dock,
.app.has-index .spots,
.app:not([data-mode='ext']) .views {
  display: none;
}

/* ---------- Méthode et sources : fenêtre à part, ouverte depuis la fiche ---------- */

.linkish {
  padding: 0;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  font-variation-settings: inherit;
  letter-spacing: inherit;
  text-decoration: underline;
  text-underline-offset: 0.18em;
  cursor: pointer;
}

.method {
  width: min(92vw, 62ch);
  max-height: min(86vh, 760px);
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--paper);
  color: var(--ink);
  overflow: auto;
}

.method::backdrop {
  background: rgba(8, 12, 12, 0.45);
  backdrop-filter: blur(6px);
}

.method__bar {
  position: sticky;
  top: 0;
  display: flex;
  justify-content: flex-end;
  margin: 0;
  padding: 14px 14px 6px;
  background: linear-gradient(var(--paper) 72%, transparent);
}

.method__body {
  padding: 0 clamp(18px, 4vw, 34px) 30px;
  font-size: 0.92rem;
  line-height: 1.6;
}

.method__title {
  margin: 0 0 0.2rem;
  font-size: clamp(1.5rem, 2.4vw, 2rem);
  font-variation-settings: 'wght' 820, 'wdth' 74;
  line-height: 0.95;
  text-transform: uppercase;
}

.method__body p {
  margin: 0.4rem 0 0;
  color: var(--soft);
}

/* ---------- Hommage : la fenêtre du souvenir (elle s'ouvre quand on passe sur le canon du monument) ----------
   Plein écran, sombre et lente : le portrait se dévoile, les deux mots montent, un filet d'or se tire,
   l'insigne du Régiment paraît, quelques pétales de coquelicot tombent derrière. */

.tribute {
  --gold: #c9a55a;
  --poppy: #b3231f;
  --bone: #f2f1ea;
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: clamp(12px, 3vw, 40px);
  border: 0;
  background: none;
  color: var(--bone);
  overflow: auto;
}

.tribute[open] {
  display: grid;
  place-items: center;
}

.tribute::backdrop {
  background: radial-gradient(120% 90% at 50% 40%, rgba(40, 10, 10, 0.86), rgba(4, 6, 7, 0.94) 62%);
  backdrop-filter: blur(10px) saturate(0.5);
  animation: tribute-fade 1.1s ease both;
}

@keyframes tribute-fade {
  from {
    opacity: 0;
  }
}

.tribute__card {
  position: relative;
  display: grid;
  grid-template-columns: minmax(0, 0.82fr) minmax(0, 1fr);
  width: min(100%, 1080px);
  min-height: min(84vh, 660px);
  background: radial-gradient(120% 100% at 100% 0%, #1d1110 0%, #0b0f10 58%);
  border: 1px solid rgba(201, 165, 90, 0.38);
  box-shadow: 0 40px 120px rgba(0, 0, 0, 0.6), 0 0 0 6px rgba(201, 165, 90, 0.07);
  overflow: hidden;
  animation: tribute-card 1.2s var(--ease) both;
}

@keyframes tribute-card {
  from {
    opacity: 0;
    transform: translateY(26px) scale(0.985);
  }
}

.tribute__portrait {
  position: relative;
  margin: 0;
  overflow: hidden;
  animation: tribute-reveal 1.6s var(--ease) 0.25s both;
}

@keyframes tribute-reveal {
  from {
    clip-path: inset(0 0 100% 0);
  }
  to {
    clip-path: inset(0);
  }
}

.tribute__portrait img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 18%;
  animation: tribute-zoom 9s ease-out both;
}

@keyframes tribute-zoom {
  from {
    transform: scale(1.12);
  }
}

.tribute__portrait::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent 62%, rgba(11, 15, 16, 0.82)), linear-gradient(0deg, rgba(11, 15, 16, 0.5), transparent 34%);
}

.tribute__text {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: clamp(24px, 3.6vw, 52px);
  padding-left: clamp(18px, 2.2vw, 30px);
}

.tribute__text p {
  margin: 0;
}

/* Les deux mots, en très grand : ils montent l'un après l'autre. */
.tribute__title {
  margin: 0;
  font-family: var(--f-display);
  font-size: clamp(3.2rem, min(10.6vw, 17vh), 7.8rem);
  font-variation-settings: 'wght' 860, 'wdth' 62;
  line-height: 0.82;
  letter-spacing: -0.01em;
  text-transform: uppercase;
}

.tribute__title span {
  display: block;
  animation: rise 1.1s var(--ease) 0.7s both;
}

.tribute__title span + span {
  color: var(--gold);
  animation-delay: 0.95s;
}

.tribute__rule {
  height: 1px;
  margin: clamp(18px, 2.6vw, 30px) 0;
  background: linear-gradient(90deg, var(--gold), rgba(201, 165, 90, 0.1));
  transform-origin: 0 50%;
  animation: tribute-rule 1.5s var(--ease) 1.3s both;
}

@keyframes tribute-rule {
  from {
    transform: scaleX(0);
  }
}

.tribute__who {
  display: grid;
  grid-template-columns: clamp(104px, 15vw, 196px) minmax(0, 1fr);
  align-items: center;
  gap: clamp(14px, 2vw, 26px);
  animation: tribute-up 1.1s var(--ease) 1.6s both;
}

@keyframes tribute-up {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
}

.tribute__badge {
  display: block;
  width: 100%;
  height: auto;
  filter: drop-shadow(0 6px 22px rgba(201, 165, 90, 0.28));
  animation: tribute-badge 6s ease-in-out 2.8s infinite alternate;
}

@keyframes tribute-badge {
  to {
    filter: drop-shadow(0 6px 30px rgba(201, 165, 90, 0.55));
  }
}

.tribute__rank,
.tribute__unit {
  font: 400 0.72rem/1.5 var(--f-mono);
  font-variation-settings: normal;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.tribute__rank {
  color: var(--gold);
}

.tribute__name {
  margin: 0.25em 0 0.35em !important;
  font-size: clamp(1.8rem, 3.9vw, 3.2rem);
  font-variation-settings: 'wght' 800, 'wdth' 78;
  line-height: 0.95;
  text-transform: uppercase;
}

.tribute__name abbr {
  text-decoration: none;
}

.tribute__unit {
  color: rgba(242, 241, 234, 0.78);
}

.tribute__vow {
  margin-top: clamp(20px, 3vw, 34px) !important;
  font-size: clamp(1.15rem, 1.9vw, 1.6rem);
  font-variation-settings: 'wght' 420, 'wdth' 96;
  font-style: italic;
  animation: tribute-up 1.2s var(--ease) 2.1s both;
}

.tribute__vow::before {
  content: '';
  display: inline-block;
  width: 0.62em;
  height: 0.62em;
  margin-right: 0.55em;
  border-radius: 50%;
  background: radial-gradient(circle, #1a1010 0 24%, var(--poppy) 26%);
  vertical-align: 0.02em;
}

.tribute__place {
  margin-top: 0.7rem !important;
  max-width: 44ch;
  font-size: 0.88rem;
  line-height: 1.5;
  color: rgba(242, 241, 234, 0.62);
  animation: tribute-up 1.2s var(--ease) 2.3s both;
}

.tribute form {
  margin-top: clamp(18px, 2.6vw, 30px);
  animation: tribute-up 1.2s var(--ease) 2.5s both;
}

.tribute .pill {
  border-color: rgba(201, 165, 90, 0.5);
  background: none;
  color: inherit;
}

.tribute .pill:hover {
  border-color: var(--gold);
}

/* Les coquelicots : quelques pétales qui tombent lentement, derrière la carte. */
.tribute__petals {
  position: fixed;
  inset: 0;
  overflow: hidden;
  pointer-events: none;
}

.tribute__petals i {
  position: absolute;
  top: -6vh;
  left: calc(var(--n) * 6.4% + 1%);
  width: calc(10px + var(--s) * 9px);
  height: calc(8px + var(--s) * 8px);
  border-radius: 62% 38% 55% 45% / 60% 44% 56% 40%;
  background: radial-gradient(circle at 34% 30%, #d6402f, var(--poppy) 58%, #7c1512);
  opacity: 0;
  animation: tribute-petal calc(11s + var(--s) * 9s) linear calc(var(--d) * 1s) infinite;
}

@keyframes tribute-petal {
  0% {
    opacity: 0;
    transform: translate3d(0, 0, 0) rotate(0deg);
  }
  8% {
    opacity: 0.72;
  }
  50% {
    transform: translate3d(calc(var(--w) * 1px), 56vh, 0) rotate(210deg);
  }
  92% {
    opacity: 0.6;
  }
  100% {
    opacity: 0;
    transform: translate3d(calc(var(--w) * -0.6px), 112vh, 0) rotate(420deg);
  }
}

.tribute__petals i:nth-child(1) {
  --n: 0;
  --s: 0.3;
  --d: 0.4;
  --w: 38;
}

.tribute__petals i:nth-child(2) {
  --n: 1;
  --s: 0.8;
  --d: 5.2;
  --w: -52;
}

.tribute__petals i:nth-child(3) {
  --n: 2;
  --s: 0.1;
  --d: 9.1;
  --w: 30;
}

.tribute__petals i:nth-child(4) {
  --n: 3;
  --s: 0.6;
  --d: 2.3;
  --w: -24;
}

.tribute__petals i:nth-child(5) {
  --n: 4;
  --s: 0.9;
  --d: 7.4;
  --w: 60;
}

.tribute__petals i:nth-child(6) {
  --n: 5;
  --s: 0.2;
  --d: 12.5;
  --w: -44;
}

.tribute__petals i:nth-child(7) {
  --n: 6;
  --s: 0.5;
  --d: 1.1;
  --w: 26;
}

.tribute__petals i:nth-child(8) {
  --n: 7;
  --s: 1;
  --d: 8.8;
  --w: -66;
}

.tribute__petals i:nth-child(9) {
  --n: 8;
  --s: 0.4;
  --d: 4.6;
  --w: 48;
}

.tribute__petals i:nth-child(10) {
  --n: 9;
  --s: 0.7;
  --d: 10.9;
  --w: -30;
}

.tribute__petals i:nth-child(11) {
  --n: 10;
  --s: 0.15;
  --d: 6.3;
  --w: 54;
}

.tribute__petals i:nth-child(12) {
  --n: 11;
  --s: 0.85;
  --d: 0.9;
  --w: -40;
}

.tribute__petals i:nth-child(13) {
  --n: 12;
  --s: 0.45;
  --d: 13.4;
  --w: 34;
}

.tribute__petals i:nth-child(14) {
  --n: 13;
  --s: 0.65;
  --d: 3.5;
  --w: -58;
}

.tribute__petals i:nth-child(15) {
  --n: 14;
  --s: 0.25;
  --d: 11.6;
  --w: 42;
}

.tribute__petals i:nth-child(16) {
  --n: 15;
  --s: 0.95;
  --d: 7.9;
  --w: -36;
}

@media (max-width: 720px) {
  .tribute {
    place-items: start center;
  }
  .tribute__card {
    grid-template-columns: 1fr;
    min-height: 0;
  }
  .tribute__portrait {
    height: 44vh;
  }
  .tribute__portrait::after {
    background: linear-gradient(0deg, rgba(11, 15, 16, 0.94), transparent 46%);
  }
  .tribute__text {
    padding: 4px 20px 26px;
  }
}

/* ---------- Plan technique : cotes tracées par-dessus la scène ---------- */

.dims {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: none;
  width: 100%;
  height: 100%;
  overflow: hidden;
  pointer-events: none;
}

.dims.is-on {
  display: block;
}

.app.has-index .dims.is-on {
  display: none;
}

.dims__line {
  fill: none;
  stroke: var(--ink);
  stroke-width: 1;
}

.dims__lot {
  fill: none;
  stroke: var(--signal);
  stroke-width: 1.5;
  stroke-dasharray: 8 5;
}

.dims__text,
.dims__label {
  fill: var(--ink);
  font: 500 0.72rem/1 var(--f-mono);
  font-variation-settings: normal;
  letter-spacing: 0.03em;
  text-anchor: middle;
  dominant-baseline: central;
  paint-order: stroke;
  stroke: var(--paper);
  stroke-width: 3.5px;
  stroke-linejoin: round;
}

.dims__label {
  font-weight: 400;
  font-size: 0.6rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.dims__label--big {
  font-size: 0.84rem;
  letter-spacing: 0.32em;
}

/* ---------- Repères posés sur la maquette ---------- */

.spots {
  position: absolute;
  inset: 0;
  z-index: 2;
  overflow: hidden;
  pointer-events: none;
}

.spot {
  position: absolute;
  left: 0;
  top: 0;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  will-change: transform;
  transition: opacity 0.4s;
}

.spot__dot {
  position: relative;
  flex: none;
  width: 24px;
  height: 24px;
  margin: -12px 0 0 -12px;
  padding: 0;
  border: 1px solid var(--signal);
  border-radius: 50%;
  background: none;
  cursor: pointer;
  pointer-events: auto;
}

.spot__dot::after {
  content: '';
  position: absolute;
  inset: 7px;
  border-radius: 50%;
  background: var(--signal);
}

.spot__card {
  max-width: 230px;
  margin-top: -14px;
  padding: 9px 12px;
  border: 1px solid var(--line);
  background: var(--glass);
  backdrop-filter: blur(10px);
  opacity: 0;
  transform: translateX(-6px);
  transition: opacity 0.3s, transform 0.4s var(--ease);
}

.spot.is-open .spot__card,
.spot__dot:hover + .spot__card,
.spot__dot:focus-visible + .spot__card {
  opacity: 1;
  transform: none;
}

.spot__card strong {
  display: block;
  font-variation-settings: 'wght' 760, 'wdth' 84;
  line-height: 1.1;
  text-transform: uppercase;
}

.spot__card span {
  font-size: 0.85rem;
  color: var(--soft);
}

.room {
  position: absolute;
  left: 0;
  top: 0;
  padding: 0.45em 0.7em;
  border: 1px solid color-mix(in srgb, var(--line) 70%, transparent);
  /* Étiquette translucide : on devine la maquette à travers, le texte reste net */
  background: color-mix(in srgb, var(--glass) 70%, transparent);
  backdrop-filter: blur(2px);
  font: 400 0.66rem/1.3 var(--f-mono);
  font-variation-settings: normal;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: center;
  white-space: nowrap;
  will-change: transform;
  transition: opacity 0.4s;
}

.room small {
  display: block;
  font-size: 1em;
  color: var(--soft);
}

/* ---------- La carte du territoire ---------- */

.top__end {
  display: flex;
  align-items: center;
  gap: 8px;
}

.map {
  gap: 9px;
}

.map__icon {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--signal);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--signal) 28%, transparent);
}

.map[aria-pressed='true'] {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}

.app.has-index #open-map,
.app.has-sheet #open-map {
  visibility: hidden;
}

/* Sur la carte, il ne reste des commandes que ce qui a un sens à l'échelle du territoire. */
.app[data-view='carte'] .rail button[data-mode],
.app[data-view='carte'] #open-photos,
.app[data-view='carte'] .rail__sheet,
.app[data-view='carte'] .pager,
.app[data-view='carte'] #open-rdv {
  display: none;
}

.app[data-view='carte'] .wash {
  opacity: 0.62;
}

.app[data-view='carte'] .title__name {
  font-size: min(clamp(2rem, 4.4vw, 4.6rem), var(--fit, 100rem));
}

.app[data-view='carte'] .title__data {
  max-width: 46ch;
}

.app[data-view='carte'] .title__note {
  display: block;
}

.app.is-swapping .spots {
  visibility: hidden;
}

/* Une étiquette par balise : un portail. La miniature du bien s'inscrit dans une fenêtre en plein cintre, posée
   sur le filet qui monte de la balise ; son nom tient sur une plaque, à hauteur de la naissance de l'arc. Le
   cintre sert de cadran : il se dore du lever au coucher du soleil. On y entre d'un clic. */
.pin {
  --aw: 60px; /* largeur de la fenêtre */
  --ah: 78px; /* sa hauteur : un demi-cercle sur deux piédroits */
  position: absolute;
  left: 0;
  top: 0;
  display: flex;
  align-items: flex-end;
  padding: 0;
  border: 0;
  background: none;
  color: var(--ink);
  text-align: left;
  cursor: pointer;
  pointer-events: auto;
  will-change: transform;
  transition: opacity 0.4s;
}

.pin::after {
  content: '';
  position: absolute;
  left: var(--lx, 50%);
  top: 100%;
  width: 1px;
  height: var(--lead, 12px);
  background: var(--signal);
  pointer-events: none;
}

.pin:hover,
.pin:focus-visible,
.pin.is-focus {
  z-index: 2;
}

.pin__arch {
  position: relative;
  z-index: 1;
  flex: none;
  box-sizing: border-box;
  width: var(--aw);
  height: var(--ah);
  padding: 2px;
  border-radius: calc(var(--aw) / 2) calc(var(--aw) / 2) 2px 2px;
  /* Le cadre : ivoire, doré sur l'arc depuis la naissance de gauche jusqu'à la position du soleil. */
  background: conic-gradient(from -90deg at 50% calc(var(--aw) / 2), var(--signal) 0 var(--sun-arc, 0deg), #f3f1ea 0);
  box-shadow: 0 0 0 1px rgba(11, 20, 18, 0.16), 0 12px 22px -10px rgba(6, 12, 10, 0.7);
  opacity: 0;
  transform: translateY(12px) scale(0.55);
  transform-origin: 50% 100%;
  transition: transform 0.6s cubic-bezier(0.2, 0.9, 0.25, 1.18), opacity 0.35s, background-color 0.25s;
}

.pin.is-on .pin__arch {
  opacity: 1;
  transform: none;
}

.pin.is-on:hover .pin__arch,
.pin.is-on:focus-visible .pin__arch,
.pin.is-on.is-focus .pin__arch {
  background: var(--signal);
  transform: scale(1.16);
}

.pin__view {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  overflow: hidden;
  border-radius: calc(var(--aw) / 2 - 2px) calc(var(--aw) / 2 - 2px) 1px 1px;
  background: #b9b6ad;
}

.pin__view img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  opacity: 0;
  transition: opacity 0.7s;
}

.pin__view img.is-in {
  opacity: 1;
}

/* Le soleil de l'étiquette, au bout de l'arc doré : il parcourt le cintre du lever (à gauche) au coucher (à droite). */
.pin__sun {
  position: absolute;
  left: 50%;
  top: calc(var(--aw) / 2);
  width: 6px;
  height: 6px;
  margin: -3px 0 0 -3px;
  border-radius: 50%;
  background: var(--signal);
  opacity: var(--sun-o, 0);
  transform: rotate(var(--sun-a, 0deg)) translateY(calc(1px - var(--aw) / 2));
  transition: opacity 0.5s;
  pointer-events: none;
}

.pin__plate {
  display: grid;
  grid-template-columns: auto auto;
  column-gap: 8px;
  align-items: baseline;
  align-content: center;
  justify-content: start;
  box-sizing: border-box;
  height: calc(var(--ah) - var(--aw) / 2);
  margin-left: -1px;
  padding: 0 14px 1px 12px;
  border: 1px solid var(--line);
  border-left: 0;
  border-radius: 0 3px 3px 0;
  background: var(--glass);
  backdrop-filter: blur(10px);
  clip-path: inset(0 100% 0 0);
  transition: clip-path 0.55s cubic-bezier(0.2, 0.7, 0.2, 1) 0.1s, background-color 0.25s, border-color 0.25s, color 0.25s;
}

.pin.is-on .pin__plate {
  clip-path: inset(0 0 0 0);
}

.pin:hover .pin__plate,
.pin:focus-visible .pin__plate,
.pin.is-focus .pin__plate {
  background: var(--signal);
  border-color: transparent;
  color: var(--on-signal);
}

/* Près du bord droit, l'étiquette se retourne : la plaque passe à gauche de la fenêtre. */
.pin--flip {
  flex-direction: row-reverse;
}

.pin--flip .pin__plate {
  justify-content: end;
  margin: 0 -1px 0 0;
  padding: 0 12px 1px 14px;
  border: 1px solid var(--line);
  border-right: 0;
  border-radius: 3px 0 0 3px;
  clip-path: inset(0 0 0 100%);
}

.pin--flip .pin__meta {
  justify-self: end;
}

.pin--bare .pin__arch {
  display: none;
}

.pin__n {
  font: 500 0.64rem/1 var(--f-mono);
  font-variation-settings: normal;
  letter-spacing: 0.08em;
  color: var(--signal);
}

.pin__name {
  font-size: 0.9rem;
  font-variation-settings: 'wght' 760, 'wdth' 84;
  line-height: 1.05;
  text-transform: uppercase;
  white-space: nowrap;
}

.pin__meta {
  grid-column: 1 / -1;
  margin-top: 4px;
  font: 400 0.58rem/1.3 var(--f-mono);
  font-variation-settings: normal;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--soft);
  white-space: nowrap;
}

.pin:hover .pin__n,
.pin:focus-visible .pin__n,
.pin.is-focus .pin__n,
.pin:hover .pin__meta,
.pin:focus-visible .pin__meta,
.pin.is-focus .pin__meta {
  color: inherit;
}

.town {
  position: absolute;
  left: 0;
  top: 0;
  font: 400 0.6rem/1 var(--f-mono);
  font-variation-settings: normal;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink);
  text-shadow: 0 0 6px var(--halo), 0 0 2px var(--halo), 0 0 12px var(--halo);
  white-space: nowrap;
  pointer-events: none;
  will-change: transform;
  transition: opacity 0.4s;
}

/* ---------- Index ---------- */

.index {
  position: absolute;
  inset: 0;
  z-index: 20;
  display: flex;
  flex-direction: column;
  padding: calc(76px + env(safe-area-inset-top, 0px)) max(var(--gx), env(safe-area-inset-right, 0px)) calc(22px + env(safe-area-inset-bottom, 0px)) max(var(--gx), env(safe-area-inset-left, 0px));
  background: linear-gradient(90deg, var(--glass) 0%, color-mix(in srgb, var(--glass) 70%, transparent) 55%, color-mix(in srgb, var(--glass) 34%, transparent) 100%);
  overflow-y: auto;
  animation: fade 0.4s ease both;
}

@keyframes fade {
  from {
    opacity: 0;
  }
}

.index__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.index__form {
  display: flex;
  flex: 1;
  gap: 8px;
  min-width: 0;
  max-width: 42rem;
}

.index__form input {
  flex: 1;
  min-width: 0;
  padding: 8px 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: none;
  font-size: 1.1rem;
}

.index__form input::placeholder {
  color: var(--soft);
  opacity: 1;
}

.index__form input:focus {
  outline: none;
  border-bottom-color: var(--ink);
}

.index__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 12px;
}

.index__answer {
  min-height: 1.5em;
  max-width: 52rem;
  margin-top: 10px;
}

.index__list {
  display: flex;
  flex-direction: column;
  margin: clamp(8px, 2.4vh, 26px) 0;
}

.row {
  display: grid;
  grid-template-columns: 3rem minmax(0, 1fr) auto;
  align-items: baseline;
  gap: 0 16px;
  width: 100%;
  max-width: 84rem;
  padding: clamp(5px, 1.1vh, 11px) 0;
  border: 0;
  border-top: 1px solid var(--line);
  background: none;
  text-align: left;
  cursor: pointer;
  opacity: 0.6;
  transition: opacity 0.3s;
}

.row.is-peek,
.row:hover,
.row:focus-visible {
  opacity: 1;
}

.row__n,
.row__where {
  font: 400 0.72rem/1.3 var(--f-mono);
  font-variation-settings: normal;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}

.row__name {
  overflow: hidden;
  font-size: clamp(1.6rem, min(5.4vw, 6.2vh), 5rem); /* les sept noms tiennent dans la hauteur de l'écran */
  font-variation-settings: 'wght' 280, 'wdth' 66;
  line-height: 0.98;
  text-overflow: ellipsis;
  text-transform: uppercase;
  white-space: nowrap;
  transition: font-variation-settings 0.55s var(--ease);
}

.row.is-peek .row__name {
  font-variation-settings: 'wght' 860, 'wdth' 104;
}

.row__where {
  grid-column: 2;
  color: var(--soft);
}

.row__price {
  grid-column: 3;
  grid-row: 1;
  font-variation-settings: 'wght' 620, 'wdth' 90;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.index__note {
  max-width: 44rem;
  font-size: 0.88rem;
  color: var(--soft);
}

/* ---------- Fiche ---------- */

.sheet {
  position: absolute;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 26;
  display: flex;
  flex-direction: column;
  width: min(460px, 100%);
  border-left: 1px solid var(--line);
  background: var(--glass);
  backdrop-filter: blur(24px) saturate(1.2);
  animation: slide 0.5s var(--ease) both;
}

@keyframes slide {
  from {
    transform: translateX(8%);
    opacity: 0;
  }
}

.sheet__close {
  position: absolute;
  top: calc(14px + env(safe-area-inset-top, 0px));
  right: max(16px, env(safe-area-inset-right, 0px));
  z-index: 1;
}

.sheet__body {
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: calc(72px + env(safe-area-inset-top, 0px)) max(24px, env(safe-area-inset-right, 0px)) calc(30px + env(safe-area-inset-bottom, 0px)) 24px;
}

.sheet__name {
  margin: 0.5rem 0 0.4rem;
  font-size: clamp(2rem, 3vw, 2.8rem);
  font-variation-settings: 'wght' 820, 'wdth' 74;
  line-height: 0.9;
  text-transform: uppercase;
  text-wrap: balance;
}

.sheet__kind {
  color: var(--soft);
}

.sheet__price {
  margin: 1rem 0;
  font-size: 1.9rem;
  font-variation-settings: 'wght' 700, 'wdth' 88;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.specs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid var(--ink);
  border-bottom: 1px solid var(--line);
}

.specs > div {
  padding: 10px 8px 10px 0;
}

.specs > div + div {
  padding-left: 12px;
  border-left: 1px solid var(--line);
}

.specs dt {
  font-size: 0.78rem;
  color: var(--soft);
}

.specs dd {
  font-size: 1.3rem;
  font-variation-settings: 'wght' 700, 'wdth' 86;
  font-variant-numeric: tabular-nums;
  line-height: 1.15;
}

.sheet__desc {
  margin: 1.1rem 0 0;
}

.h {
  margin: 1.7rem 0 0.5rem;
  padding-top: 0.7rem;
  border-top: 1px solid var(--ink);
}

.list li,
.facts > div {
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.95rem;
}

.facts > div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
}

.facts dt {
  color: var(--soft);
}

.facts dd {
  text-align: right;
  font-variant-numeric: tabular-nums;
}

.note {
  margin-top: 0.9rem;
  font-size: 0.84rem;
  color: var(--soft);
}

.note a {
  color: var(--ink);
}

.field {
  display: grid;
  gap: 6px;
  margin-bottom: 14px;
}

.field label {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 0.92rem;
  color: var(--soft);
}

.field output {
  color: var(--ink);
  font-variant-numeric: tabular-nums;
}

.field input[type='text'],
.field input[type='email'] {
  width: 100%;
  padding: 9px 0;
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: none;
}

.field input[type='text']:focus,
.field input[type='email']:focus {
  outline: none;
  border-bottom-color: var(--ink);
  box-shadow: 0 1px 0 0 var(--ink);
}

input[type='range'] {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 26px;
  margin: 0;
  background: none;
  cursor: pointer;
}

input[type='range']::-webkit-slider-runnable-track {
  height: 1px;
  background: var(--ink);
}

input[type='range']::-moz-range-track {
  height: 1px;
  background: var(--ink);
}

input[type='range']::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 18px;
  height: 18px;
  margin-top: -9px;
  border: 0;
  border-radius: 50%;
  background: var(--signal);
  box-shadow: 0 0 0 1.5px var(--ink);
}

input[type='range']::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border: 0;
  border-radius: 50%;
  background: var(--signal);
  box-shadow: 0 0 0 1.5px var(--ink);
}

.fin__pay {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding-top: 10px;
  border-top: 1px solid var(--line);
}

.fin__pay b {
  font-size: 2.2rem;
  font-variation-settings: 'wght' 800, 'wdth' 80;
  font-variant-numeric: tabular-nums;
  line-height: 1;
}

.fin__rent {
  margin-top: 10px;
  padding: 10px 12px;
  border: 1px solid var(--signal);
  font-size: 0.92rem;
}

.chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  min-width: 0;
  margin: 0 0 14px;
  padding: 0;
  border: 0;
}

.chips legend {
  width: 100%;
  margin-bottom: 8px;
  padding: 0;
  font-size: 0.92rem;
  color: var(--soft);
}

.chips label {
  position: relative;
  cursor: pointer;
}

.chips input {
  position: absolute;
  inset: 0;
  opacity: 0;
  cursor: pointer;
}

.chips span {
  display: inline-block;
  padding: 7px 13px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.88rem;
  line-height: 1.2;
}

.chips input:checked + span {
  background: var(--ink);
  border-color: var(--ink);
  color: var(--paper);
}

.chips input:focus-visible + span {
  outline: 2px solid var(--signal);
  outline-offset: 3px;
}

/* ---------- Photos ---------- */

.photos {
  position: absolute;
  inset: 0;
  z-index: 30;
  background: var(--paper);
  overflow: hidden;
  animation: fade 0.4s ease both;
}

.photos::before {
  content: '';
  position: absolute;
  inset: -60px;
  background: var(--photo, none) center / cover no-repeat;
  filter: blur(44px) saturate(1.15);
  opacity: 0.55;
}

.photos__img {
  position: absolute;
  left: 0;
  top: calc(66px + env(safe-area-inset-top, 0px));
  width: 100%;
  height: calc(100% - 176px - env(safe-area-inset-top, 0px) - env(safe-area-inset-bottom, 0px));
  object-fit: contain;
  opacity: 0;
  transform: scale(1.03);
  transition: opacity 0.7s ease, transform 1.4s var(--ease);
}

.photos__img.is-on {
  opacity: 1;
  transform: none;
}

.photos__close {
  position: absolute;
  top: calc(14px + env(safe-area-inset-top, 0px));
  right: max(var(--gx), env(safe-area-inset-right, 0px));
}

.photos__arrow {
  position: absolute;
  top: 50%;
  width: 46px;
  height: 46px;
  margin-top: -40px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: var(--glass);
  backdrop-filter: blur(12px);
  cursor: pointer;
}

.photos__arrow--prev {
  left: max(16px, env(safe-area-inset-left, 0px));
}

.photos__arrow--next {
  right: max(16px, env(safe-area-inset-right, 0px));
}

.photos__caption {
  position: absolute;
  left: 50%;
  bottom: calc(104px + env(safe-area-inset-bottom, 0px));
  max-width: calc(100% - 32px);
  padding: 0.45em 0.9em;
  background: var(--glass);
  backdrop-filter: blur(10px);
  font-size: 0.92rem;
  text-align: center;
  transform: translateX(-50%);
}

.photos__thumbs {
  position: absolute;
  left: max(16px, env(safe-area-inset-left, 0px));
  right: max(16px, env(safe-area-inset-right, 0px));
  bottom: calc(12px + env(safe-area-inset-bottom, 0px));
  display: flex;
  gap: 8px;
  padding: 4px;
  overflow-x: auto;
  scrollbar-width: thin;
}

.photos__thumbs button {
  flex: none;
  width: 104px;
  height: 70px;
  padding: 0;
  border: 0;
  background: var(--paper);
  cursor: pointer;
  opacity: 0.55;
  transition: opacity 0.3s;
}

.photos__thumbs button[aria-pressed='true'] {
  opacity: 1;
  outline: 2px solid var(--signal);
  outline-offset: 2px;
}

.photos__thumbs img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

/* ---------- Petits écrans ---------- */

@media (max-width: 760px) {
  #open-rdv {
    display: none;
  }
  .top {
    flex-wrap: wrap;
    row-gap: 8px;
  }
  .top__mid {
    order: 3;
    flex-basis: 100%;
    justify-content: space-between;
  }
  .pin {
    --aw: 42px;
    --ah: 55px;
  }
  .pin__plate {
    padding: 0 9px 0 8px;
    column-gap: 6px;
  }
  .pin--flip .pin__plate {
    padding: 0 8px 0 9px;
  }
  .pin__name {
    font-size: 0.76rem;
  }
  .pin__meta {
    display: none;
  }
  .app[data-view='carte'] .title__data,
  .app[data-view='carte'] .sun__data {
    display: none; /* sur un petit écran, la place va aux étiquettes */
  }
  .brand__name {
    font-size: 1.35rem;
  }
  .brand {
    gap: 10px;
  }
  .seasons button {
    padding: 8px 12px;
  }
  .wash {
    background: linear-gradient(to top, color-mix(in srgb, var(--paper) 92%, transparent) 0%, color-mix(in srgb, var(--paper) 72%, transparent) 26%, transparent 54%);
  }
  .title {
    bottom: calc(128px + env(safe-area-inset-bottom, 0px));
  }
  .title__name {
    font-size: min(clamp(2.3rem, 12.4vw, 4.4rem), var(--fit, 100rem));
    line-height: 0.84;
  }
  .rail {
    left: 0;
    right: 0;
    top: auto;
    bottom: calc(22px + env(safe-area-inset-bottom, 0px)); /* la mention du pied de page passe dessous */
    flex-direction: row;
    align-items: center;
    padding: 0 max(16px, env(safe-area-inset-right, 0px)) 0 max(16px, env(safe-area-inset-left, 0px));
    overflow-x: auto;
    transform: none;
    scrollbar-width: none;
  }
  .rail button {
    flex: none;
  }
  .rail .rail__clay {
    margin: 0;
  }
  /* La fiche reste à portée de pouce pendant que les autres commandes défilent dessous. */
  .rail .rail__sheet {
    position: sticky;
    right: 0;
    margin: 0 0 0 auto;
    box-shadow: -10px 0 14px 2px var(--halo);
  }
  .rail button[aria-pressed='true'] {
    padding-right: 15px;
  }
  .dock {
    bottom: calc(76px + env(safe-area-inset-bottom, 0px));
  }
  .pager span,
  .views {
    display: none;
  }
  .app.has-sheet .rail {
    right: 0;
  }
  .row {
    grid-template-columns: 2rem minmax(0, 1fr);
  }
  .row__price {
    grid-column: 2;
    grid-row: auto;
  }
  .row__name {
    font-size: clamp(1.5rem, 8.6vw, 2.6rem);
  }
}

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