/* danian.be home showcase: the shopfront (devanture).
   A painted Belgian shopfront in each demo's colour: cornice, fascia with the shop's
   lettering, shop window, base panel with an enamel house-number plaque (the URL),
   a stone step, and a wrought-iron bracket with a hanging blade sign.
   Page styles are Astro-scoped, so selectors are prefixed with `html body`. */

/* ---------- Tokens ---------- */
html body .v-moni--dense {
  --dmv-montant: 12px;            /* stile width around the window */
  --dmv-fronton: 56px;            /* fascia height */
  --dmv-socle: 42px;              /* base panel height */
  --dmv-traverse: 9px;            /* rail between window and base panel */
  --dmv-k: 1.3;                   /* wordmark scale vs the index list */
  --dmv-hmax: 30;                 /* wordmark max height (px, unitless) */
  --dmv-s: .82;                   /* bracket scale */
  --dmv-pierre: #6e767c;          /* Belgian bluestone step */
}
html body .v-moni--dense .v-moni__fenetre {
  --dmv-encre: #fff;                          /* lettering */
  --dmv-trait: rgb(255 255 255 / .2);         /* incised panel lines */
  --dmv-trait-fort: rgb(255 255 255 / .42);
  --dmv-ombre: #000;                          /* what paint is darkened with */
  --dmv-socle-fond: color-mix(in oklab, var(--fond) 84%, var(--dmv-ombre));
  --dmv-corniche-fond: color-mix(in oklab, var(--fond) 68%, var(--dmv-ombre));
}
html body .v-moni--dense .v-moni__fenetre[data-dmv-ton="clair"] {
  --dmv-encre: #161c22;
  --dmv-trait: rgb(22 28 34 / .16);
  --dmv-trait-fort: rgb(22 28 34 / .34);
  --dmv-ombre: #161c22;
  --dmv-socle-fond: color-mix(in oklab, var(--fond) 93%, var(--dmv-ombre));
  --dmv-corniche-fond: color-mix(in oklab, var(--fond) 86%, var(--dmv-ombre));
}

/* Never let the bracket or overhangs create horizontal scroll. */
html body .v-hero { overflow-x: clip; }

/* ---------- The painted frame ---------- */
html body .v-moni--dense .v-moni__fenetre {
  overflow: visible;
  border: 0;
  border-radius: 2px 2px 1px 1px;
  padding: 0 0 calc(var(--dmv-traverse) + var(--dmv-socle));
  background-color: var(--fond);
  /* paint catching light from above */
  background-image: linear-gradient(rgb(255 255 255 / .045), rgb(0 0 0 / .05));
  transition: background-color .6s var(--ease);
  box-shadow:
    inset 0 0 0 1px rgb(0 0 0 / .14),
    0 1px 0 rgb(22 28 34 / .06),
    0 22px 40px -30px rgb(22 28 34 / .55);
}
html body .v-moni--dense .v-moni__fenetre[data-dmv-ton="clair"] {
  box-shadow:
    inset 0 0 0 1px rgb(22 28 34 / .12),
    0 1px 0 rgb(22 28 34 / .05),
    0 22px 40px -30px rgb(22 28 34 / .4);
}

/* Cornice: a darker moulded cap that overhangs the frame. */
html body .v-moni--dense .v-moni__fenetre::before {
  content: "";
  position: absolute;
  z-index: 3;
  left: -7px;
  right: -7px;
  top: -10px;
  height: 11px;
  background-color: var(--dmv-corniche-fond);
  /* cap highlight, cap, shadow under the cap, band, band underside */
  background-image: linear-gradient(
    rgb(255 255 255 / .2) 0 1px,
    transparent 1px 4px,
    rgb(0 0 0 / .28) 4px 5px,
    rgb(255 255 255 / .07) 5px 10px,
    rgb(0 0 0 / .22) 10px);
  clip-path: polygon(0 0, 100% 0, 100% 4px, calc(100% - 4px) 4px, calc(100% - 4px) 100%, 4px 100%, 4px 4px, 0 4px);
  transition: background-color .6s var(--ease);
  pointer-events: none;
}

/* ---------- Fascia (the restyled browser bar) ---------- */
html body .v-moni--dense .v-moni__barre {
  position: static;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: center;
  column-gap: 12px;
  height: var(--dmv-fronton);
  min-height: 0;
  padding: 0 18px;
  border: 0;
  background: linear-gradient(rgb(0 0 0 / .2), rgb(0 0 0 / 0) 7px);
  border-radius: 0;
  /* incised panel line */
  outline: 1px solid var(--dmv-trait);
  outline-offset: -8px;
}
html body .v-moni--dense .v-moni__mention {
  grid-column: 1;
  grid-row: 1;
  justify-self: start;
  margin: 0;
  color: var(--dmv-encre);
  font-size: .6875rem;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  line-height: 1;
  transition: color .6s var(--ease);
}
html body .v-moni--dense .v-moni__long {
  position: absolute !important;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}
html body .v-moni--dense .v-moni__court { display: inline; }

html body .v-moni--dense .v-moni__pause {
  grid-column: 3;
  grid-row: 1;
  justify-self: end;
  justify-content: center;
  width: 30px;
  height: 30px;
  min-width: 0;
  min-height: 0;
  padding: 0;
  gap: 0;
  border-radius: 50%;
  color: var(--dmv-encre);
  background: transparent;
  box-shadow: inset 0 0 0 1px var(--dmv-trait-fort);
  transition: color .2s, background-color .2s, box-shadow .2s;
}
html body .v-moni--dense .v-moni__pause svg { width: 10px; height: 10px; }
html body .v-moni--dense .v-moni__pause:hover {
  color: var(--fond);
  background: var(--dmv-encre);
  box-shadow: inset 0 0 0 1px var(--dmv-encre);
}
html body .v-moni--dense .v-moni__pause:focus-visible {
  outline: 2px solid var(--dmv-encre);
  outline-offset: 3px;
}
html body .v-moni--dense .v-moni__pause-texte {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

/* Shop lettering: the demo's wordmark used as a mask, painted in --dmv-encre. */
html body .dmv-nom {
  grid-column: 2;
  grid-row: 1;
  position: relative;
  width: 250px;
  height: 40px;
  pointer-events: none;
}
html body .dmv-nom__calque {
  --dmv-ke: min(var(--dmv-k), calc(var(--dmv-hmax) / var(--dmv-h, 20)));
  position: absolute;
  left: 50%;
  top: 50%;
  width: calc(var(--dmv-w, 160) * var(--dmv-ke) * 1px);
  height: calc(var(--dmv-h, 20) * var(--dmv-ke) * 1px);
  background-color: var(--dmv-encre);
  -webkit-mask: no-repeat center / contain;
  mask: no-repeat center / contain;
  opacity: 0;
  transform: translate(-50%, calc(-50% + 5px));
  transition: opacity .32s var(--ease), transform .5s var(--ease), background-color .6s var(--ease);
}
html body .dmv-nom__calque.est-vu {
  opacity: 1;
  transform: translate(-50%, -50%);
  transition-delay: .12s, .12s, 0s;
}

/* ---------- The shop window ---------- */
html body .v-moni--dense .v-moni__ecran {
  /* definite width: with `auto`, aspect-ratio would turn max-height into a max-width */
  width: calc(100% - 2 * var(--dmv-montant));
  margin: 2px var(--dmv-montant) 0;
  border-radius: 1px;
  /* thin dark rebate + shaded moulding + highlight */
  box-shadow:
    0 0 0 1px rgb(0 0 0 / .5),
    0 0 0 3px rgb(0 0 0 / .12),
    0 0 0 4px rgb(255 255 255 / .09);
}
html body .v-moni--dense .v-moni__fenetre[data-dmv-ton="clair"] .v-moni__ecran {
  box-shadow:
    0 0 0 1px rgb(22 28 34 / .42),
    0 0 0 3px rgb(22 28 34 / .07),
    0 0 0 4px rgb(255 255 255 / .8);
}
/* Glass: two soft diagonal light streaks. */
html body .v-moni--dense .v-moni__ecran::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background:
    linear-gradient(112deg,
      transparent 0 14%,
      rgb(255 255 255 / .075) 16% 24%,
      transparent 26% 29%,
      rgb(255 255 255 / .05) 30% 32.5%,
      transparent 34%);
  mix-blend-mode: screen;
}
/* Depth: a slight inner shadow under the top of the frame. Keeps the focus ring. */
html body .v-moni--dense .v-moni__ecran::after {
  border-radius: 1px;
  box-shadow: inset 0 12px 14px -12px rgb(0 0 0 / .42), inset 0 0 0 1px rgb(0 0 0 / .18);
}
html body .v-moni--dense .v-moni__ecran:focus-visible::after {
  box-shadow: inset 0 0 0 3px var(--cobalt), inset 0 0 0 5px #fff;
}

/* ---------- Base panel (soubassement) ---------- */
html body .dmv-socle {
  position: absolute;
  z-index: 1;
  left: 0;
  right: 0;
  bottom: 0;
  height: var(--dmv-socle);
  border-radius: 0 0 1px 1px;
  background-color: var(--dmv-socle-fond);
  background-image: linear-gradient(transparent calc(100% - 5px), rgb(0 0 0 / .16) calc(100% - 5px) calc(100% - 4px), rgb(0 0 0 / .08) calc(100% - 4px));
  box-shadow: inset 0 1px 0 rgb(255 255 255 / .07), inset 0 0 0 1px rgb(0 0 0 / .14);
  transition: background-color .6s var(--ease);
  pointer-events: none;
}
/* Window sill ledge between window and base panel. */
html body .dmv-socle::before {
  content: "";
  position: absolute;
  left: 4px;
  right: 4px;
  top: -3px;
  height: 3px;
  background: rgb(255 255 255 / .1);
  box-shadow: 0 1px 0 rgb(0 0 0 / .22);
}

/* The URL as a Belgian enamel house-number plaque. */
html body .v-moni--dense .v-moni__adresse {
  position: absolute;
  z-index: 2;
  left: calc(var(--dmv-montant) + 12px);
  bottom: calc((var(--dmv-socle) - 28px) / 2);
  flex: none;
  width: auto;
  max-width: calc(100% - 2 * var(--dmv-montant) - 210px);
  height: 28px;
  gap: 0;
  padding: 0 15px;
  border-radius: 6.5px;
  color: #fff;
  font-size: .78125rem;
  letter-spacing: .015em;
  /* convex enamel: light from above, slightly darker towards the bottom */
  background:
    linear-gradient(rgb(255 255 255 / .16), rgb(255 255 255 / .02) 48%, rgb(0 0 0 / .08)),
    #0c5dfe;
  box-shadow:
    inset 0 0 0 1px rgb(0 0 0 / .22),
    inset 0 0 0 4px #0c5dfe,
    inset 0 0 0 5px rgb(255 255 255 / .82),
    0 1px 0 rgb(0 0 0 / .28),
    0 3px 6px -2px rgb(0 0 0 / .4);
}
html body .v-moni--dense .v-moni__adresse .v-moni__cadenas,
html body .v-moni--dense .v-moni__adresse img { display: none; }
html body .v-moni--dense .v-moni__url { color: #fff; }
html body .v-moni--dense .v-moni__url strong { color: #fff; font-weight: 650; }
html body .v-moni--dense .v-moni__hote,
html body .v-moni--dense .v-moni__chemin { color: #fff; font-weight: 450; }

/* Hanging "open 24/7" card, on the right of the base panel. */
html body .dmv-ouvert {
  position: absolute;
  right: calc(var(--dmv-montant) + 12px);
  top: 4px;
  display: grid;
  justify-items: center;
  color: var(--dmv-encre);
  transform-origin: 50% 2px;
}
html body .dmv-ouvert__fil {
  display: block;
  width: 40px;
  height: 9px;
  opacity: .7;
  overflow: visible;
}
html body .dmv-ouvert__clou {
  position: absolute;
  left: 50%;
  top: 0;
  width: 4px;
  height: 4px;
  margin-left: -2px;
  border-radius: 50%;
  background: color-mix(in oklab, var(--dmv-encre) 80%, #888);
  box-shadow: 0 1px 1px rgb(0 0 0 / .4);
}
html body .dmv-ouvert__carton {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 20px;
  margin-top: -1px;
  padding: 0 8px;
  border-radius: 3px;
  background: #f4f5f2;
  color: #161c22;
  font-size: .6875rem;
  font-weight: 450;
  letter-spacing: .02em;
  white-space: nowrap;
  line-height: 1;
  box-shadow: 0 1px 0 rgb(0 0 0 / .18), 0 3px 5px -2px rgb(0 0 0 / .35);
}
html body .dmv-ouvert__carton b { font-weight: 700; }
html body .dmv-ouvert__voyant {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #0c5dfe;
  box-shadow: 0 0 0 2px rgb(12 93 254 / .18);
}

/* ---------- Stone step ---------- */
html body .dmv-seuil {
  position: absolute;
  left: -10px;
  right: -10px;
  bottom: -9px;
  height: 9px;
  border-radius: 1px;
  background:
    linear-gradient(color-mix(in oklab, var(--dmv-pierre) 45%, #fff) 0 1px, color-mix(in oklab, var(--dmv-pierre) 62%, #fff) 1px 3px, var(--dmv-pierre) 3px calc(100% - 1px), color-mix(in oklab, var(--dmv-pierre) 70%, #000) calc(100% - 1px));
  box-shadow: 0 4px 6px -4px rgb(22 28 34 / .45);
  pointer-events: none;
}
html body .v-moni--dense .v-moni__index { margin-top: 23px; }

/* ---------- Bracket and blade sign ---------- */
html body .dmv-potence {
  display: none;
  position: absolute;
  z-index: 4;
  left: calc(100% - 3px);
  top: calc(var(--dmv-fronton) / 2 - 21px * var(--dmv-s));
  width: calc(100px * var(--dmv-s));
  height: calc(44px * var(--dmv-s));
  pointer-events: none;
}
html body .dmv-potence__fer {
  display: block;
  width: 100%;
  height: 100%;
}
html body .dmv-drapeau,
html body .dmv-drapeau__corps {
  position: absolute;
  transform-origin: 50% calc(5px * var(--dmv-s));
}
html body .dmv-drapeau {
  left: calc(34px * var(--dmv-s));
  top: calc(8.6px * var(--dmv-s));
  width: calc(64px * var(--dmv-s));
  height: calc(86px * var(--dmv-s));
  animation: dmv-souffle 5.2s ease-in-out infinite alternate;
}
html body .dmv-drapeau__corps { inset: 0; }
html body .dmv-drapeau__plaque {
  display: block;
  width: 100%;
  height: 100%;
  filter: drop-shadow(0 2px 2px rgb(22 28 34 / .22));
}
html body .dmv-drapeau__logo {
  position: absolute;
  left: 50%;
  top: calc(50px * var(--dmv-s));
  width: calc(28px * var(--dmv-s));
  height: calc(28px * var(--dmv-s));
  transform: translate(-50%, -50%);
  opacity: 0;
  transition: opacity .3s var(--ease);
}
html body .dmv-drapeau__logo.est-vu { opacity: 1; }
@keyframes dmv-souffle {
  from { transform: rotate(-.6deg); }
  to { transform: rotate(.6deg); }
}

/* ---------- Breakpoints ---------- */
@media (width >= 1200px) {
  html body .v-moni--dense {
    /* free space right of the content column (scrollbar ~15px accounted for) */
    --dmv-libre: max(clamp(16px, 3.2vw, 44px), (100vw - 1415px) / 2 + 44px);
    /* bracket + sign + swing + breathing room beyond the frame */
    --dmv-bras: calc(108px * var(--dmv-s) + 6px);
    margin-right: max(0px, var(--dmv-bras) - var(--dmv-libre));
  }
  html body .dmv-potence { display: block; }
  html body .v-hero .v-moni--dense .v-moni__ecran { max-height: max(250px, 100svh - 440px); }
}
@media (width >= 1400px) {
  html body .v-moni--dense { --dmv-s: .9; }
}

@media (width <= 1023px) {
  html body .v-moni--dense {
    --dmv-montant: 10px;
    --dmv-fronton: 54px;
    --dmv-socle: 42px;
    --dmv-k: 1.15;
  }
}
@media (700px <= width <= 1023px) {
  /* the frame adds ~70px around the window: keep the whole shopfront in view */
  html body .v-moni--dense .v-moni__ecran { max-height: max(240px, 100svh - 300px); }
}

@media (width <= 699px) {
  html body .v-moni--dense {
    --dmv-montant: 6px;
    --dmv-fronton: 48px;
    --dmv-socle: 12px;
    --dmv-traverse: 0px;
    --dmv-k: 1;
    --dmv-hmax: 24;
  }
  html body .v-moni--dense .v-moni__fenetre::before { left: -4px; right: -4px; top: -7px; height: 8px; }
  html body .v-moni--dense .v-moni__barre { padding: 0 12px; outline-offset: -6px; column-gap: 8px; }
  html body .v-moni--dense .v-moni__mention { font-size: .625rem; letter-spacing: .14em; }
  html body .v-moni--dense .v-moni__pause { width: 28px; height: 28px; min-width: 0; min-height: 0; }
  html body .dmv-nom { width: min(180px, 52vw); height: 32px; }
  html body .v-moni--dense .v-moni__ecran { margin-top: 0; }
  html body .v-moni--dense .v-moni__adresse,
  html body .dmv-ouvert { display: none; }
  html body .dmv-socle { outline: 0; }
  html body .dmv-socle::before { display: none; }
  html body .dmv-seuil { left: -6px; right: -6px; height: 7px; bottom: -7px; }
  html body .v-moni--dense .v-moni__index,
  html body .v-moni--dense .v-moni__rail { margin-top: 14px; }
}
/* the small pause button keeps a 44 px tap target; once paused, the blade sign stops swaying */
html body .v-moni--dense .v-moni__pause { position: relative; }
html body .v-moni--dense .v-moni__pause::after { content: ""; position: absolute; inset: -8px; border-radius: 50%; }
html body .v-moni--dense:not(.est-tourne) .dmv-drapeau { animation-play-state: paused; }

/* The landscape-phone layout hides the bar; keep the frame thin there too. */
@media (width <= 1023px) and (orientation: landscape) and (height <= 520px) {
  html body .v-moni--dense { --dmv-fronton: 0px; --dmv-socle: 10px; --dmv-traverse: 0px; }
  html body .v-moni--dense .v-moni__ecran { margin-top: var(--dmv-montant); }
  html body .v-moni--dense .v-moni__adresse,
  html body .dmv-ouvert { display: none; }
  html body .dmv-socle { outline: 0; }
}

@media (prefers-reduced-motion: reduce) {
  html body .dmv-drapeau { animation: none; }
  html body .v-moni--dense .v-moni__fenetre,
  html body .v-moni--dense .v-moni__fenetre::before,
  html body .dmv-socle,
  html body .dmv-nom__calque,
  html body .dmv-drapeau__logo { transition: none !important; }
}

/* the "open the site" label on the window follows the pill button system */
html body .v-moni__ouvrir { border-radius: 999px; padding-inline: 16px 14px; }
