.page-jeu { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; overflow: hidden; touch-action: manipulation; -webkit-user-select: none; user-select: none; }
.barre { height: 64px; padding: 0 32px; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-shrink: 0; }
.barre-d { display: flex; align-items: center; gap: 8px; }
.modes { display: flex; gap: 6px; }
.modes .c { display: none; }
.modes .tab[aria-pressed="true"] { background: var(--encre); color: #fff; border-color: var(--encre); }
#son svg { display: block; }
.son-zone { position: relative; }
.son-panneau { position: absolute; right: 0; top: 52px; z-index: 30; width: 240px; background: #fff; border-radius: 10px; padding: 14px 16px; box-shadow: 0 12px 32px rgba(27,26,23,.16), 0 0 0 1px var(--trait); display: flex; flex-direction: column; gap: 10px; }
.son-ligne { display: flex; align-items: center; gap: 12px; }
.son-ligne .mono { font-size: 13px; color: var(--gris); width: 40px; text-align: right; }
#volume { --rempli: 30%; flex: 1; height: 24px; margin: 0; background: transparent; -webkit-appearance: none; appearance: none; cursor: pointer; }
#volume::-webkit-slider-runnable-track { height: 6px; border-radius: 3px; background: linear-gradient(var(--violet), var(--violet)) 0 / var(--rempli) 100% no-repeat, var(--tronc); }
#volume::-moz-range-track { height: 6px; border-radius: 3px; background: var(--tronc); }
#volume::-moz-range-progress { height: 6px; border-radius: 3px; background: var(--violet); }
#volume::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 18px; margin-top: -6px; border-radius: 50%; background: #fff; border: 2px solid var(--violet); box-shadow: 0 1px 3px rgba(27,26,23,.2); }
#volume::-moz-range-thumb { width: 14px; height: 14px; border-radius: 50%; background: #fff; border: 2px solid var(--violet); box-shadow: 0 1px 3px rgba(27,26,23,.2); }
#volume:focus-visible { outline: 2px solid var(--violet); outline-offset: 4px; border-radius: 4px; }
.btn-petit.aide { width: 44px; justify-content: center; padding: 0; font-family: 'Geist Mono', monospace; font-size: 15px; color: var(--gris); }
.btn-petit.aide:hover { color: var(--violet); }

.jeu { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 20px; padding: 0 16px 32px; min-height: 0; }
.score { font-size: 88px; font-weight: 600; letter-spacing: -.04em; line-height: 1; }
.jauge { width: var(--l); height: 12px; border-radius: 6px; background: var(--tronc); overflow: hidden; flex-shrink: 0; }
.jauge-plein { height: 100%; background: var(--violet); border-radius: 6px; transform-origin: left center; width: 100%; transform: scaleX(.6); }
.jauge.basse .jauge-plein { background: var(--alerte); }
.scene { position: relative; width: var(--l); margin-top: 8px; }
#toile { display: block; width: 100%; height: auto; }
/* Échelle du classement, à droite du tronc (maquette de Nathan) */
.echelle { position: absolute; left: calc(100% + 56px); top: 50%; transform: translateY(-50%); width: 260px; margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 4px; pointer-events: none; }
.echelle li { color: #9A958B; display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; align-items: center; gap: 8px; height: 44px; padding: 0 14px; font-size: 15px; }
.echelle li span:nth-child(2) { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.echelle .loin { opacity: .5; }
.echelle .pres { opacity: .8; }
.echelle .moi { border-top: 1px solid #D3CEC4; border-bottom: 1px solid #D3CEC4; font-weight: 600; color: var(--gris); }
.echelle .vide { visibility: hidden; }
@media (max-width: 1180px) { .page-jeu:not(.page-impact):not(.page-touches) .echelle { display: none !important; } }
.touches { width: var(--l); display: flex; justify-content: space-between; margin-top: -8px; }
.touches > span { display: flex; gap: 8px; }

.carte { position: absolute; left: 50%; top: 46%; transform: translate(-50%, -50%); width: min(380px, 92%); background: #fff; border-radius: 12px; padding: 24px; display: flex; flex-direction: column; gap: 12px; box-shadow: 0 20px 40px rgba(27,26,23,.18), 0 0 0 1px var(--trait); text-align: left; }
.carte-titre { font-size: 30px; font-weight: 800; letter-spacing: -.02em; }
.carte p { margin: 0; font-size: 15px; line-height: 1.45; color: var(--gris-texte); }
.carte p.petit { font-size: 13px; color: var(--gris); }
.carte-depart { display: flex; align-items: center; gap: 6px; padding: 6px 0; }
.carte-depart .ou { color: var(--gris); font-size: 13px; margin: 0 6px; }
.carte-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border-top: 1px solid var(--trait-doux); }
.carte-stats:empty { display: none; }
.stat { padding: 10px 0 0; display: flex; flex-direction: column; gap: 2px; }
.stat .v { font-family: 'Geist Mono', monospace; font-variant-numeric: tabular-nums; font-size: 19px; font-weight: 600; }
.fin-score { font-size: 72px; font-weight: 600; letter-spacing: -.04em; line-height: 1; }
.fin-centile { font-size: 17px; font-weight: 600; min-height: 24px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.fin-centile .gris { color: var(--gris); font-weight: 500; font-size: 15px; }
.record { font-family: 'Geist Mono', monospace; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; padding: 4px 8px; border-radius: 4px; background: #EFE8FC; color: var(--violet-fonce); }
.carte-actions { display: flex; gap: 10px; margin-top: 4px; }
.carte-actions .btn { height: 48px; flex: 1; font-size: 15px; }
.carte-actions .btn-noir:hover { color: #fff; }

@media (max-width: 760px) {
  .barre { padding: 0 12px; }
  .barre .btn-petit span, #lien-classement span { display: none; }
  .modes .tab { padding: 0 10px; font-size: 13px; }
  .barre .joueur { display: none; }
  .score { font-size: 64px; }
  .jeu { gap: 14px; }
}
@media (max-width: 480px) { .modes .l { display: none; } .modes .c { display: inline; } .barre { gap: 6px; } .barre-d { gap: 6px; } .barre a.btn-petit:first-child { padding: 0 10px; font-size: 0; gap: 0; } }
@media (hover: none) { .touches { display: none; } }
