/* NINOUMON : style du jeu (ninoumon/index.php). Les calques (dialogues, combats, panneaux)
   sont ajoutes au <body> par ninoumon/js/ninoumon.js, d'ou la palette declaree aussi sur .nm-calque. */
.nm-jeu, .nm-calque {
	--nm-fond: #1d2b45;
	--nm-carte: #fffdf6;
	--nm-texte: #2a2335;
	--nm-accent: #f2b31e;
	--nm-accent-fonce: #c98a00;
	--nm-bleu: #2f5fd0;
	--nm-danger: #d9432f;
	font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}
body.ninoumon-page { background: #1d2b45; }
body.nm-calque-ouvert { overflow: hidden; }

.nm-jeu { max-width: 1040px; margin: 0 auto; padding: 8px 8px 16px; color: #fff; }

.nm-hud { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; justify-content: center; padding: 6px 4px 8px; font-size: 0.95rem; }
.nm-hud-bloc { background: rgba(255,255,255,.1); border-radius: 999px; padding: 3px 12px; white-space: nowrap; }
.nm-hud-bloc i { color: var(--nm-accent); margin-right: 3px; }

.nm-cadre { position: relative; display: flex; justify-content: center; }
.nm-hud-bouton { border: none; background: rgba(255,255,255,.18); color: #fff; border-radius: 999px; padding: 3px 12px; font-weight: 600; font-size: .9rem; cursor: pointer; white-space: nowrap; }
.nm-hud-bouton:hover { background: rgba(255,255,255,.3); }
.nm-hud-bouton.actif { background: var(--nm-accent); color: #2a2335; }
/* Vue 3D : le jeu prend tout l'ecran ; barre fixe en haut (infos, plein ecran), image au milieu, barre fixe en bas (boutons). */
body.nm-vue3d { overflow: hidden; }
body.nm-vue3d .nm-jeu { position: fixed; inset: 0; z-index: 1040; max-width: none; margin: 0; padding: 0; display: flex; flex-direction: column; background: #1d2b45; }
body.nm-vue3d .nm-hud { flex: none; background: #141c30; padding: 6px 8px; box-shadow: 0 2px 8px rgba(0,0,0,.4); z-index: 1; }
body.nm-vue3d .nm-cadre { flex: 1 1 auto; min-height: 0; overflow: hidden; }
body.nm-vue3d .nm-carte { border-radius: 0; box-shadow: none; }
body.nm-vue3d .nm-barre { flex: none; background: #141c30; padding: 6px 8px; box-shadow: 0 -2px 8px rgba(0,0,0,.4); z-index: 1; }
body.nm-vue3d .nm-village { width: min(1100px, 100%); }
.nm-carte { display: block; border-radius: 50%; box-shadow: 0 0 0 4px rgba(255,255,255,.08), 0 12px 40px rgba(0,0,0,.45); cursor: pointer; touch-action: manipulation; background: #26609f; }

.nm-barre { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; padding-top: 10px; }

.nm-bouton { border: 2px solid rgba(0,0,0,.15); background: #fff; color: var(--nm-texte); border-radius: 12px; padding: 7px 14px; font-weight: 600; font-size: 0.95rem; cursor: pointer; line-height: 1.2; transition: transform .08s, box-shadow .15s; box-shadow: 0 3px 0 rgba(0,0,0,.18); }
.nm-bouton:hover { transform: translateY(-1px); }
.nm-bouton:active { transform: translateY(2px); box-shadow: 0 1px 0 rgba(0,0,0,.18); }
.nm-bouton:disabled { opacity: .5; cursor: default; transform: none; }
.nm-bouton.actif { background: var(--nm-accent); }
.nm-bouton-principal { background: var(--nm-accent); border-color: var(--nm-accent-fonce); }
.nm-bouton-danger { background: var(--nm-danger); border-color: #a92f20; color: #fff; }
.nm-bouton-petit { padding: 4px 10px; font-size: 0.85rem; }

/* Croix directionnelle : ecrans tactiles seulement */
.nm-pad { display: none; position: absolute; right: 6px; bottom: 6px; width: 132px; height: 132px; }
.nm-pad button { position: absolute; width: 44px; height: 44px; border-radius: 12px; border: none; background: rgba(255,255,255,.75); color: #2a2335; font-size: 1.1rem; box-shadow: 0 2px 6px rgba(0,0,0,.3); touch-action: none; }
.nm-pad-haut { left: 44px; top: 0; } .nm-pad-bas { left: 44px; bottom: 0; } .nm-pad-gauche { left: 0; top: 44px; } .nm-pad-droite { right: 0; top: 44px; }
@media (pointer: coarse) { .nm-pad { display: block; } }

.nm-toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 30px); background: #2a2335; color: #fff; padding: 10px 18px; border-radius: 14px; max-width: min(92vw, 520px); text-align: center; opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s; z-index: 1100; box-shadow: 0 6px 20px rgba(0,0,0,.35); }
.nm-toast.visible { opacity: 1; transform: translate(-50%, 0); }
.nm-toast.alerte { background: #8a2b1e; }

/* Calques */
.nm-calque { position: fixed; inset: 0; z-index: 1060; color: var(--nm-texte); }
.nm-dialogue-fond { background: rgba(10,15,30,.25); display: flex; align-items: flex-end; justify-content: center; padding: 16px; cursor: pointer; }
.nm-dialogue-fond.nm-centre { align-items: center; background: rgba(10,15,30,.55); cursor: default; }
.nm-dialogue { position: relative; width: min(760px, 100%); background: var(--nm-carte); border: 4px solid #2a2335; border-radius: 18px; padding: 14px 18px 12px; box-shadow: 0 10px 30px rgba(0,0,0,.4); min-height: 110px; display: flex; flex-direction: column; }
.nm-dialogue-image { position: absolute; right: 14px; top: -100px; }
.nm-dialogue-qui { font-weight: 800; color: var(--nm-bleu); margin-bottom: 4px; }
.nm-dialogue-texte { font-size: 1.1rem; line-height: 1.45; flex: 1; }
.nm-dialogue-suite { align-self: flex-end; font-size: .85rem; color: #8a7f95; animation: nm-clignote 1.2s infinite; }
@keyframes nm-clignote { 50% { opacity: .3; } }

.nm-question { background: var(--nm-carte); border: 4px solid #2a2335; border-radius: 18px; padding: 18px; width: min(460px, 100%); text-align: center; box-shadow: 0 10px 30px rgba(0,0,0,.4); max-height: 92vh; overflow: auto; }
.nm-question-image { display: block; margin: 0 auto 4px; }
.nm-question-texte { font-size: 1.08rem; line-height: 1.45; margin-bottom: 14px; }
.nm-question-boutons { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; }
.nm-petit { font-size: .88rem; color: #6b6178; margin-top: 4px; }
.nm-fin-titre { font-size: 1.6rem; font-weight: 800; color: var(--nm-accent-fonce); margin-bottom: 6px; }

.nm-starters { width: min(780px, 100%); }
.nm-starters-grille { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; }
.nm-starter { background: #fff; border: 3px solid #e4dcc8; border-radius: 16px; padding: 10px; cursor: pointer; transition: transform .1s, border-color .15s; }
.nm-starter:hover, .nm-starter:focus { transform: translateY(-3px); border-color: var(--nm-accent); outline: none; }

.nm-type { display: inline-block; color: #fff; font-size: .72rem; font-weight: 700; padding: 1px 8px; border-radius: 999px; text-shadow: 0 1px 1px rgba(0,0,0,.35); }
.nm-badge { display: inline-block; background: #ffe7a8; color: #7a5600; font-size: .72rem; font-weight: 700; padding: 1px 8px; border-radius: 999px; vertical-align: middle; }
.nm-badge-monture { background: #d6e6ff; color: #1f4d9a; }

/* Ecran titre */
.nm-titre-fond { background: radial-gradient(circle at 50% 40%, #3d5a99, #141d33 75%); display: flex; align-items: center; justify-content: center; padding: 16px; overflow: auto; }
.nm-titre { text-align: center; color: #fff; width: min(520px, 100%); }
.nm-titre-logo { font-size: clamp(2.6rem, 11vw, 4.6rem); font-weight: 900; letter-spacing: 3px; color: var(--nm-accent); text-shadow: 0 4px 0 #8a5a00, 0 8px 24px rgba(0,0,0,.5); }
.nm-titre-sous { font-size: 1.2rem; opacity: .9; margin-top: -4px; }
.nm-titre-images { display: flex; justify-content: center; align-items: flex-end; margin: 14px 0; }
.nm-titre-actions { display: flex; flex-direction: column; gap: 10px; align-items: center; background: rgba(255,255,255,.08); border-radius: 18px; padding: 16px; }
.nm-titre-actions .nm-petit { color: #dfe6f5; }
.nm-calque.nm-temps-fini { z-index: 3000; }
.nm-temps-fini .nm-titre-actions { font-size: 1.1rem; }
#nm-hud-temps.nm-hud-alerte { color: #ffb4a8; font-weight: 700; }
.nm-champ { width: 100%; max-width: 280px; border-radius: 12px; border: 2px solid #c9c0ad; padding: 8px 12px; font-size: 1.1rem; text-align: center; }

/* Combat */
.nm-combat-fond { background: rgba(10,15,30,.75); display: flex; align-items: center; justify-content: center; padding: 8px; }
.nm-combat { width: min(820px, 100%); background: var(--nm-carte); border: 4px solid #2a2335; border-radius: 20px; overflow: hidden; box-shadow: 0 14px 40px rgba(0,0,0,.5); display: flex; flex-direction: column; max-height: 96vh; }
.nm-cb-scene { position: relative; height: clamp(250px, 46vh, 380px); }
.nm-decor-prairie { background: linear-gradient(#a8dcff 0 45%, #9ad66a 45% 100%); }
.nm-decor-foret { background: linear-gradient(#8fc7a0 0 45%, #4f9a45 45% 100%); }
.nm-decor-eau { background: linear-gradient(#a8dcff 0 45%, #4a9be0 45% 100%); }
.nm-decor-montagne { background: linear-gradient(#cfe3f2 0 45%, #e8eef3 45% 100%); }
.nm-decor-cratere { background: linear-gradient(#2b2230 0 45%, #6a5d55 45% 100%); }
.nm-cb-e { position: absolute; right: 6%; top: 8%; }
.nm-cb-j { position: absolute; left: 6%; bottom: 2%; }
.nm-cb-e::after, .nm-cb-j::after { content: ""; display: block; height: 14px; margin: -18px auto 0; width: 80%; border-radius: 50%; background: rgba(0,0,0,.15); }
.nm-cb-fiche { position: absolute; background: rgba(255,253,246,.94); border: 3px solid #2a2335; border-radius: 14px; padding: 6px 10px; width: min(250px, 46%); }
.nm-cb-fiche-e { left: 4%; top: 6%; }
.nm-cb-fiche-j { right: 4%; bottom: 8%; }
.nm-cb-nom { font-weight: 800; font-size: 1rem; }
.nm-cb-niv { font-weight: 600; font-size: .82rem; color: #6b6178; }
.nm-cb-types { margin: 2px 0 4px; }
.nm-cb-chiffres { font-size: .82rem; text-align: right; color: #4a4155; }
.nm-barre-pv { height: 10px; background: #ddd5c4; border-radius: 6px; overflow: hidden; }
.nm-barre-pv div { height: 100%; transition: width .5s, background .5s; }
.nm-barre-xp { height: 5px; background: #ddd5c4; border-radius: 4px; overflow: hidden; margin-top: 4px; }
.nm-barre-xp div { height: 100%; background: #3f8ff0; transition: width .5s; }
.nm-cb-bas { border-top: 4px solid #2a2335; padding: 10px 12px 12px; cursor: pointer; }
.nm-cb-texte { font-size: 1.08rem; min-height: 1.6em; margin-bottom: 8px; }
.nm-cb-actions { display: grid; grid-template-columns: repeat(2, 1fr); gap: 6px; cursor: default; }
.nm-cb-actions:empty { display: none; }
.nm-att { text-align: left; display: flex; flex-direction: column; }
.nm-att-info { font-size: .75rem; font-weight: 500; color: #5d5468; }
.nm-carte-bestiole { flex-direction: row; align-items: center; gap: 8px; }
.nm-carte-bestiole .nm-visage { flex: 0 0 auto; border-radius: 50%; background: radial-gradient(circle at 40% 35%, #ffffff, #dde8f2); box-shadow: inset 0 0 0 2px rgba(0,0,0,.08); }
.nm-carte-bestiole:disabled .nm-visage { filter: grayscale(1); opacity: .6; }
.nm-carte-texte { display: flex; flex-direction: column; min-width: 0; flex: 1 1 auto; gap: 1px; }
.nm-carte-nom { font-weight: 700; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nm-carte-types .nm-type { font-size: .62rem; padding: 0 6px; }
.nm-carte-pv { display: block; height: 5px; border-radius: 3px; background: rgba(0,0,0,.12); overflow: hidden; margin-top: 2px; }
.nm-carte-pv i { display: block; height: 100%; border-radius: 3px; }
.nm-cb-secondaire { background: #efe9dc; }
@media (min-width: 640px) { .nm-cb-actions { grid-template-columns: repeat(4, 1fr); } .nm-cb-actions .nm-att { grid-column: span 2; } }
.nm-touche { animation: nm-touche .45s; }
@keyframes nm-touche { 0%, 100% { transform: translateX(0); opacity: 1; } 20% { transform: translateX(-8px); opacity: .4; } 40% { transform: translateX(8px); opacity: 1; } 60% { transform: translateX(-5px); opacity: .5; } 80% { transform: translateX(4px); } }

/* Panneaux */
.nm-panneau-fond { background: rgba(10,15,30,.6); display: flex; align-items: center; justify-content: center; padding: 10px; }
.nm-panneau { background: var(--nm-carte); border: 4px solid #2a2335; border-radius: 18px; width: min(760px, 100%); max-height: 94vh; display: flex; flex-direction: column; box-shadow: 0 10px 30px rgba(0,0,0,.45); }
.nm-panneau-tete { display: flex; align-items: center; justify-content: space-between; padding: 10px 14px; border-bottom: 3px solid #e4dcc8; }
.nm-panneau-tete h2 { font-size: 1.3rem; margin: 0; font-weight: 800; }
.nm-fermer { border: none; background: #efe9dc; border-radius: 10px; width: 38px; height: 38px; font-size: 1.1rem; cursor: pointer; }
.nm-panneau-corps { padding: 12px 14px 16px; overflow: auto; }
.nm-sous-titre { font-size: 1.05rem; font-weight: 800; margin: 16px 0 6px; }
.nm-fiche { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; background: #fff; border: 2px solid #e4dcc8; border-radius: 14px; padding: 8px 10px; margin-bottom: 8px; }
.nm-fiche-image { flex: none; }
.nm-fiche-info { flex: 1; min-width: 200px; }
.nm-fiche-nom { font-weight: 800; }
.nm-fiche-att { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 5px; }
.nm-fiche-att span { font-size: .75rem; border: 2px solid; border-radius: 8px; padding: 0 6px; background: #faf7ef; }
.nm-fiche-boutons { display: flex; flex-direction: column; gap: 5px; }
.nm-menu-boutons { display: flex; flex-direction: column; gap: 8px; max-width: 360px; }
.nm-carnet { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 8px; }
.nm-carnet-case { background: #f3eee2; border-radius: 12px; padding: 6px; text-align: center; font-size: .82rem; }
.nm-carnet-case.pris { background: #fff; border: 2px solid #e4dcc8; }
.nm-carnet-case canvas { display: block; margin: 0 auto; }
.nm-carnet-inconnu { height: 76px; line-height: 76px; font-size: 2rem; font-weight: 900; color: #c9c0ad; }
.nm-carnet-nom { font-weight: 700; }
.nm-carnet-desc { font-size: .72rem; color: #6b6178; }

/* Dialogues : bouton pour passer toute la conversation */
.nm-dialogue-passer { position: absolute; right: 12px; bottom: -40px; border: none; background: rgba(255,255,255,.92); color: var(--nm-texte); border-radius: 999px; padding: 5px 14px; font-weight: 700; font-size: .85rem; box-shadow: 0 3px 10px rgba(0,0,0,.3); cursor: pointer; }
.nm-dialogue-fond { padding-bottom: 54px; }

/* Combat : calcul des degats, vitesse, elan, animations */
.nm-cb-calcul { font-size: .78rem; color: #6b6178; min-height: 1.1em; margin: -4px 0 6px; font-variant-numeric: tabular-nums; }
.nm-cb-calcul:empty { display: none; }
.nm-cb-vit { font-size: .72rem; color: #6b6178; margin-bottom: 2px; }
.nm-cb-vit i { color: #e0a800; }
.nm-cb-fx { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 3; }
.nm-elan-j { animation: nm-elan-j .45s; }
.nm-elan-e { animation: nm-elan-e .45s; }
@keyframes nm-elan-j { 40% { transform: translate(40px, -24px); } }
@keyframes nm-elan-e { 40% { transform: translate(-40px, 24px); } }
.nm-decor-marais { background: linear-gradient(#b9d6c0 0 45%, #7f9e5c 45% 100%); }
.nm-etoiles { color: #e0a800; font-size: .8em; letter-spacing: -1px; white-space: nowrap; }

/* Fiches : statistiques et badges */
.nm-stats { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 5px; }
.nm-stat { font-size: .72rem; background: #f1ecdf; border-radius: 8px; padding: 1px 7px; }
.nm-stat b { font-size: .8rem; }
.nm-badge-pas-encore { opacity: .6; }
.nm-badge-ko { background: #f6c6bd; color: #8a2b1e; }
.nm-baie-icone { flex: none; width: 52px; height: 52px; border-radius: 50%; display: flex; align-items: center; justify-content: center; color: #fff; font-size: 1.4rem; box-shadow: inset 0 -4px 0 rgba(0,0,0,.15); }
.nm-exige { font-size: .85rem; margin-top: 3px; }
.nm-exige.ok { color: #2e8a3e; }
.nm-exige.non { color: #b8322a; }
.nm-regles { background: #f6f1e4; border-radius: 12px; padding: 8px 12px; margin-bottom: 10px; font-size: .9rem; display: flex; flex-direction: column; gap: 3px; }

/* Village (sous-carte) */
.nm-village-fond { background: rgba(10,15,30,.65); display: flex; align-items: center; justify-content: center; padding: 10px; }
.nm-village { background: var(--nm-carte); border: 4px solid #2a2335; border-radius: 18px; width: min(560px, 100%); max-height: 96vh; overflow: auto; box-shadow: 0 10px 30px rgba(0,0,0,.45); display: flex; flex-direction: column; align-items: center; }
.nm-village .nm-panneau-tete { width: 100%; gap: 8px; }
.nm-village-argent { margin-left: auto; font-weight: 700; white-space: nowrap; }
.nm-village-argent i { color: var(--nm-accent-fonce); }
.nm-village-carte { display: block; margin: 8px auto 4px; border-radius: 12px; cursor: pointer; touch-action: manipulation; }
.nm-village-boutons { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; padding: 6px 10px 2px; }
.nm-village-aide { padding: 0 10px 10px; text-align: center; }

/* Enigmes des temples (ninoumon/js/enigmes.js) */
.nm-enigme-compteur { margin-left: auto; font-weight: 700; white-space: nowrap; font-size: .9rem; font-variant-numeric: tabular-nums; }
.nm-enigme-regle { background: #f6f1e4; border-radius: 12px; padding: 8px 12px; margin: 8px 10px 0; font-size: .9rem; align-self: stretch; }
.nm-enigme-zone { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 10px; width: 100%; }
.nm-enigme-canvas { display: block; border-radius: 10px; touch-action: manipulation; cursor: pointer; box-shadow: 0 3px 10px rgba(0,0,0,.25); }
.nm-enigme-msg { min-height: 1.4em; padding: 0 12px; text-align: center; font-weight: 600; font-size: .92rem; }
.nm-enigme-alerte { color: #b0402e; }
.nm-enigme-bon { color: #2f8a3a; }
.nm-enigme-boutons { padding-bottom: 12px; }
.nm-enigme-gagnee { animation: nm-gagne .6s ease-in-out 2; }
@keyframes nm-gagne { 50% { transform: scale(1.03); box-shadow: 0 0 0 6px #ffd23a, 0 10px 30px rgba(0,0,0,.45); } }
.nm-enigme-pad { display: grid; grid-template-columns: repeat(3, 46px); grid-template-rows: repeat(2, 40px); gap: 4px; }
.nm-enigme-pad button { border: none; border-radius: 10px; background: #2a2335; color: #fff; font-size: 1.1rem; cursor: pointer; touch-action: manipulation; }
.nm-enigme-pad [data-d="haut"] { grid-column: 2; grid-row: 1; }
.nm-enigme-pad [data-d="gauche"] { grid-column: 1; grid-row: 2; }
.nm-enigme-pad [data-d="bas"] { grid-column: 2; grid-row: 2; }
.nm-enigme-pad [data-d="droite"] { grid-column: 3; grid-row: 2; }
.nm-torches { display: grid; gap: 8px; width: min(320px, 100%); }
.nm-torche { aspect-ratio: 1; border: 3px solid #2a2335; border-radius: 12px; background: #3a3346; display: flex; flex-direction: column; align-items: center; justify-content: center; cursor: pointer; transition: background .2s; padding: 0; }
.nm-torche-flamme { font-size: 1.7rem; color: #5d566a; transition: color .2s, transform .2s; }
.nm-torche-pied { width: 10px; height: 16px; background: #7a5230; border-radius: 3px; }
.nm-torche.allumee { background: #5a3b2a; }
.nm-torche.allumee .nm-torche-flamme { color: #ffb52e; transform: scale(1.15); text-shadow: 0 0 12px #ff8a1e; animation: nm-flamme 1s ease-in-out infinite alternate; }
@keyframes nm-flamme { to { transform: scale(1.25) rotate(4deg); color: #ffd23a; } }
.nm-memoire { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; width: min(300px, 100%); }
.nm-pierre { aspect-ratio: 1; border: 4px solid #2a2335; border-radius: 50%; background: var(--pierre); opacity: .45; cursor: pointer; transition: opacity .12s, transform .12s; }
.nm-pierre.chante { opacity: 1; transform: scale(1.08); box-shadow: 0 0 22px var(--pierre); }
.nm-devinette { text-align: center; width: 100%; }
.nm-devinette-q { font-size: 1.1rem; font-weight: 700; margin: 4px 0 12px; }
.nm-code { width: 100%; }
.nm-code-indices { margin: 0 0 12px; padding-left: 26px; font-size: .92rem; }
.nm-code-indices li { margin-bottom: 4px; }
.nm-code-roues { display: flex; justify-content: center; gap: 10px; }
.nm-code-roue { display: flex; flex-direction: column; align-items: center; background: #2a2335; border-radius: 12px; padding: 4px; }
.nm-code-roue button { border: none; background: transparent; color: #fff; font-size: 1.1rem; width: 44px; height: 34px; cursor: pointer; }
.nm-code-roue span { background: #f6f1e4; color: #2a2335; font-size: 1.8rem; font-weight: 800; width: 44px; text-align: center; border-radius: 8px; font-variant-numeric: tabular-nums; }

/* Ecran de fin : BRAVO */
.nm-bravo-fond { background: radial-gradient(circle at 50% 30%, #3b2a6a, #120c24 75%); display: flex; align-items: center; justify-content: center; padding: 12px; overflow: auto; }
.nm-bravo-feu { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.nm-bravo { position: relative; background: rgba(255,250,238,.96); border: 4px solid #ffd23a; border-radius: 22px; padding: 18px 20px; width: min(520px, 100%); text-align: center; box-shadow: 0 0 40px rgba(255,210,58,.5); max-height: 96vh; overflow: auto; }
.nm-bravo-mot { font-size: clamp(2.6rem, 12vw, 4.4rem); font-weight: 900; letter-spacing: .04em; line-height: 1; color: #e9a23b; -webkit-text-stroke: 2px #6a3a10; }
.nm-bravo-mot span { display: inline-block; animation: nm-saut 1.1s ease-in-out infinite; }
@keyframes nm-saut { 0%, 100% { transform: translateY(0); } 30% { transform: translateY(-14px) rotate(-4deg); color: #e0442e; } 60% { transform: translateY(0); } }
.nm-bravo-fin { font-weight: 800; letter-spacing: .12em; color: #3b2a6a; margin: 8px 0 6px; }
.nm-bravo-texte { margin-bottom: 8px; line-height: 1.45; }
.nm-bravo-images { display: flex; flex-wrap: wrap; justify-content: center; gap: 2px; margin-bottom: 6px; }
.nm-bravo-stats { display: flex; flex-direction: column; gap: 6px; text-align: left; margin: 6px 0 10px; }
.nm-bravo-ligne { display: grid; grid-template-columns: 1fr auto; gap: 2px 8px; font-size: .9rem; }
.nm-bravo-ligne i { color: #e9a23b; width: 1.2em; text-align: center; }
.nm-bravo-barre { grid-column: 1 / -1; height: 7px; background: #e8dfcb; border-radius: 4px; overflow: hidden; }
.nm-bravo-barre span { display: block; height: 100%; background: linear-gradient(90deg, #5fb648, #ffd23a); }
.nm-bravo .nm-question-boutons { margin-top: 12px; }

/* Decors de combat plus detailles : ciel en degrade, soleil ou lune, nuages, relief, et une estrade sous chaque Ninoumon */
.nm-cb-scene { overflow: hidden; }
.nm-decor-prairie { background:
	radial-gradient(circle at 84% 16%, #fff6b8 0 22px, rgba(255,246,184,.45) 23px 34px, transparent 35px),
	radial-gradient(ellipse 70px 16px at 22% 18%, rgba(255,255,255,.95) 60%, transparent 62%),
	radial-gradient(ellipse 46px 12px at 30% 13%, rgba(255,255,255,.95) 60%, transparent 62%),
	radial-gradient(ellipse 60% 22% at 20% 47%, #7cc05a 60%, transparent 61%),
	radial-gradient(ellipse 55% 20% at 85% 47%, #86c862 60%, transparent 61%),
	linear-gradient(#7cc4f5, #cfeeff 45%, #a6dc74 45%, #79bd4f 100%); }
.nm-decor-foret { background:
	radial-gradient(circle at 12% 40%, #2c6a26 0 34px, transparent 35px),
	radial-gradient(circle at 26% 36%, #357a30 0 40px, transparent 41px),
	radial-gradient(circle at 78% 38%, #2a6224 0 38px, transparent 39px),
	radial-gradient(circle at 92% 42%, #357a30 0 30px, transparent 31px),
	linear-gradient(#a8d8b4, #d8eedb 45%, #5aa34e 45%, #3d7f37 100%); }
.nm-decor-eau { background:
	radial-gradient(circle at 84% 16%, #fff6b8 0 20px, transparent 21px),
	repeating-linear-gradient(170deg, rgba(255,255,255,0) 0 18px, rgba(255,255,255,.16) 18px 21px),
	linear-gradient(#8fd0ff, #dff3ff 45%, #5aaae6 45%, #2f74bd 100%); }
.nm-decor-marais { background:
	radial-gradient(ellipse 60px 10px at 30% 70%, rgba(70,120,140,.55) 60%, transparent 62%),
	radial-gradient(ellipse 80px 12px at 75% 85%, rgba(70,120,140,.5) 60%, transparent 62%),
	linear-gradient(#b9d6c0, #e2efe5 45%, #8aa866 45%, #6d8c4d 100%); }
.nm-decor-montagne { background:
	radial-gradient(ellipse 40% 30% at 18% 46%, #b7c3cc 60%, transparent 61%),
	radial-gradient(ellipse 34% 34% at 70% 46%, #a3b0ba 60%, transparent 61%),
	radial-gradient(ellipse 20% 14% at 70% 22%, #ffffff 60%, transparent 61%),
	linear-gradient(#bcd9ef, #eef6fb 45%, #eef3f7 45%, #d3dfe8 100%); }
.nm-decor-cratere { background:
	radial-gradient(circle at 80% 18%, #ffd27a 0 16px, rgba(255,140,60,.35) 17px 30px, transparent 31px),
	radial-gradient(ellipse 50% 18% at 50% 46%, rgba(255,110,40,.35) 40%, transparent 70%),
	linear-gradient(#2b2230, #5a3a3a 45%, #6a5d55 45%, #4a403a 100%); }
.nm-cb-e::after, .nm-cb-j::after { height: 22px; margin-top: -22px; width: 90%; background: radial-gradient(ellipse at 50% 40%, rgba(255,255,255,.35), rgba(0,0,0,.08) 55%, rgba(0,0,0,.22) 100%); box-shadow: 0 3px 0 rgba(0,0,0,.12); }
/* Combats dans les galeries souterraines */
.nm-decor-grotte { background:
	radial-gradient(circle at 14% 20%, #7ad0e8 0 3px, rgba(122,208,232,.25) 4px 12px, transparent 13px),
	radial-gradient(circle at 86% 30%, #7ad0e8 0 2px, rgba(122,208,232,.25) 3px 10px, transparent 11px),
	radial-gradient(ellipse 60% 30% at 50% 60%, rgba(255,220,150,.22) 30%, transparent 70%),
	linear-gradient(#120d0a, #3a2e24 45%, #5c4a38 45%, #2e241c 100%); }

/* Parties sauvegardees (ecran titre et Menu) */
.nm-parties { display: flex; flex-direction: column; gap: 8px; width: 100%; margin: 6px 0; }
.nm-partie { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 12px; background: rgba(127,127,127,.12); border: 2px solid rgba(127,127,127,.2); text-align: left; }
.nm-partie-en-cours { border-color: var(--nm-accent); }
.nm-partie-info { flex: 1; min-width: 0; display: flex; flex-direction: column; overflow-wrap: anywhere; }
.nm-partie-info .fa-trophy { color: var(--nm-accent); }
.nm-partie-boutons { display: flex; gap: 6px; flex-shrink: 0; align-items: center; }
.nm-titre-actions .nm-partie b { color: #fff; }
.nm-bouton:disabled { opacity: .5; cursor: not-allowed; }
@media (max-width: 420px) { .nm-partie { flex-direction: column; align-items: stretch; } .nm-partie-boutons { justify-content: flex-end; } }

/* Combat : boutons figes entre deux choix (visibles, inactifs, le toucher passe au travers pour faire avancer le combat) */
.nm-cb-fige button { pointer-events: none; opacity: .45; box-shadow: none; }

/* Nouvelles enigmes (2026-12-02) : quiz, silhouette, taquin, balance */
.nm-quiz-theme { display: inline-block; background: #2a2335; color: #fff; border-radius: 999px; padding: 2px 12px; font-size: .8rem; font-weight: 700; margin-bottom: 6px; }
.nm-quiz-choix .nm-bouton:disabled { opacity: .55; cursor: default; }
.nm-bouton.nm-quiz-bon, .nm-bouton.nm-quiz-bon:disabled { background: #3bb44a; border-color: #2a8a36; color: #fff; opacity: 1; }
.nm-bouton.nm-quiz-faux, .nm-bouton.nm-quiz-faux:disabled { background: #e0442e; border-color: #a92f20; color: #fff; opacity: 1; }
.nm-quiz > .nm-bouton-principal { margin-top: 10px; }
.nm-silhouette { text-align: center; width: 100%; display: flex; flex-direction: column; align-items: center; gap: 6px; }
.nm-silhouette-cadre { width: 190px; height: 190px; display: flex; align-items: center; justify-content: center; border-radius: 18px; background: radial-gradient(circle at 50% 45%, #fff6d8, #f0c870 60%, #b8862e); box-shadow: inset 0 0 0 5px #7a2a2a, 0 3px 10px rgba(0,0,0,.25); }
.nm-silhouette-revele { background: radial-gradient(circle at 50% 45%, #ffffff, #dff3ff 60%, #9fd0f0); }
.nm-silhouette > .nm-bouton-principal { margin-top: 4px; }
.nm-taquin { display: flex; align-items: flex-start; gap: 12px; flex-wrap: wrap; justify-content: center; }
.nm-taquin-modele { display: flex; flex-direction: column; align-items: center; background: #f6f1e4; border-radius: 12px; padding: 6px; }
.nm-balance { width: 100%; display: flex; flex-direction: column; align-items: center; gap: 10px; }
.nm-balance-appareil { position: relative; width: min(420px, 100%); height: 150px; }
.nm-balance-fleau { position: absolute; left: 6%; right: 6%; top: 28px; height: 8px; background: #7a5230; border-radius: 4px; transition: transform .6s cubic-bezier(.3,1.6,.5,1); transform-origin: 50% 50%; }
.nm-balance-plateau { position: absolute; top: 8px; width: 42%; min-height: 54px; padding: 6px 4px 8px; display: flex; flex-wrap: wrap; gap: 4px; justify-content: center; align-content: flex-end; background: linear-gradient(#f2d37a, #c99a2e); border-radius: 0 0 50% 50% / 0 0 30px 30px; border: 2px solid #8a6a1e; }
.nm-balance-plateau[data-p="1"] { left: -4%; }
.nm-balance-plateau[data-p="2"] { right: -4%; }
.nm-balance-pied { position: absolute; left: calc(50% - 7px); top: 32px; width: 14px; height: 110px; background: #5a3b20; border-radius: 4px; }
.nm-balance-pied::after { content: ""; position: absolute; left: -40px; bottom: -4px; width: 94px; height: 14px; background: #5a3b20; border-radius: 8px; }
.nm-balance-sol { display: flex; flex-wrap: wrap; gap: 6px; justify-content: center; min-height: 44px; padding: 6px 10px; background: #e9dfc8; border-radius: 12px; width: min(420px, 100%); }
.nm-pierre-balance { width: 38px; height: 34px; border-radius: 45% 50% 42% 48%; border: 2px solid #3c3630; background: radial-gradient(circle at 35% 30%, #c9c3ba, #8a847c 70%); color: #1f1a16; font-weight: 800; cursor: pointer; font-size: .95rem; touch-action: manipulation; }
.nm-pierre-balance.nm-a-choisir { box-shadow: 0 0 0 3px #f2b31e; animation: nm-pulse .8s ease-in-out infinite alternate; }
@keyframes nm-pulse { to { transform: scale(1.12); } }
.nm-balance-histo { margin: 0; padding-left: 22px; font-size: .85rem; width: min(440px, 100%); }
/* Mes missions (Menu) */
.nm-mission { border-left: 4px solid #8a8f99; background: rgba(127,127,127,.1); border-radius: 8px; padding: 8px 10px; margin: 8px 0; }
.nm-mission-prete { border-left-color: #3bb44a; }

