/* MediArt — jeu d’ouverture Kénitra : pop-up + carte NFC à gratter */
.knt { position: fixed; inset: 0; z-index: 95; display: grid; place-items: center; padding: 16px; }
.knt-bg { position: absolute; inset: 0; background: rgba(0,0,0,.78); backdrop-filter: blur(10px); animation: kntFade .4s ease both; }
.knt-panel {
  position: relative; width: min(480px, 100%); max-height: calc(100dvh - 32px); overflow-y: auto;
  padding: 34px 30px 28px; border-radius: 28px; text-align: center;
  background: radial-gradient(90% 60% at 50% 0%, rgba(240,122,42,.22), transparent 70%), linear-gradient(180deg, #120a10, #070609);
  border: 1px solid rgba(240,122,42,.35); box-shadow: 0 40px 100px rgba(0,0,0,.7), 0 0 80px rgba(240,122,42,.12);
  animation: kntIn .6s cubic-bezier(.2,.8,.2,1) both;
}
@keyframes kntFade { from { opacity: 0; } }
@keyframes kntIn { from { opacity: 0; transform: translateY(30px) scale(.96); } }
.knt-close { position: absolute; top: 12px; right: 12px; width: 40px; height: 40px; border-radius: 50%; border: 1px solid var(--line); font-size: 22px; line-height: 1; color: var(--muted); transition: color .3s, border-color .3s; }
.knt-close:hover { color: var(--off); border-color: rgba(239,238,238,.4); }
.knt-logo { display: block; width: 112px; height: auto; margin: -6px auto 18px; opacity: .95; }
.orb-mark { width: 34px; height: auto; margin-bottom: 6px; filter: drop-shadow(0 0 14px rgba(169,142,230,.6)); }
.knt-code span img { display: inline-block; width: 12px; height: auto; vertical-align: -1px; margin-right: 4px; opacity: .8; }
.knt-step { display: grid; justify-items: center; gap: 4px; }
.knt-step .eyebrow { margin-bottom: 10px; }
.knt .eyebrow .dot { background: #ff9450; box-shadow: 0 0 12px #ff9450; }
.knt-title { margin: 0; font: 600 clamp(24px, 6vw, 32px)/1.05 var(--display); font-stretch: 120%; letter-spacing: -.01em; }
.knt-text { margin: 12px 0 0; color: var(--muted); font-size: 15px; max-width: 380px; }
.knt-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 24px; }

/* Planète + repère Kénitra */
.knt-planet { position: relative; width: 108px; height: 108px; margin-bottom: 14px; border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, #3a2a3a, #0c0810 70%); box-shadow: inset -12px -14px 30px rgba(0,0,0,.7), 0 0 0 1px rgba(255,255,255,.08), 0 0 60px rgba(240,122,42,.35); }
.knt-planet::before { content: ""; position: absolute; inset: -14px; border-radius: 50%; border: 1px dashed rgba(240,122,42,.4); animation: kntSpin 18s linear infinite; }
.knt-pin { position: absolute; left: 58%; top: 34%; width: 12px; height: 12px; border-radius: 50%; background: #ff9450; box-shadow: 0 0 0 0 rgba(255,148,80,.7); animation: kntPing 1.8s ease-out infinite; }
@keyframes kntSpin { to { transform: rotate(360deg); } }
@keyframes kntPing { 0% { box-shadow: 0 0 0 0 rgba(255,148,80,.7); } 100% { box-shadow: 0 0 0 22px rgba(255,148,80,0); } }

/* Jeu « Mise en orbite » */
.orb-hud { display: flex; justify-content: space-between; gap: 10px; width: 100%; margin-top: 16px; font: 500 11px/1 var(--mono); letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.orb-hud b { color: var(--off); font-weight: 500; font-variant-numeric: tabular-nums; }
.orb-alt b { color: #ffb37f; }
.orb-stage { position: relative; width: 100%; aspect-ratio: 4 / 3.4; margin-top: 10px; border-radius: 20px; overflow: hidden; cursor: pointer; touch-action: manipulation; user-select: none; -webkit-tap-highlight-color: transparent;
  background: radial-gradient(80% 70% at 50% 100%, rgba(141,114,199,.22), transparent 70%), #05040a; box-shadow: inset 0 0 0 1px rgba(255,255,255,.08); outline: none; }
.orb-stage:focus-visible { box-shadow: inset 0 0 0 2px #ff9450; }
.orb-stage canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.orb-overlay { position: absolute; inset: 0; display: grid; place-content: center; overflow-y: auto; justify-items: center; gap: 6px; padding: 18px; background: rgba(5,4,10,.72); backdrop-filter: blur(4px); animation: kntFade .35s ease both; cursor: default; }
.orb-result { margin: 0; font: 600 22px/1.1 var(--display); font-stretch: 118%; }
.orb-prize { margin: 4px 0 2px; padding: 8px 14px; border-radius: 12px; border: 1px dashed rgba(240,122,42,.5); background: rgba(240,122,42,.1); font-size: 14px; color: var(--off); max-width: 300px; }
.orb-prize b { color: #ffb37f; font-weight: 600; }
.orb-sub { margin: 0 0 10px; font-size: 13.5px; color: var(--muted); max-width: 280px; }
.orb-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.orb-actions .pill { min-height: 42px; padding: 0 18px; font-size: 14px; }
.orb-legend { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 6px; width: 100%; text-align: left; }
.orb-legend li { display: flex; align-items: center; gap: 10px; font-size: 12.5px; color: var(--muted); }
.orb-legend i { flex: none; width: 10px; height: 10px; border-radius: 3px; background: var(--c); box-shadow: 0 0 8px var(--c); }
.knt-share { margin: 2px auto 0; font-size: 13.5px; color: #ffb37f; text-decoration: underline; text-underline-offset: 3px; }
.knt-share:hover { color: #ffd2b0; }

/* Gagné */
.knt-code { display: grid; gap: 4px; margin: 18px 0 6px; padding: 12px 22px; border-radius: 16px; border: 1px dashed rgba(240,122,42,.55); background: rgba(240,122,42,.08); }
.knt-code span { font: 500 10.5px/1 var(--mono); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.knt-code b { font: 600 24px/1 var(--mono); letter-spacing: .12em; color: #ffb37f; }
.knt-form { display: grid; gap: 12px; width: 100%; margin-top: 14px; text-align: left; }
.knt-form label { display: grid; gap: 6px; }
.knt-form label > span { font-size: 13px; color: var(--muted); }
.knt-form input:not([type=checkbox]) { width: 100%; padding: 13px 15px; border-radius: 13px; border: 1px solid var(--line); background: rgba(0,0,0,.45); font-size: 16px; }
.knt-form input:focus { outline: none; border-color: #ff9450; }
.knt-form .is-invalid { border-color: #ff6b6b !important; }
.knt-form .check { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; }
.knt-form .check input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: #f07a2a; flex: none; }
.knt-form .check span { font-size: 13.5px; color: var(--off); }
.knt-form .check a { color: #ffb37f; text-decoration: underline; }
.knt-form .check.is-invalid span { color: #ff8a8a; }
.knt-form .pill { width: 100%; margin-top: 4px; }
.knt-note { margin: 0; font-size: 12.5px; color: var(--muted); text-align: center; }
.knt-note:empty { display: none; }
#knt-error { color: #ff8a8a; }

/* Étincelles de victoire */
.knt-burst { position: absolute; left: var(--ox, 50%); top: var(--oy, 40%); z-index: 2; width: 6px; height: 6px; border-radius: 50%; pointer-events: none; animation: kntBurst 1.1s cubic-bezier(.15,.8,.3,1) forwards; }
@keyframes kntBurst { to { transform: translate(var(--x), var(--y)) scale(.3); opacity: 0; } }

/* Pastille pour rouvrir le jeu */
.knt-badge { position: fixed; z-index: 41; left: var(--gutter); bottom: 58px; display: inline-flex; align-items: center; gap: 8px; padding: 10px 16px; border-radius: 999px;
  background: linear-gradient(180deg, #ff9450, #e8661c); color: #1a0700; font: 600 13px/1 var(--body); box-shadow: 0 12px 40px rgba(240,122,42,.35); animation: kntBob 3s ease-in-out infinite; }
.knt-badge:hover { animation-play-state: paused; }
@keyframes kntBob { 50% { transform: translateY(-4px); } }

@media (max-width: 520px) {
  .knt-panel { padding: 30px 20px 22px; border-radius: 24px; }
  .knt-actions .pill { width: 100%; }
  .knt-badge { bottom: 48px; font-size: 12px; padding: 9px 14px; }
  .orb-stage { aspect-ratio: 1 / 1.12; }
  .orb-overlay { padding: 12px; gap: 4px; overflow-y: auto; }
  .orb-mark { width: 26px; margin-bottom: 0; }
  .orb-result { font-size: 19px; }
  .orb-prize { font-size: 13px; padding: 7px 12px; }
  .orb-sub { font-size: 12.5px; margin-bottom: 6px; }
  .orb-actions .pill { min-height: 38px; padding: 0 14px; font-size: 13px; }
}
@media (prefers-reduced-motion: reduce) {
  .knt-badge, .knt-pin, .knt-planet::before { animation: none; }
}
