/* ===== L'usine du Père Noël + l'alunissage ===== */
.us-overlay { position: fixed; inset: 0; z-index: 40; display: grid; place-items: safe center; padding: 8px; overflow: auto; background: rgba(8, 23, 48, .85); }
.us-box {
  position: relative; width: min(1040px, 100%); padding: 12px 14px; border-radius: 20px;
  background: var(--cream); color: var(--ink); border: 3px solid var(--gold); box-shadow: 0 24px 60px rgba(0, 0, 0, .55);
  font: 600 14px/1.4 var(--body);
}
.us-x { position: absolute; top: 6px; right: 8px; z-index: 3; border: 0; background: none; font-size: 18px; color: #9b7a52; cursor: pointer; padding: 6px; }
.us-head h2, .us-story h2, .us-moon-title { font: 700 26px/1.1 var(--title); color: var(--red); margin: 0 0 6px; }

.us-goal { display: flex; gap: 10px; align-items: baseline; padding: 7px 12px; border-radius: 12px; background: #e6f3ea; color: #1b4d33; margin-right: 26px; }
.us-goal b { white-space: nowrap; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; }
.us-needs { display: flex; flex-wrap: wrap; gap: 6px 18px; margin: 8px 0; }
.us-need { display: grid; grid-template-columns: auto 110px auto; align-items: center; gap: 8px; font-size: 13px; }
.us-bar { height: 9px; border-radius: 6px; background: #ecdcc0; overflow: hidden; }
.us-bar i { display: block; height: 100%; width: 0; border-radius: 6px; transition: width .3s; }
.us-need small { font-variant-numeric: tabular-nums; color: #7a6652; min-width: 40px; }
.us-launch { display: block; width: 100%; margin: 4px 0 8px; font-size: 20px; padding: 12px; animation: us-pulse .7s ease-in-out infinite alternate; }
.us-launch[hidden] { display: none; }
@keyframes us-pulse { to { transform: scale(1.02); box-shadow: 0 4px 0 var(--red-d), 0 0 26px rgba(255, 90, 90, .8); } }

.us-wrap { display: grid; place-items: center; }
.us-canvas { display: block; border-radius: 12px; border: 3px solid #b9c9dc; touch-action: none; cursor: crosshair; background: #eef4fb; }
.us-tools { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; margin-top: 8px; }
.us-tool { display: grid; justify-items: center; gap: 1px; min-width: 92px; padding: 6px 8px; border-radius: 12px; border: 2px solid #e2c9a0; background: #fff; color: var(--ink); font: 700 11px var(--body); cursor: pointer; }
.us-tool span { font-size: 22px; line-height: 1.1; }
.us-tool.on { border-color: var(--red); background: #ffe9e9; box-shadow: 0 3px 0 var(--red); transform: translateY(-2px); }
.us-foot { display: flex; align-items: center; gap: 10px; margin-top: 8px; }
.us-foot .btn { font-size: 13px; padding: 7px 12px; white-space: nowrap; }
.us-tip { flex: 1; margin: 0; font-size: 13px; color: #7a6652; }
.us-talk { display: flex; align-items: center; gap: 8px; margin-top: 8px; }
.us-talk span { font-size: 26px; line-height: 1; }
.us-talk p { margin: 0; padding: 6px 12px; border-radius: 14px 14px 14px 4px; background: #f1e2c6; font-weight: 700; font-size: 13px; }

/* écrans d'histoire + décollage */
.us-story { width: min(520px, 100%); text-align: center; padding: 26px 26px 22px; font-size: 15px; }
.us-story h2 { font-size: 32px; margin: 4px 0 12px; }
.us-big { font-size: 62px; line-height: 1.1; }
.us-kicker { margin: 0; font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--green); }
.us-row { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin-top: 14px; }
.us-liftoff { background: linear-gradient(#0b1c3d, #24457a 70%, #f0a35a); color: #fff; min-height: 420px; overflow: hidden; border-color: #24457a; }
.us-rocket { font-size: 90px; line-height: 1; margin-top: 190px; transform: rotate(-45deg); animation: us-shake .08s linear infinite alternate; }
.us-rocket.go { animation: us-shake .08s linear infinite alternate, us-up 4.6s cubic-bezier(.5, 0, .9, .5) forwards; }
@keyframes us-shake { from { translate: -2px 0; } to { translate: 2px 0; } }
@keyframes us-up { to { margin-top: -520px; } }
.us-log { position: absolute; left: 0; right: 0; bottom: 16px; padding: 0 20px; }
.us-log p { margin: 4px 0; font-weight: 700; text-shadow: 0 1px 4px rgba(0, 0, 0, .6); animation: us-in .3s; }
@keyframes us-in { from { opacity: 0; transform: translateY(8px); } }

/* la Lune */
.us-moon { background: #0b1226; color: #fff; border-color: #3b4a6b; width: min(940px, 100%); }
.us-moon .us-moon-title { color: var(--gold); }
.us-moon .us-canvas { border-color: #3b4a6b; cursor: default; background: #050a18; }
.us-pad { display: flex; gap: 8px; justify-content: center; margin-top: 8px; }
.us-pad .btn { min-width: 84px; font-size: 16px; padding: 10px 14px; touch-action: none; user-select: none; -webkit-user-select: none; }
.us-talk.dark p { background: #1b2748; color: #cfe0ff; }

/* usine v2 : carte + mémo des recettes, info-bulle */
.us-main { display: flex; gap: 10px; align-items: flex-start; justify-content: center; }
.us-recipes { flex: 0 0 220px; max-height: 60vh; overflow: auto; padding: 8px 10px; border-radius: 12px; background: #fff; border: 2px solid #e2c9a0; font-size: 12px; }
.us-recipes > b { display: block; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: #9b7a52; margin-bottom: 4px; }
.us-rec { display: flex; align-items: center; flex-wrap: wrap; gap: 3px; padding: 4px 0; border-bottom: 1px dashed #ecdcc0; }
.us-rec span { white-space: nowrap; }
.us-ic { vertical-align: middle; flex: none; }
.us-need span { display: inline-flex; align-items: center; gap: 4px; }
.us-goal { align-items: center; }
.us-tip.hot { color: var(--ink); font-weight: 800; }
.us-tool { min-width: 74px; }
.us-pad { flex-wrap: wrap; }
.us-pad .btn { min-width: 56px; }
@media (max-width: 900px) { .us-main { flex-direction: column; align-items: center; } .us-recipes { flex: none; width: 100%; max-height: 120px; } }

/* le portrait du Kerlutin sur les écrans de mission */
.us-ker { display: block; width: 150px; height: auto; margin: -6px auto 4px; animation: us-bob 2.4s ease-in-out infinite; }
.us-ker.oups { transform: rotate(160deg); animation: us-spin 5s linear infinite; }
@keyframes us-bob { 50% { transform: translateY(-6px) rotate(-3deg); } }
@keyframes us-spin { to { transform: rotate(520deg); } }
