/* ---------- Entrée du site : l'ampoule Lumi ---------- */
html.lx-on, html.lx-on body { overflow: hidden; }
.lx { --cx: 50%; --cy: 30%; --r: 0px; --f: 240px; position: fixed; inset: 0; z-index: 1000; overflow: hidden; color: #fff; font-family: "Poppins", sans-serif;
  background: #0b0512; transition: background-color 1.4s ease, opacity .45s; user-select: none; -webkit-user-select: none; touch-action: none; }
.lx.glow { background: #24101c; }
.lx.fade { opacity: 0; transition: opacity .7s ease; }
.lx.lx-reveal {
  -webkit-mask-image: radial-gradient(circle at var(--cx) var(--cy), transparent var(--r), #000 calc(var(--r) + var(--f)));
  mask-image: radial-gradient(circle at var(--cx) var(--cy), transparent var(--r), #000 calc(var(--r) + var(--f)));
}

/* Lumière chaude et reflets flous */
.lx-warm { position: absolute; inset: 0; opacity: 0; transition: opacity 1.2s ease;
  background: radial-gradient(circle at 50% calc(20vh + 120px), rgba(255, 214, 150, .62), rgba(255, 120, 80, .3) 28%, rgba(255, 46, 126, .14) 50%, rgba(124, 77, 255, .08) 66%, transparent 80%); }
.lx.glow .lx-warm { opacity: 1; }
.lx-bokeh i { position: absolute; left: var(--x); top: var(--y); width: var(--s); height: var(--s); border-radius: 50%; opacity: 0;
  background: radial-gradient(circle, rgba(var(--h), .55), rgba(var(--h), .18) 45%, rgba(var(--h), 0) 70%); filter: blur(1.5px);
  transition: opacity 1.6s ease; animation: lx-float var(--d) ease-in-out var(--k) infinite alternate; }
.lx.glow .lx-bokeh i { opacity: .9; }
@keyframes lx-float { from { transform: translate(0, 0); } to { transform: translate(18px, -34px); } }

/* La lampe suspendue */
.lx-lamp { position: absolute; left: 50%; top: 0; width: 220px; margin-left: -110px; transform-origin: 50% 0; animation: lx-idle 5s ease-in-out infinite alternate; z-index: 2; }
@keyframes lx-idle { from { transform: rotate(-.8deg); } to { transform: rotate(.8deg); } }
.lx-lamp.swing { animation: lx-swing 2.6s cubic-bezier(.3, .7, .3, 1) both; }
@keyframes lx-swing { 0% { transform: rotate(0); } 18% { transform: rotate(5deg); } 40% { transform: rotate(-3.5deg); } 62% { transform: rotate(2deg); } 82% { transform: rotate(-.8deg); } 100% { transform: rotate(0); } }
.lx-wire { width: 2px; height: 20vh; margin: 0 auto; background: linear-gradient(#1a1024, #4a3658); }
.lx-bulb { display: block; width: 190px; margin: -1px auto 0; position: relative; z-index: 2; transition: filter .3s; }
.lx-glass { fill: rgba(255, 255, 255, .05); stroke: rgba(255, 255, 255, .22); stroke-width: 2; transition: fill .15s, stroke .15s; }
.lx-fil { fill: none; stroke: #6b5577; stroke-width: 2; transition: fill .15s, stroke .15s; }
.lx.lit .lx-glass { fill: url(#lx-glass); stroke: rgba(255, 240, 200, .85); }
.lx.lit .lx-fil { fill: url(#lx-star); stroke: #fff3c4; }
.lx.lit .lx-bulb { filter: drop-shadow(0 0 24px rgba(255, 210, 130, .95)) drop-shadow(0 0 70px rgba(255, 120, 90, .65)); }
.lx-halo { position: absolute; left: 50%; top: calc(20vh - 20px); width: 520px; height: 520px; margin-left: -260px; border-radius: 50%; pointer-events: none; opacity: 0;
  background: radial-gradient(circle, rgba(255, 236, 190, .55), rgba(255, 170, 100, .18) 40%, transparent 70%); transition: opacity .15s; }
.lx.lit .lx-halo { opacity: 1; }
.lx-cone { position: absolute; left: 50%; top: calc(20vh + 150px); width: 130vw; height: 110vh; margin-left: -65vw; pointer-events: none; opacity: 0; filter: blur(8px);
  background: linear-gradient(to bottom, rgba(255, 220, 150, .42), rgba(255, 150, 100, .12) 55%, transparent 80%); clip-path: polygon(46% 0, 54% 0, 100% 100%, 0 100%); transition: opacity .15s; }
.lx.lit .lx-cone { opacity: 1; }

/* La chaînette à tirer */
.lx-chain { --pull: 0px; position: absolute; left: calc(50% + 64px); top: calc(20vh + 30px); width: 2px; z-index: 3; }
.lx-links { display: block; width: 2px; height: calc(170px + var(--pull)); background: repeating-linear-gradient(#b8a6c4 0 4px, transparent 4px 7px); transition: height .55s cubic-bezier(.34, 1.56, .64, 1); }
.lx-chain.drag .lx-links { transition: none; }
.lx-bead { position: absolute; left: -11px; bottom: -22px; width: 24px; height: 24px; border-radius: 50%; border: 0; padding: 0; cursor: grab; touch-action: none;
  background: radial-gradient(circle at 35% 30%, #fff6d8, #ffc860 45%, #b5741c); box-shadow: 0 0 0 6px rgba(255, 200, 96, .14), 0 4px 10px rgba(0, 0, 0, .5);
  animation: lx-call 1.8s ease-in-out infinite; }
.lx-bead:active { cursor: grabbing; }
.lx-bead:focus-visible { outline: 3px solid #fff; outline-offset: 4px; }
@keyframes lx-call { 0%, 100% { box-shadow: 0 0 0 6px rgba(255, 200, 96, .14), 0 4px 10px rgba(0, 0, 0, .5); } 50% { box-shadow: 0 0 0 14px rgba(255, 200, 96, .04), 0 4px 10px rgba(0, 0, 0, .5); } }
.lx.lit .lx-bead { animation: none; }

/* Textes */
.lx-dark, .lx-hint, .lx-title { position: absolute; left: 0; right: 0; text-align: center; z-index: 3; padding: 0 20px; }
.lx-dark { top: calc(20vh + 272px); margin: 0; color: rgba(255, 255, 255, .55); font-size: 1.05rem; letter-spacing: .5px; transition: opacity .5s; animation: lx-in 1.2s ease .3s both; }
.lx-hint { top: calc(20vh + 306px); margin: 0; display: flex; flex-direction: column; gap: 2px; align-items: center; color: #ffd08a; font-weight: 600; transition: opacity .4s; animation: lx-in 1.2s ease .9s both; }
.lx-hint small { color: rgba(255, 255, 255, .4); font-weight: 500; }
.lx.lit .lx-dark, .lx.lit .lx-hint { opacity: 0; }
@keyframes lx-in { from { opacity: 0; transform: translateY(8px); } }
.lx-title { top: calc(20vh + 250px); opacity: 0; pointer-events: none; }
.lx-title b { display: block; font-weight: 800; font-size: clamp(3.6rem, 11vw, 7.5rem); line-height: 1; letter-spacing: -2px;
  background: linear-gradient(100deg, #ff7a3c, #ff2e7e 50%, #7c4dff); -webkit-background-clip: text; background-clip: text; color: transparent;
  filter: drop-shadow(0 0 2px rgba(255, 255, 255, .9)) drop-shadow(0 6px 26px rgba(60, 10, 40, .45)); }
.lx-title span { display: inline-block; margin-top: 12px; font-size: clamp(1rem, 2.2vw, 1.3rem); color: #fff; font-weight: 600; padding: 6px 16px; border-radius: 999px;
  background: rgba(40, 12, 34, .45); backdrop-filter: blur(6px); }
.lx.named .lx-title { opacity: 1; transition: opacity .9s ease; }
.lx.named .lx-title b { animation: lx-name 1.2s cubic-bezier(.2, .8, .2, 1) both; }
.lx.named .lx-title span { animation: lx-in 1s ease .5s both; }
@keyframes lx-name { from { letter-spacing: 18px; opacity: 0; } }
.lx-skip { position: absolute; right: 18px; bottom: 18px; z-index: 4; font: 600 .85rem "Poppins", sans-serif; color: rgba(255, 255, 255, .75); background: rgba(255, 255, 255, .08);
  border: 1px solid rgba(255, 255, 255, .18); border-radius: 999px; padding: 8px 16px; cursor: pointer; }
.lx-skip:hover { background: rgba(255, 255, 255, .16); color: #fff; }

/* La lumière remplit la pièce juste avant que la page apparaisse */
.lx.bloom { background-color: #f7e2d2; transition: background-color 1s ease; }
.lx.bloom .lx-warm { opacity: 1; }
.lx.bloom .lx-title, .lx.bloom .lx-bokeh, .lx.bloom .lx-skip { opacity: 0; transition: opacity .6s ease; }
.lx.bloom .lx-cone { opacity: .3; transition: opacity 1s ease; }
.lx.bloom .lx-wire { opacity: .4; transition: opacity 1s ease; }

/* Arrivée en douceur de la page d'accueil */
#app.lx-arrive > * { animation: lx-arrive 1.9s cubic-bezier(.22, .8, .2, 1) both; }
@keyframes lx-arrive { from { opacity: 0; filter: blur(10px); transform: translateY(16px) scale(.985); } 60% { filter: blur(0); } }

@media (max-height: 620px) {
  .lx-wire { height: 8vh; }
  .lx-halo { top: calc(8vh + 20px); } .lx-cone { top: calc(8vh + 120px); } .lx-chain { top: calc(8vh + 26px); }
  .lx-dark { top: calc(8vh + 210px); } .lx-hint { top: calc(8vh + 244px); } .lx-title { top: calc(8vh + 190px); }
  .lx-warm { background: radial-gradient(circle at 50% calc(8vh + 120px), rgba(255, 214, 150, .62), rgba(255, 120, 80, .3) 28%, rgba(255, 46, 126, .14) 50%, transparent 80%); }
}
