/* =========================================================================
   HELIOS — pied de page (procedure d'urgence, terminal, compteur retro)
   et effets des easter eggs (voir assets/js/eggs.js).
   ========================================================================= */

.eggs-row { display: grid; grid-template-columns: 1fr 1.2fr; gap: 2rem; margin-top: 2.6rem; padding-top: 2rem; border-top: 1px dashed #26333e; align-items: start; }
@media (max-width: 760px) { .eggs-row { grid-template-columns: 1fr; } }
.emergency p { margin: 0 0 1rem; }
.code-chips { display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.code-chips button { display: flex; gap: 6px; background: none; border: 0; padding: 0; cursor: pointer; }
.code-chips button span { font-family: var(--f-mono); font-weight: 700; font-size: 2rem; line-height: 1; background: var(--red); color: #fff; padding: .35rem .55rem; border-radius: 4px; box-shadow: 0 4px 0 #7a120d; transition: transform .1s; }
.code-chips button:hover span { transform: translateY(-2px); }
.code-chips button:active span { transform: translateY(3px); box-shadow: 0 1px 0 #7a120d; }
.code-chips small { font-family: var(--f-mono); color: var(--red); letter-spacing: .08em; }
.whisper { font-family: var(--f-mono); font-size: .8rem; color: #5d6f79; }

.term { background: #031210; border: 2px solid #164a40; border-radius: 10px; overflow: hidden; box-shadow: inset 0 0 40px rgba(97,232,198,.08); font-family: var(--f-mono); color: #9fe8d6; font-size: .9rem; }
.term-bar { display: flex; justify-content: space-between; align-items: center; padding: .4rem .8rem; background: #0a2d26; font-size: .7rem; letter-spacing: .18em; color: #5fb9a3; }
.term-bar i { width: 8px; height: 8px; border-radius: 50%; background: var(--teal); box-shadow: 0 0 8px var(--teal); animation: blink 2s infinite; }
.term-log { height: 11.5rem; overflow-y: auto; padding: .7rem .9rem; line-height: 1.45; }
.term-log > div { margin-bottom: .35rem; }
.term-log .cmd { color: var(--teal); margin-top: .5rem; }
.term-log b { color: var(--teal); }
.term-log .r { color: var(--red); }
.term-log .dim { color: #3d7a6c; }
.term form { display: flex; gap: .5rem; align-items: center; border-top: 1px solid #164a40; padding: .5rem .9rem; }
.term form span { color: var(--teal); }
.term input { flex: 1; min-width: 0; background: transparent; border: 0; color: var(--teal); font: inherit; font-size: 1rem; caret-color: var(--teal); }
.term input:focus { outline: none; }
.term input::placeholder { color: #2f6a5d; }

.retro-row { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin-top: 1.8rem; font-family: var(--f-mono); color: #5d6f79; font-size: .78rem; }
.visits { display: flex; align-items: center; gap: .6rem; }
.odo { display: inline-flex; gap: 2px; }
.odo span { background: #000; color: var(--rad); font-family: var(--f-mono); font-weight: 700; padding: 0 .3rem; border: 1px solid #333; font-size: .95rem; }

/* Notifications */
.toasts { position: fixed; left: 1rem; bottom: 1rem; z-index: 97; display: grid; gap: .6rem; width: min(380px, calc(100vw - 2rem)); }
.toast { background: var(--cream); color: var(--paper-ink); border-left: 6px solid var(--paper-ink); padding: .8rem 1rem; box-shadow: 0 14px 40px rgba(0,0,0,.55); font-family: var(--f-mono); font-size: .9rem; animation: toastin .35s cubic-bezier(.2,1.4,.4,1); transition: opacity .6s, transform .6s; }
.toast b { display: block; font-family: var(--f-cond); font-weight: 800; letter-spacing: .14em; text-transform: uppercase; font-size: .9rem; margin-bottom: .25rem; }
.toast .r { color: #c8231f; font-weight: 700; }
.toast.amber { border-color: var(--orange); }
.toast.red { border-color: var(--red); }
.toast.green { border-color: #2a8a4a; }
.toast.out { opacity: 0; transform: translateX(-20px); }
@keyframes toastin { from { opacity: 0; transform: translateY(20px) scale(.96); } }

/* Effets */
.bolt-flash { position: fixed; inset: 0; z-index: 98; pointer-events: none; background: #fff; animation: bolt .9s steps(1) forwards; }
@keyframes bolt { 0% { opacity: .95; } 10% { opacity: 0; } 20% { opacity: .8; background: #cfe8ff; } 30%, 100% { opacity: 0; } }
body.quake main { animation: quake .12s linear infinite; }
@keyframes quake { 25% { transform: translate(3px, -2px); } 50% { transform: translate(-3px, 2px); } 75% { transform: translate(2px, 3px); } }
.matrix-rain { position: fixed; inset: 0; z-index: 94; pointer-events: none; background: rgba(0,0,0,.35); animation: fadeout 5.2s forwards; }
.matrix-rain canvas { width: 100%; height: 100%; }
@keyframes fadeout { 0%, 80% { opacity: 1; } 100% { opacity: 0; } }
.helmet-drop { position: fixed; top: -80px; z-index: 96; pointer-events: none; animation-name: hdrop; animation-timing-function: linear; animation-fill-mode: forwards; filter: drop-shadow(0 4px 4px rgba(0,0,0,.4)); }
@keyframes hdrop { to { transform: translateY(calc(100vh + 120px)) rotate(var(--r)); } }
body.flicker main, body.flicker .nav { animation: lights 4.2s steps(1) forwards; }
@keyframes lights { 0% { filter: brightness(1); } 8% { filter: brightness(.2); } 12% { filter: brightness(1.2) hue-rotate(-20deg); } 20% { filter: brightness(.15); } 26% { filter: brightness(1); } 40% { filter: brightness(.3) saturate(2) hue-rotate(160deg); } 44% { filter: brightness(1); } 60% { filter: brightness(.1); } 64%, 100% { filter: none; } }
body.hal::after { content: ""; position: fixed; left: 50%; top: 50%; width: 140px; height: 140px; margin: -70px 0 0 -70px; z-index: 96; pointer-events: none; border-radius: 50%; background: radial-gradient(circle, #ffe2a0 0 6%, #ff2a12 16%, #8a0a00 45%, #200 62%, #444 64%, #111 70%, transparent 71%); box-shadow: 0 0 80px rgba(255,40,20,.6); animation: haleye 3.5s ease forwards; }
@keyframes haleye { 0% { opacity: 0; transform: scale(.6); } 15%, 80% { opacity: 1; transform: scale(1); } 100% { opacity: 0; } }
.poke { animation: shake .3s 1; }
body.meltdown .logo .rays { animation-duration: 1.2s; fill: #ff3b30; }
body.meltdown .logo .gear { animation-duration: .6s; fill: #a3170f; }
body.meltdown .logo svg { filter: drop-shadow(0 0 40px rgba(255,59,48,.9)) hue-rotate(-25deg); }
body.meltdown .hero::before { filter: hue-rotate(-30deg) saturate(1.8); }
/* Indices du terminal */
.term-log .hint { color: #7fc9b6; font-style: italic; }
.term-log .easy { color: #f5c400; }
/* Grand titre plein ecran (GTA, Brooklyn 99) */
.banner { position: fixed; inset: 0; z-index: 98; pointer-events: none; display: grid; place-items: center; font-family: var(--f-display); font-size: clamp(3rem, 2rem + 8vw, 9rem); text-transform: uppercase; letter-spacing: .02em; animation: bannerin 3.2s ease forwards; }
.banner.gta { color: #c4161c; -webkit-text-stroke: 3px #000; text-shadow: 0 6px 0 #000; background: radial-gradient(circle, rgba(0,0,0,.15), rgba(0,0,0,.55)); }
.banner.b99 { color: var(--sun); -webkit-text-stroke: 2px #0b1016; text-shadow: 6px 6px 0 #1d4fa8; font-style: italic; }
@keyframes bannerin { 0% { opacity: 0; transform: scale(1.3); } 12%, 78% { opacity: 1; transform: scale(1); } 100% { opacity: 0; } }
body.wasted main, body.wasted .nav { filter: grayscale(1) contrast(1.1) brightness(.8); transition: filter .6s; }
body.pivot main { animation: pivot 1.6s ease-in-out; }
@keyframes pivot { 20% { transform: rotate(-2.5deg); } 45% { transform: rotate(2.5deg); } 70% { transform: rotate(-1.5deg); } 100% { transform: none; } }
.fire-flash { position: fixed; inset: 0; z-index: 98; pointer-events: none; background: radial-gradient(ellipse at 50% 110%, rgba(255,140,0,.95), rgba(255,40,0,.6) 45%, transparent 75%); animation: fire 1.4s ease-out forwards; }
@keyframes fire { 0% { opacity: 0; } 15% { opacity: 1; } 100% { opacity: 0; } }
.helmet-drop.flake { color: #e8f4ff; text-shadow: 0 0 6px rgba(255,255,255,.8); line-height: 1; filter: none; }
@media (prefers-reduced-motion: reduce) { .helmet-drop, .matrix-rain, body.hal::after, .fire-flash { display: none; } .banner { animation-duration: .01s; } body.pivot main { animation: none; } }

/* ---------- Easter eggs caches (emoji, noms des temoignages) ------------- */
.egg-ico { display: inline-block; position: relative; background: none; border: 0; padding: 0; margin: 0 .1em; font: inherit; font-size: .8em; line-height: 1; vertical-align: baseline; cursor: pointer; opacity: .28; filter: grayscale(1); transition: opacity .3s, filter .3s, transform .2s; -webkit-tap-highlight-color: transparent; }
.egg-ico::after { content: ""; position: absolute; inset: -12px; } /* zone tactile >= 40 px */
.egg-ico:hover, .egg-ico:focus-visible { opacity: 1; filter: none; transform: scale(1.25) rotate(-8deg); outline: none; }
.badge-card .barcode[data-egg] { cursor: pointer; }

.game-modal { position: fixed; inset: 0; z-index: 99; display: grid; place-items: center; padding: 1rem; background: rgba(5,8,12,.82); animation: gmin .3s ease; transition: opacity .4s; }
.game-modal.out { opacity: 0; }
@keyframes gmin { from { opacity: 0; } }
.gm-box { width: min(440px, 100%); max-height: calc(100dvh - 2rem); overflow: auto; background: var(--cream); color: var(--paper-ink); border: 3px solid var(--paper-ink); box-shadow: 10px 10px 0 var(--amber); padding: 1.4rem 1.3rem; text-align: center; font-family: var(--f-mono); animation: gmpop .35s cubic-bezier(.2,1.4,.4,1); }
@keyframes gmpop { from { transform: scale(.85); } }
.gm-box h3 { font-family: var(--f-display); font-weight: 400; font-size: clamp(1.6rem, 1.2rem + 2vw, 2.2rem); margin: .2rem 0 .4rem; text-transform: uppercase; color: var(--rust); }
.gm-sub { margin: 0 0 1rem; }
.gm-box .r { color: #c8231f; font-weight: 700; }
.gm-bell { font-size: 3rem; display: inline-block; animation: bell .4s ease-in-out 6; }
@keyframes bell { 25% { transform: rotate(18deg); } 75% { transform: rotate(-18deg); } }
.gm-votes { display: grid; grid-template-columns: 1fr 1fr; gap: .6rem; }
.gm-votes button, .gm-fix { font: inherit; font-weight: 700; min-height: 48px; padding: .6rem; border: 2px solid var(--paper-ink); background: #fff8e6; color: var(--paper-ink); border-radius: 3px; cursor: pointer; touch-action: manipulation; }
.gm-votes button.skip { background: transparent; }
.gm-votes button.pick { background: var(--paper-ink); color: var(--sun); }
.gm-votes button:disabled:not(.pick) { opacity: .45; }
.gm-timer { height: 6px; background: #d9c79c; margin: 1rem 0 .6rem; overflow: hidden; }
.gm-timer i { display: block; height: 100%; background: var(--red); transform-origin: left; animation: gmtimer linear forwards; }
@keyframes gmtimer { from { transform: scaleX(1); } to { transform: scaleX(0); } }
.gm-res { margin: 0; min-height: 2.6em; }




.watch-pop { position: fixed; right: max(1rem, env(safe-area-inset-right)); bottom: max(1rem, env(safe-area-inset-bottom)); z-index: 99; width: 170px; height: 170px; border-radius: 50%; border: 10px solid #23282d; background: #000; color: #fff; display: grid; place-items: center; padding: 0; cursor: pointer; box-shadow: 0 0 0 3px #555, 0 20px 50px rgba(0,0,0,.6); animation: wvib .09s linear 14, gmin .3s; font-family: var(--f-mono); transition: opacity .4s, transform .4s; }
.watch-pop.out { opacity: 0; transform: translateY(30px); }
@keyframes wvib { 50% { transform: translateX(3px) rotate(1deg); } }
.watch-pop .wf { display: grid; gap: .2rem; padding: 0 1rem; text-align: center; }
.watch-pop small { font-size: .62rem; letter-spacing: .2em; color: var(--amber); }
.watch-pop b { font-family: var(--f-cond); font-weight: 800; font-size: 1.1rem; }
.watch-pop em { font-style: normal; font-size: .62rem; color: #aaa; }
.watch-pop.crew { box-shadow: 0 0 0 3px #555, 0 0 40px rgba(97,232,198,.6); } .watch-pop.crew b { color: var(--teal); font-size: 1.4rem; }
.watch-pop.imp { box-shadow: 0 0 0 3px #555, 0 0 50px rgba(255,59,48,.8); animation: wvib .09s linear 24; } .watch-pop.imp b { color: var(--red); font-size: 1.25rem; }

.nfc-ping { position: fixed; z-index: 98; width: 20px; height: 20px; margin: -10px 0 0 -10px; border-radius: 50%; border: 3px solid var(--teal); pointer-events: none; animation: ping .9s ease-out forwards; }
@keyframes ping { to { transform: scale(9); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .watch-pop, .watch-pop.imp, .gm-bell { animation: none; } .nfc-ping { display: none; } }
@media (hover: none) { .egg-ico { opacity: .42; } } /* mobile : pas de survol pour les reperer */

/* Textes pieges : rien ne les distingue, sauf au survol */
.egg-txt { cursor: pointer; -webkit-tap-highlight-color: transparent; border-radius: 2px; }
.egg-txt:hover { text-decoration: underline dotted; text-underline-offset: 3px; }
.egg-txt:focus-visible { outline: 2px dashed var(--rust); outline-offset: 2px; }

/* Star Wars : texte deroulant */
.game-modal.sw { background: #000; padding: 0; overflow: hidden; cursor: pointer; }
.sw .gm-box { all: unset; position: absolute; inset: 0; display: block; perspective: 320px; overflow: hidden; background-image: radial-gradient(1px 1px at 12% 22%, #fff 50%, transparent), radial-gradient(1px 1px at 68% 12%, #fff 50%, transparent), radial-gradient(1px 1px at 82% 64%, #fff 50%, transparent), radial-gradient(1px 1px at 32% 78%, #fff 50%, transparent), radial-gradient(1px 1px at 52% 44%, #ddd 50%, transparent), radial-gradient(1px 1px at 90% 30%, #fff 50%, transparent); }
.sw-intro { position: absolute; inset: 0; display: grid; place-items: center; margin: 0; padding: 1.5rem; text-align: center; color: #4bd5ee; font-family: var(--f-cond); font-size: clamp(1.2rem, 1rem + 1.6vw, 2rem); animation: swintro 3.4s ease forwards; }
@keyframes swintro { 0% { opacity: 0; } 15%, 75% { opacity: 1; } 100% { opacity: 0; } }
.sw-crawl { position: absolute; inset: 0; transform-origin: 50% 100%; transform: rotateX(24deg); }
.sw-text { position: absolute; left: 50%; width: min(88vw, 620px); transform: translateX(-50%); top: 100%; color: #ffe81f; font-family: var(--f-cond); font-weight: 700; font-size: clamp(1.25rem, 1rem + 2.4vw, 2.3rem); line-height: 1.3; text-align: justify; animation: swcrawl 13s linear 3.2s forwards; }
.sw-text p { margin: 0 0 1.2em; }
.sw-ep, .sw-title { text-align: center; }
.sw-title { font-family: var(--f-display); font-weight: 400; font-size: 1.3em; }
@keyframes swcrawl { to { top: -190%; } }
.sw-skip { position: absolute; bottom: max(.8rem, env(safe-area-inset-bottom)); left: 0; right: 0; margin: 0; text-align: center; color: #666; font-family: var(--f-mono); font-size: .75rem; }

/* Matrix : pilules */
.pills .gm-box { background: #031210; color: #9fe8d6; border-color: #164a40; box-shadow: 10px 10px 0 #0a2d26; }
.pills .gm-box h3 { color: #3cff8f; }
.gm-votes button.blue { background: #1d4fa8; color: #fff; border-color: #0d2a5e; border-radius: 999px; }
.gm-votes button.red { background: #c8231f; color: #fff; border-color: #6e0f0c; border-radius: 999px; }

/* Harry Potter : Choixpeau */
.hat .gm-box { background: #2a1d12; color: #f0dfb8; border-color: #b08a3c; box-shadow: 10px 10px 0 #5a2a1a; }
.hat .gm-box h3 { color: #e3b54a; }
.hat-say { min-height: 3.2em; font-style: italic; }
.hat .verdict { display: block; font-family: var(--f-display); font-style: normal; font-size: 2rem; color: #e3b54a; animation: gmpop .4s cubic-bezier(.2,1.4,.4,1); }
.hat .verdict.r { color: #ff4a3d; }
.helmet-drop.letter { color: #f3e7cc; filter: drop-shadow(0 3px 3px rgba(0,0,0,.5)); line-height: 1; }

/* Friends : canape dans l'escalier */
.pivot-stage { position: fixed; inset: 0; z-index: 98; pointer-events: none; background: repeating-linear-gradient(160deg, rgba(11,16,22,.55) 0 38px, rgba(11,16,22,.75) 38px 76px); animation: fadeout 5.2s forwards; overflow: hidden; }
.pivot-stage .sofa { position: absolute; left: 50%; top: 55%; font-size: clamp(5rem, 3rem + 10vw, 9rem); line-height: 1; animation: sofa 4.6s ease-in-out forwards; }
@keyframes sofa { 0% { transform: translate(-150%, 60%) rotate(0); } 25% { transform: translate(-70%, 10%) rotate(-25deg); } 40% { transform: translate(-60%, 0) rotate(35deg); } 55% { transform: translate(-50%, -10%) rotate(-40deg); } 70%, 100% { transform: translate(-50%, -10%) rotate(80deg); } }
.pivot-stage .pv { position: absolute; font-family: var(--f-display); font-weight: 400; color: var(--sun); -webkit-text-stroke: 1px #0b1016; font-size: clamp(1.6rem, 1rem + 4vw, 3.4rem); opacity: 0; animation: pv .9s ease forwards; white-space: nowrap; }
.pivot-stage .p1 { left: 6%; top: 18%; animation-delay: .6s; } .pivot-stage .p2 { right: 6%; top: 30%; animation-delay: 1.4s; } .pivot-stage .p3 { left: 12%; top: 72%; animation-delay: 2.2s; }
.pivot-stage .p4 { left: 50%; bottom: 8%; transform: translateX(-50%); font-family: var(--f-mono); font-size: clamp(1rem, .8rem + 1.4vw, 1.6rem); color: var(--cream); -webkit-text-stroke: 0; animation-delay: 3.2s; }
@keyframes pv { 0% { opacity: 0; scale: .6; } 60% { opacity: 1; scale: 1.15; } 100% { opacity: 1; scale: 1; } }

/* Game of Thrones */
.banner.got { color: #e8f4ff; text-shadow: 0 0 30px rgba(160,210,255,.9), 0 4px 0 #1b2a3a; background: radial-gradient(circle, rgba(10,20,35,.2), rgba(10,20,35,.7)); font-size: clamp(2.4rem, 1.6rem + 6vw, 7rem); text-align: center; padding: 0 1rem; }

@media (prefers-reduced-motion: reduce) { .sw-text { animation: none; top: 8%; transform: translateX(-50%); } .sw-crawl { transform: none; } .sw-intro { display: none; } .pivot-stage .sofa { animation: none; transform: translate(-50%, -10%) rotate(20deg); } .pivot-stage .pv { animation-duration: .01s; } }
