/* Carte de vœux, modèle Minuit. Partagée par la page publique et l'aperçu de l'éditeur. */

@font-face { font-family: "Fraunces"; font-weight: 600; font-style: normal; font-display: swap; src: url("fonts/fraunces-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Fraunces"; font-weight: 700; font-style: normal; font-display: swap; src: url("fonts/fraunces-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "Figtree"; font-weight: 400; font-style: normal; font-display: swap; src: url("fonts/figtree-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Figtree"; font-weight: 500; font-style: normal; font-display: swap; src: url("fonts/figtree-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Figtree"; font-weight: 600; font-style: normal; font-display: swap; src: url("fonts/figtree-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Figtree"; font-weight: 700; font-style: normal; font-display: swap; src: url("fonts/figtree-latin-700-normal.woff2") format("woff2"); }

.vsbc-frame {
  --c-bg: #080d22; --c-bg2: #131a3d; --c-ink: #f5f1e8; --c-soft: rgba(245, 241, 232, .74); --c-line: rgba(245, 241, 232, .2);
  --b1: #e9b949; --b2: #ef6f4a; --on-brand: #10163a;
  --vsbc-display: "Fraunces", Georgia, "Times New Roman", serif;
  --vsbc-body: "Figtree", "Segoe UI", system-ui, sans-serif;
  position: relative; overflow: hidden; box-sizing: border-box;
  background: radial-gradient(120% 90% at 50% 100%, var(--c-bg2) 0%, var(--c-bg) 62%);
  background-color: var(--c-bg);
  color: var(--c-ink);
  font-family: var(--vsbc-body); font-size: 16px; line-height: 1.5;
}
.vsbc-frame *, .vsbc-frame *::before, .vsbc-frame *::after { box-sizing: border-box; }
.vsbc-frame canvas { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.vsbc-stage { position: absolute; inset: 0; overflow-y: auto; display: flex; flex-direction: column; align-items: center; padding: 32px 20px 20px; }
.vsbc-card { margin: auto 0; width: 100%; max-width: 640px; text-align: center; display: flex; flex-direction: column; align-items: center; }
.vsbc-fold { max-height: 0; opacity: 0; overflow: hidden; transform: translateY(12px); width: 100%;
  transition: max-height 1s ease, opacity 1s ease .25s, transform 1s ease .25s; }
.vsbc-revealed .vsbc-fold { max-height: 1600px; opacity: 1; transform: none; }
.vsbc-clock-wrap { max-height: 120px; overflow: hidden; transition: max-height .8s ease, opacity .5s ease; }
.vsbc-revealed .vsbc-clock-wrap { max-height: 0; opacity: 0; }
.vsbc-clock-label { margin: 0 0 6px; color: var(--c-soft); font-size: 15px; }
.vsbc-clock { font: 500 30px/1 var(--vsbc-body); font-variant-numeric: tabular-nums; letter-spacing: .08em; margin: 0 0 8px; }
.vsbc-logo { margin: 0 auto 16px; display: grid; place-items: center; overflow: hidden; max-width: 100%; }
.vsbc-logo.vsbc-tile { border-radius: 18px; background: linear-gradient(140deg, var(--b1), var(--b2)); color: var(--on-brand); font: 700 26px/1 var(--vsbc-display); }
.vsbc-logo.vsbc-backed { background: #fff; border-radius: 14px; padding: 8px; }
.vsbc-logo img { width: 100%; height: 100%; object-fit: contain; display: block; }
.vsbc-lead { margin: 0; font-size: 17px; color: var(--c-soft); }
.vsbc-lead b { color: var(--c-ink); font-weight: 600; }
.vsbc-wish { margin: 4px 0 0; font: 600 clamp(26px, 6vw, 44px)/1.1 var(--vsbc-display); text-wrap: balance; }
.vsbc-year { margin: 0; display: flex; justify-content: center; height: 1em; overflow: hidden; color: var(--b2);
  font: 700 clamp(96px, 24vw, 230px)/1 var(--vsbc-display); transition: font-size 1s ease; }
.vsbc-revealed .vsbc-year { font-size: clamp(80px, 17vw, 160px); }
/* Le dégradé ne porte que sur la partie fixe : un texte découpé dans un fond
   ne se peint pas dans un élément animé par transform. */
.vsbc-year-fixed { background: linear-gradient(100deg, var(--b1), var(--b2)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.vsbc-roller { display: flex; flex-direction: column; transition: transform 1.1s cubic-bezier(.2, .9, .2, 1); }
.vsbc-roller span { height: 1em; display: block; }
.vsbc-midnight .vsbc-roller { transform: translateY(-1em); }
.vsbc-message { margin: 10px auto 0; max-width: 46ch; font-size: 17px; white-space: pre-line; }
.vsbc-team { list-style: none; margin: 20px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.vsbc-team li { font-size: 14px; padding: 6px 12px; border: 1px solid var(--c-line); border-radius: 999px; color: var(--c-soft); margin: 0; }
.vsbc-team li b { color: var(--c-ink); font-weight: 600; }
.vsbc-links { margin-top: 22px; display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }
.vsbc-links a { font: 500 14px/1 var(--vsbc-body); color: var(--c-ink); text-decoration: none; border: 1px solid var(--c-line); border-radius: 999px; padding: 11px 16px; }
.vsbc-links a:hover { border-color: var(--c-ink); }
.vsbc-links a:focus-visible, .vsbc-replay:focus-visible, .vsbc-credit a:focus-visible { outline: 2px solid var(--c-ink); outline-offset: 2px; }
.vsbc-links a.vsbc-main { background: linear-gradient(100deg, var(--b1), var(--b2)); color: var(--on-brand); border-color: transparent; font-weight: 600; }
.vsbc-foot { margin-top: 28px; display: flex; flex-wrap: wrap; gap: 6px 16px; justify-content: center; align-items: center; font-size: 13px; color: var(--c-soft); }
.vsbc-replay { font: 500 13px/1 var(--vsbc-body); color: var(--c-soft); background: transparent; border: 1px solid var(--c-line); border-radius: 999px; padding: 8px 12px; cursor: pointer; }
.vsbc-replay:hover { color: var(--c-ink); border-color: var(--c-ink); }
.vsbc-credit a { color: var(--c-soft); }
.vsbc-credit a:hover { color: var(--c-ink); }
.vsbc-watermark { position: absolute; inset: -40%; z-index: 3; pointer-events: none; user-select: none;
  display: flex; flex-wrap: wrap; align-content: center; justify-content: center; gap: 46px 60px;
  transform: rotate(-24deg); color: var(--c-ink); opacity: .1;
  font: 700 26px/1 var(--vsbc-body); letter-spacing: .3em; text-transform: uppercase; }

@media (prefers-reduced-motion: reduce) {
  .vsbc-fold, .vsbc-clock-wrap, .vsbc-year, .vsbc-roller { transition: none; }
}
