/* ══════════════════════════════════════════
   APPLE HUNT v2 — STYLES
   Thème : Luxury Dark · Apple DNA
   ══════════════════════════════════════════ */

/* ── TOKENS ─────────────────────────────── */
:root {
  --dark:        #0a0a0f;
  --dark2:       #111118;
  --dark3:       #16161f;
  --card-bg:     rgba(255,255,255,0.05);
  --card-bg2:    rgba(255,255,255,0.08);
  --card-border: rgba(255,255,255,0.10);
  --text:        #f0f0f5;
  --text-muted:  rgba(240,240,245,0.55);
  --text-dim:    rgba(240,240,245,0.30);
  --accent:      #0a84ff;
  --accent2:     #5ac8fa;
  --gold:        #ffd60a;
  --green:       #30d158;
  --red:         #ff453a;
  --orange:      #ff9f0a;
  --purple:      #bf5af2;
  --acc-rgb:     10,132,255;
  --radius-xl:   24px;
  --radius-lg:   18px;
  --radius-md:   12px;
  --radius-sm:   8px;
  --ease:        cubic-bezier(0.4,0,0.2,1);
  --font-d:      'Playfair Display', Georgia, serif;
  --font-b:      'DM Sans', -apple-system, sans-serif;
}

/* ── IMAGES PERSONNALISÉES (v3/IMG/) ──── */
/* Les conteneurs logos utilisent flex pour centrer parfaitement */
.lock-logo,
.logo-apple,
.gh-logo {
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo-img-apple {
  display: block;
  object-fit: contain;
  object-position: center;
  max-width: 100%;
  max-height: 100%;
  /* Si ton logo est noir sur fond transparent → décommente : */
  /* filter: invert(1) brightness(2); */
}

/* Taille des conteneurs image selon le contexte */
.lock-logo    .logo-img-apple { width: 144px;  height: 144px;  }
.logo-apple   .logo-img-apple { width: 156px;  height: 156px;  }
.gh-logo      .logo-img-apple { width: 20px;  height: 20px; opacity: .5; }


*,*::before,*::after { box-sizing:border-box; margin:0; padding:0; }
html { -webkit-font-smoothing:antialiased; }
body {
  font-family: var(--font-b);
  background: var(--dark);
  color: var(--text);
  min-height: 100vh;
  overflow: hidden;
}

/* ── SCREENS ─────────────────────────────── */
.screen {
  position: fixed;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow-y: auto;
  padding: 20px 16px 32px;
  opacity: 0;
  pointer-events: none;
  transform: translateY(28px);
  transition: opacity .55s var(--ease), transform .55s var(--ease);
  z-index: 1;
}
.screen.active   { opacity:1; pointer-events:all; transform:translateY(0); }
.screen.exiting  { opacity:0; transform:translateY(-24px); pointer-events:none; }

/* ════════════════════════════════════════════
   INTRO SCREEN
════════════════════════════════════════════ */
#screen-intro {
  background: radial-gradient(ellipse 80% 60% at 50% 0%, #0f1a2e 0%, #080810 60%);
}

/* Starfield canvas */
#starfield {
  position: fixed; inset: 0;
  width: 100%; height: 100%;
  pointer-events: none; z-index: 0;
}

/* Glows */
.intro-glow {
  position: absolute; border-radius: 50%;
  filter: blur(70px); pointer-events: none; z-index: 0;
}
.g1 {
  width: 500px; height: 300px;
  top: -80px; left: 50%; transform: translateX(-50%);
  background: radial-gradient(ellipse, rgba(10,132,255,.28), transparent 70%);
}
.g2 {
  width: 350px; height: 200px;
  bottom: 10%; left: 10%;
  background: radial-gradient(ellipse, rgba(191,90,242,.18), transparent 70%);
}
.g3 {
  width: 300px; height: 200px;
  bottom: 5%; right: 5%;
  background: radial-gradient(ellipse, rgba(48,209,88,.12), transparent 70%);
}

/* Intro wrapper */
.intro-wrap {
  position: relative; z-index: 2;
  display: flex; flex-direction: column;
  align-items: center; text-align: center;
  gap: 0; max-width: 500px; width: 100%;
  animation: fadeUp .9s var(--ease) both;
}

/* Logo rings */
.intro-logo-zone {
  position: relative;
  width: 120px; height: 120px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 28px;
}
.logo-ring {
  position: absolute; border-radius: 50%;
  border: 1px solid rgba(10,132,255,.2);
}
.lr1 { inset: 12px;  animation: ringPulse 2.8s ease-in-out infinite 0s; }
.lr2 { inset: 0px;   animation: ringPulse 2.8s ease-in-out infinite .3s; }
.lr3 { inset: -16px; animation: ringPulse 2.8s ease-in-out infinite .6s; }
.lr4 { inset: -32px; animation: ringPulse 2.8s ease-in-out infinite .9s; }

@keyframes ringPulse {
  0%,100% { opacity:.3; transform:scale(1); }
  50%      { opacity:.8; transform:scale(1.04); }
}

.logo-apple {
  width: 56px; height: 56px;
  position: relative; z-index: 1;
  display: flex; align-items: center; justify-content: center;
  animation: floatY 4s ease-in-out infinite;
}
.logo-apple svg { fill: var(--text); width: 100%; height: 100%; }

@keyframes floatY {
  0%,100% { transform: translateY(0); }
  50%     { transform: translateY(-8px); }
}

/* Intro text */
.intro-text-block { margin-bottom: 32px; }

.intro-eyebrow {
  font-size: .72rem;
  font-weight: 500;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 10px;
  opacity: .9;
}

.intro-h1 {
  font-family: var(--font-d);
  font-size: clamp(3.8rem, 14vw, 6.5rem);
  font-weight: 700;
  line-height: 1;
  color: var(--text);
  margin-bottom: 16px;
}
.intro-h1 em {
  font-style: italic;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.intro-desc {
  font-size: .975rem;
  line-height: 1.65;
  color: var(--text-muted);
}

/* Path preview */
.path-preview {
  width: 100%; max-width: 460px;
  margin-bottom: 36px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.07);
  border-radius: var(--radius-lg);
  padding: 16px 18px 12px;
}
.path-svg {
  width: 100%; height: auto;
  display: block; margin-bottom: 8px;
}
.path-svg .ppc { animation: dotBlink 2s ease-in-out infinite alternate; }
.path-svg .ppc:nth-child(odd)  { animation-delay: .2s; }
.path-svg .ppc:nth-child(even) { animation-delay: .5s; }
@keyframes dotBlink {
  from { opacity: .5; }
  to   { opacity: 1; }
}
.path-caption {
  font-size: .72rem; color: var(--text-dim);
  text-align: center; letter-spacing: .08em;
}

/* CTA button */
.btn-start {
  display: inline-flex; align-items: center; gap: 12px;
  background: linear-gradient(135deg, var(--accent) 0%, #0060cc 100%);
  color: #fff;
  border: none; border-radius: 980px;
  padding: 15px 30px;
  font-family: var(--font-b);
  font-size: .9375rem; font-weight: 600;
  cursor: pointer;
  box-shadow: 0 6px 28px rgba(var(--acc-rgb),.45), 0 0 0 1px rgba(var(--acc-rgb),.3);
  transition: transform .2s var(--ease), box-shadow .2s;
  margin-bottom: 14px;
}
.btn-start:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 36px rgba(var(--acc-rgb),.55), 0 0 0 1px rgba(var(--acc-rgb),.4);
}
.btn-start:active { transform: scale(.97); }
.btn-start svg { width: 18px; height: 18px; transition: transform .2s; }
.btn-start:hover svg { transform: translateX(4px); }

.intro-hint-tip {
  font-size: .75rem;
  color: var(--text-dim);
  letter-spacing: .04em;
}

/* ════════════════════════════════════════════
   LOCK / COUNTDOWN SCREEN
════════════════════════════════════════════ */
#screen-lock {
  background: radial-gradient(ellipse 90% 70% at 50% 0%, #060e1e, #04040a 65%);
  z-index: 10;
}

#lock-starfield {
  position: fixed; inset: 0;
  width: 100%; height: 100%;
  pointer-events: none; z-index: 0;
}

.lock-glow {
  position: absolute; border-radius: 50%;
  filter: blur(80px); pointer-events: none; z-index: 0;
}
.lg1 {
  width: 600px; height: 350px;
  top: -100px; left: 50%; transform: translateX(-50%);
  background: radial-gradient(ellipse, rgba(10,132,255,.22), transparent 70%);
}
.lg2 {
  width: 400px; height: 250px;
  bottom: 0; right: -80px;
  background: radial-gradient(ellipse, rgba(191,90,242,.14), transparent 70%);
}

.lock-wrap {
  position: relative; z-index: 2;
  display: flex; flex-direction: column; align-items: center;
  text-align: center;
  max-width: 520px; width: 100%;
  animation: fadeUp .9s var(--ease) both;
  gap: 0;
}

/* Apple logo lock */
.lock-logo {
  position: relative;
  width: 90px; height: 90px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 28px;
}
.lock-logo svg {
  width: 44px; height: 44px; fill: var(--text);
  position: relative; z-index: 1;
  animation: floatY 4s ease-in-out infinite;
  opacity: .9;
}
.lock-ring {
  position: absolute; border-radius: 50%;
  border: 1px solid rgba(10,132,255,.18);
  animation: ringPulse 2.8s ease-in-out infinite;
}
.lring1 { inset: 6px;   animation-delay: 0s; }
.lring2 { inset: -8px;  animation-delay: .35s; }
.lring3 { inset: -22px; animation-delay: .7s; }

/* Badge "En préparation" */
.lock-badge {
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(255,159,10,.1);
  border: 1px solid rgba(255,159,10,.25);
  border-radius: 99px;
  padding: 6px 16px;
  font-size: .7rem; font-weight: 600;
  letter-spacing: .13em; text-transform: uppercase;
  color: var(--orange);
  margin-bottom: 20px;
}
.lock-badge-dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--orange);
  box-shadow: 0 0 6px var(--orange);
  animation: blink 1.4s ease-in-out infinite;
}
@keyframes blink {
  0%,100% { opacity: 1; }
  50%      { opacity: .3; }
}

/* Titles */
.lock-title {
  font-family: var(--font-d);
  font-size: clamp(2.4rem, 9vw, 4rem);
  font-weight: 700; line-height: 1.1;
  color: var(--text);
  margin-bottom: 14px;
}
.lock-subtitle {
  font-size: .875rem; color: var(--text-muted);
  margin-bottom: 4px;
}
.lock-date-line {
  font-family: var(--font-d);
  font-size: 1.1rem; font-style: italic;
  color: var(--accent2);
  margin-bottom: 32px;
  letter-spacing: .02em;
}

/* Countdown grid */
.countdown-grid {
  display: flex; align-items: flex-start; gap: 6px;
  margin-bottom: 28px;
}
.cg-unit {
  display: flex; flex-direction: column; align-items: center;
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.08);
  border-radius: var(--radius-md);
  padding: 14px 18px 10px;
  min-width: 70px;
}
.cg-val {
  font-family: var(--font-d);
  font-size: clamp(2rem, 8vw, 2.8rem);
  font-weight: 700; line-height: 1;
  color: var(--text);
  font-variant-numeric: tabular-nums;
  transition: transform .15s var(--ease);
}
.cg-val.flip { animation: flipNum .22s var(--ease); }
@keyframes flipNum {
  0%   { transform: translateY(-6px); opacity: 0; }
  100% { transform: translateY(0);    opacity: 1; }
}
.cg-label {
  font-size: .62rem; font-weight: 500;
  letter-spacing: .1em; text-transform: uppercase;
  color: var(--text-dim); margin-top: 6px;
}
.cg-sep {
  font-family: var(--font-d);
  font-size: 2rem; font-weight: 700;
  color: var(--text-dim);
  padding-top: 14px; line-height: 1;
}

/* Lock progress bar */
.lock-prog-wrap {
  width: 100%; max-width: 380px;
  margin-bottom: 28px;
}
.lock-prog-track {
  height: 4px;
  background: rgba(255,255,255,.07);
  border-radius: 99px; overflow: hidden;
  margin-bottom: 8px;
}
.lock-prog-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--purple));
  border-radius: 99px;
  width: 0%;
  transition: width 1s var(--ease);
}
.lock-prog-label {
  font-size: .7rem; color: var(--text-dim);
  letter-spacing: .05em;
}

/* Secret access button */
.lock-secret-zone { margin-top: 4px; }
.lock-secret-btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: transparent;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 99px;
  padding: 9px 18px;
  font-family: var(--font-b); font-size: .78rem;
  color: var(--text-dim);
  cursor: pointer;
  transition: border-color .2s, color .2s;
}
.lock-secret-btn:hover {
  border-color: rgba(255,255,255,.2);
  color: var(--text-muted);
}
.lock-secret-btn svg { width: 13px; height: 13px; }

/* Lock code modal */
.lock-code-modal {
  position: fixed; inset: 0; z-index: 20;
  background: rgba(0,0,0,.75);
  backdrop-filter: blur(12px);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  opacity: 0; pointer-events: none;
  transition: opacity .3s var(--ease);
}
.lock-code-modal.open { opacity: 1; pointer-events: all; }

.lcm-box {
  background: #14141e;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: var(--radius-xl);
  padding: 32px 28px 28px;
  width: 100%; max-width: 340px;
  text-align: center;
  position: relative;
  box-shadow: 0 32px 80px rgba(0,0,0,.7);
  transform: scale(.93) translateY(12px);
  transition: transform .35s var(--ease);
}
.lock-code-modal.open .lcm-box { transform: scale(1) translateY(0); }

.lcm-close {
  position: absolute; top: 14px; right: 14px;
  background: rgba(255,255,255,.06); border: none; border-radius: 50%;
  width: 30px; height: 30px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: var(--text-muted);
  transition: background .2s;
}
.lcm-close:hover { background: rgba(255,255,255,.12); }
.lcm-close svg { width: 14px; height: 14px; }

.lcm-icon { font-size: 2.5rem; margin-bottom: 12px; }
.lcm-title {
  font-family: var(--font-d);
  font-size: 1.4rem; font-weight: 700;
  color: var(--text); margin-bottom: 6px;
}
.lcm-sub { font-size: .85rem; color: var(--text-muted); margin-bottom: 22px; }

/* Countdown expired state */
.cg-val.ready { color: var(--green); }
.cg-unit.ready { border-color: rgba(48,209,88,.25); background: rgba(48,209,88,.07); }


#screen-game {
  background: var(--dark2);
  justify-content: flex-start;
  padding-top: 0; padding-bottom: 40px;
  gap: 0;
}

.game-orb {
  position: fixed; border-radius: 50%;
  filter: blur(90px); pointer-events: none; z-index: 0; opacity: .5;
}
.go1 {
  width: 400px; height: 300px;
  top: -120px; left: -80px;
  background: radial-gradient(ellipse, rgba(10,132,255,.2), transparent 70%);
}
.go2 {
  width: 350px; height: 250px;
  bottom: -80px; right: -60px;
  background: radial-gradient(ellipse, rgba(191,90,242,.15), transparent 70%);
}

/* Header */
.game-header {
  position: relative; z-index: 2;
  width: 100%; max-width: 560px;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 2px 0;
  margin-bottom: 8px;
}
.gh-logo { width: 20px; height: 20px; opacity: .5; }
.gh-logo svg { fill: var(--text); width: 100%; height: 100%; }
.gh-label {
  font-size: .78rem; font-weight: 500;
  letter-spacing: .07em; color: var(--text-muted);
}

/* ── MAP ROAD ── */
.map-scroll-wrap {
  position: relative; z-index: 2;
  width: 100%; max-width: 560px;
  overflow-x: auto;
  padding: 6px 0 4px;
  scrollbar-width: none;
  -ms-overflow-style: none;
}
.map-scroll-wrap::-webkit-scrollbar { display: none; }

.map-road {
  display: flex; align-items: center;
  gap: 0;
  padding: 10px 12px;
  width: max-content;
  min-width: 100%;
}

.map-node {
  display: flex; flex-direction: column; align-items: center;
  position: relative;
  flex-shrink: 0;
}
.map-node-dot {
  width: 30px; height: 30px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: .7rem; font-weight: 600;
  border: 2px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.05);
  color: var(--text-dim);
  transition: all .4s var(--ease);
  position: relative; z-index: 1;
}
.map-node-dot.done {
  background: var(--green);
  border-color: var(--green);
  color: #fff;
  box-shadow: 0 0 12px rgba(48,209,88,.5);
}
.map-node-dot.active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
  box-shadow: 0 0 0 4px rgba(var(--acc-rgb),.25), 0 0 16px rgba(var(--acc-rgb),.4);
  animation: activePulse 1.8s ease-in-out infinite;
}
.map-node-dot.treasure {
  width: 34px; height: 34px;
  background: rgba(255,214,10,.1);
  border-color: rgba(255,214,10,.4);
  font-size: .85rem;
}
.map-node-dot.treasure.done {
  background: var(--gold);
  border-color: var(--gold);
  box-shadow: 0 0 16px rgba(255,214,10,.6);
}

@keyframes activePulse {
  0%,100% { box-shadow: 0 0 0 4px rgba(var(--acc-rgb),.25), 0 0 16px rgba(var(--acc-rgb),.4); }
  50%      { box-shadow: 0 0 0 7px rgba(var(--acc-rgb),.15), 0 0 24px rgba(var(--acc-rgb),.5); }
}

.map-node-label {
  font-size: .58rem;
  color: var(--text-dim);
  margin-top: 5px;
  white-space: nowrap;
  transition: color .3s;
}
.map-node-dot.active + .map-node-label,
.map-node-dot.done  + .map-node-label { color: var(--text-muted); }

.map-connector {
  flex: 1; min-width: 18px; max-width: 40px;
  height: 2px;
  margin-bottom: 16px; /* offset for label below */
  background: rgba(255,255,255,.08);
  border-radius: 2px;
  position: relative; overflow: hidden;
  transition: background .4s;
  flex-shrink: 0;
}
.map-connector.done-line {
  background: rgba(48,209,88,.4);
}
.map-connector::after {
  content: '';
  position: absolute; top: 0; left: -100%; width: 100%; height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.4), transparent);
}
.map-connector.done-line::after {
  animation: shimmer 1.2s ease forwards;
}
@keyframes shimmer {
  from { left: -100%; }
  to   { left: 200%; }
}

/* Progress bar */
.prog-wrap {
  position: relative; z-index: 2;
  width: 100%; max-width: 560px;
  display: flex; align-items: center; gap: 10px;
  padding: 4px 0 14px;
}
.prog-track {
  flex: 1; height: 3px;
  background: rgba(255,255,255,.08);
  border-radius: 99px; overflow: hidden;
}
.prog-fill {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  border-radius: 99px;
  width: 0%;
  transition: width .7s var(--ease);
}
.prog-pct {
  font-size: .7rem; font-weight: 500;
  color: var(--text-dim); min-width: 32px; text-align: right;
}

/* Card */
.card-zone { position: relative; z-index: 2; width: 100%; max-width: 560px; }

.card {
  background: var(--card-bg2);
  border: 1px solid var(--card-border);
  border-radius: var(--radius-xl);
  padding: 28px 24px 22px;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  box-shadow: 0 24px 64px rgba(0,0,0,.45), 0 0 0 1px rgba(255,255,255,.06);
  position: relative; overflow: hidden;
}
.card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, var(--accent), var(--purple), var(--green));
  opacity: .7;
}

.card-top-row {
  display: flex; align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}
.card-big-num {
  font-family: var(--font-d);
  font-size: 3.8rem; font-weight: 700;
  line-height: 1; color: rgba(255,255,255,.06);
  letter-spacing: -.02em;
  user-select: none;
}
.card-category {
  font-size: .67rem; font-weight: 600;
  letter-spacing: .14em; text-transform: uppercase;
  background: rgba(var(--acc-rgb),.15);
  color: var(--accent2);
  padding: 5px 12px; border-radius: 99px;
  border: 1px solid rgba(var(--acc-rgb),.2);
}

.card-enigma-title {
  font-family: var(--font-d);
  font-size: clamp(1.2rem, 4vw, 1.55rem);
  font-weight: 700;
  line-height: 1.25;
  color: var(--text);
  margin-bottom: 12px;
}

.card-enigma-text {
  font-size: .9rem;
  line-height: 1.7;
  color: var(--text-muted);
  margin-bottom: 20px;
}

/* Hint reveal */
.hint-reveal {
  display: none;
  background: rgba(255,159,10,.07);
  border: 1px solid rgba(255,159,10,.2);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  margin-bottom: 18px;
  animation: fadeUp .35s var(--ease) both;
}
.hint-reveal.visible { display: block; }
.hr-top {
  display: flex; align-items: center; gap: 8px; margin-bottom: 8px;
}
.hr-bulb { font-size: 1rem; }
.hr-label {
  font-size: .7rem; font-weight: 600;
  letter-spacing: .1em; text-transform: uppercase;
  color: var(--orange); flex: 1;
}
.hr-close {
  font-size: .75rem; color: var(--text-dim);
  cursor: pointer; padding: 2px 4px;
  border-radius: 4px; transition: color .2s;
}
.hr-close:hover { color: var(--text); }
.hr-body { font-size: .85rem; line-height: 1.6; color: rgba(255,159,10,.85); }

/* Input */
.input-wrap { margin-bottom: 8px; }
.answer-input {
  width: 100%;
  background: rgba(255,255,255,.05);
  border: 1.5px solid rgba(255,255,255,.1);
  border-radius: var(--radius-md);
  padding: 13px 16px;
  font-family: var(--font-b);
  font-size: .9375rem; color: var(--text);
  outline: none;
  transition: border-color .2s, box-shadow .2s, background .2s;
  -webkit-appearance: none;
}
.answer-input::placeholder { color: var(--text-dim); }
.answer-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 4px rgba(var(--acc-rgb),.15);
  background: rgba(255,255,255,.08);
}
.answer-input.shake { animation: shake .45s var(--ease); }
.answer-input.flash-ok { animation: flashOk .5s ease forwards; }

/* Feedback */
.feedback-msg {
  min-height: 18px;
  font-size: .82rem; font-weight: 500;
  margin-bottom: 16px;
  transition: opacity .2s;
}
.feedback-msg.err     { color: var(--red); }
.feedback-msg.ok      { color: var(--green); }
.feedback-msg.neutral { color: var(--text-dim); }

/* Card footer buttons */
.card-footer {
  display: flex; align-items: center; gap: 10px;
}
.btn-lock-hint {
  display: inline-flex; align-items: center; gap: 7px;
  background: transparent;
  border: 1.5px solid rgba(255,255,255,.1);
  border-radius: 980px;
  padding: 11px 18px;
  font-family: var(--font-b); font-size: .84rem;
  color: var(--text-muted);
  cursor: pointer;
  transition: border-color .2s, color .2s, background .2s;
}
.btn-lock-hint:hover {
  border-color: var(--orange);
  color: var(--orange);
  background: rgba(255,159,10,.07);
}
.btn-lock-hint svg { width: 15px; height: 15px; }

.btn-go {
  flex: 1; display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  background: linear-gradient(135deg, var(--accent) 0%, #0060cc 100%);
  color: #fff;
  border: none; border-radius: 980px;
  padding: 12px 22px;
  font-family: var(--font-b); font-size: .9rem; font-weight: 600;
  cursor: pointer;
  box-shadow: 0 4px 18px rgba(var(--acc-rgb),.4);
  transition: transform .18s var(--ease), box-shadow .2s;
}
.btn-go:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 26px rgba(var(--acc-rgb),.5);
}
.btn-go:active { transform: scale(.97); }
.btn-go svg { width: 17px; height: 17px; transition: transform .2s; }
.btn-go:hover svg { transform: translateX(3px); }

/* Card transitions */
.card.c-exit   { animation: cExit .32s var(--ease) forwards; }
.card.c-enter  { animation: cEnter .4s var(--ease) both; }
@keyframes cExit  { to { opacity:0; transform:translateX(-36px) scale(.97); } }
@keyframes cEnter { from { opacity:0; transform:translateX(36px) scale(.97); } to { opacity:1; transform:none; } }

/* ════════════════════════════════════════════
   MODAL · MOT DE PASSE
════════════════════════════════════════════ */
.modal-bg {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(0,0,0,.75);
  backdrop-filter: blur(10px);
  display: flex; align-items: center; justify-content: center;
  padding: 20px;
  opacity: 0; pointer-events: none;
  transition: opacity .3s var(--ease);
}
.modal-bg.open { opacity: 1; pointer-events: all; }

.modal-box {
  background: #1c1c28;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: var(--radius-xl);
  padding: 32px 28px 28px;
  width: 100%; max-width: 360px;
  text-align: center;
  position: relative;
  box-shadow: 0 32px 80px rgba(0,0,0,.6);
  transform: scale(.94) translateY(10px);
  transition: transform .35s var(--ease);
}
.modal-bg.open .modal-box { transform: scale(1) translateY(0); }

.modal-x {
  position: absolute; top: 14px; right: 14px;
  background: rgba(255,255,255,.06); border: none; border-radius: 50%;
  width: 30px; height: 30px;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; color: var(--text-muted);
  transition: background .2s, color .2s;
}
.modal-x:hover { background: rgba(255,255,255,.12); color: var(--text); }
.modal-x svg { width: 14px; height: 14px; }

.modal-icon-wrap {
  font-size: 2.4rem;
  margin-bottom: 14px;
  animation: iconBounce .5s var(--ease) both;
}
@keyframes iconBounce {
  from { transform: scale(.5); opacity: 0; }
  70%  { transform: scale(1.2); }
  to   { transform: scale(1); opacity: 1; }
}

.modal-h {
  font-family: var(--font-d);
  font-size: 1.4rem; font-weight: 700;
  color: var(--text); margin-bottom: 6px;
}
.modal-sub { font-size: .85rem; color: var(--text-muted); margin-bottom: 24px; }

/* PIN row */
.pin-row {
  display: flex; justify-content: center; gap: 10px;
  margin-bottom: 12px;
}
.pin-cell {
  width: 52px; height: 58px;
  background: rgba(255,255,255,.06);
  border: 1.5px solid rgba(255,255,255,.12);
  border-radius: var(--radius-md);
  font-family: var(--font-d);
  font-size: 1.6rem; font-weight: 700;
  color: var(--text);
  text-align: center;
  outline: none;
  caret-color: var(--accent);
  transition: border-color .2s, box-shadow .2s;
  -webkit-appearance: none;
}
.pin-cell:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(var(--acc-rgb),.2);
}
.pin-cell.wrong-shake { animation: shake .4s var(--ease); }

.modal-err {
  font-size: .8rem; min-height: 18px;
  color: var(--red); margin-bottom: 16px;
  font-weight: 500;
}

.modal-unlock-btn {
  width: 100%;
}

/* ════════════════════════════════════════════
   VICTORY SCREEN
════════════════════════════════════════════ */
#screen-victory {
  background: radial-gradient(ellipse 100% 70% at 50% 0%, #0e1f3a, #07070f 65%);
  padding-top: 40px;
}

#fireworks-canvas {
  position: fixed; inset: 0;
  width: 100%; height: 100%;
  pointer-events: none; z-index: 0;
}
.confetti-wrap {
  position: fixed; inset: 0;
  pointer-events: none; z-index: 0; overflow: hidden;
}
.confetti-p {
  position: absolute; top: -14px;
  animation: confettiFall linear both;
}
@keyframes confettiFall {
  0%   { transform: translateY(0) rotate(0deg); opacity: 1; }
  80%  { opacity: 1; }
  100% { transform: translateY(105vh) rotate(720deg); opacity: 0; }
}

.victory-inner {
  position: relative; z-index: 2;
  display: flex; flex-direction: column; align-items: center;
  text-align: center; max-width: 500px; width: 100%;
  animation: fadeUp .8s var(--ease) .2s both;
}

/* Burst rays */
.v-burst {
  position: absolute;
  top: 30px; left: 50%; transform: translateX(-50%);
  width: 160px; height: 160px;
  z-index: 0;
}
.vb-ray {
  position: absolute;
  top: 50%; left: 50%;
  width: var(--l); height: 2px;
  background: linear-gradient(90deg, rgba(255,214,10,.6), transparent);
  transform-origin: 0 50%;
  transform: rotate(var(--a));
  border-radius: 2px;
  animation: rayGlow 2s ease-in-out infinite alternate;
}
@keyframes rayGlow {
  from { opacity: .3; }
  to   { opacity: .9; }
}

.v-trophy {
  font-size: 5rem;
  position: relative; z-index: 1;
  margin-bottom: 16px;
  animation: trophyIn 1s var(--ease) .4s both;
  filter: drop-shadow(0 0 24px rgba(255,214,10,.5));
}
@keyframes trophyIn {
  from { transform: scale(0) rotate(-20deg); opacity: 0; }
  70%  { transform: scale(1.2) rotate(5deg); }
  to   { transform: scale(1) rotate(0deg); opacity: 1; }
}

.v-eyebrow {
  font-size: .8rem; font-weight: 600;
  letter-spacing: .16em; text-transform: uppercase;
  color: var(--green); margin-bottom: 8px;
}

.v-title {
  font-family: var(--font-d);
  font-size: clamp(2rem, 8vw, 3.2rem);
  font-weight: 700; line-height: 1.1;
  color: var(--text); margin-bottom: 28px;
}
.v-title em {
  font-style: italic;
  background: linear-gradient(135deg, var(--gold), var(--orange));
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* Treasure card */
.treasure-card {
  background: rgba(255,255,255,.05);
  border: 1px solid rgba(255,255,255,.10);
  border-radius: var(--radius-xl);
  padding: 22px 22px 18px;
  margin-bottom: 20px; text-align: left;
  position: relative; overflow: hidden;
  box-shadow: 0 12px 40px rgba(0,0,0,.4);
}
.treasure-card::before {
  content: '';
  position: absolute; top: 0; left: 0; right: 0; height: 3px;
  background: linear-gradient(90deg, var(--gold), var(--orange), var(--red));
}
.tc-label {
  font-size: .68rem; font-weight: 600;
  letter-spacing: .14em; text-transform: uppercase;
  color: var(--gold); margin-bottom: 10px;
}
.tc-text {
  font-family: var(--font-d);
  font-size: 1.05rem; line-height: 1.65;
  color: var(--text); font-style: italic;
}
.tc-text em { color: var(--gold); font-style: normal; font-weight: 700; }

/* Festive emojis */
.v-emojis {
  display: flex; gap: 12px;
  font-size: 1.8rem;
  margin-bottom: 14px;
}
.v-emojis span {
  animation: emojiPop .5s var(--ease) var(--d) both;
  display: inline-block;
}
@keyframes emojiPop {
  from { transform: scale(0) rotate(-15deg); opacity: 0; }
  70%  { transform: scale(1.3) rotate(5deg); }
  to   { transform: scale(1) rotate(0deg); opacity: 1; }
}

.v-msg {
  font-size: .9rem; color: var(--text-muted); margin-bottom: 24px;
}

.btn-restart {
  background: transparent;
  border: 1.5px solid rgba(255,255,255,.15);
  border-radius: 980px;
  padding: 11px 24px;
  font-family: var(--font-b); font-size: .875rem;
  color: var(--text-muted);
  cursor: pointer;
  transition: border-color .2s, color .2s;
}
.btn-restart:hover {
  border-color: rgba(255,255,255,.35);
  color: var(--text);
}

/* ════════════════════════════════════════════
   KEYFRAMES COMMUNS
════════════════════════════════════════════ */
@keyframes fadeUp {
  from { opacity:0; transform:translateY(22px); }
  to   { opacity:1; transform:translateY(0); }
}
@keyframes shake {
  0%,100% { transform:translateX(0); }
  15%     { transform:translateX(-8px); }
  30%     { transform:translateX(8px); }
  45%     { transform:translateX(-5px); }
  60%     { transform:translateX(5px); }
  75%     { transform:translateX(-3px); }
  90%     { transform:translateX(3px); }
}
@keyframes flashOk {
  0%   { background: rgba(255,255,255,.05); }
  40%  { background: rgba(48,209,88,.12); border-color: var(--green); }
  100% { background: rgba(255,255,255,.05); }
}

/* ════════════════════════════════════════════
   RESPONSIVE
════════════════════════════════════════════ */
@media (max-width: 480px) {
  .card { padding: 22px 16px 18px; }
  .card-footer { flex-direction: column-reverse; }
  .btn-lock-hint, .btn-go { width: 100%; justify-content: center; }
  .pin-cell { width: 46px; height: 52px; font-size: 1.4rem; }
  .v-trophy { font-size: 4rem; }
  .v-emojis { font-size: 1.5rem; gap: 8px; }
}
@media (max-width: 360px) {
  .intro-h1 { font-size: 3.2rem; }
  .map-node-dot { width: 26px; height: 26px; font-size: .62rem; }
}
