/* Quizzo Games : styles propres aux jeux. S'appuie sur les variables et composants de front.css (Quizzo Engine). */
.qzg { --qzg-b: var(--qz-b, 2.5px solid var(--qz-ink, #3D1246)); --qzg-ink: var(--qz-ink, #3D1246); }

.qzg-how { font-size: 1.15rem; font-weight: 600; margin: 0 0 14px; color: var(--qzg-ink); }
.qzg-best { margin: -6px 0 14px; font-weight: 600; }
.qzg-best strong { color: var(--qz-accent, var(--qz-violet)); }

/* Barre du haut : score */
.qzg-pts { flex: none; min-width: 64px; padding: 6px 12px; border: var(--qzg-b); border-radius: 999px; background: var(--qz-yellow, #FFD23F); font-family: var(--qz-display); font-weight: 900; font-size: 1.15rem; line-height: 1; text-align: center; box-shadow: 3px 3px 0 var(--qzg-ink); }
.qzg-pts small { font-size: .7em; font-weight: 700; }
.qzg-pts.is-bump { animation: qzg-bump .45s ease; }
@keyframes qzg-bump { 40% { transform: scale(1.25) rotate(-4deg); background: var(--qz-mint, #22C38E); } }

/* Médias */
.qzg-media { margin: 0 0 18px; border: var(--qzg-b); border-radius: 18px; overflow: hidden; background: var(--qz-base); box-shadow: 4px 4px 0 var(--qzg-ink); }
.qzg-media img { display: block; width: 100%; max-height: 440px; object-fit: cover; }
.qzg-emoji { margin: 4px 0 20px; padding: 22px 16px; border: var(--qzg-b); border-radius: 18px; background: var(--qz-base); box-shadow: 4px 4px 0 var(--qzg-ink); text-align: center; font-size: clamp(2.8rem, 9vw, 4.6rem); line-height: 1.15; letter-spacing: .08em; word-break: break-word; }
.qzg-desc { margin: 0 0 18px; padding: 18px 20px; border: var(--qzg-b); border-radius: 18px; background: #fff; font-size: 1.2rem; font-weight: 600; line-height: 1.45; box-shadow: 4px 4px 0 var(--qzg-ink); }
.qzg-desc::before { content: '📸 '; }

/* Zoom / flou / pixels */
.qzg-zoom { margin: 0 0 18px; }
.qzg-zoom__frame { position: relative; aspect-ratio: 4 / 3; max-height: 460px; width: 100%; border: var(--qzg-b); border-radius: 18px; overflow: hidden; background: var(--qz-base); box-shadow: 4px 4px 0 var(--qzg-ink); }
.qzg-zoom__img, .qzg-zoom__canvas { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .7s cubic-bezier(.2,.8,.2,1), filter .7s ease, opacity .4s ease; user-select: none; -webkit-user-drag: none; }
.qzg-zoom__canvas { image-rendering: pixelated; z-index: 1; }
.qzg-zoom__bar { height: 10px; margin-top: 10px; border: 2px solid var(--qzg-ink); border-radius: 999px; background: #fff; overflow: hidden; }
.qzg-zoom__bar span { display: block; height: 100%; width: 0; background: var(--qz-accent, var(--qz-violet)); transition: width .5s ease; }

/* Indices */
.qzg-clues { list-style: none; margin: 0 0 14px; padding: 0; display: grid; gap: 8px; }
.qzg-clues:empty { display: none; }
.qzg-clues li { padding: 10px 14px; border: 2px solid var(--qzg-ink); border-radius: 12px; background: var(--qz-yellow, #FFD23F); font-weight: 600; font-size: 1.05rem; }
.qzg-clues li::before { content: '💡 '; }

/* Saisie */
.qzg-form { display: flex; gap: 10px; }
.qzg-input { flex: 1; min-width: 0; padding: 16px 18px; border: var(--qzg-b); border-radius: 16px; background: #fff; color: var(--qzg-ink); font: inherit; font-size: 1.25rem; font-weight: 700; box-shadow: 4px 4px 0 var(--qzg-ink); outline: none; }
.qzg-input:focus { background: var(--qz-lilac, #F1EBFF); }
.qzg-input.is-shake { animation: qzg-shake .4s; }
@keyframes qzg-shake { 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }
.qzg-form .qz-btn { flex: none; padding: 14px 22px; font-size: 1.15rem; }
.qzg-feedback { min-height: 1.6em; margin: 10px 2px 4px; font-weight: 700; font-size: 1.05rem; }
.qzg-feedback.is-close { color: #B26A00; }
.qzg-feedback.is-wrong { color: #D7263D; }

.qzg-tools { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.qzg-tool { display: inline-flex; align-items: center; gap: 6px; padding: 9px 14px; border: 2px solid var(--qzg-ink); border-radius: 999px; background: #fff; color: var(--qzg-ink); font: inherit; font-weight: 700; font-size: 1rem; cursor: pointer; box-shadow: 2px 2px 0 var(--qzg-ink); transition: transform .12s ease, box-shadow .12s ease; }
.qzg-tool small { font-weight: 600; opacity: .7; }
.qzg-tool:hover { transform: translate(-1px, -1px); box-shadow: 3px 3px 0 var(--qzg-ink); background: var(--qz-lilac, #F1EBFF); }
.qzg-tool--skip { margin-left: auto; background: transparent; box-shadow: none; border-color: transparent; text-decoration: underline; }
.qzg-tool--skip:hover { box-shadow: none; transform: none; background: transparent; }

/* Révélation */
.qzg-reveal { margin-top: 6px; }
.qzg-verdict { display: flex; align-items: center; gap: 16px; padding: 16px 18px; border: var(--qzg-b); border-radius: 18px; box-shadow: 4px 4px 0 var(--qzg-ink); margin-bottom: 14px; }
.qzg-verdict.is-ok { background: #C9F5E3; }
.qzg-verdict.is-ko { background: #FFD9DC; }
.qzg-verdict__badge { flex: none; display: grid; place-items: center; min-width: 64px; height: 64px; padding: 0 8px; border: var(--qzg-b); border-radius: 50%; background: #fff; font-family: var(--qz-display); font-weight: 900; font-size: 1.4rem; }
.qzg-verdict__kicker { margin: 0; font-weight: 700; font-size: .95rem; text-transform: uppercase; letter-spacing: .04em; }
.qzg-verdict__answer { margin: 2px 0 0; font-family: var(--qz-display); font-weight: 900; font-size: clamp(1.5rem, 3.4vw, 2rem); line-height: 1.1; }
.qzg-verdict--small .qzg-verdict__badge { min-width: 52px; height: 52px; font-size: 1.15rem; }
.qzg-verdict--small .qzg-verdict__answer { font-size: 1.35rem; }
.qzg-reveal__geo { margin: 12px 0 6px; font-size: 1.15rem; }
.qzg-reveal__place { margin: 6px 0; font-weight: 800; font-size: 1.15rem; }
.qzg-reveal__place::before { content: '📍 '; }
.qzg-reveal__fact { margin: 6px 0 12px; font-size: 1.1rem; line-height: 1.5; }
.qzg-credit { margin: 4px 0 14px; font-size: .85rem; opacity: .85; }
.qzg-next { width: 100%; margin-top: 8px; }

/* Carte */
.qzg-map__title { margin: 4px 0 10px; font-family: var(--qz-display); font-weight: 900; font-size: 1.35rem; }
.qzg-map__title span { display: block; font-family: inherit; font-weight: 600; font-size: 1rem; opacity: .8; }
.qzg-map { height: min(60vh, 420px); border: var(--qzg-b); border-radius: 18px; overflow: hidden; box-shadow: 4px 4px 0 var(--qzg-ink); margin-bottom: 12px; z-index: 0; cursor: crosshair; }
.qzg-map__err { padding: 20px; }
.qzg-pin { background: none; border: 0; }
.qzg-pin span { display: grid; place-items: center; width: 34px; height: 34px; border: 2.5px solid var(--qzg-ink); border-radius: 50% 50% 50% 0; transform: rotate(-45deg); font-weight: 900; box-shadow: 2px 2px 0 var(--qzg-ink); }
.qzg-pin--guess span { background: var(--qz-yellow, #FFD23F); }
.qzg-pin--true span { background: var(--qz-mint, #22C38E); color: #fff; }
.qzg-pin span { line-height: 1; }

/* Résultat */
.qzg-record { display: inline-block; margin: 0 0 12px; padding: 6px 14px; border: 2px solid var(--qzg-ink); border-radius: 999px; background: var(--qz-yellow, #FFD23F); font-weight: 800; transform: rotate(-2deg); }
.qzg-recap { list-style: none; margin: 18px 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; text-align: left; }
.qzg-recap li { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border: 2px solid var(--qzg-ink); border-radius: 12px; background: #fff; font-weight: 600; }
.qzg-recap li span { flex: none; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; color: #fff; font-weight: 900; }
.qzg-recap li.is-ok span { background: var(--qz-mint, #22C38E); }
.qzg-recap li.is-ko span { background: #D7263D; }
.qzg-recap li em { margin-left: auto; font-style: normal; font-weight: 800; }

/* Confettis */
.qzg { position: relative; }
.qzg-confetti { position: absolute; inset: 0; pointer-events: none; overflow: hidden; z-index: 5; }
.qzg-confetti i { position: absolute; top: -12px; width: 10px; height: 14px; border-radius: 2px; animation: qzg-fall linear forwards; }
@keyframes qzg-fall { to { top: 105%; transform: rotate(720deg) translateX(40px); } }

@media (max-width: 560px) {
	.qzg-form { flex-direction: column; }
	.qzg-form .qz-btn { width: 100%; }
	.qzg-tool--skip { margin-left: 0; }
	.qzg-verdict { gap: 12px; padding: 14px; }
}
@media (prefers-reduced-motion: reduce) {
	.qzg-zoom__img, .qzg-zoom__canvas { transition: none; }
	.qzg-input.is-shake { animation: none; }
}

/* Badge « Jeu » sur les cartes */
.qz-card__media { position: relative; }
.qz-card .qz-card__media .qzg-card__type { position: absolute; right: auto; width: auto; max-width: calc(100% - 20px); margin: 0; line-height: 1.3; white-space: nowrap; top: 10px; left: 10px; z-index: 2; padding: 4px 10px; border-radius: 999px; background: var(--qz-ink, #3D1246); color: #fff; font-weight: 800; font-size: .8rem; }
