/* Le Village — interface discrète, lisible, au service du décor.
   Palette de la direction artistique : crème, sauge, pierre, bordeaux, or doux. */
:root {
  --cream: #FFF5E8;
  --cream-2: #F6E9D6;
  --sage: #435747;
  --sage-2: #5C7360;
  --stone: #8B6849;
  --bordeaux: #773D35;
  --gold: #C59B56;
  --ink: #2E2620;
  --ink-2: #5A4D42;
  --ok: #3F7A4E;
  --warn: #A4661C;
  --err: #9B3A2E;
  --panel: rgba(255, 245, 232, 0.94);
  --panel-line: rgba(139, 104, 73, 0.22);
  --shadow: 0 10px 30px rgba(46, 38, 32, 0.22), 0 2px 6px rgba(46, 38, 32, 0.12);
  --radius: 16px;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  color-scheme: light;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: #1f1a16; color: var(--ink); font: 15px/1.45 var(--sans); -webkit-tap-highlight-color: transparent; }
body { overflow: hidden; overscroll-behavior: none; }
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }
.skip { position: absolute; left: -999px; top: 8px; z-index: 100; background: var(--cream); padding: 6px 10px; border-radius: 8px; }
.skip:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 2px; }

.screen { position: fixed; inset: 0; display: none; }
.screen.active { display: block; }
.card { background: var(--panel); border: 1px solid var(--panel-line); border-radius: var(--radius); box-shadow: var(--shadow); backdrop-filter: blur(10px) saturate(1.1); -webkit-backdrop-filter: blur(10px) saturate(1.1); }
.brand { font-family: var(--serif); font-size: 34px; letter-spacing: .02em; color: var(--sage); margin: 0; font-weight: 600; }
h2, h3 { font-family: var(--serif); color: var(--sage); margin: 0 0 8px; font-weight: 600; }
h2 { font-size: 24px; } h3 { font-size: 18px; }
small, .hint { color: var(--ink-2); font-size: 13px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 42px; padding: 0 16px; border-radius: 12px; border: 1px solid var(--panel-line); background: #fffaf2; color: var(--ink); cursor: pointer; font-weight: 600; transition: transform .08s, background .15s; }
.btn:hover { background: #fff; }
.btn:active { transform: translateY(1px); }
.btn.primary { background: var(--sage); color: var(--cream); border-color: var(--sage); }
.btn.primary:hover { background: var(--sage-2); }
.btn.danger { background: #fff2ee; color: var(--err); border-color: rgba(155,58,46,.35); }
.btn.gold { background: var(--gold); color: #2b2015; border-color: #b08848; }
.btn.small { min-height: 34px; padding: 0 12px; font-size: 14px; border-radius: 10px; }
.btn[disabled] { opacity: .55; cursor: not-allowed; }
.link { background: none; border: 0; color: var(--sage); text-decoration: underline; cursor: pointer; padding: 6px 0; }
.icon-btn svg { width: 20px; height: 20px; }
.btn svg { width: 18px; height: 18px; flex: none; }
.btn.small { white-space: nowrap; }

/* ---------- chargement & accueil ---------- */
#screen-loading { display: none; place-items: center; background: radial-gradient(circle at 50% 40%, #3b4a3d, #1f1a16); }
#screen-loading.active { display: grid; }
.loading-card { text-align: center; color: var(--cream); }
.loading-card .brand { color: var(--cream); }
.spinner { width: 34px; height: 34px; margin: 18px auto; border-radius: 50%; border: 3px solid rgba(255,245,232,.25); border-top-color: var(--gold); animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.auth-bg { position: absolute; inset: 0; background: #2a241e url('/assets/00_reference_validee.md.webp') center/cover no-repeat; filter: saturate(1.05); }
.auth-bg::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(31,26,22,.55), rgba(31,26,22,.1) 60%); }
#screen-auth.active, #screen-recovery.active, #screen-onboarding.active { display: flex; align-items: center; justify-content: flex-start; padding: 24px; overflow-y: auto; }
.auth-card { position: relative; width: min(420px, 100%); padding: 28px; margin-left: clamp(0px, 6vw, 90px); }
.tagline { color: var(--ink-2); margin: 6px 0 18px; }
.tabs { display: flex; gap: 6px; background: var(--cream-2); padding: 4px; border-radius: 12px; margin-bottom: 16px; }
.tabs button { flex: 1; border: 0; background: transparent; padding: 9px; border-radius: 9px; cursor: pointer; font-weight: 600; color: var(--ink-2); }
.tabs button[aria-selected="true"] { background: #fffaf2; color: var(--sage); box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.form { display: grid; gap: 10px; }
.form label { display: grid; gap: 4px; font-weight: 600; font-size: 14px; }
.form input:not([type=checkbox]), .input { width: 100%; min-height: 44px; padding: 0 12px; border-radius: 10px; border: 1px solid rgba(139,104,73,.35); background: #fffdf9; }
.form input:focus, .input:focus { outline: none; border-color: var(--gold); box-shadow: 0 0 0 3px rgba(197,155,86,.25); }
.check { grid-template-columns: auto 1fr !important; align-items: start; font-weight: 500 !important; }
.check input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--sage); }
.notice { font-size: 13px; color: var(--ink-2); background: var(--cream-2); border-radius: 10px; padding: 10px 12px; margin: 0; }
.form-error { color: var(--err); min-height: 1em; margin: 0; font-weight: 600; font-size: 14px; }
.recovery-code { font: 600 20px/1.3 ui-monospace, Consolas, monospace; letter-spacing: .04em; background: var(--cream-2); padding: 14px; border-radius: 12px; text-align: center; color: var(--sage); word-break: break-all; }

.onboarding { position: relative; width: min(640px, 100%); padding: 26px; margin: auto; display: grid; gap: 14px; }
fieldset { border: 0; padding: 0; margin: 0; }
legend { font-family: var(--serif); font-size: 18px; color: var(--sage); margin-bottom: 8px; font-weight: 600; }
.avatar-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.avatar-opt { border: 2px solid transparent; border-radius: 14px; background: #fffaf2; padding: 6px; cursor: pointer; display: grid; gap: 4px; justify-items: center; }
.avatar-opt img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 10px; background: var(--cream-2); }
.avatar-opt[aria-checked="true"] { border-color: var(--sage); box-shadow: 0 0 0 3px rgba(67,87,71,.18); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip-opt { border: 1px solid rgba(139,104,73,.35); background: #fffaf2; padding: 7px 12px; border-radius: 999px; cursor: pointer; }
.chip-opt[aria-pressed="true"] { background: var(--sage); color: var(--cream); border-color: var(--sage); }
.explain { background: var(--cream-2); border-radius: 12px; padding: 12px 16px; }
.explain ul { margin: 6px 0 0; padding-left: 18px; }
.explain li { margin: 4px 0; }
.npc-badge { display: inline-block; background: var(--bordeaux); color: var(--cream); font-size: 11px; font-weight: 700; letter-spacing: .03em; padding: 2px 8px; border-radius: 999px; text-transform: uppercase; vertical-align: middle; }

/* ---------- monde ---------- */
#screen-world { background: #1f1a16; touch-action: none; }
#world { position: absolute; inset: 0; width: 100%; height: 100%; display: block; cursor: pointer; }
.labels { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
.place-label { position: absolute; transform: translate(-50%, -100%); pointer-events: auto; display: inline-flex; align-items: center; gap: 6px; white-space: nowrap;
  background: rgba(255,245,232,.9); color: var(--sage); border: 1px solid rgba(67,87,71,.25); border-radius: 999px; padding: 5px 11px 5px 9px; font: 600 13px/1 var(--sans);
  box-shadow: 0 3px 10px rgba(0,0,0,.18); cursor: pointer; transition: transform .12s, background .12s; }
.place-label:hover, .place-label:focus-visible { background: #fff; transform: translate(-50%, -100%) scale(1.05); }
.place-label::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 3px rgba(197,155,86,.25); }
.place-label.npc { color: var(--bordeaux); border-color: rgba(119,61,53,.3); }
.place-label.npc::before { background: var(--bordeaux); box-shadow: 0 0 0 3px rgba(119,61,53,.2); }
.place-label.decor { color: var(--ink-2); font-weight: 500; }
.place-label.decor::before { background: #bba78e; box-shadow: none; }
.fade { position: absolute; inset: 0; background: var(--cream); opacity: 0; pointer-events: none; transition: opacity .32s ease; display: grid; place-items: center; }
.fade.on { opacity: 1; pointer-events: auto; }
.scene-title { font: 600 28px var(--serif); color: var(--sage); opacity: 0; transition: opacity .3s; }
.fade.on .scene-title { opacity: 1; }

.hud-top { position: absolute; top: calc(10px + var(--safe-t)); left: 10px; right: 10px; display: flex; justify-content: space-between; align-items: flex-start; gap: 8px; pointer-events: none; }
.hud-top > * { pointer-events: auto; }
.hud-left { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; min-width: 0; }
.hud-left .place-chip { max-width: 100%; }
.hud-right { display: flex; gap: 8px; flex-shrink: 0; }
.chip.scene-return { min-height: 44px; max-width: 100%; padding: 8px 14px; background: var(--sage); color: #fff; text-align: left; line-height: 1.3; }
.scene-return:hover { filter: brightness(1.1); }
.scene-return:disabled { opacity: .65; cursor: wait; }
.hud-left #place-name, .hud-left #place-count { min-width: 0; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.chip { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; padding: 0 12px; background: var(--panel); border: 1px solid var(--panel-line); border-radius: 999px; box-shadow: 0 4px 14px rgba(0,0,0,.15); cursor: pointer; font-weight: 600; color: var(--ink); position: relative; }
.place-chip { cursor: default; font-family: var(--serif); font-size: 16px; color: var(--sage); max-width: 60vw; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.place-chip .sep { opacity: .5; }
#place-count { font-family: var(--sans); font-size: 13px; color: var(--ink-2); font-weight: 600; }
.demo-tag { font-size: 10px; letter-spacing: .06em; background: var(--cream-2); color: var(--stone); padding: 2px 6px; border-radius: 6px; }
.badge-dot { position: absolute; top: 6px; right: 6px; width: 9px; height: 9px; border-radius: 50%; background: var(--bordeaux); box-shadow: 0 0 0 2px var(--cream); }
.banner { position: absolute; top: max(var(--hud-bottom, 0px), calc(60px + var(--safe-t))); left: 50%; transform: translateX(-50%); background: #3a2e25; color: var(--cream); padding: 9px 14px; border-radius: 12px; box-shadow: var(--shadow); display: flex; gap: 10px; align-items: center; z-index: 30; font-weight: 600; font-size: 14px; }
.banner .btn { min-height: 30px; }

.nearby { position: absolute; left: 12px; bottom: calc(14px + var(--safe-b)); width: min(330px, calc(100vw - 24px)); padding: 12px; z-index: 12; }
.nearby h4 { margin: 0 0 8px; font: 600 13px var(--sans); color: var(--ink-2); text-transform: uppercase; letter-spacing: .05em; }
.person-row { display: grid; grid-template-columns: 40px 1fr auto; gap: 10px; align-items: center; padding: 6px; border-radius: 12px; }
.person-row + .person-row { border-top: 1px solid var(--panel-line); }
.person-row img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; background: var(--cream-2); }
.person-row .who { min-width: 0; }
.person-row .who b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.status { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--ink-2); }
.status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--ok); }
.status.occupe::before { background: var(--warn); } .status.en_activite::before { background: #3c6e9e; } .status.ne_pas_deranger::before { background: var(--err); }
.nearby .more { font-size: 13px; color: var(--ink-2); margin-top: 6px; }

.context-action { position: absolute; left: 50%; bottom: calc(18px + var(--safe-b)); transform: translateX(-50%); z-index: 11; display: flex; gap: 8px; }
.context-action .btn { box-shadow: var(--shadow); }
.invites { position: absolute; top: max(var(--hud-bottom, 0px), calc(62px + var(--safe-t))); left: 50%; transform: translateX(-50%); display: grid; gap: 8px; z-index: 40; width: min(380px, calc(100vw - 20px)); }
.invite { padding: 12px 14px; display: grid; gap: 8px; animation: drop .25s ease; }
.invite .row { display: flex; gap: 10px; align-items: center; }
.invite img { width: 42px; height: 42px; border-radius: 50%; object-fit: cover; }
.invite .actions { display: flex; gap: 8px; justify-content: flex-end; }
.countdown { height: 3px; background: var(--cream-2); border-radius: 3px; overflow: hidden; }
.countdown i { display: block; height: 100%; background: var(--gold); transform-origin: left; }
@keyframes drop { from { transform: translateY(-8px); opacity: 0; } }
.toasts { position: absolute; bottom: calc(80px + var(--safe-b)); left: 50%; transform: translateX(-50%); display: grid; gap: 6px; z-index: 50; width: min(420px, calc(100vw - 20px)); pointer-events: none; }
.toast { background: #3a2e25; color: var(--cream); padding: 10px 14px; border-radius: 12px; box-shadow: var(--shadow); font-weight: 500; animation: drop .2s ease; pointer-events: auto; }
.toast.ok { background: var(--sage); } .toast.err { background: var(--bordeaux); }

/* ---------- conversation privée ---------- */
.chat-panel { position: absolute; top: max(var(--hud-bottom, 0px), calc(62px + var(--safe-t))); bottom: calc(14px + var(--safe-b)); width: 350px; z-index: 20; display: flex; flex-direction: column; overflow: hidden;
  background: var(--panel); border: 1px solid var(--panel-line); border-radius: var(--radius); box-shadow: var(--shadow); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.chat-panel.side-right { right: 12px; } .chat-panel.side-left { left: 12px; }
.chat-head { display: grid; grid-template-columns: 40px 1fr auto; gap: 10px; align-items: center; padding: 10px 10px 10px 12px; border-bottom: 1px solid var(--panel-line); }
.chat-head img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }
.chat-head .who b { display: block; font-family: var(--serif); font-size: 17px; color: var(--sage); }
.head-actions { display: flex; gap: 2px; }
.ibtn { width: 36px; height: 36px; display: grid; place-items: center; border: 0; background: transparent; border-radius: 10px; cursor: pointer; color: var(--ink-2); }
.ibtn:hover { background: var(--cream-2); color: var(--ink); }
.ibtn svg { width: 20px; height: 20px; }
.ibtn.active { color: var(--sage); background: rgba(67,87,71,.12); }
.chat-tabs { display: flex; gap: 6px; padding: 6px 10px; overflow-x: auto; border-bottom: 1px solid var(--panel-line); }
.chat-tabs button { border: 1px solid var(--panel-line); background: #fffaf2; border-radius: 999px; padding: 4px 10px; cursor: pointer; white-space: nowrap; font-size: 13px; }
.chat-tabs button[aria-selected="true"] { background: var(--sage); color: var(--cream); }
.chat-tabs .unread { color: var(--bordeaux); font-weight: 700; }
.thread { flex: 1; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 6px; }
.msg { max-width: 82%; padding: 8px 11px; border-radius: 14px; background: #fff; border: 1px solid var(--panel-line); align-self: flex-start; white-space: pre-wrap; word-wrap: break-word; }
.msg.mine { align-self: flex-end; background: var(--sage); color: var(--cream); border-color: var(--sage); }
.msg.card-msg { background: var(--cream-2); border-style: dashed; font-style: italic; }
.msg .meta { display: block; font-size: 11px; opacity: .75; margin-top: 3px; }
.msg.pending { opacity: .7; } .msg.failed { background: #fff2ee; color: var(--err); border-color: rgba(155,58,46,.4); }
.msg .retry { background: none; border: 0; color: inherit; text-decoration: underline; cursor: pointer; font-size: 12px; padding: 0; margin-left: 6px; }
.sys { align-self: center; font-size: 12px; color: var(--ink-2); background: rgba(139,104,73,.08); padding: 4px 10px; border-radius: 999px; text-align: center; }
.composer { display: grid; grid-template-columns: 1fr auto; gap: 8px; padding: 10px; border-top: 1px solid var(--panel-line); }
.composer textarea { resize: none; min-height: 44px; max-height: 120px; padding: 11px 12px; border-radius: 12px; border: 1px solid rgba(139,104,73,.35); background: #fffdf9; }
.composer textarea:focus { outline: none; border-color: var(--gold); }
.composer .count { grid-column: 1 / -1; font-size: 11px; color: var(--ink-2); text-align: right; margin-top: -4px; }
.chat-reopen { position: absolute; right: 12px; bottom: calc(14px + var(--safe-b)); z-index: 19; }
.voice-bar { padding: 10px 12px; border-bottom: 1px solid var(--panel-line); background: rgba(67,87,71,.07); display: grid; gap: 8px; }
.voice-bar .state { display: flex; align-items: center; gap: 8px; font-weight: 600; }
.voice-bar .state .dot { width: 10px; height: 10px; border-radius: 50%; background: #b5a691; }
.voice-bar.live .state .dot { background: var(--ok); box-shadow: 0 0 0 4px rgba(63,122,78,.18); }
.voice-bar.err { background: #fff2ee; }
.voice-bar .controls { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.speaking { display: inline-flex; gap: 2px; align-items: flex-end; height: 14px; }
.speaking i { width: 3px; background: var(--sage); border-radius: 2px; height: 3px; transition: height .08s; }
.vol { width: 110px; accent-color: var(--sage); }

/* panneaux du côté opposé à la conversation */
.chat-open-left .nearby, .chat-open-left .npc-panel { left: auto; right: 12px; }
.chat-open-left .recenter { right: auto; left: 12px; }
.chat-open-right .recenter { right: 376px; }

/* ---------- personnage virtuel ---------- */
.npc-panel { position: absolute; left: 12px; top: max(var(--hud-bottom, 0px), calc(62px + var(--safe-t))); width: min(370px, calc(100vw - 24px)); max-height: calc(100% - 90px - var(--safe-t) - var(--safe-b)); overflow-y: auto; z-index: 18; padding: 14px; }
.npc-head { display: grid; grid-template-columns: 64px 1fr auto; gap: 12px; align-items: center; margin-bottom: 10px; }
.npc-head img { width: 64px; height: 64px; border-radius: 14px; object-fit: cover; background: var(--cream-2); }
.npc-head b { font-family: var(--serif); font-size: 18px; color: var(--bordeaux); display: block; }
.npc-say { background: #fffaf2; border: 1px solid var(--panel-line); border-radius: 14px; padding: 10px 12px; margin: 0 0 10px; }
.choices { display: grid; gap: 8px; }
.choices .btn { justify-content: flex-start; text-align: left; }
.items { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; margin-bottom: 10px; }
.item { border: 1px solid var(--panel-line); border-radius: 12px; background: #fffaf2; padding: 8px; display: grid; gap: 4px; justify-items: center; text-align: center; }
.item img { width: 64px; height: 64px; object-fit: contain; }
.item .price { font-weight: 700; color: var(--stone); }
.summary { background: #fffaf2; border-radius: 12px; border: 1px solid var(--panel-line); padding: 10px 12px; display: grid; gap: 4px; margin-bottom: 10px; }
.summary div { display: flex; justify-content: space-between; gap: 10px; }
.qty { display: inline-flex; align-items: center; gap: 6px; }
.qty button { width: 32px; height: 32px; border-radius: 8px; border: 1px solid var(--panel-line); background: #fff; cursor: pointer; }

/* ---------- activités ---------- */
.game-panel { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: min(760px, calc(100vw - 24px)); max-height: calc(100% - 100px); overflow: hidden; z-index: 25; display: flex; flex-direction: column; }
.game-panel.minimized { top: auto; bottom: calc(14px + var(--safe-b)); transform: translateX(-50%); width: auto; }
.game-head { display: flex; justify-content: space-between; align-items: center; padding: 12px 14px; border-bottom: 1px solid var(--panel-line); gap: 8px; }
.game-head h3 { margin: 0; }
.game-body { padding: 14px; overflow-y: auto; display: grid; gap: 12px; }
.game-cols { display: grid; grid-template-columns: 1fr 230px; gap: 12px; }
.players { display: grid; gap: 6px; align-content: start; }
.player { display: flex; justify-content: space-between; gap: 8px; padding: 6px 10px; background: #fffaf2; border-radius: 10px; border: 1px solid var(--panel-line); font-size: 14px; }
.player.off { opacity: .55; }
.timer { height: 6px; background: var(--cream-2); border-radius: 6px; overflow: hidden; }
.timer i { display: block; height: 100%; background: var(--gold); transition: width .25s linear; }
.question { font: 600 19px/1.35 var(--serif); color: var(--ink); }
.options { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.opt { text-align: left; padding: 12px; border-radius: 12px; border: 2px solid var(--panel-line); background: #fffaf2; cursor: pointer; min-height: 56px; display: grid; gap: 6px; }
.opt.mine { border-color: var(--sage); }
.opt.correct { border-color: var(--ok); background: #eef6ef; }
.opt.wrong { border-color: var(--err); background: #fff2ee; }
.voters { display: flex; gap: 4px; flex-wrap: wrap; }
.voters span { font-size: 11px; background: var(--sage); color: var(--cream); padding: 1px 7px; border-radius: 999px; }
.mini-chat { display: grid; gap: 6px; }
.mini-chat .log { height: 150px; overflow-y: auto; background: #fffaf2; border: 1px solid var(--panel-line); border-radius: 10px; padding: 8px; font-size: 13px; display: grid; align-content: start; gap: 3px; }
.mini-chat form { display: flex; gap: 6px; }
.draw-wrap { position: relative; background: #fffdf8; border-radius: 12px; border: 1px solid var(--panel-line); overflow: hidden; aspect-ratio: 4 / 3; touch-action: none; }
.draw-wrap canvas { width: 100%; height: 100%; display: block; }
.palette { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.swatch { width: 28px; height: 28px; border-radius: 50%; border: 2px solid #fff; box-shadow: 0 0 0 1px var(--panel-line); cursor: pointer; }
.swatch[aria-pressed="true"] { box-shadow: 0 0 0 3px var(--gold); }
.word { font: 700 22px var(--serif); letter-spacing: .25em; color: var(--sage); }
.clue { background: #fffaf2; border-left: 4px solid var(--gold); padding: 10px 12px; border-radius: 8px; font-style: italic; }
.mech { display: grid; gap: 8px; padding: 10px; border: 1px solid var(--panel-line); border-radius: 12px; background: #fffdf9; }
.mech.solved { border-color: var(--ok); background: #f1f7f1; }
.dial { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; }
.dial button, .symbols button { min-height: 40px; border-radius: 10px; border: 1px solid var(--panel-line); background: #fff; cursor: pointer; font-weight: 600; }
.symbols { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.symbols button { display: grid; justify-items: center; gap: 2px; padding: 6px; }
.symbols svg { width: 30px; height: 30px; color: var(--stone); }

/* ---------- fenêtres modales ---------- */
.modal-back { position: fixed; inset: 0; background: rgba(31,26,22,.45); display: grid; place-items: center; z-index: 60; padding: 12px; animation: fadein .15s; }
@keyframes fadein { from { opacity: 0; } }
.modal { width: min(560px, 100%); max-height: calc(100vh - 24px); overflow: hidden; display: flex; flex-direction: column; }
.modal-head { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px; border-bottom: 1px solid var(--panel-line); }
.modal-head h2 { margin: 0; font-size: 21px; }
.modal-body { padding: 14px 16px; overflow-y: auto; display: grid; gap: 12px; }
.modal-foot { padding: 12px 16px; border-top: 1px solid var(--panel-line); display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.menu-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.menu-grid .btn { justify-content: flex-start; min-height: 52px; }
.list { display: grid; gap: 8px; }
.list-item { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; padding: 8px 10px; background: #fffaf2; border: 1px solid var(--panel-line); border-radius: 12px; }
.list-item img { width: 40px; height: 40px; border-radius: 50%; object-fit: cover; }
.row-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.field { display: grid; gap: 4px; font-weight: 600; font-size: 14px; }
.seg { display: inline-flex; background: var(--cream-2); border-radius: 10px; padding: 3px; gap: 3px; flex-wrap: wrap; }
.seg button { border: 0; background: transparent; padding: 7px 11px; border-radius: 8px; cursor: pointer; font-weight: 600; color: var(--ink-2); }
.seg button[aria-pressed="true"] { background: #fffaf2; color: var(--sage); box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.ledger { font-size: 13px; display: grid; gap: 2px; }
.ledger div { display: flex; justify-content: space-between; gap: 8px; border-bottom: 1px dashed var(--panel-line); padding: 3px 0; }
.empty { color: var(--ink-2); font-style: italic; }
.profile-card { display: grid; grid-template-columns: 84px 1fr; gap: 14px; align-items: center; }
.profile-card img { width: 84px; height: 84px; border-radius: 16px; object-fit: cover; }
.tag { display: inline-block; font-size: 12px; background: var(--cream-2); padding: 2px 8px; border-radius: 999px; margin: 2px 4px 0 0; }
.staff-tag { background: #2f4a63; color: #fff; }

/* ---------- tactile ---------- */
.joystick { position: absolute; left: 18px; bottom: calc(22px + var(--safe-b)); width: 116px; height: 116px; border-radius: 50%; background: rgba(255,245,232,.28); border: 1px solid rgba(255,245,232,.55); z-index: 9; touch-action: none; backdrop-filter: blur(4px); }
.joystick .stick { position: absolute; left: 50%; top: 50%; width: 50px; height: 50px; margin: -25px 0 0 -25px; border-radius: 50%; background: rgba(255,245,232,.9); box-shadow: 0 3px 10px rgba(0,0,0,.25); }
.recenter { position: absolute; right: 12px; bottom: calc(70px + var(--safe-b)); z-index: 9; }

@media (max-width: 760px) {
  .brand { font-size: 28px; }
  .auth-card { margin: auto; padding: 22px; }
  .avatar-grid { grid-template-columns: repeat(2, 1fr); }
  .place-chip { font-size: 14px; max-width: 46vw; }
  .chat-panel { left: 0 !important; right: 0 !important; top: auto; bottom: 0; width: 100%; height: min(72vh, var(--vvh, 100vh)); border-radius: 18px 18px 0 0; padding-bottom: var(--safe-b); }
  .chat-panel.kb { height: calc(var(--vvh, 100vh) - 8px); }
  .npc-panel { top: auto; bottom: 0; left: 0; width: 100%; border-radius: 18px 18px 0 0; max-height: 70vh; padding-bottom: calc(14px + var(--safe-b)); }
  .game-panel { width: 100%; height: 100%; max-height: none; top: 0; left: 0; transform: none; border-radius: 0; }
  .game-panel.minimized { top: auto; left: 50%; height: auto; transform: translateX(-50%); width: auto; border-radius: 999px; }
  .game-cols { grid-template-columns: 1fr; }
  .options { grid-template-columns: 1fr; }
  .nearby { left: 8px; right: 8px; width: auto; top: max(var(--hud-bottom, 0px), calc(58px + var(--safe-t))); bottom: auto; padding: 8px 10px; }
  .nearby h4 { display: none; }
  .person-row { grid-template-columns: 32px 1fr auto; padding: 3px 2px; gap: 8px; }
  .person-row img { width: 32px; height: 32px; }
  .person-row small { display: none; }
  .chat-open-left .nearby, .chat-open-right .nearby { left: 8px; right: 8px; }
  .place-chip { flex-direction: column; align-items: flex-start; gap: 0; line-height: 1.15; padding: 4px 12px; }
  .place-chip .sep { display: none; }
  #place-count { font-size: 11px; }
  .hud-right { gap: 6px; }
  .hud-right .chip { padding: 0 10px; }
  .place-chip { max-width: none; min-width: 0; flex: 0 1 auto; }
  .invites { top: max(var(--hud-bottom, 0px), calc(58px + var(--safe-t))); }
  .context-action { bottom: calc(150px + var(--safe-b)); }
  .menu-grid { grid-template-columns: 1fr; }
  .modal-back { place-items: end center; padding: 0; }
  .modal { width: 100%; border-radius: 18px 18px 0 0; max-height: 88vh; }
  .chat-reopen { bottom: calc(150px + var(--safe-b)); }
  .chat-open-left .nearby, .chat-open-right .nearby { display: none; }
  .chat-open-left .npc-panel, .chat-open-right .npc-panel { left: 0; right: 0; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}

/* ---------- Lancement gratuit, comptes, fiches, habitants, appartements ---------- */
.launch-note { background: #eef3ea; color: var(--sage); border-radius: 10px; padding: 8px 12px; font-size: 13px; margin: 6px 0 10px; }
.free-tag { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--sage); background: #e5ede1; padding: 2px 8px; border-radius: 999px; }
.dev-box { margin-top: 12px; font-size: 12.5px; background: #fff4d9; border: 1px dashed var(--gold); border-radius: 10px; padding: 8px 10px; }
.form-ok { color: var(--sage); font-size: 13.5px; min-height: 1em; margin: 0; }
.link.inline { display: inline; padding: 0; min-height: 0; font: inherit; text-decoration: underline; }
.link.small { font-size: 12.5px; }
[aria-invalid="true"] { border-color: #9B3A2E !important; box-shadow: 0 0 0 2px rgba(155,58,46,.15); }
.prose p { margin: 0 0 10px; }
.fiche { display: grid; grid-template-columns: 132px 1fr; gap: 16px; align-items: start; }
.profile-photo { width: 132px; height: 132px; border-radius: 18px; object-fit: cover; background: var(--cream-2, #efe4d2); }
.profile-photo.avatar { object-position: top; }
.profile-photo.small { width: 56px; height: 56px; border-radius: 12px; }
.fiche-main h3 { margin-bottom: 4px; }
.fiche-line { display: flex; flex-wrap: wrap; gap: 10px; font-size: 14px; margin-bottom: 6px; }
.fiche-bio { white-space: pre-wrap; overflow-wrap: anywhere; background: #fffaf2; border-radius: 10px; padding: 8px 10px; margin: 8px 0; }
.photo-row { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.radio-list { display: grid; gap: 8px; }
.vis-preview { margin-top: 8px; font-size: 13px; background: #fffaf2; border-radius: 10px; padding: 8px 10px; }
.photo-editor { justify-items: start; }
.crop-canvas { width: 280px; height: 280px; max-width: 100%; border-radius: 16px; touch-action: none; cursor: grab; background: #efe4d2; }
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.chat-head .who.link-like { background: none; border: 0; padding: 0; text-align: left; cursor: pointer; color: inherit; font: inherit; }
.resident-foot { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 8px; }
.resident-invite .npc-badge { font-size: 10px; }
.apt-bar { position: absolute; left: 50%; transform: translateX(-50%); top: 64px; display: flex; gap: 8px; align-items: center; padding: 8px 10px; z-index: 6; max-width: calc(100% - 32px); flex-wrap: wrap; justify-content: center; }
@media (max-width: 760px) {
  .fiche { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .fiche-line { justify-content: center; }
  .apt-bar { top: 96px; }
}

/* ---------- Chat collectif (lieu public + groupes privés), distinct de la conversation privée ---------- */
.collective { position: absolute; top: 64px; left: 12px; z-index: 7; width: 360px; height: 250px; min-width: 280px; min-height: 170px; max-width: min(560px, calc(100vw - 24px)); max-height: 70vh; resize: both; overflow: hidden; display: grid; grid-template-rows: auto auto 1fr auto auto; background: rgba(255,250,242,.94); border: 1px solid rgba(122,75,42,.25); box-shadow: 0 6px 22px rgba(46,38,32,.18); border-radius: 14px; padding: 0; font-size: var(--ctext, 14px); }
.collective.on-right { left: auto; right: 12px; }
.collective-chip { position: absolute; top: 64px; left: 12px; z-index: 6; }
.collective-chip.on-right { left: auto; right: 12px; }
.collective-chip .unread, .ctabs .unread { color: #9B3A2E; font-weight: 700; }
.chead { display: flex; align-items: center; gap: 4px; padding: 4px 4px 0 6px; border-bottom: 1px solid var(--panel-line); }
.ctabs { display: flex; gap: 2px; overflow-x: auto; flex: 1; scrollbar-width: thin; }
.ctabs button { border: 0; background: transparent; padding: 6px 8px; border-radius: 8px 8px 0 0; font: 600 12.5px var(--sans); color: var(--ink-2); white-space: nowrap; cursor: pointer; }
.ctabs button[aria-selected="true"] { background: #fff; color: var(--sage); box-shadow: inset 0 -2px 0 var(--sage); }
.ctabs .private-tab { color: #7a4b2a; }
.ctab-add { font-size: 16px !important; }
.cactions { display: flex; gap: 2px; }
.cactions .ibtn { width: 30px; height: 30px; font: 600 12px var(--sans); }
.ccontext { font-size: 12px; padding: 4px 10px; color: var(--ink-2); border-bottom: 1px solid var(--panel-line); }
.ccontext.public b { color: #7a4b2a; } .ccontext.group b { color: var(--sage); }
.cmsgs { overflow-y: auto; padding: 6px 10px; display: flex; flex-direction: column; gap: 4px; }
.cmsg { line-height: 1.35; overflow-wrap: anywhere; }
.cmsg .cwho { border: 0; background: none; padding: 0; font: 700 1em var(--sans); color: var(--sage); cursor: pointer; margin-right: 6px; }
.cmsg.mine .cwho { color: #7a4b2a; }
.cmsg .ctext { white-space: pre-wrap; }
.cmsg .cmeta { display: inline-flex; gap: 6px; margin-left: 6px; font-size: 11px; color: var(--ink-2); }
.cmsg.pending { opacity: .7; } .cmsg.failed .cmeta { color: #9B3A2E; }
.csys { font-size: 12px; color: var(--ink-2); font-style: italic; text-align: center; }
.cnewer { justify-self: center; margin: -30px 0 4px; z-index: 1; border: 0; background: var(--sage); color: #fff; border-radius: 999px; padding: 3px 10px; font-size: 12px; cursor: pointer; }
.ccomposer { display: flex; gap: 6px; padding: 6px 8px 8px; border-top: 1px solid var(--panel-line); }
.ccomposer textarea { flex: 1; resize: none; border: 1px solid var(--panel-line); border-radius: 10px; padding: 7px 10px; font: inherit; min-height: 36px; max-height: 90px; background: #fff; }
.official-badge { display: inline-block; margin-left: 4px; font-size: 10px; font-weight: 700; background: #2f4a63; color: #fff; padding: 1px 6px; border-radius: 999px; vertical-align: middle; }
.private-title { display: flex; align-items: center; gap: 6px; padding: 6px 12px; font: 700 13px var(--sans); color: #7a4b2a; background: #fbf1e3; border-bottom: 1px solid var(--panel-line); }
.private-title .mobile-only { margin-left: auto; }
.mobile-only { display: none; }
@media (max-width: 760px) {
  .collective { top: auto; bottom: 0; left: 0; right: 0; width: 100%; max-width: none; height: 46vh; min-height: 0; resize: none; border-radius: 16px 16px 0 0; }
  .collective.on-right { right: 0; }
  .collective-chip { display: none; }
  .mobile-only { display: inline-flex; }
  #screen-world.collective-open .joystick { display: none; }
}

/* ---------- Café : menu des jus LFL (boissons virtuelles) ---------- */
.cafe-order .hint { font-size: 13px; }

/* ---------- Panneau des nouveautés ---------- */
.news-card { display: grid; gap: 8px; justify-items: center; text-align: center; }
.news-headline { margin: 0; font: 600 12px var(--sans); letter-spacing: .08em; text-transform: uppercase; color: #7a4b2a; }
.news-image { width: min(320px, 100%); aspect-ratio: 1; display: grid; place-items: center; background: #fff; border-radius: 14px; overflow: hidden; }
.news-image img { width: 100%; height: 100%; object-fit: contain; }
.news-image.large { width: min(560px, 100%); }
.news-detail { display: grid; gap: 12px; justify-items: center; }

/* Les panneaux commencent sous toute la navigation, y compris quand le texte revient à la ligne. */
.apt-bar { top: max(var(--hud-bottom, 0px), 64px); }
.collective-chip { top: max(var(--hud-bottom, 0px), 64px); }
@media (min-width: 761px) {
  .collective { top: max(var(--hud-bottom, 0px), 64px); }
}
@media (max-width: 760px) {
  .hud-top { flex-wrap: wrap; }
  .hud-left { width: 100%; flex-direction: row; align-items: center; justify-content: space-between; }
  .hud-left .place-chip { flex: 1; min-width: 0; }
  .hud-left .scene-return { flex: 0 0 auto; max-width: 55%; }
  .hud-right { margin-left: auto; }
}

/* Les sièges se commandent dans le décor. Garder l'action accessible au clavier / lecteur d'écran. */
.context-action.seat-action:not(:focus-within) { width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

/* Promenade (téléphone) : barre « Aller à », points dorés au sol, rapprochements et transitions de porte. */
.promenade-bar { position: absolute; left: 0; right: 0; bottom: 0; z-index: 10; padding: 8px 0 calc(10px + var(--safe-b));
  background: linear-gradient(to top, rgba(31,26,22,.55), rgba(31,26,22,0)); pointer-events: none; }
.promenade-list { display: flex; gap: 8px; overflow-x: auto; padding: 0 12px; scrollbar-width: none; scroll-snap-type: x proximity; pointer-events: auto; }
.promenade-list::-webkit-scrollbar { display: none; }
.promenade-chip { flex: 0 0 auto; scroll-snap-align: start; display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 14px 0 12px;
  border-radius: 999px; border: 1px solid rgba(67,87,71,.25); background: rgba(255,245,232,.94); color: var(--sage); font: 600 14px/1 var(--sans);
  box-shadow: 0 3px 10px rgba(0,0,0,.2); cursor: pointer; white-space: nowrap; }
.promenade-chip::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 3px rgba(197,155,86,.25); }
.promenade-chip.kind-npc { color: var(--bordeaux); }
.promenade-chip.kind-npc::before { background: var(--bordeaux); box-shadow: 0 0 0 3px rgba(119,61,53,.2); }
.promenade-chip.kind-door { background: rgba(67,87,71,.92); color: var(--cream); border-color: rgba(255,245,232,.35); }
.promenade-chip.kind-door::before { background: var(--cream); box-shadow: none; }
.promenade-chip.view-all { background: rgba(31,26,22,.62); color: var(--cream); border-color: rgba(255,245,232,.45); }
.promenade-chip.view-all::before { display: none; }
.promenade-chip.view-all[aria-pressed="true"] { background: var(--cream); color: var(--ink); }
.promenade-chip:active { transform: scale(.97); }
.promenade-on .context-action { bottom: calc(76px + var(--safe-b)); }
.promenade-on .recenter { bottom: calc(76px + var(--safe-b)); }
.promenade-on .chat-reopen { bottom: calc(76px + var(--safe-b)); }
.promenade-on .toasts { bottom: calc(128px + var(--safe-b)); }
@media (min-width: 761px) { .promenade-on .nearby { bottom: calc(76px + var(--safe-b)); } }
.labels.far .place-label:not(.door) { display: none; }
.labels.far .place-label.door { font-size: 12px; padding: 4px 9px 4px 8px; }
.scene-ghost { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; will-change: transform;
  transition: transform .4s cubic-bezier(.55,0,.85,.45); }
.scene-ghost.go { transform: scale(1.5); }
@media (prefers-reduced-motion: reduce) { .scene-ghost { transition: none; } }

/* Devantures cliquables (place) : l'étiquette ne s'affiche qu'au survol de la façade ou au focus clavier. */
.place-label.storefront { opacity: 0; pointer-events: none; transition: opacity .18s ease; }
.place-label.storefront:focus-visible, .place-label.storefront.hover-show { opacity: 1; pointer-events: auto; }
/* Plaques du village : enseigne émaillée crème et vert sauge, lumière douce qui invite au clic. */
.village-plaque { position: absolute; left: 0; top: 0; transform-origin: 50% 100%; pointer-events: auto; cursor: pointer; white-space: nowrap;
  padding: 8px 18px 9px; min-height: 40px; border-radius: 10px; border: 2px solid #435747; color: #2f4a3a;
  background: linear-gradient(180deg, #fbf3e3 0%, #efe0c4 100%); font: 600 16px/1.15 var(--serif); letter-spacing: .02em;
  box-shadow: 0 0 0 3px rgba(251,243,227,.85), 0 6px 16px rgba(0,0,0,.32), 0 0 18px rgba(255,214,140,.45);
  animation: plaque-lueur 3.4s ease-in-out infinite; }
.village-plaque::before { content: ""; position: absolute; inset: 3px; border: 1px solid rgba(67,87,71,.45); border-radius: 7px; pointer-events: none; }
.village-plaque:hover { background: linear-gradient(180deg, #fffaf0 0%, #f4e7cf 100%); }
.village-plaque:focus-visible { outline: 3px solid var(--gold); outline-offset: 4px; }
@keyframes plaque-lueur {
  0%, 100% { box-shadow: 0 0 0 3px rgba(251,243,227,.85), 0 6px 16px rgba(0,0,0,.32), 0 0 12px rgba(255,214,140,.30); }
  50% { box-shadow: 0 0 0 3px rgba(251,243,227,.9), 0 6px 16px rgba(0,0,0,.32), 0 0 30px rgba(255,214,140,.80); }
}
@media (prefers-reduced-motion: reduce) { .village-plaque { animation: none; } }
@media (max-width: 760px) { .village-plaque { font-size: 15px; padding: 9px 15px 10px; min-height: 44px; } }

/* Balcon : la place en direct en plein écran, sans défilement, retour au salon bien visible. */
.balcony-full { position: fixed; inset: 0; z-index: 70; background: #1f1a16; overflow: hidden; overscroll-behavior: contain; touch-action: none; }
.balcony-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.balcony-top { position: absolute; left: 0; right: 0; top: 0; display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px;
  padding: calc(10px + var(--safe-t, 0px)) 14px 18px; background: linear-gradient(to bottom, rgba(31,26,22,.62), rgba(31,26,22,0)); }
.balcony-back { min-height: 46px; padding: 0 20px; font-size: 16px; box-shadow: 0 4px 14px rgba(0,0,0,.35); }
.balcony-info { display: flex; flex-direction: column; gap: 2px; color: var(--cream); font: 600 15px/1.2 var(--sans); text-shadow: 0 1px 3px rgba(0,0,0,.65); }
.balcony-count { font-weight: 500; font-size: 13px; }
.balcony-select { margin-left: auto; min-height: 40px; padding: 0 12px; border-radius: 999px; border: 1px solid rgba(255,245,232,.6); background: rgba(255,245,232,.92); color: var(--ink); font: 500 14px var(--sans); }
.balcony-hint { position: absolute; left: 50%; bottom: calc(10px + var(--safe-b)); transform: translateX(-50%); margin: 0; width: max-content; max-width: calc(100% - 24px);
  color: var(--cream); font: 12px/1.3 var(--sans); text-align: center; opacity: .85; text-shadow: 0 1px 3px rgba(0,0,0,.7); }

/* Terrasse de la salle de jeux : la vue sur l'océan en plein écran, un seul bouton de retour. */
.terrace-full { position: fixed; inset: 0; z-index: 70; background: #1f1a16; overflow: hidden; touch-action: none; }
.terrace-canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.terrace-back { position: absolute; left: 14px; top: calc(12px + var(--safe-t, 0px)); min-height: 46px; padding: 0 20px; font-size: 16px; box-shadow: 0 4px 14px rgba(0,0,0,.35); }
.terrace-caption { position: absolute; left: 50%; bottom: calc(22px + var(--safe-b)); transform: translateX(-50%); margin: 0; width: max-content; max-width: calc(100% - 24px);
  color: var(--cream); font: 600 20px/1.2 var(--serif); text-align: center; text-shadow: 0 2px 8px rgba(0,0,0,.6); transition: opacity 1.2s ease; }
.terrace-caption.gone { opacity: 0; }

/* Réunion de l'annexe : vue assise devant le grand écran ; les vidéos réelles occupent l'écran peint. */
.reunion-stage { position: fixed; inset: 0; z-index: 58; background: #1f1a16; overflow: hidden; }
.reunion-bg { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.reunion-screen { position: absolute; display: grid; place-items: center; background: #0f1a14; border-radius: 4px; overflow: hidden; }
.reunion-screen .meeting-grid { width: 100%; height: 100%; margin: 0; padding: 6px; gap: 6px; display: grid; grid-template-columns: 1fr; grid-auto-rows: 1fr; }
.reunion-screen[data-count="2"] .meeting-grid { grid-template-columns: 1fr 1fr; }
.reunion-screen[data-count="3"] .meeting-grid, .reunion-screen[data-count="4"] .meeting-grid { grid-template-columns: 1fr 1fr; }
.reunion-screen[data-count="5"] .meeting-grid, .reunion-screen[data-count="6"] .meeting-grid { grid-template-columns: repeat(3, 1fr); }
.reunion-screen .meeting-tile { aspect-ratio: auto; min-height: 0; border-radius: 6px; cursor: zoom-in; }
.reunion-screen .meeting-tile video { object-fit: contain; background: #0b120e; } /* visages et partage d'écran entiers, jamais étirés */
.reunion-screen.has-spot .meeting-grid { grid-template-columns: 4fr 1fr; grid-auto-rows: auto; }
.reunion-screen.has-spot .meeting-tile.spot { grid-column: 1; grid-row: 1 / span 6; cursor: zoom-out; }
.reunion-join { max-width: 460px; margin: 12px; padding: 18px 20px; display: grid; gap: 10px; text-align: left; }
.reunion-join h3 { margin: 0; font: 600 22px var(--serif); color: var(--sage); }
.reunion-bar { position: absolute; left: 50%; bottom: calc(10px + var(--safe-b)); transform: translateX(-50%); display: flex; flex-wrap: wrap; justify-content: center; gap: 8px;
  max-width: calc(100% - 20px); padding: 8px; border-radius: 16px; background: rgba(31,26,22,.62); backdrop-filter: blur(6px); }
.reunion-bar .btn { min-height: 44px; }
/* Agrandir : la réunion prend presque tout l'écran ; téléphone en hauteur : mosaïque pleine largeur, décor en fond. */
.reunion-stage.large .reunion-screen, .reunion-stage.portrait .reunion-screen { left: 8px; right: 8px; top: calc(8px + var(--safe-t, 0px)); bottom: calc(76px + var(--safe-b)); width: auto; height: auto; }
.reunion-stage.portrait .reunion-bg { filter: blur(10px) brightness(.55); }
.reunion-stage.portrait .reunion-screen .meeting-grid { grid-template-columns: 1fr !important; }
.reunion-stage.portrait .reunion-bar { bottom: calc(6px + var(--safe-b)); }
/* Une partie en cours : l'appel reste visible en petit, en haut à droite, avec ses commandes. */
.jeu-ouvert .meeting-panel { top: max(var(--hud-bottom, 64px), 64px); bottom: auto; right: 10px; width: 220px; padding: 8px; max-height: 52dvh; z-index: 96; }
.jeu-ouvert .meeting-panel .meeting-head h3 { font-size: 14px; }
.jeu-ouvert .meeting-panel .meeting-grid { grid-template-columns: 1fr; gap: 6px; margin: 6px 0; }
.jeu-ouvert .meeting-panel .hint { display: none; }
.jeu-ouvert .meeting-panel .meeting-controls { gap: 6px; }
.jeu-ouvert .meeting-panel .meeting-controls .btn { min-height: 38px; padding: 0 10px; font-size: 12px; }
@media (max-width: 520px) { .jeu-ouvert .meeting-panel { width: 140px; right: 6px; } .jeu-ouvert .meeting-panel .meeting-head button { display: none; } }
.reunion-stage.portrait .reunion-bar, .reunion-stage.large .reunion-bar { left: 6px; right: 6px; transform: none; max-width: none; flex-wrap: nowrap; overflow-x: auto; justify-content: flex-start; scrollbar-width: none; }
.reunion-stage.portrait .reunion-bar::-webkit-scrollbar { display: none; }
.reunion-bar .btn { flex: 0 0 auto; white-space: nowrap; }
/* Appartement au téléphone : « À côté de vous » au-dessus de la barre « Aller à », jamais par-dessus. */
@media (max-width: 520px) { .promenade-on.in-apartment .nearby { bottom: calc(78px + var(--safe-b)); } }
/* Nouvelle version du village mise en ligne pendant la visite : proposition de recharger (jamais automatique). */
.update-banner { width: min(560px, calc(100vw - 16px)); flex-wrap: wrap; justify-content: center; text-align: center; z-index: 31; font-weight: 500; line-height: 1.35; }
.update-banner span { flex: 1 1 100%; }
.update-banner .btn { min-height: 40px; }

/* Visite gratuite de l'appartement témoin : bandeau toujours lisible, sans bouton d'équipement. */
.apt-bar.apt-bar-temoin { border: 2px solid #C59B56; background: rgba(255, 248, 236, .97); }
.apt-temoin-label { font-size: 14px; color: #2E2620; }
.apt-temoin-label b { color: #2F5A3A; }

/* Plaque « Ruelle des loisirs » : halo rouge qui respire lentement (aucun flash), flèche vers l'entrée du passage ;
   texte toujours lisible. Animations réduites : halo et flèche rouges fixes. */
.village-plaque.plaque-signal { z-index: 2; overflow: visible; font-size: 17px; }
.plaque-signal .plaque-text { position: relative; }
.plaque-halo { position: absolute; inset: -7px; border-radius: 15px; pointer-events: none;
  box-shadow: 0 0 0 3px rgba(196, 30, 36, .95), 0 0 18px 6px rgba(214, 38, 44, .55); animation: halo-rouge 2.8s ease-in-out infinite; }
@keyframes halo-rouge {
  0%, 100% { box-shadow: 0 0 0 3px rgba(196, 30, 36, .75), 0 0 10px 2px rgba(214, 38, 44, .30); }
  50% { box-shadow: 0 0 0 3px rgba(196, 30, 36, 1), 0 0 24px 9px rgba(214, 38, 44, .70); }
}
.plaque-fleche { position: absolute; left: 50%; top: 50%; width: 0; height: 0; pointer-events: none; transform: rotate(var(--fleche, 0deg)) translateY(var(--fleche-r, 26px)); }
.plaque-fleche::before { content: ""; position: absolute; left: -4px; top: 0; width: 8px; height: 18px; background: #C41E24; border-radius: 2px; box-shadow: 0 0 0 2px rgba(255,248,236,.9); }
.plaque-fleche::after { content: ""; position: absolute; left: -15px; top: 15px; border-left: 15px solid transparent; border-right: 15px solid transparent; border-top: 19px solid #C41E24;
  filter: drop-shadow(0 0 2px rgba(255,248,236,.95)) drop-shadow(0 2px 2px rgba(0,0,0,.35)); }
.plaque-signal .plaque-fleche { animation: fleche-ruelle 1.8s ease-in-out infinite; }
@keyframes fleche-ruelle { 0%, 100% { translate: 0 0; } 50% { translate: 0 4px; } }
.plaque-signal.au-bord .plaque-fleche { animation: none; }
@media (prefers-reduced-motion: reduce) {
  .plaque-halo { animation: none; box-shadow: 0 0 0 3px rgba(196, 30, 36, 1), 0 0 16px 5px rgba(214, 38, 44, .6); }
  .plaque-signal .plaque-fleche { animation: none; }
}

/* Clara, guide virtuelle : en bas à droite sur ordinateur (le coin gauche est celui des personnes à proximité), en bas sur
   téléphone (au-dessus de la barre « Aller à ») ; sous les autres panneaux, mais devant le bouton d'action du lieu : ses
   propres boutons (« Continuer ») restent toujours touchables. */
.guide-panel { position: absolute; right: 12px; bottom: calc(14px + var(--safe-b)); z-index: 12; display: flex; gap: 12px; align-items: flex-start;
  width: min(440px, calc(100vw - 24px)); padding: 12px 14px; border: 2px solid #C59B56; background: rgba(255, 248, 236, .98); }
.guide-portrait { width: 56px; height: 56px; border-radius: 50%; object-fit: cover; object-position: top; flex: none; border: 2px solid #435747; background: #efe0c4; }
.guide-body { display: grid; gap: 6px; min-width: 0; }
.guide-name { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin: 0; }
.guide-text { margin: 0; font-size: 14.5px; line-height: 1.45; color: #2E2620; }
.guide-actions { display: flex; flex-wrap: wrap; gap: 6px; }
.guide-visit { background: #2F5A3A; border-color: #2F5A3A; }
.guide-chip-wrap { position: absolute; right: 12px; bottom: calc(14px + var(--safe-b)); z-index: 9; display: flex; align-items: center; gap: 4px; }
.guide-chip-close { width: 32px; height: 32px; border-radius: 50%; border: 1px solid rgba(67,87,71,.4); background: #fbf3e3; cursor: pointer; font-size: 18px; line-height: 1; }
.promenade-on .guide-panel, .promenade-on .guide-chip-wrap { bottom: calc(76px + var(--safe-b)); }
body.jeu-ouvert .guide-panel, body.jeu-ouvert .guide-chip-wrap { display: none; }
@media (max-width: 760px) {
  .guide-panel { left: 8px; right: 8px; width: auto; padding: 10px 12px; }
  .guide-chip-wrap { right: auto; left: 8px; }
  .guide-portrait { width: 44px; height: 44px; }
  .guide-text { font-size: 14px; }
}

/* Lecteur de musique des appartements : carte sous la barre de l'appartement. */
.music-panel { position: absolute; left: 50%; transform: translateX(-50%); top: calc(max(var(--hud-bottom, 0px), 64px) + 56px); z-index: 11;
  width: min(420px, calc(100vw - 24px)); max-height: calc(100dvh - 200px); overflow-y: auto; padding: 12px 14px; display: grid; gap: 10px; }
.music-head { display: flex; align-items: center; justify-content: space-between; }
.music-head h3 { margin: 0; font-size: 17px; }
.music-moods { flex-wrap: wrap; }
.music-list { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 6px; }
.music-list li { display: flex; align-items: center; gap: 8px; }
.music-list small { color: #5A4D42; }
.music-now { margin: 0; font-size: 14px; }
.music-now small { color: #5A4D42; }
.music-volume { display: flex; align-items: center; gap: 10px; }
.music-volume input { flex: 1; }

.balcony-down { min-height: 46px; padding: 0 18px; font-size: 15px; background: #FFF5E8; border: 2px solid #C59B56; color: #2F4A3A; box-shadow: 0 4px 14px rgba(0,0,0,.35); }
/* Plaque « Entrer dans le café » : plus grande, lueur dorée douce (animation de base des plaques). */
.village-plaque.plaque-cafe { font-size: 19px; padding: 10px 22px 11px; }
@media (max-width: 760px) { .village-plaque.plaque-cafe { font-size: 16px; } }

/* « Les recettes d'Atef Barbouche » (dossier d'Atef, sources/carrousel.css adapté) : entrée du panneau des nouveautés et
   grande fenêtre ; au téléphone, toute la hauteur disponible, lecture verticale libre, boutons de 44 px au moins. */
.news-list { display: grid; gap: 14px; }
.news-recipes { display: grid; gap: 6px; padding: 14px 16px; border-radius: 14px; border: 2px solid #C59B56; background: linear-gradient(135deg, #fbf3e3, #f1e4c8); }
.news-recipes h3 { margin: 0; font: 600 21px/1.2 var(--serif); color: #2f4a3a; }
.news-recipes-sub { margin: 0; color: #5A4D42; }
.news-recipes .btn { justify-self: start; }
.modal.modal-recettes { width: min(920px, 100%); max-height: calc(100dvh - 24px); background: #fffaf2; backdrop-filter: none; }
.atef-recipes { color: #243d32; background: #fbf7ec; border-radius: 16px; padding: clamp(12px, 3vw, 28px); }
.atef-recipes * { box-sizing: border-box; }
.atef-recipes .ar-intro { margin: 0; color: #6d614b; }
.atef-recipes .ar-filters, .atef-recipes .ar-nav { display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; margin: 16px 0; }
.atef-recipes .ar-filters label { display: flex; align-items: center; gap: 8px; }
.atef-recipes select, .atef-recipes button { font: inherit; min-height: 44px; border: 1px solid #b9c6b7; border-radius: 10px; padding: 8px 12px; background: #fff; color: #243d32; }
.atef-recipes .ar-nav button { background: #315c49; color: #fff; cursor: pointer; }
.atef-recipes button:disabled { opacity: .45; cursor: default; }
.atef-recipes :focus-visible { outline: 3px solid #b86b22; outline-offset: 3px; }
.atef-recipes .ar-nav span { font-variant-numeric: tabular-nums; font-weight: 600; }
.atef-recipes .ar-card { padding: clamp(14px, 3vw, 30px); border: 1px solid #e2d6bc; border-radius: 14px; background: #fffdf8; touch-action: pan-y; overflow-wrap: anywhere; }
.atef-recipes .ar-card h3 { font: 600 clamp(22px, 3.4vw, 32px)/1.2 var(--serif); margin: 6px 0 10px; color: #243d32; }
.atef-recipes .ar-card h4 { margin: 16px 0 6px; font-size: 16px; }
.atef-recipes .ar-meta, .atef-recipes .ar-note { font-size: 14px; color: #665f52; line-height: 1.6; }
.atef-recipes .ar-produce { color: #557344; font-weight: 600; margin: 0; }
.atef-recipes .ar-card li { line-height: 1.65; margin-bottom: 6px; }
.atef-recipes .ar-card ul, .atef-recipes .ar-card ol { padding-left: 22px; margin: 0; }
.atef-recipes .ar-signature { border-top: 1px solid #e2d6bc; padding-top: 14px; margin-top: 16px; font-family: var(--serif); }
.atef-recipes .ar-note { margin: 16px 0 0; }
@media (max-width: 760px) {
  .modal.modal-recettes { max-height: 100dvh; border-radius: 16px 16px 0 0; }
  .modal-recettes .modal-body { padding: 8px; }
  .atef-recipes { padding: 10px; border-radius: 12px; }
  .atef-recipes .ar-nav { gap: 8px; }
  .atef-recipes .ar-nav button { flex: 1; font-size: 14px; }
  .atef-recipes .ar-filters label { width: 100%; justify-content: space-between; }
  .atef-recipes .ar-filters select { flex: 1; }
}

/* « SUITE PRIVÉE — ACCÈS MEMBRES » : grand rectangle bordeaux, texte crème sur plusieurs lignes, fin liseré doré,
   entièrement cliquable (cible confortable au toucher). */
.village-plaque.suite-plaque { display: inline-flex; flex-direction: column; align-items: center; gap: 3px; padding: 11px 22px 12px; min-height: 58px;
  background: linear-gradient(180deg, #9E1F2B 0%, #7A1420 100%); border: 2px solid #E9C77B; border-radius: 10px; color: #FFF5E8; animation: none;
  box-shadow: 0 0 0 2px #5A0E17, 0 8px 22px rgba(0,0,0,.4); white-space: nowrap; }
.village-plaque.suite-plaque::before { border-color: rgba(255,245,232,.3); }
.village-plaque.suite-plaque:hover { background: linear-gradient(180deg, #B0283A 0%, #861827 100%); }
.suite-plaque .plaque-price { margin-top: 3px; padding-top: 4px; border-top: 1px solid rgba(233,199,123,.55); font: 700 13px/1.2 var(--sans); color: #F3DDA6; }
.suite-plaque .plaque-text { font: 700 18px/1.1 var(--sans); letter-spacing: .06em; color: #FFF5E8; }
.suite-plaque .plaque-sub { font: 600 14px/1.2 var(--sans); color: #FFF5E8; }
.suite-plaque .plaque-fleche::before, .suite-plaque .plaque-fleche::after { filter: drop-shadow(0 0 2px #fff); }
@media (max-width: 760px) { .suite-plaque .plaque-text { font-size: 14px; } .suite-plaque .plaque-sub { font-size: 12px; } .suite-plaque .plaque-price { font-size: 11.5px; } .village-plaque.suite-plaque { padding: 8px 12px 9px; gap: 2px; } }

/* Conversation individuelle : trois grands boutons (message, appel audio, appel vidéo), contrastés et faciles à toucher. */
.conv-actions { display: grid; gap: 6px; padding: 8px 12px 10px; border-bottom: 1px solid var(--panel-line, rgba(139,104,73,.24)); }
.conv-hint { margin: 0; font-size: 13px; color: var(--ink-2, #5A4D42); text-align: center; }
.conv-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.conv-btn { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px; min-height: 64px; padding: 8px 6px; border-radius: 14px;
  border: 2px solid transparent; font: 700 14px/1.15 var(--sans); cursor: pointer; text-align: center; box-shadow: 0 3px 10px rgba(46,38,32,.14); }
.conv-btn .conv-ico { font-size: 22px; line-height: 1; }
.conv-btn:disabled { opacity: .45; cursor: default; box-shadow: none; }
.conv-btn:focus-visible { outline: 3px solid #C59B56; outline-offset: 2px; }
.conv-msg { background: #FFF5E8; color: #2F4A3A; border-color: #435747; }
.conv-audio { background: #2F5A3A; color: #FFF8EC; border-color: #2F5A3A; }
.conv-video { background: #8E4A2B; color: #FFF8EC; border-color: #8E4A2B; }
.conv-msg:hover:not(:disabled) { background: #fbe9d1; }
.conv-audio:hover:not(:disabled) { background: #24492e; }
.conv-video:hover:not(:disabled) { background: #7a3e23; }
@media (max-width: 420px) { .conv-btn { min-height: 60px; font-size: 13px; } .conv-btn .conv-ico { font-size: 20px; } }

/* Étiquettes des présentoirs de recettes : sur téléphone, deux lignes plutôt qu'un texte réduit ou coupé. */
@media (max-width: 760px) { .place-label.stand-label { white-space: normal; max-width: 210px; text-align: center; line-height: 1.2; padding: 6px 12px; } }
.place-label .lbl-short { display: none; }
@media (max-width: 760px) { .place-label .lbl-long { display: none; } .place-label .lbl-short { display: inline; } .place-label.stand-label { padding: 4px 9px; font-size: 12px; } }
/* Boutons « Vos recettes » devant les commerces (demande d'Atef du 1er novembre 2026) : rouges, texte blanc, compacts,
   liseré doré comme la plaque de la suite ; petite icône couverts ; zone de toucher agrandie sans grossir le bouton. */
.place-label.recipe-tag { gap: 6px; padding: 5px 11px 5px 8px; font: 700 12.5px/1 var(--sans); letter-spacing: .02em; color: #fff;
  background: linear-gradient(180deg, #B42A35 0%, #8E1B26 100%); border: 1px solid #E9C77B; text-shadow: 0 1px 1px rgba(0,0,0,.25);
  box-shadow: 0 2px 8px rgba(46,38,32,.32), inset 0 1px 0 rgba(255,255,255,.18); }
.place-label.recipe-tag::before { width: 13px; height: 13px; border-radius: 0; box-shadow: none; background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 2h1.4v5.5h1.1V2H10v5.5h1.1V2h1.4v6.5a2.5 2.5 0 0 1-2 2.45V22H8.5V10.95a2.5 2.5 0 0 1-2.5-2.45zM18.5 2c-2 1.2-3.2 3.6-3.2 6.5V14h2v8h2V2z'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M6 2h1.4v5.5h1.1V2H10v5.5h1.1V2h1.4v6.5a2.5 2.5 0 0 1-2 2.45V22H8.5V10.95a2.5 2.5 0 0 1-2.5-2.45zM18.5 2c-2 1.2-3.2 3.6-3.2 6.5V14h2v8h2V2z'/%3E%3C/svg%3E") center / contain no-repeat; }
.place-label.recipe-tag::after { content: ""; position: absolute; inset: -9px -6px; }
.place-label.recipe-tag:hover, .place-label.recipe-tag:focus-visible { background: linear-gradient(180deg, #C2323D 0%, #9E1F2B 100%); }
.place-label.recipe-tag:focus-visible { outline: 3px solid #E9C77B; outline-offset: 2px; }
@media (max-width: 760px) { .place-label.recipe-tag { font-size: 12px; padding: 5px 10px 5px 8px; } }
.atef-recipes .ar-photo { width: 100%; max-width: 520px; margin: 0 auto 6px; border-radius: 14px; background-repeat: no-repeat; box-shadow: 0 6px 18px rgba(46,38,32,.18); }
.atef-recipes .ar-photo-note { margin: 0 0 10px; text-align: center; font-size: 12.5px; color: #665f52; }

/* Salon musical : barre du salon, bibliothèque, vues rapprochées du piano et de la scène. */
.salon-bar { position: absolute; left: 50%; transform: translateX(-50%); top: max(var(--hud-bottom, 0px), 64px); z-index: 6; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; justify-content: center;
  padding: 8px 10px; max-width: calc(100% - 24px); }
.salon-status { flex-basis: 100%; text-align: center; font-size: 13px; color: var(--ink-2, #5A4D42); }
.salon-library-modal { width: min(760px, 100%); }
.salon-library { display: grid; gap: 10px; }
.salon-library input[type=search] { width: 100%; min-height: 44px; padding: 8px 12px; border-radius: 10px; border: 1px solid rgba(67,87,71,.35); }
.salon-now { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.salon-now-actions { display: flex; gap: 6px; margin-left: auto; }
.salon-tracks { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.salon-tracks li { display: flex; gap: 10px; align-items: center; justify-content: space-between; padding: 8px 10px; border-radius: 12px; border: 1px solid rgba(139,104,73,.24); background: #fffbf4; }
.salon-tracks li.current { border: 2px solid #C59B56; background: #fbf3e3; }
.salon-track-text { display: grid; gap: 2px; min-width: 0; }
.salon-track-text span, .salon-track-text small { color: #5A4D42; font-size: 13px; }
.salon-track-actions { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; }
.salon-view { position: fixed; inset: 0; z-index: 35; }
.salon-view-bg { position: absolute; inset: 0; background: #1F1A16 center / cover no-repeat; }
.salon-view-top { position: absolute; top: calc(10px + var(--safe-t, 0px)); left: 50%; transform: translateX(-50%); width: min(760px, calc(100% - 24px)); display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
  justify-content: space-between; padding: 10px 14px; border-radius: 14px; background: rgba(255,248,236,.94); box-shadow: 0 6px 20px rgba(0,0,0,.3); }
.salon-view-top .hint { flex: 1 1 260px; font-size: 13px; }
.stage-panel { position: absolute; left: 50%; bottom: calc(14px + var(--safe-b, 0px)); transform: translateX(-50%); width: min(560px, calc(100% - 16px)); display: grid; gap: 8px; padding: 12px 14px;
  background: rgba(255,248,236,.96); max-height: 62dvh; overflow-y: auto; }
.stage-head { display: flex; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.stage-state { font-weight: 600; color: #2F5A3A; }
.stage-row { display: flex; flex-wrap: wrap; gap: 6px; }
.stage-row .btn { min-height: 44px; }
.stage-meter, .annonce-meter { display: block; height: 8px; border-radius: 999px; background: rgba(67,87,71,.18); overflow: hidden; min-width: 120px; }
.stage-meter-fill, .annonce-meter-fill { display: block; height: 100%; width: 0; background: linear-gradient(90deg, #2F5A3A, #C59B56, #B3261E); transition: width .1s linear; }
.stage-label { font-size: 13px; font-weight: 600; }
.stage-panel select { min-height: 44px; border-radius: 10px; padding: 6px 10px; }
.stage-countdown { font: 700 22px var(--serif); text-align: center; color: #B3261E; margin: 0; }
/* Annonce : bouton du propriétaire (vert contrasté, mégaphone blanc) et bandeau d'écoute. */
.annonce-btn { display: inline-flex; align-items: center; gap: 6px; min-height: 44px; padding: 0 14px; border-radius: 999px; border: 2px solid #FFF5E8; background: #2F5A3A; color: #fff;
  font: 700 14px var(--sans); cursor: pointer; box-shadow: 0 3px 10px rgba(0,0,0,.25); }
.annonce-btn.live { background: #B3261E; }
.annonce-banner { position: absolute; left: 50%; transform: translateX(-50%); top: calc(max(var(--hud-bottom, 0px), 64px) + 52px); z-index: 13; display: flex; flex-wrap: wrap; gap: 8px; align-items: center;
  justify-content: center; padding: 8px 12px; max-width: calc(100% - 24px); border: 2px solid #C59B56; }
.annonce-controls { display: inline-flex; flex-wrap: wrap; gap: 6px; align-items: center; }
@media (max-width: 760px) {
  .annonce-btn .annonce-btn-label { font-size: 13px; }
  .annonce-btn { padding: 0 10px; }
  .salon-bar .btn { font-size: 13px; }
}
/* Téléphone : la carte « à côté de vous » occupe le haut ; la barre du salon passe en bas, au-dessus de « Aller à ». */
@media (max-width: 760px) {
  .salon-bar { top: auto; bottom: calc(14px + var(--safe-b)); gap: 4px; padding: 6px 8px; }
  .promenade-on .salon-bar { bottom: calc(76px + var(--safe-b)); }
  .salon-bar .salon-status { font-size: 12px; }
}
.stage-panel { grid-template-columns: minmax(0, 1fr); overflow-x: hidden; }
.stage-panel select, .stage-panel .music-volume input { width: 100%; max-width: 100%; min-width: 0; }
.stage-head > *, .stage-state { min-width: 0; overflow-wrap: anywhere; }

/* Artisans : grand bouton « Découvrez les recettes d’Atef Barbouche » en tête de leurs propositions. */
.npc-recipes-btn { display: flex; align-items: center; gap: 12px; width: 100%; margin: 0 0 10px; padding: 12px 14px; min-height: 56px; text-align: left; cursor: pointer;
  border: 2px solid #C59B56; border-radius: 14px; background: linear-gradient(135deg, #2F5A3A, #3F7A4E); color: #fff; box-shadow: 0 4px 14px rgba(47,90,58,.28); font: inherit; }
.npc-recipes-btn:hover { filter: brightness(1.06); }
.npc-recipes-btn:focus-visible { outline: 3px solid #b86b22; outline-offset: 3px; }
.npc-recipes-icon { font-size: 26px; line-height: 1; flex: none; }
.npc-recipes-text { display: grid; gap: 2px; min-width: 0; }
.npc-recipes-text b { font: 600 17px/1.2 var(--serif); }
.npc-recipes-text span { font-size: 13px; color: #f3ead6; }

/* Suggestion proche (fiche de « Composez votre menu ») : jamais présentée comme une correspondance. */
.qc-diff { margin: 4px 0 0; font-size: 13px; color: #7a4d1e; }
.qc-diff-card { margin: 6px 0 8px; padding: 8px 12px; border-left: 4px solid #C59B56; background: #fff6e6; border-radius: 8px; font-size: 14px; }

/* Télévision du premier salon (public/js/tele.js) : vue assise DE FACE, lecteur posé sur le rectangle de l'écran. */
.tv-view { position: fixed; inset: 0; z-index: 36; display: flex; flex-direction: column; align-items: center; justify-content: flex-start; gap: 8px;
  padding: max(10px, var(--safe-t, 0px)) 8px max(10px, var(--safe-b, 0px)); background: #1f1a16; overflow: hidden; }
.tv-stage { position: relative; flex: none; overflow: hidden; border-radius: 12px; box-shadow: 0 18px 50px rgba(0,0,0,.45); max-width: 100%; }
.tv-bg { position: absolute; inset: 0; background-repeat: no-repeat; }
.tv-screen { position: absolute; left: 0; top: 0; background: #14251e; display: flex; align-items: center; justify-content: center; overflow: hidden; }
.tv-box { flex: none; display: flex; align-items: center; justify-content: center; background: #0d1210; }
.tv-stage:fullscreen { border-radius: 0; background: #000; box-shadow: none; }
.tv-screen-hint { margin: 0; padding: 0 30px; color: #e9f0ea; font: 600 26px/1.3 var(--serif, Georgia, serif); text-align: center; }
.tv-frame { width: 100%; height: 100%; border: 0; display: block; background: #000; }
.tv-bar { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; justify-content: center; max-width: min(980px, 100%); }
.tv-bar .btn { min-height: 44px; }
.tv-status { margin: 0 6px; color: #f3ead6; font-size: 14px; }
.tv-list { display: flex; gap: 8px; overflow-x: auto; overscroll-behavior: contain; max-width: min(1100px, 100%); padding: 4px 2px 8px; scroll-snap-type: x proximity; }
.tv-list .hint { color: #e9e0cf; }
.tv-item { flex: 0 0 auto; width: 210px; min-height: 64px; display: grid; grid-template-columns: 72px minmax(0, 1fr); gap: 8px; align-items: center; text-align: left; padding: 6px;
  border-radius: 12px; border: 1px solid rgba(197,155,86,.5); background: rgba(255,248,236,.95); color: #2e2620; font: inherit; cursor: pointer; scroll-snap-align: start; }
.tv-item img { width: 72px; height: 48px; object-fit: cover; border-radius: 8px; }
.tv-item b { display: block; font-size: 13px; line-height: 1.25; } .tv-item small { color: #5a4d42; font-size: 11.5px; }
.tv-item.current { border: 2px solid #C59B56; background: #fbf3e3; }
.tv-item:focus-visible { outline: 3px solid #b86b22; outline-offset: 2px; }
@media (max-width: 700px) { .tv-item { width: 170px; grid-template-columns: 56px minmax(0, 1fr); } .tv-item img { width: 56px; height: 40px; } }
.tv-item { grid-template-columns: 40px minmax(0, 1fr); width: 240px; }
.tv-item:has(img) { grid-template-columns: 72px minmax(0, 1fr); }
.tv-item-ico { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: #2F5A3A; color: #fff; font-size: 15px; }
@media (max-width: 700px) { .tv-item { width: 200px; } }
/* Téléphone en hauteur : la liste des vidéos occupe la place sous l'écran, en colonne (plus de bande vide). */
@media (max-width: 700px) and (orientation: portrait) {
  .tv-list { flex: 1 1 auto; min-height: 0; width: 100%; flex-direction: column; overflow-x: hidden; overflow-y: auto; scroll-snap-type: y proximity; }
  .tv-item { width: 100%; }
}

/* Écran « Tour du monde des fruits » en grand (public/js/philibon.js) : visuel entier sur fond noir, sans recadrage. */
.modal.philibon-modal { width: min(1100px, 100%); }
.philibon-viewer { display: grid; gap: 10px; }
.philibon-frame { display: grid; place-items: center; background: #000; border-radius: 12px; overflow: hidden; }
.philibon-img { display: block; width: 100%; height: auto; max-height: calc(100dvh - 260px); object-fit: contain; }
.philibon-caption { margin: 0; text-align: center; font: 600 16px/1.35 var(--serif); color: var(--ink); }
.philibon-bar { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; }
.philibon-bar .btn { min-height: 44px; min-width: 44px; }
.philibon-note { margin: 0; text-align: center; font-size: 13px; color: var(--ink-2); }
