/* ================= Page d'accueil (« vitrine », ui/vitrine.js) =================
   Une page qui défile, posée au-dessus du jeu (#vitrine, position fixe, z-index haut). Le jeu se charge dessous.
   Polices sous des noms propres (Vt*) pour ne pas toucher à l'alias « Pixelify » du jeu (Jersey 10). */
@font-face { font-family: 'VtJersey'; src: url(../fonts/Jersey10-Regular.ttf) format('truetype'); font-display: swap; }
@font-face { font-family: 'VtPixel'; src: url(../fonts/PixelifySans.ttf) format('truetype'); font-weight: 400 700; font-display: swap; }
@font-face { font-family: 'VtSilk'; src: url(../fonts/Silkscreen-Regular.ttf) format('truetype'); font-display: swap; }

#vitrine { display: none; }
.vt-on #vitrine { display: block; }
.vt-on body > #loading { visibility: hidden; }
.vt-on body { background: #0d0b10; }

#vitrine {
  --vt-bg: #0d0b10; --vt-bg2: #17131d; --vt-bg3: #221d2c; --vt-fg: #f3ead8; --vt-dim: #b5a98f; --vt-sun: #ffcf3f;
  --vt-red: #ff5a4e; --vt-blue: #2f6bff; --vt-ink: #08060a; --vt-p: 4px;
  position: fixed; inset: 0; z-index: 10000; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch; scroll-behavior: smooth;
  background: var(--vt-bg); color: var(--vt-fg); user-select: text;
  font: 400 19px/1.55 'VtPixel', system-ui, sans-serif; -webkit-font-smoothing: auto; letter-spacing: .01em;
  font-variant-ligatures: none; font-feature-settings: "liga" 0;
}
#vitrine *, #vitrine *::before, #vitrine *::after { box-sizing: border-box; }
#vitrine a { color: var(--vt-sun); text-underline-offset: 3px; }
#vitrine :focus-visible { outline: 3px solid var(--vt-sun); outline-offset: 3px; }
#vitrine .vt-titre { font-family: 'VtJersey', monospace; font-weight: 400; line-height: .85; letter-spacing: .04em;
  text-shadow: 0 .06em 0 #000, .06em 0 0 #000, -.04em 0 0 #000, 0 -.04em 0 #000; }
#vitrine .vt-k { font-family: 'VtSilk', monospace; letter-spacing: .1em; text-transform: uppercase; }
/* coins coupés façon pixel */
.vt-coins { clip-path: polygon(var(--vt-p) 0, calc(100% - var(--vt-p)) 0, calc(100% - var(--vt-p)) var(--vt-p), 100% var(--vt-p), 100% calc(100% - var(--vt-p)),
  calc(100% - var(--vt-p)) calc(100% - var(--vt-p)), calc(100% - var(--vt-p)) 100%, var(--vt-p) 100%, var(--vt-p) calc(100% - var(--vt-p)), 0 calc(100% - var(--vt-p)), 0 var(--vt-p), var(--vt-p) var(--vt-p)); }

/* ---------- haut de page ---------- */
.vt-haut { position: relative; min-height: calc(100svh - 64px); display: flex; flex-direction: column; justify-content: center; align-items: center;
  padding: 28px 16px 20px; text-align: center; isolation: isolate; }
.vt-haut::before { content: ''; position: absolute; inset: 0; z-index: -1; opacity: .5;
  background: radial-gradient(ellipse 70% 55% at 50% 38%, #2a2033 0, transparent 70%),
    repeating-linear-gradient(0deg, rgba(255,255,255,.025) 0 2px, transparent 2px 4px); }
.vt-logo { margin: 0; font-size: clamp(76px, 15vw, 172px); color: var(--vt-sun); }
.vt-logo span { display: block; }
.vt-accroche { margin: 14px auto 0; max-width: 34ch; font-size: clamp(20px, 2.4vw, 27px); line-height: 1.3; }
.vt-sous { margin: 8px auto 0; color: var(--vt-dim); font-size: clamp(14px, 1.3vw, 16px); }

.vt-choix { width: min(1180px, 100%); margin: clamp(22px, 4vh, 44px) auto 0; display: grid; grid-template-columns: 1fr 1fr; gap: clamp(14px, 2vw, 26px); }
.vt-gros { --vt-p: 6px; position: relative; display: flex; flex-direction: column; justify-content: flex-end; align-items: flex-start; gap: 6px;
  min-height: clamp(210px, 30vh, 300px); padding: 22px 26px; border: 0; cursor: pointer; overflow: hidden; text-align: left;
  color: var(--vt-fg); background: var(--vt-bg3); font: inherit; isolation: isolate;
  box-shadow: inset 0 0 0 4px var(--vt-ink), inset 0 0 0 7px var(--vt-c, var(--vt-sun)); transition: transform .12s steps(2); }
.vt-gros .vt-fond { position: absolute; inset: 0; z-index: -2; width: 100%; height: 100%; object-fit: cover; image-rendering: pixelated; pointer-events: none;
  filter: saturate(1.05); transition: transform .4s steps(6); }
.vt-gros::after { content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(180deg, rgba(8,6,10,.05) 0, rgba(8,6,10,.25) 45%, rgba(8,6,10,.88) 100%); }
.vt-gros-t { font-size: clamp(64px, 7.4vw, 104px); color: var(--vt-c, var(--vt-sun)); }
.vt-gros-s { font-size: clamp(15px, 1.3vw, 18px); color: var(--vt-fg); text-shadow: 0 2px 0 #000; }
.vt-gros-icone { position: absolute; top: 18px; right: 20px; width: 54px; height: 54px; display: grid; place-items: center;
  background: var(--vt-c, var(--vt-sun)); color: var(--vt-ink); --vt-p: 6px; }
.vt-gros-icone svg { width: 26px; height: 26px; shape-rendering: crispEdges; }
.vt-gros:hover, .vt-gros:focus-visible { transform: translateY(-4px); }
.vt-gros:hover .vt-fond, .vt-gros:focus-visible .vt-fond { transform: scale(1.04); }
.vt-gros:active { transform: translateY(2px); }
.vt-gros.vt-bande { --vt-c: #fff3d6; }
.vt-gros.vt-bande .vt-gros-t { font-size: clamp(50px, 5.6vw, 82px); }

.vt-plus { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 10px 18px; margin-top: 18px; min-height: 40px; }
.vt-continuer { --vt-p: 4px; border: 0; cursor: pointer; padding: 9px 16px; background: var(--vt-sun); color: var(--vt-ink); font: 15px/1.2 'VtSilk', monospace; text-transform: uppercase; letter-spacing: .06em; }
.vt-continuer small { font: 16px/1 'VtPixel', sans-serif; text-transform: none; letter-spacing: 0; margin-left: 6px; }
.vt-continuer:hover { filter: brightness(1.1); }
.vt-mobile { display: none; max-width: 52ch; margin: 14px auto 0; font-size: 15px; color: var(--vt-dim); }
.vt-tactile .vt-mobile { display: block; }

/* ---------- repli « Description du jeu » ---------- */
.vt-repli { width: min(980px, 100%); margin: 0 auto; padding: 0 16px; }
.vt-repli > summary { list-style: none; cursor: pointer; display: flex; justify-content: center; align-items: center; gap: 12px; height: 64px;
  font: 17px/1 'VtSilk', monospace; text-transform: uppercase; letter-spacing: .1em; color: var(--vt-sun); }
.vt-repli > summary::-webkit-details-marker { display: none; }
.vt-repli > summary .vt-fleche { display: inline-block; width: 14px; height: 10px; background: currentColor;
  clip-path: polygon(0 0, 100% 0, 100% 30%, 80% 30%, 80% 60%, 60% 60%, 60% 100%, 40% 100%, 40% 60%, 20% 60%, 20% 30%, 0 30%); animation: vt-rebond 1.2s steps(2) infinite; }
.vt-repli[open] > summary .vt-fleche { transform: rotate(180deg); animation: none; }
@keyframes vt-rebond { 50% { translate: 0 4px; } }

.vt-desc { padding: 10px 0 40px; }
.vt-intro { max-width: 680px; margin: 10px auto 34px; font-size: clamp(19px, 1.8vw, 22px); text-align: center; }
.vt-section { max-width: 760px; margin: 0 auto; padding: 22px 0 8px; }
.vt-section h2 { margin: 0 0 14px; font-size: clamp(44px, 5.4vw, 64px); color: var(--vt-fg); }
.vt-section h2 .vt-n { display: block; margin-bottom: 8px; font: 14px/1 'VtSilk', monospace; letter-spacing: .14em; color: var(--vt-sun); text-shadow: none; }
.vt-section p { margin: 0 0 14px; }
.vt-section p b { color: var(--vt-sun); font-weight: 400; }
.vt-section.vt-crs h2 .vt-n { color: #8db0ff; }

/* encarts animés */
.vt-encarts { display: grid; gap: 14px; margin: 26px auto 30px; max-width: 900px; }
.vt-encarts.vt-deux { grid-template-columns: 1fr 1fr; }
.vt-fig { margin: 0; }
.vt-ecran { --vt-p: 5px; position: relative; aspect-ratio: 960 / 408; background: #000; overflow: hidden;
  box-shadow: inset 0 0 0 3px var(--vt-ink); }
.vt-ecran video, .vt-ecran img { display: block; width: 100%; height: 100%; object-fit: cover; image-rendering: pixelated; }
.vt-ecran::after { content: ''; position: absolute; inset: 0; pointer-events: none; box-shadow: inset 0 0 0 3px var(--vt-ink), inset 0 0 0 5px rgba(255,207,63,.35); }
.vt-crs .vt-ecran::after { box-shadow: inset 0 0 0 3px var(--vt-ink), inset 0 0 0 5px rgba(47,107,255,.6); }
.vt-pp { position: absolute; right: 10px; bottom: 10px; z-index: 1; width: 34px; height: 34px; border: 0; padding: 0; cursor: pointer; display: grid; place-items: center;
  background: rgba(8,6,10,.75); color: var(--vt-fg); opacity: 0; transition: opacity .15s; --vt-p: 4px; }
.vt-pp svg { width: 14px; height: 14px; shape-rendering: crispEdges; }
.vt-ecran:hover .vt-pp, .vt-pp:focus-visible, .vt-pp[aria-pressed="true"] { opacity: 1; }
.vt-fig figcaption { margin-top: 8px; font-size: 15px; color: var(--vt-dim); }
.vt-fig figcaption::before { content: '▸ '; color: var(--vt-sun); }

/* bas de page */
.vt-fin { text-align: center; padding: 30px 0 10px; }
.vt-fin .vt-gros { display: inline-flex; min-height: 0; width: min(420px, 100%); align-items: center; padding: 18px 26px; background: var(--vt-sun); color: var(--vt-ink); box-shadow: inset 0 0 0 4px var(--vt-ink); }
.vt-fin .vt-gros-t { color: var(--vt-ink); text-shadow: none; font-size: 64px; }
.vt-liens { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 20px; margin: 22px 0 0; padding: 0; list-style: none; font-size: 16px; }
.vt-pied { max-width: 680px; margin: 28px auto 0; color: var(--vt-dim); font-size: 14px; text-align: center; }

/* ---------- lecteur de la bande-annonce ---------- */
.vt-lecteur { position: fixed; inset: 0; z-index: 10001; display: grid; place-items: center; padding: 16px; background: rgba(8,6,10,.94); }
.vt-lecteur[hidden] { display: none; }
.vt-lecteur-in { width: min(1280px, 100%, calc((100svh - 120px) * 16 / 9)); }
.vt-lecteur video { display: block; width: 100%; aspect-ratio: 16 / 9; background: #000; box-shadow: 0 0 0 3px var(--vt-ink), 0 0 0 6px var(--vt-sun); }
.vt-lecteur-bas { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px 18px; margin-top: 16px; font-size: 16px; }
.vt-lecteur-bas .vt-liens { margin: 0; justify-content: flex-start; }
.vt-fermer { --vt-p: 4px; border: 0; cursor: pointer; padding: 9px 14px; background: var(--vt-fg); color: var(--vt-ink); font: 14px/1.2 'VtSilk', monospace; text-transform: uppercase; letter-spacing: .06em; }
.vt-fermer:hover { background: var(--vt-sun); }
.vt-lecteur-msg { color: var(--vt-dim); font-size: 15px; margin-top: 8px; }

/* bouton « Accueil » du menu principal (ui/accueil.js : ligne du bas) */
#menu-list .mi[data-act="vitrine"] { white-space: nowrap; }

/* ---------- petits écrans ---------- */
@media (max-width: 760px) {
  #vitrine { font-size: 17px; }
  .vt-haut { min-height: 0; padding-top: 34px; }
  .vt-choix { grid-template-columns: 1fr; }
  .vt-gros { min-height: 170px; padding: 18px 20px; }
  .vt-gros-icone { width: 44px; height: 44px; top: 14px; right: 14px; }
  .vt-encarts.vt-deux { grid-template-columns: 1fr; }
  .vt-pp { opacity: 1; }
  .vt-lecteur-bas { flex-direction: column; align-items: stretch; }
}
@media (prefers-reduced-motion: reduce) {
  #vitrine { scroll-behavior: auto; }
  .vt-repli > summary .vt-fleche { animation: none; }
  .vt-gros, .vt-gros .vt-fond { transition: none; }
}
.vt-encarts.vt-trois { grid-template-columns: 1fr 1fr; }
.vt-encarts.vt-trois > :first-child { grid-column: 1 / -1; }
@media (max-width: 760px) { .vt-encarts.vt-trois { grid-template-columns: 1fr; } }

/* le jeu stylise tous les <button> (index.html : fond papier, ombre, enfoncement au clic) : on repart de zéro ici */
#vitrine button { box-shadow: none; transform: none; }
#vitrine button:hover { background: inherit; }
#vitrine .vt-gros, #vitrine .vt-gros:hover, #vitrine .vt-gros:active { background: var(--vt-bg3); box-shadow: inset 0 0 0 4px var(--vt-ink), inset 0 0 0 7px var(--vt-c, var(--vt-sun)); }
#vitrine .vt-gros:hover, #vitrine .vt-gros:focus-visible { transform: translateY(-4px); }
#vitrine .vt-gros:active { transform: translateY(2px); }
#vitrine .vt-fin .vt-gros, #vitrine .vt-fin .vt-gros:hover, #vitrine .vt-fin .vt-gros:active { background: var(--vt-sun); box-shadow: inset 0 0 0 4px var(--vt-ink); }
#vitrine .vt-pp, #vitrine .vt-pp:hover { background: rgba(8,6,10,.8); }
#vitrine .vt-continuer, #vitrine .vt-continuer:hover { background: var(--vt-sun); }
#vitrine .vt-fermer { background: var(--vt-fg); }
#vitrine .vt-fermer:hover { background: var(--vt-sun); }
#vitrine .vt-continuer:active, #vitrine .vt-fermer:active { transform: translateY(2px); }
/* liseré des gros boutons par-dessus la vidéo de fond */
.vt-gros::before { content: ''; position: absolute; inset: 0; z-index: 1; pointer-events: none; box-shadow: inset 0 0 0 4px var(--vt-ink), inset 0 0 0 7px var(--vt-c, var(--vt-sun)); }
.vt-fin .vt-gros::before { box-shadow: inset 0 0 0 4px var(--vt-ink); }
.vt-gros > span { position: relative; z-index: 2; }
.vt-gros > .vt-gros-icone { position: absolute; }
@media (max-width: 760px) { #vitrine .vt-sous { letter-spacing: .04em; font-size: 13px; } }
