:root {
  --bg-page: #1f0b1b;
  --accent: #ff4d6d;
  --accent-hover: #e03755;
  --text-main: #ffffff;
  --text-muted: #ffb3c1;
  --card-bg: rgba(20, 5, 15, 0.4);
  --card-border: rgba(255, 77, 109, 0.2);
  --glow: rgba(255, 77, 109, 0.4);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  padding: 0;
  min-height: 100%;
  background: var(--bg-page);
  color: var(--text-main);
  font-family: 'Inter', sans-serif;
  overflow-x: hidden;
  overflow-y: auto;
}

body {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px 8px;
}

.bokeh {
  position: fixed;
  border-radius: 50%;
  filter: blur(60px);
  pointer-events: none;
  z-index: 1;
  opacity: 0;
  transition: opacity 2s ease;
}

.bokeh.active.b1 {
  width: 300px;
  height: 300px;
  background: #ffb3c1;
  top: 0%;
  left: 5%;
  opacity: 0.6;
}

.bokeh.active.b2 {
  width: 250px;
  height: 250px;
  background: #ff006e;
  bottom: 5%;
  right: 5%;
  opacity: 0.5;
}

.bokeh.active.b3 {
  width: 200px;
  height: 200px;
  background: #ffc8dd;
  bottom: 20%;
  left: 15%;
  opacity: 0.5;
}

#floating-emojis {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 2;
  overflow: hidden;
  transition: opacity 0.5s ease;
}

.firefly {
  position: absolute;
  bottom: -100px;
  border-radius: 50%;
  background: radial-gradient(circle, #fff, #ffd166 40%, transparent 80%);
  box-shadow: 0 0 10px 2px rgba(255, 209, 102, 0.4);
  opacity: 0;
  animation: floatUpFirefly 20s linear infinite, blinkFirefly 2s ease-in-out infinite alternate;
}

@keyframes floatUpFirefly {
  0% { transform: translateY(0) translateX(0); }
  50% { transform: translateY(-60vh) translateX(20px); }
  100% { transform: translateY(-120vh) translateX(-20px); }
}

@keyframes blinkFirefly {
  0% { opacity: 0.2; }
  100% { opacity: 0.9; }
}

.stage {
  position: relative;
  width: min(100%, 480px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;
}

.card {
  position: relative;
  width: 100%;
  background: var(--card-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid var(--card-border);
  border-radius: 32px;
  box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3), inset 0 0 0 1px rgba(255, 255, 255, 0.05);
  text-align: center;
  padding: 40px 24px;
}

.eyebrow {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  opacity: 0.9;
  margin-bottom: 10px;
}

h1 {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: clamp(24px, 5vw, 34px);
  line-height: 1.2;
  margin: 0 0 28px 0;
  color: var(--text-main);
}

h1 em {
  font-style: normal;
  position: relative;
  display: inline-block;
  z-index: 1;
}

h1 em::after {
  content: '';
  position: absolute;
  bottom: 3px;
  left: -2%;
  width: 104%;
  height: 10px;
  background: #ffb3c1;
  z-index: -1;
  border-radius: 4px;
  opacity: 0.6;
  transform: rotate(-1deg);
}

.choice-zone {
  position: relative;
  width: 100%;
  height: 190px;
  margin-top: 20px;
}

.btn {
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  border: none;
  border-radius: 999px;
  padding: 14px 36px;
  font-family: 'Outfit', sans-serif;
  font-weight: 600;
  font-size: 17px;
  cursor: pointer;
  transition: top 0.35s cubic-bezier(.2, .9, .3, 1.3), left 0.35s cubic-bezier(.2, .9, .3, 1.3), transform 0.35s cubic-bezier(.2, .9, .3, 1.3), box-shadow 0.25s ease, background 0.2s ease, font-size 0.3s ease, padding 0.3s ease;
}

#btnOui {
  background: var(--accent);
  color: white;
  box-shadow: 0 8px 20px var(--glow);
  top: 0;
  z-index: 10;
}

#btnOui:hover {
  background: var(--accent-hover);
  box-shadow: 0 10px 25px rgba(255, 77, 109, 0.6);
  transform: translateX(-50%) translateY(-2px);
}

#btnOui:disabled {
  background: var(--accent-hover);
  opacity: 0.8;
  cursor: not-allowed;
  transform: translateX(-50%);
}

#btnNon {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
  border: 1px solid rgba(255, 77, 109, 0.3);
  top: 90px;
  z-index: 5;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: top 0.35s ease-out, left 0.35s ease-out, transform 0.35s ease-out, box-shadow 0.25s ease, background 0.2s ease;
}

.panel {
  display: none;
  width: 100%;
  animation: rise 0.4s cubic-bezier(.2, .8, .2, 1);
}

.panel.active {
  display: block;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.panel h2 {
  font-family: 'Outfit', sans-serif;
  font-weight: 700;
  font-size: 24px;
  margin: 0 0 12px 0;
  color: var(--text-main);
}

.success {
  text-align: center;
  padding: 10px 0;
}

/* Style pour le GIF de validation */
.success-gif {
  max-width: 220px;
  width: 100%;
  height: auto;
  border-radius: 16px;
  margin: 8px 0 20px 0;
  box-shadow: 0 10px 25px rgba(43, 45, 66, 0.08);
}

.success p {
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.6;
  margin: 0;
}

.success .recap {
  color: var(--accent);
  font-weight: 600;
}

/* --- Styles du cadenas (Nouveau) --- */
#lockStage {
  display: flex;
}
#mainStage {
  display: none; /* Masqué par défaut */
}
.pin-input {
  font-family: 'Outfit', sans-serif;
  font-size: 32px;
  text-align: center;
  letter-spacing: 12px;
  width: 100%;
  max-width: 250px;
  padding: 15px;
  border-radius: 16px;
  border: 2px solid #edf2f4;
  margin-bottom: 25px;
  outline: none;
  background: white;
  color: var(--text-main);
  transition: border-color 0.3s, transform 0.15s;
}
.pin-input:focus {
  border-color: var(--accent);
}
#lockError {
  color: var(--accent);
  font-weight: 500;
  margin-top: 15px;
  display: none;
  font-size: 14px;
}

/* --- Mode Verrouillé "Furtif" --- */
#locked-bg {
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: linear-gradient(-45deg, #020617, #0f172a, #1e1b4b, #172554, #0f172a);
  background-size: 400% 400%;
  animation: gradientBG 15s ease infinite;
  z-index: 0;
  transition: opacity 1.5s ease;
}
@keyframes gradientBG {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.lock-card {
  background: rgba(30, 41, 59, 0.4) !important;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.1) !important;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4) !important;
}
.lock-icon {
  width: 56px;
  height: 56px;
  margin: 0 auto 16px auto;
  border-radius: 50%;
  background: rgba(56, 189, 248, 0.1);
  display: flex;
  align-items: center;
  justify-content: center;
  color: #38bdf8;
  border: 1px solid rgba(56, 189, 248, 0.2);
  box-shadow: 0 0 20px rgba(56, 189, 248, 0.2);
}
.lock-icon svg {
  width: 24px;
  height: 24px;
}
.lock-card h1 { color: #f8fafc !important; }
.lock-card .eyebrow { color: #38bdf8 !important; }
.lock-card .pin-input {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(255, 255, 255, 0.15);
  color: #38bdf8;
  font-family: monospace;
  font-size: 36px;
  letter-spacing: 16px;
  box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.5);
  border-radius: 12px;
}
.lock-card .pin-input:focus { 
  border-color: #38bdf8; 
  box-shadow: inset 0 2px 10px rgba(0, 0, 0, 0.5), 0 0 15px rgba(56, 189, 248, 0.3);
}
.lock-card .pin-input::placeholder { color: rgba(255, 255, 255, 0.1); }
.lock-card #btnUnlock {
  background: #38bdf8 !important;
  color: #0f172a !important;
  box-shadow: 0 8px 20px rgba(56, 189, 248, 0.2) !important;
}
.lock-card #btnUnlock:hover { background: #0ea5e9 !important; }
.lock-card #lockError { color: #f87171 !important; }

@media (prefers-reduced-motion: reduce) {

  .btn,
  .panel {
    transition: none;
    animation: none;
  }
}
