/* ============================================================
   PATATE.exe (clicker) — rétro : polices pixel, bords épais
   ============================================================ */
.pt { --pix: "Press Start 2P", monospace; --vt: VT323, monospace; position: relative; height: 100%; display: flex; flex-direction: column; overflow: hidden; background: #1a1030; color: #fff; container-type: inline-size; font-family: var(--vt); }
.pt * { box-sizing: border-box; }
.pt-head { display: flex; align-items: center; gap: 12px; padding: 10px 14px; background: #2b1650; border-bottom: 3px solid #14101f; }
.pt-bank { display: flex; align-items: baseline; gap: 8px; flex: 1; min-width: 0; flex-wrap: wrap; }
.pt-bank span { font-size: 26px; }
.pt-bank b { font: 18px var(--pix); color: #ffd23f; }
.pt-bank small { font-size: 20px; color: #c9b6ff; }
.pt-time { font-size: 20px; color: #80ed99; white-space: nowrap; }
.pt-q { width: 38px; height: 38px; font: 14px var(--pix); background: #ffd23f; color: #14101f; border: 3px solid #14101f; border-radius: 8px; box-shadow: 3px 3px 0 #000; cursor: pointer; }
.pt-main { flex: 1; min-height: 0; display: grid; grid-template-columns: 1.1fr 1fr; }
/* scène */
.pt-stage { position: relative; overflow: hidden; display: grid; place-items: center; padding: 50px 16px 20px;
  background: radial-gradient(circle at 50% 60%, #4a2a7a, #1a1030 70%), #1a1030; }
.pt-stage::before { content: ''; position: absolute; inset: 0; background: repeating-conic-gradient(from 0deg at 50% 60%, rgba(255, 255, 255, .04) 0 10deg, transparent 10deg 20deg); animation: pt-rot 40s linear infinite; pointer-events: none; }
.pt-hp { position: absolute; left: 16px; right: 16px; top: 12px; height: 26px; background: #14101f; border: 3px solid #14101f; border-radius: 6px; overflow: hidden; }
.pt-hp i { position: absolute; inset: 0 auto 0 0; background: linear-gradient(180deg, #ff6b6b, #c1121f); transition: width .15s linear; }
.pt-hp span { position: relative; display: block; text-align: center; font-size: 20px; line-height: 20px; text-shadow: 2px 2px 0 #000; }
.pt-buff { position: absolute; top: 44px; right: 16px; font: 10px var(--pix); background: #ffd23f; color: #14101f; padding: 6px 8px; border: 3px solid #14101f; border-radius: 6px; animation: pt-pulse .6s ease-in-out infinite alternate; }
.pt-pot { position: relative; z-index: 1; width: min(320px, 80%); aspect-ratio: 1; padding: 0; border: 0; background: none; cursor: pointer; touch-action: manipulation; -webkit-tap-highlight-color: transparent; filter: drop-shadow(0 8px 0 rgba(0, 0, 0, .35)); transition: transform .08s; }
.pt-pot img { width: 100%; height: 100%; object-fit: contain; display: block; pointer-events: none; user-select: none; -webkit-user-select: none; -webkit-user-drag: none; transition: filter .08s; }
.pt-pot.hit img { filter: brightness(1.25) saturate(1.25); }
.pt-scars { position: absolute; inset: 0; pointer-events: none; }
.pt-scars i { position: absolute; font-style: normal; font-size: clamp(24px, 13%, 44px); filter: drop-shadow(1px 2px 0 rgba(0, 0, 0, .35)); animation: pt-scar .3s cubic-bezier(.3, 1.6, .5, 1) both; }
.pt-scars .pt-d1 { left: 14%; top: 52%; transform: rotate(-25deg); }
.pt-scars .pt-d2 { right: 12%; top: 30%; transform: rotate(30deg); }
.pt-scars .pt-d3 { right: 18%; top: 8%; }
.pt-scars .pt-d4 { left: 40%; top: -6%; }
@keyframes pt-scar { from { opacity: 0; scale: 1.8; } }
.pt-pot:hover { transform: scale(1.03); }
.pt-pot.squish { animation: pt-squish .14s ease-out; }
.pt-pot.boom { animation: pt-boom .7s ease-in forwards; }
.pt-say { position: absolute; z-index: 3; left: 50%; bottom: 14px; transform: translateX(-50%); max-width: 92%; padding: 10px 14px; font-size: 20px; line-height: 1.1; text-align: center; color: #14101f; background: #fff7ee; border: 3px solid #14101f; border-radius: 10px; box-shadow: 4px 4px 0 #000; }
.pt-say.pop { animation: pt-in .3s cubic-bezier(.3, 1.6, .5, 1); }
.pt-fx { position: absolute; inset: 0; pointer-events: none; z-index: 2; }
.pt-num { position: absolute; transform: translate(-50%, -50%); font: 14px var(--pix); color: #ffd23f; text-shadow: 2px 2px 0 #000; animation: pt-up .9s ease-out forwards; white-space: nowrap; }
.pt-peel { position: absolute; width: 6px; height: 3px; background: #c08552; border: 1px solid #5c3a1e; animation: pt-peel .7s ease-out forwards; }
.pt-gold { position: absolute; z-index: 4; font-size: 38px; background: none; border: 0; cursor: pointer; filter: drop-shadow(0 0 10px #ffd23f) drop-shadow(0 0 20px #ffd23f); animation: pt-gold 1.2s ease-in-out infinite; }
/* boutique */
.pt-shop { display: flex; flex-direction: column; min-height: 0; background: #241640; border-left: 3px solid #14101f; }
.pt-ups { display: flex; flex-wrap: wrap; gap: 6px; padding: 10px; border-bottom: 3px solid #14101f; min-height: 64px; }
.pt-none { color: #6a5a8a; font-size: 20px; padding: 10px; }
.pt-up { width: 52px; height: 52px; display: grid; place-items: center; padding: 2px; background: #3a2266; color: #fff; border: 3px solid #ffd23f; border-radius: 8px; cursor: pointer; font-family: var(--vt); }
.pt-up span { font-size: 16px; line-height: 1; }
.pt-up small { font-size: 15px; color: #ffd23f; line-height: 1; }
.pt-up.off { border-color: #5a4a7a; opacity: .55; }
.pt-gens { flex: 1; overflow-y: auto; padding: 8px 10px 14px; display: flex; flex-direction: column; gap: 6px; }
.pt-gen { display: grid; grid-template-columns: 40px 1fr auto 40px; align-items: center; gap: 8px; padding: 6px 8px; text-align: left; background: #3a2266; color: #fff; border: 3px solid #14101f; border-radius: 8px; box-shadow: 3px 3px 0 #000; cursor: pointer; font-family: var(--vt); }
.pt-gen:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 #000; }
.pt-gen.off { opacity: .55; }
.pt-gen.is-next { display: block; text-align: center; color: #6a5a8a; font-size: 20px; box-shadow: none; cursor: default; background: #2b1a4a; }
.pt-gi { font-size: 22px; text-align: center; }
.pt-gn b { display: block; font-size: 21px; font-weight: 400; line-height: 1; }
.pt-gn small { font-size: 17px; color: #80ed99; }
.pt-gc { font-size: 19px; white-space: nowrap; }
.pt-gc b { color: #ffd23f; font-weight: 400; }
.pt-go { font: 14px var(--pix); color: #c9b6ff; text-align: right; }
/* ticket d'or */
.pt-end { position: absolute; inset: 0; z-index: 5; display: grid; place-items: center; padding: 16px; background: radial-gradient(circle, rgba(255, 210, 63, .35), rgba(20, 16, 31, .85) 70%); }
.pt-ticket { display: grid; justify-items: center; gap: 12px; animation: pt-in .6s cubic-bezier(.3, 1.6, .5, 1); }
.pt-tk { position: relative; width: min(340px, 86cqw); padding: 20px 26px; text-align: center; color: #3a2400; display: grid; gap: 6px;
  background: linear-gradient(135deg, #b8860b, #ffd700 30%, #fff3b0 45%, #ffd700 60%, #b8860b); border: 4px solid #14101f; border-radius: 12px; box-shadow: 6px 6px 0 #000, 0 0 40px #ffd23f;
  -webkit-mask: radial-gradient(circle at 0 50%, transparent 14px, #000 15px) left / 51% 100% no-repeat, radial-gradient(circle at 100% 50%, transparent 14px, #000 15px) right / 51% 100% no-repeat;
  mask: radial-gradient(circle at 0 50%, transparent 14px, #000 15px) left / 51% 100% no-repeat, radial-gradient(circle at 100% 50%, transparent 14px, #000 15px) right / 51% 100% no-repeat; }
.pt-tk small { font: 9px var(--pix); letter-spacing: .2em; }
.pt-tk b { font: 20px var(--pix); }
.pt-tk span { font-size: 22px; }
.pt-tk em { font: 13px var(--pix); font-style: normal; }
.pt-tk code { font: 9px var(--pix); opacity: .7; }
.pt-ticket:not(.is-open) .pt-tk { filter: blur(3px) grayscale(.4); }
.pt-ticket.unlock .pt-tk { animation: pt-shine 1.2s ease; }
.pt-lock { display: flex; gap: 8px; align-items: center; }
.pt-lock span { font-size: 26px; }
.pt-lock input { width: min(240px, 54cqw); font: 20px var(--vt); padding: 8px 10px; border: 3px solid #14101f; border-radius: 8px; background: #fff7ee; color: #14101f; outline: none; user-select: text; -webkit-user-select: text; }
.pt-lock button { width: 46px; height: 42px; font-size: 20px; background: #ffd23f; border: 3px solid #14101f; border-radius: 8px; box-shadow: 3px 3px 0 #000; cursor: pointer; }
.pt-lock.nope { animation: pt-nope .35s; }
.pt-hint { font-size: 18px; color: #c9b6ff; }
.pt-again { display: grid; justify-items: center; gap: 8px; margin-top: 4px; }
.pt-again p { margin: 0; font-size: 22px; color: #ffd23f; text-shadow: 2px 2px 0 #000; display: flex; align-items: center; gap: 6px; }
.pt-hp span { white-space: nowrap; }
.pt-pop { position: absolute; inset: 0; z-index: 9; display: grid; place-items: center; background: rgba(10, 6, 25, .7); }
.pt-popbox { max-width: min(420px, 90%); display: grid; gap: 6px; padding: 16px 18px; color: #14101f; background: #fff7ee; border: 3px solid #14101f; border-radius: 12px; box-shadow: 6px 6px 0 #000; font-size: 20px; }
.pt-popbox b { font: 12px var(--pix); }
.pt-popbox p { margin: 0; }
.pt-popbox hr { width: 100%; border: 0; border-top: 2px dashed #14101f; }
@container (max-width: 640px) {
  .pt-main { grid-template-columns: 1fr; grid-template-rows: minmax(250px, 46%) 1fr; }
  .pt-shop { border-left: 0; border-top: 3px solid #14101f; }
  .pt-pot { width: min(170px, 46%, 30cqh); }
  .pt-stage { padding-top: 44px; }
  .pt-bank b { font-size: 14px; }
}
@keyframes pt-squish { 0% { transform: scale(1); } 40% { transform: scale(.9, 1.08); } 100% { transform: scale(1); } }
@keyframes pt-boom { 0% { transform: scale(1); } 40% { transform: scale(1.3) rotate(8deg); } 100% { transform: scale(0) rotate(-30deg); opacity: 0; } }
@keyframes pt-up { from { opacity: 1; transform: translate(-50%, -50%); } to { opacity: 0; transform: translate(-50%, -150%); } }
@keyframes pt-peel { to { transform: translate(var(--dx), var(--dy)) rotate(var(--r)); opacity: 0; } }
@keyframes pt-gold { 0%, 100% { transform: translateY(0) rotate(-10deg); } 50% { transform: translateY(-8px) rotate(10deg); } }
@keyframes pt-pulse { to { transform: scale(1.06); } }
@keyframes pt-rot { to { transform: rotate(360deg); } }
@keyframes pt-in { from { transform: translateX(var(--tx, 0)) scale(.6); opacity: 0; } }
.pt-say.pop { --tx: -50%; }
@keyframes pt-shine { 0% { filter: blur(3px) brightness(2); transform: scale(.8); } 60% { transform: scale(1.08); } 100% { filter: none; transform: none; } }
@keyframes pt-nope { 25% { transform: translateX(-8px); } 50% { transform: translateX(8px); } 75% { transform: translateX(-4px); } }

/* icônes plus petites pour qu'elles restent dans leur cadre */
.pt-up span img, .pt-gi img { max-width: 100%; max-height: 22px; }
