/* Escape Game - extension phpBB */
.eg-wrap {
	--eg-ink: #1e1b2e;
	--eg-night: #17142a;
	--eg-night2: #2a2246;
	--eg-gold: #d9a441;
	--eg-ok: #2e8b57;
	--eg-err: #c0392b;
	--eg-warn: #d68910;
	--eg-info: #2874a6;
	--eg-radius: 10px;
	margin-bottom: 10px;
}
.eg-wrap *, .eg-wrap *::before, .eg-wrap *::after { box-sizing: border-box; }
.eg-topnav { display: flex; gap: 6px; flex-wrap: wrap; margin: 4px 0 12px; }
.eg-small { font-size: .9em; opacity: .8; }
.eg-center { text-align: center; }
.eg-right { text-align: right; }
.eg-u { text-decoration: underline; }
.eg-inline { display: inline-block; margin: 0; }
.eg-img { max-width: 100%; height: auto; border-radius: 6px; display: block; margin: 10px auto; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* Héros et filtres */
.eg-hero {
	background: radial-gradient(circle at 20% 0%, #4a3a7a 0%, var(--eg-night) 60%);
	color: #f3eefc; border-radius: var(--eg-radius); padding: 22px 24px; margin-bottom: 12px;
}
.eg-hero-title { color: #fff; font-size: 2em; margin: 0 0 6px; font-family: Georgia, "Times New Roman", serif; border: 0; }
.eg-hero-title .icon { color: var(--eg-gold); }
.eg-hero p { margin: 0; font-size: 1.15em; }
.eg-filters { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0 0 12px; }
.eg-filters select { margin-left: 4px; }
.eg-count { margin-left: auto; opacity: .75; }

/* Cartes */
.eg-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; margin-bottom: 14px; }
.eg-card { border-radius: var(--eg-radius); overflow: hidden; background: #fff; box-shadow: 0 2px 10px rgba(0,0,0,.12); display: flex; flex-direction: column; color: #333; }
.eg-card-cover {
	position: relative; display: block; height: 140px; background: linear-gradient(135deg, var(--eg-night2), var(--eg-night));
	background-size: cover; background-position: center; text-decoration: none !important;
}
.eg-card-cover::after { content: ""; position: absolute; inset: 0; background: linear-gradient(transparent 40%, rgba(0,0,0,.6)); }
.eg-card-theme { position: absolute; left: 12px; bottom: 10px; z-index: 1; color: #fff; font-weight: bold; text-shadow: 0 1px 3px #000; }
.eg-game-head .eg-card-theme { position: static; display: inline-block; margin-left: 8px; }
.eg-card-body { padding: 12px 14px; display: flex; flex-direction: column; flex: 1; }
.eg-card-body h3 { margin: 0 0 6px; font-size: 1.3em; border: 0; text-transform: none; font-family: Georgia, serif; }
.eg-card-summary { flex: 1; font-size: 1.05em; line-height: 1.45; }
.eg-card-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin: 10px 0 0; font-size: .95em; opacity: .9; }
.eg-badge { position: absolute; top: 10px; left: 10px; z-index: 1; padding: 3px 10px; border-radius: 20px; font-weight: bold; font-size: .9em; color: #fff; }
.eg-game-head .eg-badge { position: static; }
.eg-badge-beginner { background: #27ae60; }
.eg-badge-normal { background: #d68910; }
.eg-badge-expert { background: #b03a2e; }
.eg-status { position: absolute; top: 10px; right: 10px; z-index: 1; padding: 3px 10px; border-radius: 20px; font-size: .9em; background: rgba(255,255,255,.92); color: #222; }
.eg-status-won { color: var(--eg-ok); }
.eg-status-playing { color: var(--eg-info); }
.eg-meta { list-style: none; margin: 8px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 14px; }
.eg-meta-light { color: #e9e3f7; margin-top: 12px; }

/* Fiche jeu */
.eg-game-head {
	background: linear-gradient(135deg, var(--eg-night2), var(--eg-night)); background-size: cover; background-position: center;
	color: #fff; border-radius: var(--eg-radius); padding: 22px 24px; margin-bottom: 12px;
}
.eg-game-head h2 { color: #fff; font-size: 2.2em; margin: 10px 0 8px; font-family: Georgia, serif; border: 0; text-transform: none; }
.eg-game-summary { font-size: 1.15em; max-width: 760px; }
.eg-columns { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 12px; align-items: start; }
.eg-main { min-width: 0; }
.eg-aside h3, .eg-rules h3, .eg-side h3, .eg-share-title { margin-top: 0; }
.eg-start-panel .inner { font-size: 1.1em; }
.eg-start-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 8px; }
.eg-center.eg-start-actions { justify-content: center; }
.button.eg-btn-big { font-size: 1.25em; padding: 8px 18px; height: auto; }
.eg-won-note { color: var(--eg-ok); font-weight: bold; }
.eg-table { width: 100%; }
.eg-table td, .eg-table th { padding: 5px; }
.eg-rank { display: inline-block; min-width: 24px; height: 24px; line-height: 24px; text-align: center; border-radius: 50%; background: #ddd; color: #333; font-weight: bold; }
.eg-rank-1 { background: #f1c40f; }
.eg-rank-2 { background: #c0c6cc; }
.eg-rank-3 { background: #d4935a; color: #fff; }
.eg-top { list-style: none; margin: 0 0 8px; padding: 0; }
.eg-top li { padding: 4px 0; display: flex; align-items: center; gap: 8px; }
.eg-top-score { margin-left: auto; opacity: .8; }
tr.eg-me td { background: #fff4d6; }

/* Partie */
.eg-hud {
	position: sticky; top: 0; z-index: 20; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 20px;
	background: var(--eg-night); color: #eee; padding: 10px 14px; border-radius: var(--eg-radius); margin-bottom: 12px;
	box-shadow: 0 3px 12px rgba(0,0,0,.25);
}
.eg-hud-title { display: flex; flex-direction: column; }
.eg-hud-title strong { color: #fff; font-size: 1.1em; }
.eg-hud-title span { color: var(--eg-gold); }
.eg-hud-progress { flex: 1; min-width: 120px; display: flex; align-items: center; gap: 8px; }
.eg-progress { flex: 1; height: 8px; background: rgba(255,255,255,.15); border-radius: 8px; overflow: hidden; }
.eg-progress span { display: block; height: 100%; background: linear-gradient(90deg, var(--eg-gold), #f5d58a); transition: width .6s; }
.eg-hud-timer { display: flex; align-items: center; gap: 6px; font-variant-numeric: tabular-nums; }
.eg-timer-label { opacity: .7; font-size: .9em; }
.eg-timer { font-size: 1.5em; font-weight: bold; color: #fff; font-family: "Courier New", monospace; }
.eg-countdown.eg-hurry .eg-timer { color: #ff6b5b; animation: eg-pulse 1s infinite; }
.eg-hud-stats { display: flex; gap: 12px; }
.eg-hud-actions { display: flex; gap: 6px; margin-left: auto; }
@keyframes eg-pulse { 50% { opacity: .45; } }

.eg-feedback { padding: 10px 14px; border-radius: 8px; margin-bottom: 12px; font-weight: bold; font-size: 1.1em; border-left: 5px solid; }
.eg-feedback-success { background: #e6f5ec; border-color: var(--eg-ok); color: #1d6b40; }
.eg-feedback-error { background: #fbeaea; border-color: var(--eg-err); color: #922b21; animation: eg-shake .4s; }
.eg-feedback-warning { background: #fdf2e0; border-color: var(--eg-warn); color: #8a5a00; }
.eg-feedback-info { background: #e8f1f8; border-color: var(--eg-info); color: #1b4f72; }
@keyframes eg-shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }

.eg-intro .inner, .eg-story { font-size: 1.15em; line-height: 1.6; }
.eg-intro { border-left: 5px solid var(--eg-gold); }
.eg-room-title { font-family: Georgia, serif; font-size: 1.7em; margin-top: 0; text-transform: none; }
.eg-room-title span { color: var(--eg-gold); font-size: .65em; display: block; text-transform: uppercase; letter-spacing: 1px; }
.eg-room-new { animation: eg-fadein .9s; }
@keyframes eg-fadein { from { opacity: 0; transform: translateY(12px); } }
.eg-room-done > summary { cursor: pointer; padding: 6px 0; font-weight: bold; }
.eg-quote { border-left: 3px solid var(--eg-gold); margin: 8px 0; padding: 6px 12px; font-style: italic; background: rgba(0,0,0,.04); }
.eg-note { background: #fbf6e9; border: 1px dashed #c9a85a; padding: 10px 12px; margin: 8px 0; font-family: "Courier New", monospace; color: #4a3b1a; border-radius: 4px; }
.eg-code { font-family: "Courier New", monospace; background: rgba(0,0,0,.06); padding: 1px 5px; border-radius: 3px; letter-spacing: 1px; }
.eg-spoiler summary { cursor: pointer; }

.eg-enigma { border: 1px solid rgba(0,0,0,.12); border-radius: 8px; padding: 12px 14px; margin: 14px 0; background: rgba(255,255,255,.55); }
.eg-enigma h4 { margin: 0 0 8px; font-size: 1.2em; }
.eg-enigma h4 .fa-lock { color: var(--eg-warn); }
.eg-enigma.eg-solved { border-color: rgba(46,139,87,.4); background: rgba(46,139,87,.06); }
.eg-enigma.eg-solved h4 .icon { color: var(--eg-ok); }
.eg-enigma.eg-locked { opacity: .6; border-style: dashed; }
.eg-enigma.eg-focus { box-shadow: 0 0 0 2px var(--eg-gold); }
.eg-enigma-text { font-size: 1.08em; line-height: 1.55; }
.eg-tag { font-size: .7em; padding: 2px 8px; border-radius: 10px; vertical-align: middle; margin-left: 6px; }
.eg-tag-ok { background: var(--eg-ok); color: #fff; }
.eg-answer { display: flex; gap: 8px; margin-top: 10px; }
.eg-answer .inputbox { flex: 1; font-size: 1.15em; padding: 6px 10px; max-width: none; width: auto; }
.eg-btn-submit { font-size: 1.1em; height: auto; padding: 6px 16px; }
.eg-hint-form { margin-top: 6px; }
.eg-link-btn { background: none; border: 0; padding: 0; color: var(--eg-info); cursor: pointer; font-size: 1em; text-decoration: underline; }
.eg-hint { background: #fff8e1; border-left: 4px solid #f1c40f; padding: 8px 10px; margin: 8px 0; border-radius: 4px; color: #4d3d00; }
.eg-success { background: #eef8f1; border-left: 4px solid var(--eg-ok); padding: 8px 10px; margin: 8px 0; border-radius: 4px; color: #1d4a30; }
.eg-item-found { color: var(--eg-ok); font-weight: bold; margin: 6px 0 0; }

.eg-inventory { position: sticky; top: 90px; }
.eg-inventory ul { list-style: none; margin: 0; padding: 0; }
.eg-inventory li { border-bottom: 1px solid rgba(0,0,0,.08); padding: 6px 0; }
.eg-inventory summary { cursor: pointer; font-weight: bold; }
.eg-inventory summary .icon { color: var(--eg-gold); }
.eg-item-desc { padding: 6px 0 2px 22px; font-size: .98em; }

/* Résultat */
.eg-result .inner { text-align: center; padding: 20px; }
.eg-result h2 { font-size: 2em; font-family: Georgia, serif; border: 0; text-transform: none; }
.eg-result-won h2 { color: var(--eg-ok); }
.eg-result-lost h2 { color: var(--eg-err); }
.eg-result .eg-story { text-align: left; max-width: 720px; margin: 10px auto; }
.eg-result-game { font-size: 1.2em; opacity: .8; margin-top: 0; }
.eg-stats { display: flex; justify-content: center; flex-wrap: wrap; gap: 12px; margin: 18px 0; }
.eg-stats div { background: var(--eg-night); color: #fff; border-radius: 8px; padding: 10px 18px; min-width: 110px; }
.eg-stats span { display: block; font-size: .85em; opacity: .75; }
.eg-stats strong { font-size: 1.6em; color: var(--eg-gold); }
.eg-points-line { font-size: 1.15em; }

/* Bloc de recommandation : même ambiance que l'entête de l'extension */
.eg-wrap .eg-share.panel, .eg-share.panel {
	position: relative; overflow: hidden; margin-top: 12px; padding: 20px 24px; border: 0; border-radius: var(--eg-radius, 10px);
	background: radial-gradient(circle at 20% 0%, #4a3a7a 0%, #17142a 60%); color: #f3eefc;
	box-shadow: 0 6px 18px rgba(23, 20, 42, .25);
}
.eg-share.panel::after {
	content: '\f084'; font-family: FontAwesome; position: absolute; right: -10px; bottom: -34px; font-size: 150px; line-height: 1;
	color: #d9a441; opacity: .07; transform: rotate(-20deg); pointer-events: none;
}
.eg-share .inner { position: relative; z-index: 1; }
.eg-share.panel h3.eg-share-title {
	margin: 0 0 6px; padding: 0; border: 0; color: #fff; text-transform: none; letter-spacing: 0;
	font-family: Georgia, "Times New Roman", serif; font-size: 1.6em; font-weight: normal;
}
.eg-share-title .icon { color: #d9a441; }
.eg-share-intro { margin: 0 0 14px; font-size: 1.15em; color: #d9d2ec; }
.eg-share-buttons { display: flex; flex-wrap: wrap; gap: 8px; }
.eg-share-btn {
	--eg-brand: #6c757d;
	display: inline-flex; align-items: center; gap: 8px; padding: 5px 14px 5px 5px; border-radius: 22px; cursor: pointer;
	border: 1px solid rgba(255, 255, 255, .16); background: rgba(255, 255, 255, .07);
	color: #f3eefc !important; text-decoration: none !important; font-size: 1em; font-weight: bold; line-height: 1.2;
	transition: background .2s, border-color .2s, transform .2s, box-shadow .2s;
}
.eg-share-btn .icon {
	display: inline-flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 50%;
	background: var(--eg-brand); color: #fff; font-size: 14px;
}
.eg-share-btn:hover, .eg-share-btn:focus-visible {
	background: var(--eg-brand); border-color: var(--eg-brand); transform: translateY(-2px);
	box-shadow: 0 6px 14px rgba(0, 0, 0, .35); color: #fff !important;
}
.eg-share-btn:hover .icon, .eg-share-btn:focus-visible .icon { background: rgba(255, 255, 255, .2); }
.eg-share-whatsapp { --eg-brand: #25d366; }
.eg-share-email { --eg-brand: #6c757d; }
.eg-share-facebook { --eg-brand: #1877f2; }
.eg-share-messenger { --eg-brand: #0084ff; }
.eg-share-x { --eg-brand: #000; }
.eg-share-telegram { --eg-brand: #229ed9; }
.eg-share-linkedin { --eg-brand: #0a66c2; }
.eg-share-copy { --eg-brand: #8e44ad; }
.eg-share-native { --eg-brand: #d9a441; }
.eg-share-native .icon { color: #17142a; }
.eg-share-btn.eg-done { --eg-brand: #2e8b57; background: #2e8b57; border-color: #2e8b57; }
@media (max-width: 700px) {
	.eg-share.panel { padding: 16px; }
	.eg-share-buttons { display: grid; grid-template-columns: 1fr 1fr; }
	.eg-share-btn { justify-content: flex-start; }
}

@media (max-width: 900px) {
	.eg-columns { grid-template-columns: 1fr; }
	.eg-inventory { position: static; }
}
@media (max-width: 600px) {
	.eg-hero-title, .eg-game-head h2 { font-size: 1.6em; }
	.eg-hud { gap: 8px 12px; padding: 8px 10px; }
	.eg-hud-actions { margin-left: 0; }
	.eg-hud-actions .button span { display: none; }
	.eg-answer { flex-direction: column; }
	.eg-count { margin-left: 0; width: 100%; }
}

/* ==================================================================
 * Mode scène (point & click)
 * ================================================================== */
.egs { margin: 0 0 12px; }
.egs-frame {
	--egs-gold: #d9a441;
	position: relative; background: #0b0910; border-radius: 12px; overflow: hidden;
	box-shadow: 0 8px 30px rgba(0,0,0,.45); color: #eee6d6; font-size: 15px;
}
.egs-frame *, .egs-frame *::before, .egs-frame *::after { box-sizing: border-box; }
.egs-frame:fullscreen { border-radius: 0; display: flex; flex-direction: column; height: 100vh; width: 100vw; }
.egs-frame:fullscreen .egs-stage { flex: 1; aspect-ratio: auto; width: min(100vw, calc((100vh - 140px) * 16 / 9)); margin: 0 auto; max-height: calc(100vh - 140px); }

/* Barre du haut */
.egs-hud { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 18px; padding: 10px 14px; background: linear-gradient(#1b1626, #120e1a); border-bottom: 1px solid rgba(217,164,65,.25); }
.egs-hud-title { display: flex; flex-direction: column; min-width: 0; }
.egs-hud-title strong { color: #fff; font-family: Georgia, serif; font-size: 1.15em; }
.egs-room-name { color: var(--egs-gold); font-size: .9em; }
.egs-hud-progress { flex: 1; min-width: 110px; display: flex; align-items: center; gap: 8px; }
.egs-bar { flex: 1; height: 7px; background: rgba(255,255,255,.12); border-radius: 7px; overflow: hidden; }
.egs-bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--egs-gold), #f5d58a); transition: width .8s; }
.egs-hud-timer { display: flex; flex-direction: column; align-items: center; line-height: 1.1; }
.egs-timer-label { font-size: .75em; opacity: .7; text-transform: uppercase; letter-spacing: 1px; }
.egs-timer { font-family: "Courier New", monospace; font-size: 1.6em; font-weight: bold; color: #fff; font-variant-numeric: tabular-nums; }
.egs-hurry .egs-timer { color: #ff6b5b; animation: eg-pulse 1s infinite; }
.egs-hud-stats { display: flex; gap: 12px; }
.egs-hud-stats b { margin-left: 2px; }
.egs-hud-tools { display: flex; gap: 4px; margin-left: auto; }
.egs-tool { background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12); color: #eee6d6; border-radius: 8px; width: 36px; height: 34px; cursor: pointer; font-size: 15px; }
.egs-tool:hover, .egs-tool:focus-visible { background: rgba(217,164,65,.2); border-color: var(--egs-gold); color: #fff; outline: none; }
.egs-tool.egs-active { background: var(--egs-gold); color: #1a1208; }
.egs-tool-danger:hover { background: #8a2222; border-color: #c33; }

/* Scène */
.egs-stage { position: relative; width: 100%; aspect-ratio: 16 / 9; overflow: hidden; background: #000; user-select: none; }
.egs-scene { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; animation: egs-breathe 9s ease-in-out infinite alternate; }
@keyframes egs-breathe { from { filter: brightness(.96); } to { filter: brightness(1.04); } }
.egs-spots { position: absolute; inset: 0; }
.egs-spot {
	position: absolute; background: transparent; border: 2px solid transparent; border-radius: 10px; cursor: zoom-in; padding: 0;
	transition: border-color .2s, box-shadow .2s, background .2s;
}
.egs-spot-round { border-radius: 50%; }
.egs-spot:hover, .egs-spot:focus-visible, .egs-show-spots .egs-spot {
	border-color: rgba(255, 220, 140, .85); background: rgba(255, 220, 140, .08);
	box-shadow: 0 0 18px rgba(255, 200, 100, .45), inset 0 0 18px rgba(255, 200, 100, .25); outline: none;
}
.egs-show-spots .egs-spot { animation: egs-glow 1.6s ease-in-out infinite; }
@keyframes egs-glow { 50% { box-shadow: 0 0 6px rgba(255,200,100,.2), inset 0 0 6px rgba(255,200,100,.1); } }
.egs-spot-label {
	position: absolute; left: 50%; bottom: calc(100% + 6px); transform: translateX(-50%) translateY(4px); white-space: nowrap;
	background: rgba(12,9,16,.92); color: #f3e6c8; padding: 4px 10px; border-radius: 6px; font-size: 13px; font-weight: bold;
	border: 1px solid rgba(217,164,65,.5); opacity: 0; pointer-events: none; transition: opacity .15s, transform .15s;
}
.egs-spot:hover .egs-spot-label, .egs-spot:focus-visible .egs-spot-label, .egs-show-spots .egs-spot-label { opacity: 1; transform: translateX(-50%); }
.egs-spot-check { position: absolute; top: -10px; right: -10px; width: 24px; height: 24px; border-radius: 50%; background: #2e8b57; color: #fff; font-size: 12px; display: flex; align-items: center; justify-content: center; box-shadow: 0 2px 6px rgba(0,0,0,.5); }
.egs-spot-solved { cursor: pointer; }

/* Toast */
.egs-toast {
	position: absolute; left: 50%; bottom: 18px; transform: translate(-50%, 30px); opacity: 0; pointer-events: none;
	background: rgba(20,60,36,.95); color: #e9ffef; padding: 10px 18px; border-radius: 30px; font-weight: bold; border: 1px solid #4caf7a;
	box-shadow: 0 6px 20px rgba(0,0,0,.5); max-width: 90%; text-align: center;
}
.egs-toast-in { animation: egs-toast 3.6s ease forwards; }
@keyframes egs-toast { 10%, 85% { opacity: 1; transform: translate(-50%, 0); } 100% { opacity: 0; transform: translate(-50%, 10px); } }

/* Rideau entre deux salles */
.egs-curtain { position: absolute; inset: 0; background: #000; opacity: 0; pointer-events: none; transition: opacity .8s; z-index: 30; }
.egs-curtain-on { opacity: 1; }

/* Fenêtres */
.egs-modal, .egs-panel {
	position: absolute; inset: 0; z-index: 20; display: flex; align-items: center; justify-content: center; padding: 3%;
	background: rgba(5,3,8,.72); backdrop-filter: blur(3px); opacity: 0; transition: opacity .25s;
}
.egs-modal[hidden], .egs-panel[hidden] { display: none; }
.egs-modal.egs-in, .egs-panel.egs-in { opacity: 1; }
.egs-modal-box, .egs-panel-box {
	position: relative; width: min(760px, 100%); max-height: 100%; overflow: auto;
	background: linear-gradient(#f4ead2, #e6d6b0); color: #2b2014; border-radius: 10px; padding: 22px 26px;
	box-shadow: 0 20px 50px rgba(0,0,0,.6), inset 0 0 60px rgba(120,80,20,.25); border: 1px solid #b8955a;
	transform: scale(.96); transition: transform .25s;
}
.egs-in .egs-modal-box, .egs-in .egs-panel-box { transform: scale(1); }
.egs-panel-box { width: min(820px, 100%); font-size: 1.05em; }
.egs-close { position: absolute; top: 6px; right: 10px; background: none; border: 0; font-size: 30px; line-height: 1; color: #6b4a1a; cursor: pointer; }
.egs-close:hover { color: #000; }
.egs-title { font-family: Georgia, serif; font-size: 1.45em; margin: 0 30px 10px 0; color: #3a2510; border: 0; text-transform: none; }
.egs-room-title { font-family: Georgia, serif; font-size: 1.8em; margin: 0 0 10px; color: #3a2510; border: 0; text-transform: none; }
.egs-room-title small { display: block; font-size: .5em; letter-spacing: 2px; text-transform: uppercase; color: #9a6a1a; }
.egs-kicker { margin: 0; font-style: italic; color: #7a5a2a; }
.egs-text { line-height: 1.6; font-size: 1.05em; }
.egs-text p { margin: 0 0 8px; }
.egs-look + .egs-text { margin-top: 10px; padding-top: 10px; border-top: 1px dashed rgba(90,60,20,.35); }
.egs-intro { font-size: 1.12em; }
.egs-zoom {
	margin: 0 auto 14px; max-width: 100%; border-radius: 8px; background-repeat: no-repeat; background-color: #000;
	box-shadow: inset 0 0 40px rgba(0,0,0,.7), 0 3px 10px rgba(0,0,0,.35); border: 3px solid #6b4a1a;
}
.egs-zoom[hidden] { display: none; }
.egs-zoom-img, .egs-enigma-img { display: block; width: 100%; max-height: 320px; object-fit: contain; border-radius: 6px; }
.egs-modal-box .eg-note { background: #fbf6e9; }
.egs-modal-box .eg-quote, .egs-panel-box .eg-quote { background: rgba(90,60,20,.08); }
.egs-locked { margin-top: 12px; padding: 10px 12px; background: rgba(60,40,20,.12); border-radius: 6px; font-style: italic; }
.egs-hint { background: #fff3c4; border-left: 4px solid #e0b422; padding: 8px 10px; margin: 8px 0; border-radius: 4px; }
.egs-success { background: #e2f3e6; border-left: 4px solid #2e8b57; padding: 10px 12px; margin: 10px 0; border-radius: 4px; color: #1d4a30; }
.egs-solved-badge { display: inline-block; margin-top: 10px; background: #2e8b57; color: #fff; padding: 4px 12px; border-radius: 20px; font-weight: bold; }
.egs-new-item { color: #1d6b40; font-weight: bold; }
.egs-flash { animation: egs-flash 1.2s ease; }
@keyframes egs-flash { 0% { box-shadow: 0 0 0 0 rgba(46,139,87,.8); transform: scale(.98); } 60% { box-shadow: 0 0 0 10px rgba(46,139,87,0); transform: scale(1); } }
.egs-shake { animation: eg-shake .45s; }
.egs-center { text-align: center; }

/* Boutons */
.egs-btn {
	background: linear-gradient(#8a5a1a, #5a3a10); color: #fff7e0; border: 1px solid #3a2508; border-radius: 8px;
	padding: 9px 18px; font-size: 1.05em; font-weight: bold; cursor: pointer; box-shadow: 0 3px 0 #2a1a05;
}
.egs-btn:hover, .egs-btn:focus-visible { background: linear-gradient(#a06a22, #6a4612); outline: none; }
.egs-btn:active { transform: translateY(2px); box-shadow: 0 1px 0 #2a1a05; }
.egs-btn-big { font-size: 1.2em; padding: 11px 26px; margin-top: 8px; }
.egs-hint-btn { margin-top: 12px; background: none; border: 0; color: #7a4a0a; text-decoration: underline; cursor: pointer; font-size: .98em; padding: 0; }

/* Cadenas */
.egs-lock-wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 14px; margin: 16px 0 6px; }
.egs-wheels { display: flex; gap: 6px; padding: 10px 12px; background: linear-gradient(#c9a24a, #8a6a20); border-radius: 10px; box-shadow: inset 0 2px 6px rgba(0,0,0,.4), 0 4px 10px rgba(0,0,0,.3); }
.egs-wheel { display: flex; flex-direction: column; align-items: center; width: 46px; background: #1a120a; border-radius: 6px; color: #f3d27a; outline: none; box-shadow: inset 0 0 10px #000; }
.egs-wheel:focus-visible, .egs-wheel:focus { box-shadow: inset 0 0 10px #000, 0 0 0 3px #fff3c4; }
.egs-wheel button { background: none; border: 0; color: #c9a24a; cursor: pointer; width: 100%; padding: 3px 0; font-size: 12px; }
.egs-wheel button:hover { color: #fff; background: rgba(255,255,255,.08); }
.egs-wheel-val { font-family: "Courier New", monospace; font-size: 30px; font-weight: bold; line-height: 40px; display: block; }
.egs-roll { animation: egs-roll .15s ease; }
@keyframes egs-roll { from { transform: translateY(-8px); opacity: .3; } }
.egs-input { flex: 1; min-width: 200px; font-size: 1.2em; padding: 10px 12px; border: 2px solid #8a6a2a; border-radius: 8px; background: #fffaf0; color: #2b2014; }
.egs-input:focus { outline: none; border-color: #3a2510; box-shadow: 0 0 0 3px rgba(217,164,65,.35); }
.egs-keypad-display { display: flex; gap: 6px; justify-content: center; width: 100%; }
.egs-keypad-display span { width: 40px; height: 46px; border-radius: 6px; background: #1a120a; color: #f3d27a; font: bold 26px/46px "Courier New", monospace; text-align: center; box-shadow: inset 0 0 10px #000; }
.egs-keypad { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; width: 100%; }
.egs-key { min-width: 54px; height: 64px; border-radius: 8px; border: 1px solid #3a2508; background: linear-gradient(#fbf6ea, #d9c8a2); color: #2b2014; cursor: pointer; box-shadow: 0 4px 0 #8a6a2a; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.egs-key b { font-size: 1.4em; }
.egs-key small { font-size: .78em; color: #7a5a2a; }
.egs-key:active { transform: translateY(3px); box-shadow: 0 1px 0 #8a6a2a; }
.egs-key-clear { min-width: 80px; font-weight: bold; }
.egs-feedback { min-height: 1.4em; text-align: center; font-weight: bold; margin-top: 4px; }
.egs-fb-wrong { color: #a12a1a; }
.egs-fb-near { color: #a86a00; }
.egs-fb-info { color: #1b4f72; }

/* Inventaire */
.egs-inv { display: flex; align-items: center; gap: 12px; padding: 10px 14px; background: linear-gradient(#120e1a, #1b1626); border-top: 1px solid rgba(217,164,65,.25); min-height: 74px; overflow-x: auto; }
.egs-inv-title { color: var(--egs-gold); font-weight: bold; white-space: nowrap; text-transform: uppercase; font-size: .85em; letter-spacing: 1px; }
.egs-inv-slots { display: flex; gap: 8px; }
.egs-inv-empty { opacity: .6; font-style: italic; }
.egs-item {
	display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; width: 92px; height: 58px; flex: 0 0 auto;
	background: radial-gradient(circle at 50% 30%, #3a2f48, #1a1424); border: 1px solid rgba(217,164,65,.45); border-radius: 8px;
	color: #f3e6c8; cursor: pointer; padding: 4px;
}
.egs-item:hover, .egs-item:focus-visible { border-color: #ffd98a; box-shadow: 0 0 12px rgba(255,200,100,.4); outline: none; }
.egs-item-icon { color: var(--egs-gold); font-size: 20px; }
.egs-item-name { font-size: 11px; line-height: 1.1; text-align: center; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.egs-item-new { animation: egs-newitem 1.4s ease 2; }
@keyframes egs-newitem { 50% { box-shadow: 0 0 22px rgba(255,210,110,.9); transform: translateY(-4px); } }

@media (max-width: 760px) {
	.egs-frame { border-radius: 0; margin: 0 -10px; font-size: 14px; }
	.egs-hud { gap: 6px 10px; padding: 8px 10px; }
	.egs-hud-progress { order: 5; flex-basis: 100%; }
	.egs-hud-tools { margin-left: 0; }
	.egs-tool { width: 32px; height: 32px; }
	.egs-modal, .egs-panel { position: fixed; padding: 10px; z-index: 1000; }
	.egs-modal-box, .egs-panel-box { padding: 16px; max-height: 92vh; }
	.egs-wheel { width: 38px; }
	.egs-wheel-val { font-size: 24px; line-height: 34px; }
	.egs-spot-label { display: none; }
}
.eg-mirror { display: inline-block; transform: scaleX(-1); }

@media (min-width: 761px) {
	.egs-modal-box.egs-has-zoom { width: min(980px, 100%); display: grid; grid-template-columns: minmax(0, 38%) minmax(0, 1fr); gap: 0 24px; align-items: start; }
	.egs-has-zoom .egs-zoom { position: sticky; top: 0; margin: 0 auto; }
}

/* ==================================================================
 * 1.3.0 : animations de la scène et des actions
 * ================================================================== */
.egs-world { position: absolute; inset: 0; transform-origin: 50% 50%; }
.egs-world.egs-drift { animation: egs-drift 38s ease-in-out infinite alternate; }
@keyframes egs-drift { from { transform: scale(1.005) translate(0, 0); } to { transform: scale(1.045) translate(-.8%, -.5%); } }
.egs-fx, .egs-fx-canvas { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; overflow: hidden; container-type: size; }
.egs-fx-light { position: absolute; aspect-ratio: 1; transform: translate(-50%, -50%); mix-blend-mode: screen; border-radius: 50%; animation: egs-fx-flicker 2s ease-in-out infinite; will-change: opacity, transform; }
@keyframes egs-fx-flicker {
	0%, 100% { opacity: .85; transform: translate(-50%, -50%) scale(1); }
	12% { opacity: .65; transform: translate(-50%, -51%) scale(.96); }
	25% { opacity: 1; transform: translate(-50%, -50%) scale(1.03); }
	41% { opacity: .72; transform: translate(-51%, -50%) scale(.98); }
	55% { opacity: .95; }
	68% { opacity: .6; transform: translate(-50%, -50%) scale(.95); }
	83% { opacity: 1; transform: translate(-49%, -50%) scale(1.02); }
}
.egs-fx-glow { animation-name: egs-fx-glow; }
@keyframes egs-fx-glow { 0%, 100% { opacity: .55; transform: translate(-50%, -50%) scale(.97); } 50% { opacity: 1; transform: translate(-50%, -50%) scale(1.04); } }
.egs-fx-rays { position: absolute; mix-blend-mode: screen; filter: blur(6px); transform-origin: top center; animation: egs-fx-rays 9s ease-in-out infinite; -webkit-mask-image: linear-gradient(90deg, transparent, #000 25%, #000 75%, transparent); mask-image: linear-gradient(90deg, transparent, #000 25%, #000 75%, transparent); }
@keyframes egs-fx-rays { 0%, 100% { opacity: .55; } 50% { opacity: 1; } }
.egs-fx-fog { position: absolute; overflow: hidden; -webkit-mask-image: linear-gradient(180deg, transparent, #000 40%); mask-image: linear-gradient(180deg, transparent, #000 40%); }
.egs-fx-fog-layer { position: absolute; inset: 0 -100% 0 0; background-size: 50% 100%; background-repeat: repeat-x; animation: egs-fx-fog 70s linear infinite; }
@keyframes egs-fx-fog { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.egs-fx-float { position: absolute; mix-blend-mode: screen; -webkit-mask-image: radial-gradient(ellipse 50% 50% at 50% 50%, #000 40%, transparent 75%); mask-image: radial-gradient(ellipse 50% 50% at 50% 50%, #000 40%, transparent 75%); animation: egs-fx-float 7s ease-in-out infinite; }
@keyframes egs-fx-float { 0%, 100% { transform: translateY(0); opacity: .15; } 50% { transform: translateY(-2.5%); opacity: .85; } }
.egs-fx-flash { position: absolute; inset: 0; mix-blend-mode: screen; animation: egs-fx-flash 1.2s ease-out forwards; }
@keyframes egs-fx-flash { 0% { opacity: 0; } 4% { opacity: 1; } 10% { opacity: .1; } 16% { opacity: .8; } 30% { opacity: .15; } 100% { opacity: 0; } }
.egs-fx-ghost { position: absolute; aspect-ratio: 1 / 3; transform: translate(-50%, -50%); background-size: 100% 100%; mix-blend-mode: screen; animation: egs-fx-ghost 5s ease-in-out forwards; }
@keyframes egs-fx-ghost { 0% { opacity: 0; } 25% { opacity: .55; } 60% { opacity: .35; } 100% { opacity: 0; transform: translate(calc(-50% + var(--egs-dx, 6cqw)), -52%); } }
.egs-fx-drop { position: absolute; width: .35%; aspect-ratio: 1 / 1.6; border-radius: 50% 50% 50% 50% / 60% 60% 40% 40%; background: radial-gradient(circle at 40% 35%, rgba(230,240,255,.95), rgba(150,170,200,.5)); animation: egs-fx-drop .9s cubic-bezier(.5, 0, 1, .5) forwards; }
@keyframes egs-fx-drop { 0% { transform: translateY(0) scale(.3); opacity: 0; } 25% { transform: translateY(0) scale(1); opacity: 1; } 100% { transform: translateY(var(--egs-fall, 20cqh)); opacity: .8; } }

/* Passage d'une salle à l'autre : on s'avance vers la porte */
.egs-world.egs-walk { animation: none; transition: transform 1.3s cubic-bezier(.55, 0, .8, .45), filter 1.3s, opacity 1.3s; transform: scale(2.6); filter: blur(5px) brightness(.4); opacity: 0; }
.egs-world.egs-arrive { animation: egs-arrive 1.6s cubic-bezier(.2, .7, .3, 1); }
@keyframes egs-arrive { from { transform: scale(1.18); filter: blur(8px) brightness(.2); opacity: 0; } to { transform: scale(1.005); filter: none; opacity: 1; } }

/* Erreur : la scène tressaille et rougit */
.egs-hurt::after { content: ''; position: absolute; inset: 0; z-index: 25; pointer-events: none; box-shadow: inset 0 0 120px 30px rgba(170, 0, 0, .55); animation: egs-hurt .7s ease-out forwards; }
@keyframes egs-hurt { from { opacity: 1; } to { opacity: 0; } }
.egs-stage.egs-quake .egs-world { animation: egs-quake .4s linear; }
@keyframes egs-quake { 20% { transform: translate(-.6%, .3%) scale(1.02); } 40% { transform: translate(.5%, -.3%) scale(1.02); } 60% { transform: translate(-.4%, -.2%) scale(1.02); } 80% { transform: translate(.3%, .2%) scale(1.02); } }

/* Moins de 5 minutes : le cœur bat et les bords rougissent */
.egs-tension .egs-stage::before { content: ''; position: absolute; inset: 0; z-index: 4; pointer-events: none; box-shadow: inset 0 0 140px 20px rgba(150, 0, 0, .5); animation: egs-tension .95s ease-in-out infinite; }
@keyframes egs-tension { 0%, 100% { opacity: .25; } 15% { opacity: .9; } 30% { opacity: .4; } 45% { opacity: .8; } }

/* Cadenas ouvert : gerbe d'étincelles et objet qui vole vers l'inventaire */
.egs-burst { position: fixed; z-index: 100000; width: 0; height: 0; pointer-events: none; }
.egs-spark { position: absolute; aspect-ratio: 1; border-radius: 50%; box-shadow: 0 0 8px 2px rgba(255, 210, 120, .8); animation: egs-spark 1.1s cubic-bezier(.2, .8, .3, 1) forwards; }
@keyframes egs-spark { from { transform: translate(-50%, -50%) scale(1.4); opacity: 1; } to { transform: translate(calc(-50% + var(--dx)), calc(-50% + var(--dy) + 40px)) scale(.2); opacity: 0; } }
.egs-fly { position: fixed; z-index: 100000; pointer-events: none; transform: translate(-50%, -50%) scale(1.6); font-size: 28px; color: #ffd982; text-shadow: 0 0 12px rgba(255, 200, 90, .9); transition: transform .9s cubic-bezier(.5, -.3, .7, 1), opacity .9s; }
.egs-modal-box.egs-unlocked { animation: egs-unlocked 1s ease-out; }
@keyframes egs-unlocked { 0% { box-shadow: 0 0 0 0 rgba(255, 210, 110, .9); } 40% { box-shadow: 0 0 60px 18px rgba(255, 210, 110, .55); } 100% { box-shadow: 0 0 0 0 rgba(255, 210, 110, 0); } }
.egs-wheels.egs-wheels-ok .egs-wheel { animation: egs-wheel-ok .6s ease-out; border-color: #6fcf8e; }
@keyframes egs-wheel-ok { 50% { transform: translateY(-4px); box-shadow: 0 0 16px rgba(120, 230, 150, .8); } }

/* Victoire : la lumière envahit l'écran */
.egs-dawn { position: absolute; inset: 0; z-index: 60; pointer-events: none; background: radial-gradient(circle at 50% 55%, #fff8e6 0%, #ffe2a8 35%, rgba(255, 210, 140, 0) 75%); animation: egs-dawn 2.2s ease-in forwards; }
@keyframes egs-dawn { from { opacity: 0; transform: scale(.4); } to { opacity: 1; transform: scale(2.2); } }

/* Texte d'introduction révélé ligne par ligne */
.egs-reveal > * { opacity: 0; animation: egs-reveal 1.1s ease-out forwards; }
@keyframes egs-reveal { from { opacity: 0; filter: blur(6px); transform: translateY(8px); } to { opacity: 1; filter: none; transform: none; } }
.egs-reveal.egs-revealed > * { animation: none; opacity: 1; }
.egs-room-title { animation: egs-title 1.4s ease-out; }
@keyframes egs-title { from { letter-spacing: .35em; opacity: 0; filter: blur(4px); } to { letter-spacing: normal; opacity: 1; filter: none; } }

@media (prefers-reduced-motion: reduce) {
	.egs-world.egs-drift, .egs-fx-light, .egs-fx-rays, .egs-fx-fog-layer, .egs-fx-float, .egs-tension .egs-stage::before { animation: none !important; }
	.egs-world.egs-walk { transition: opacity .6s; transform: none; filter: none; }
	.egs-world.egs-arrive, .egs-reveal > *, .egs-room-title { animation: none !important; opacity: 1; }
}
.egs-tool.egs-off { opacity: .45; }

/* ==================================================================
 * 1.4.0 : blocs bleu nuit, badges, temps par énigme, notes, secrets
 * ================================================================== */

.eg-dark {
	position: relative; overflow: hidden; margin-bottom: 12px; padding: 16px 18px; border-radius: var(--eg-radius);
	background: radial-gradient(circle at 20% 0%, #4a3a7a 0%, var(--eg-night) 60%); color: #e9e4f7;
	box-shadow: 0 6px 18px rgba(23, 20, 42, .25);
}
.eg-dark h3 { color: #fff; margin: 0 0 10px; padding-bottom: 6px; border-bottom: 1px solid rgba(255,255,255,.14); font-family: Georgia, "Times New Roman", serif; text-transform: none; font-size: 1.3em; }
.eg-dark h3 .icon { color: var(--eg-gold); }
.eg-dark a, .eg-dark a.username { color: #f5d58a; }
.eg-dark a.username-coloured { filter: brightness(1.6) saturate(.8); }
.eg-dark p { margin: 0 0 6px; }
.eg-dark-count { float: right; font-family: inherit; font-size: .7em; opacity: .75; padding-top: 6px; }
.eg-dark-more { text-align: right; margin: 8px 0 0 !important; }
.eg-muted { opacity: .6; }
.eg-explain { opacity: .85; }

.eg-dark-table { width: 100%; border-collapse: collapse; }
.eg-dark-table th { text-align: left; font-weight: normal; font-size: .85em; text-transform: uppercase; letter-spacing: .5px; opacity: .65; padding: 4px 6px; }
.eg-dark-table td { padding: 6px; border-top: 1px solid rgba(255,255,255,.08); }
.eg-dark-table tr.eg-me td { background: rgba(217,164,65,.16); }
.eg-dark .eg-rank { background: rgba(255,255,255,.14); color: #fff; }
.eg-dark .eg-rank-1 { background: #f1c40f; color: #3a2a00; }
.eg-dark .eg-rank-2 { background: #c0c6cc; color: #222; }
.eg-dark .eg-rank-3 { background: #d4935a; color: #fff; }

/* Bloc meilleurs joueurs de la page d'accueil */
.eg-side.eg-dark .eg-top li { border-top: 1px solid rgba(255,255,255,.08); padding: 6px 0; }
.eg-side.eg-dark .eg-top li:first-child { border-top: 0; }
.eg-side.eg-dark .eg-top-score { color: var(--eg-gold); opacity: 1; }

/* Colonne de la fiche jeu */
.eg-aside { display: flex; flex-direction: column; gap: 0; }
.eg-erecords { list-style: none; margin: 0; padding: 0; }
.eg-erecords li { padding: 6px 0; border-top: 1px solid rgba(255,255,255,.08); display: flex; flex-direction: column; gap: 1px; }
.eg-erecords li:first-child { border-top: 0; }
.eg-erecord-title { font-weight: bold; color: #fff; }
.eg-erecord-holder .icon { color: var(--eg-gold); }
.eg-erecord-holder strong { color: var(--eg-gold); margin-left: 4px; }
.eg-erecord-me { font-size: .9em; color: #b9e6c9; }

/* Mode record, secrets */
.eg-record-note { color: #6c3fb0; font-weight: bold; margin: 4px 0; }
.eg-secret-note { color: #16876f; margin: 4px 0; }
.eg-record-banner { display: inline-block; margin: 6px auto 4px; padding: 8px 16px; border-radius: 30px; background: linear-gradient(90deg, #6c3fb0, #9b59b6); color: #fff; font-weight: bold; font-size: 1.1em; box-shadow: 0 4px 14px rgba(155,89,182,.4); }
.eg-record-banner.eg-record-miss { background: rgba(255,255,255,.1); box-shadow: none; font-weight: normal; }

/* Badges */
.eg-badges-block .eg-badge-list { grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); }
.eg-new-badges { max-width: 760px; margin: 14px auto; text-align: left; }
.eg-new-badges h3 { text-align: center; border: 0; color: var(--eg-gold); }
.eg-new-badges li { animation: eg-badge-in .7s cubic-bezier(.2,1.6,.4,1) both; }
.eg-new-badges li:nth-child(2) { animation-delay: .15s; }
.eg-new-badges li:nth-child(3) { animation-delay: .3s; }
.eg-new-badges li:nth-child(4) { animation-delay: .45s; }
@keyframes eg-badge-in { from { opacity: 0; transform: scale(.6) translateY(10px); } to { opacity: 1; transform: none; } }
.eg-row-badges { display: inline-flex; gap: 2px; vertical-align: middle; margin-left: 4px; }

/* Étoiles */
.eg-stars { position: relative; display: inline-block; font-family: FontAwesome; letter-spacing: 2px; color: rgba(255,255,255,.25); line-height: 1; }
.eg-stars::before { content: "\f005\f005\f005\f005\f005"; }
.eg-stars::after { content: "\f005\f005\f005\f005\f005"; position: absolute; left: 0; top: 0; width: var(--eg-pct, 0%); overflow: hidden; color: var(--eg-gold); white-space: nowrap; }
.eg-stars-line { margin: 6px 0 2px; display: flex; align-items: center; gap: 6px; }
.eg-stars-small { font-size: .9em; margin: -2px 0 6px; opacity: .9; }
.eg-card .eg-stars { color: #d8d3e4; }

.eg-rate-form { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.eg-rate-label { font-weight: bold; color: #fff; }
.eg-rate-stars { display: inline-flex; flex-direction: row; }
.eg-star { background: none; border: 0; padding: 2px 3px; cursor: pointer; font-size: 1.6em; color: rgba(255,255,255,.3); transition: transform .15s, color .15s; }
.eg-star.eg-on, .eg-rate-stars:hover .eg-star { color: var(--eg-gold); }
.eg-rate-stars .eg-star:hover ~ .eg-star { color: rgba(255,255,255,.3); }
.eg-star:hover { transform: scale(1.2); }
.eg-star:focus-visible { outline: 2px solid var(--eg-gold); border-radius: 4px; }
.eg-rate-msg { color: #b9e6c9; }
.eg-result .eg-rate { max-width: 760px; margin: 14px auto; background: rgba(0,0,0,.18); box-shadow: none; }
.eg-result .eg-rate-form { justify-content: center; }

/* Résultat en bleu nuit, comme l'entête */
.eg-result.panel { background: radial-gradient(circle at 20% 0%, #4a3a7a 0%, var(--eg-night) 60%); color: #e9e4f7; border-radius: var(--eg-radius); box-shadow: 0 6px 18px rgba(23,20,42,.25); }
.eg-result.panel .eg-story { color: #e9e4f7; }
.eg-result-won h2 { color: #f5d58a; }
.eg-result-lost h2 { color: #f1948a; }
.eg-result .eg-stats div { background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.12); }
.eg-result .eg-points-line, .eg-result .eg-result-game { color: #e9e4f7; }
.eg-result a:not(.button) { color: #f5d58a; }
.eg-splits { max-width: 760px; margin: 16px auto; text-align: left; background: rgba(0,0,0,.18); border-radius: var(--eg-radius); padding: 12px 14px; }
.eg-splits h3 { color: #fff; margin: 0 0 8px; border: 0; font-family: Georgia, serif; text-transform: none; }
.eg-splits h3 .icon, .eg-split-record { color: var(--eg-gold); }

/* Onglets du classement */
.eg-hero-small { padding-bottom: 0; }
.eg-tabs { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 14px; }
.eg-tab { padding: 8px 16px; border-radius: 10px 10px 0 0; color: #e9e4f7 !important; background: rgba(255,255,255,.08); text-decoration: none !important; }
.eg-tab:hover { background: rgba(255,255,255,.16); }
.eg-tab-on { background: #fff; color: var(--eg-night) !important; font-weight: bold; }
.eg-egrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.eg-ecard { background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.1); border-radius: 10px; padding: 10px 12px; }
.eg-ecard h4 { margin: 0 0 8px; color: #fff; font-size: 1.1em; }
.eg-etop { list-style: none; margin: 0; padding: 0; }
.eg-etop li { display: flex; align-items: center; gap: 6px; padding: 3px 4px; border-radius: 6px; }
.eg-etop li.eg-me { background: rgba(217,164,65,.18); }
.eg-etop-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.eg-etop strong { color: var(--eg-gold); font-variant-numeric: tabular-nums; }
.eg-room-num { display: inline-block; font-family: Verdana, sans-serif; font-size: .55em; text-transform: uppercase; letter-spacing: 1px; color: var(--eg-gold); vertical-align: middle; margin-right: 6px; }

/* Pendant le jeu : temps de l'énigme, record, secrets */
.egs-split {
	position: absolute; left: 50%; top: 18%; transform: translate(-50%, 0); z-index: 40; pointer-events: none;
	background: rgba(14,12,28,.9); color: #fff; border: 1px solid rgba(217,164,65,.6); border-radius: 30px;
	padding: 8px 18px; font-size: 1.05em; box-shadow: 0 6px 24px rgba(0,0,0,.5); white-space: nowrap;
	animation: egs-split-in 3.6s ease both;
}
.egs-split .icon { color: var(--eg-gold); }
.egs-split b { color: var(--eg-gold); }
.egs-split .egs-ahead { color: #7ee2a8; }
.egs-split .egs-behind { color: #f1948a; }
@keyframes egs-split-in { 0% { opacity: 0; transform: translate(-50%, -14px); } 10%, 82% { opacity: 1; transform: translate(-50%, 0); } 100% { opacity: 0; transform: translate(-50%, -8px); } }

.egs-secret { position: absolute; z-index: 6; cursor: zoom-in; border-radius: 50%; background: transparent; border: 0; padding: 0; }
.egs-secret::after {
	content: ""; position: absolute; left: 50%; top: 50%; width: 6px; height: 6px; margin: -3px; border-radius: 50%;
	background: #fff8d8; box-shadow: 0 0 6px 2px rgba(255,236,170,.75); opacity: 0;
	animation: egs-glint 7s ease-in-out infinite; animation-delay: var(--eg-delay, 0s);
}
.egs-secret:hover::after, .egs-secret:focus-visible::after { opacity: 1; animation: none; }
.egs-secret:focus-visible { outline: 2px dashed rgba(255,236,170,.8); }
.egs-secret.egs-found { cursor: pointer; }
.egs-secret.egs-found::after { opacity: .0; animation: none; }
@keyframes egs-glint { 0%, 88%, 100% { opacity: 0; transform: scale(.4); } 92% { opacity: 1; transform: scale(1.6); } 96% { opacity: .4; transform: scale(1); } }
.egs-secret-count { color: #8a6416; font-weight: bold; margin-top: 10px; }
.egs-secret-head { font-weight: bold; color: #1d6b40; }

.egs-badge-pop {
	position: absolute; right: 14px; bottom: 74px; z-index: 45; display: flex; pointer-events: none; align-items: center; gap: 10px;
	background: radial-gradient(circle at 20% 0%, #4a3a7a 0%, #17142a 70%); color: #fff; border-radius: 14px; padding: 10px 14px;
	box-shadow: 0 8px 30px rgba(0,0,0,.55), 0 0 0 1px rgba(217,164,65,.5); max-width: 300px;
	animation: egs-badge-pop 5s cubic-bezier(.2,1.4,.4,1) both;
}
.egs-badge-pop .eg-badge-medal { width: 44px; height: 44px; }
.egs-badge-pop small { display: block; opacity: .8; }
.egs-badge-pop em { display: block; font-style: normal; color: var(--eg-gold); font-size: .8em; text-transform: uppercase; letter-spacing: 1px; }
@keyframes egs-badge-pop { 0% { opacity: 0; transform: translateY(20px) scale(.8); } 8%, 88% { opacity: 1; transform: none; } 100% { opacity: 0; transform: translateY(10px); } }

@media (max-width: 700px) {
	.eg-dark-table th:nth-child(4), .eg-dark-table td:nth-child(4) { display: none; }
	.eg-ranking-table th:nth-child(5), .eg-ranking-table td:nth-child(5) { display: none; }
	.eg-tab { padding: 7px 10px; font-size: .95em; }
	.egs-split { font-size: .9em; top: 12%; }
	.egs-badge-pop { left: 10px; right: 10px; max-width: none; bottom: 64px; }
}
@media (prefers-reduced-motion: reduce) {
	.egs-secret::after { animation: none; opacity: .5; }
	.eg-new-badges li, .egs-badge-pop, .egs-split { animation-duration: .01s; }
}
/* Sur mobile, la fenêtre d'énigme occupe tout l'écran : les messages passent au-dessus */
@media (max-width: 760px) {
	.egs-split { position: fixed; top: 14px; z-index: 1001; white-space: normal; width: max-content; max-width: calc(100vw - 20px); text-align: center; }
	.egs-badge-pop { position: fixed; bottom: 16px; z-index: 1001; }
}
