/* Veillée — cadrage de l'image d'un lieu (location-framing.js). Thème clair. */
.vfr-picker{display:flex;flex-wrap:wrap;gap:6px}
.vfr-opt{display:flex;flex-direction:column;align-items:center;justify-content:center;gap:4px;width:78px;height:64px;padding:4px;border:1px solid var(--line);border-radius:6px;background:var(--surface);color:var(--ink);font-size:11px;line-height:1.15;text-align:center;cursor:pointer}
.vfr-opt:hover{background:var(--green-soft)}
.vfr-opt.is-on,.vfr-opt[aria-pressed=true]{border-color:var(--green);background:var(--green-soft);color:var(--green);font-weight:650}
.vfr-editor{position:absolute;inset:0;z-index:30;pointer-events:none}
.vfr-box{position:absolute;box-sizing:border-box;border:2px dashed var(--green);background:transparent;cursor:move;touch-action:none;pointer-events:auto}
.vfr-box:focus-visible{outline:2px solid var(--copper);outline-offset:2px}
.vfr-h{position:absolute;box-sizing:border-box;width:12px;height:12px;background:#fff;border:2px solid var(--green);pointer-events:auto}
.vfr-h-nw{top:-6px;left:-6px;cursor:nwse-resize}.vfr-h-ne{top:-6px;right:-6px;cursor:nesw-resize}
.vfr-h-se{bottom:-6px;right:-6px;cursor:nwse-resize}.vfr-h-sw{bottom:-6px;left:-6px;cursor:nesw-resize}
.vfr-h-n{top:-6px;left:calc(50% - 6px);cursor:ns-resize}.vfr-h-s{bottom:-6px;left:calc(50% - 6px);cursor:ns-resize}
.vfr-h-w{left:-6px;top:calc(50% - 6px);cursor:ew-resize}.vfr-h-e{right:-6px;top:calc(50% - 6px);cursor:ew-resize}
.vfr-bar{position:absolute;bottom:8px;left:50%;transform:translateX(-50%);display:flex;align-items:center;gap:8px;padding:6px 10px;border:1px solid var(--line);border-radius:8px;background:var(--surface);font-size:12px;pointer-events:auto;white-space:nowrap}
.vfr-bar button{padding:3px 9px;border:1px solid var(--line);border-radius:5px;background:var(--paper);cursor:pointer}
.vfr-bar .vfr-save{background:var(--green);border-color:var(--green);color:#fff}
/* Réglage manuel : le cadre garde le rapport largeur/hauteur de la vue pour que les fractions restent fidèles chez le joueur */
.location-stage.vfr-manual{max-height:none;overflow:hidden;margin-inline:auto}
.sw-stage.vfr-manual{overflow:hidden}
/* En réglage manuel, la scène garde le rapport de la vue (largeur/hauteur du lieu), en grand comme chez le joueur */
.location-stage.vfr-manual,.stage-expanded .location-stage.vfr-manual,.player-layout #workspace .location-stage.vfr-manual{aspect-ratio:var(--location-ratio)!important;height:auto!important;max-height:calc(100dvh - 210px)!important;width:min(100%,calc((100dvh - 210px) * var(--location-ratio)))!important}
.location-stage.vfr-editing,.sw-stage.vfr-editing{overflow:visible!important}
/* Dans l'en-tête de la régie du lieu, la même pastille tient en une rangée : dessin seul, libellé en info-bulle. */
.location-preview-panel .vfr-picker{display:inline-flex;flex-wrap:nowrap;gap:4px;margin-left:6px}
.location-preview-panel .vfr-opt{width:40px;height:34px;padding:2px}
.location-preview-panel .vfr-opt span{display:none}
/* En-tête de la régie : la rangée d'actions passe à la ligne plutôt que de rogner les pastilles dans une fenêtre étroite. */
.location-preview-panel .actions{flex-wrap:wrap}
/* Réglages ouverts : la carte seule, sans voisines du carrousel ni listes, comme la grande image des joueurs. */
.vw-settings-focus .vc-slide:not(.vc-active){display:none}
.vw-settings-focus .vc-slide.vc-active{width:min(1240px,96%)}
.vw-settings-focus .vw-stage .vc-swiper{height:var(--vc-h);padding:0}
.vw-settings-focus .sw-card{width:100%;height:100%;display:block}
.vw-settings-focus .sw-card{border:0;background:none;box-shadow:none;padding:0}
.vw-settings-focus .sw-card .vw-card-head,.vw-settings-focus .sw-card .vw-list,.vw-settings-focus .sw-card .vw-card-foot{display:none}
/* La plus grande image qui tient dans la page en gardant le rapport du lieu : elle touche un des bords.
   Posée en fixe pour ne dépendre ni du carrousel ni de la carte : la largeur est le plus petit des deux
   « tout l'écran disponible » et « la hauteur disponible au rapport du lieu ». */
.vw-settings-focus .sw-card .sw-stage{position:fixed;top:112px;left:calc(50% + 140px);transform:translateX(-50%);z-index:4;margin:0;height:auto;min-height:0;max-height:calc(100dvh - 210px);aspect-ratio:var(--sw-ratio,16/10);width:min(calc(100vw - 400px), calc((100dvh - 210px) * var(--sw-ratio,16/10)))}
/* L'image se déplace à la souris : le curseur le dit, et le geste ne déclenche pas le rectangle de sélection. */
.sw-stage.vfr-pan{cursor:grab;touch-action:none}
.sw-stage.vfr-pan.vfr-panning{cursor:grabbing}
/* Bouton posé sur l'image : elle prend toute la page (bureau du MJ en réglage, table du joueur). */
.stage-plein{position:absolute;top:6px;right:6px;z-index:46;display:grid;place-items:center;width:30px;height:30px;border:1px solid var(--line);border-radius:8px;background:var(--surface);color:var(--ink);font-size:15px;line-height:1;cursor:pointer;opacity:.85}
.stage-plein:hover,.stage-plein:focus-visible{opacity:1;border-color:var(--green);color:var(--green)}
[data-plein-image] .vw-settings{display:none}
[data-plein-image] .vw-settings-focus .sw-card .sw-stage,.sw-stage[data-plein]{left:50%;width:min(calc(100vw - 40px), calc((100dvh - 190px) * var(--sw-ratio,16/10)))}
[data-plein-image] .vpt-tile:not([data-frame="image-scene"]){display:none}
[data-plein-image] .location-stage{height:calc(100dvh - 200px)!important;max-height:none!important;width:min(100%, calc((100dvh - 200px) * var(--location-ratio,1.7778)))!important}
/* Régie agrandie : la grande image tient dans sa zone, sans déformation, et ne recouvre plus les boutons de cadrage (Benoit, 30/10). */
.stage-expanded .console-stage-wrap:has(>.location-stage){container-type:size}
.stage-expanded .console-stage-wrap>.location-stage,.stage-expanded .console-stage-wrap>.location-stage.vfr-manual{max-height:100cqh!important}
.stage-expanded .console-stage-wrap>.location-stage.vfr-manual{height:auto!important;max-width:100cqw!important;width:min(100cqw,calc(100cqh * var(--location-ratio)))!important}
