/* =========================================================
 * Soléa Studio — Responsive overrides (mobile + tablet)
 * Chargé APRÈS configurator-studio.css. Surcharge uniquement.
 *
 * Breakpoints :
 *   - Mobile  : <= 640px   → drawers, FAB, bottom tab bar
 *   - Tablet  : 641-1023px → sidebars 240px, icons-only
 *   - Desktop : >= 1024px  → comportement de base
 *
 * Convention :
 *   - Cibles tactiles >= 44×44px (Apple HIG / Material)
 *   - Transitions drawer : 300ms cubic-bezier(0.22, 0.61, 0.36, 1)
 *   - Hover désactivés en pointeur tactile (@media (hover: none))
 *   - Safe-area iOS (env(safe-area-inset-*))
 * ========================================================= */

/* ====== ACCESSIBILITY FIXES (tous breakpoints) ====== */
/* Bump des fonts les plus petites pour passer WCAG (>= 11px minimum) */
.solea-studio .studio-rooms-eyebrow,
.solea-studio .studio-footer-label,
.solea-studio .studio-budget-eyebrow,
.solea-studio .recap-eyebrow,
.solea-studio .studio-mat-card-meta,
.solea-studio .studio-mat-tier,
.solea-studio .studio-mat-card-note,
.solea-studio .studio-roof-desc,
.solea-studio .studio-window-mat-badge { font-size: 10.5px !important; letter-spacing: 0.12em; }

/* Contraste text-mute augmenté pour WCAG AA */
.solea-studio { --st-text-mute: rgba(244, 240, 232, 0.62); }

/* Tap targets minimums 36×36 (était 20-30) — moins de 44 mais déjà mieux */
.solea-studio .studio-search-clear,
.solea-studio .studio-chat-attach-remove,
.solea-studio .studio-win-qty-btn { min-width: 28px; min-height: 28px; }
.solea-studio .studio-chat-close,
.solea-studio .studio-chat-attach,
.solea-studio .studio-chat-voice,
.solea-studio .studio-chat-send { min-width: 36px; min-height: 36px; }


/* ════════════════════════════════════════════════════
   0. VARIABLES RESPONSIVE
   ════════════════════════════════════════════════════ */
.solea-studio {
    --st-drawer-w:        min(86vw, 340px);
    --st-drawer-easing:   cubic-bezier(0.22, 0.61, 0.36, 1);
    --st-drawer-dur:      300ms;
    --st-fab-size:        52px;
    --st-bottom-tabs-h:   60px;
    --st-tap-target:      44px;
    --st-safe-bottom:     env(safe-area-inset-bottom, 0px);
    --st-safe-top:        env(safe-area-inset-top, 0px);
}

/* Éléments mobile-only, cachés par défaut (desktop) */
.studio-fab,
.studio-bottom-tabs,
.studio-drawer-backdrop,
.studio-mobile-only {
    display: none !important;
}

/* Éléments desktop-only, visibles par défaut */
.studio-desktop-only { display: initial; }


/* ════════════════════════════════════════════════════
   1. TABLET — 641 → 1023px
   ════════════════════════════════════════════════════ */
@media (min-width: 641px) and (max-width: 1023px) {

    .solea-studio {
        --st-sidebar-l-w: 240px;
        --st-sidebar-r-w: 240px;
        --st-topbar-h:    52px;
        --st-toolbar-h:   42px;
    }

    /* — Topbar : labels disparaissent, icônes only — */
    .studio-topbar { padding: 0 12px; }
    .studio-brand-text       { display: none; }
    .studio-project-input    { min-width: 130px; font-size: 12.5px; }
    .studio-topbar-divider   { margin: 0 4px; }
    .studio-btn .studio-btn-label,
    .studio-topbar .studio-btn span:not(.studio-btn-icon) { display: none; }
    .studio-btn { padding: 9px 10px; gap: 0; }
    .studio-btn svg { width: 18px; height: 18px; }

    /* — Toolbar canvas : icons only — */
    .studio-tool { padding: 7px 9px; }
    .studio-tool-label,
    .studio-tool span:not(.studio-tool-icon) { display: none; }
    .studio-tool svg { width: 17px; height: 17px; }

    /* — Catalogue : 3 colonnes — */
    .studio-catalog {
        grid-template-columns: 1fr 1fr 1fr;
        gap: 6px;
    }
    .studio-catalog-item { padding: 10px 8px; }
    .studio-catalog-label { font-size: 11px; }
    .studio-catalog-meta  { font-size: 10px; }

    /* — Matériaux : 3 colonnes — */
    .studio-mat-swatches { grid-template-columns: 1fr 1fr 1fr; }

    /* — Tabs sidebar : un peu plus compact — */
    .studio-tab {
        padding: 10px 4px 8px;
        font-size: 9.5px;
    }
    .studio-tab svg { width: 18px; height: 18px; }

    /* — Panel padding réduit — */
    .studio-panel { padding: 14px 12px 20px; }
    .studio-props-summary,
    .studio-props-detail { padding: 18px 14px 24px; }

    /* — Footer compact — */
    .studio-footer-label { font-size: 10px; }
    .studio-footer-value { font-size: 14px; }
}


/* ════════════════════════════════════════════════════
   2. MOBILE — <= 640px
   ════════════════════════════════════════════════════ */
@media (max-width: 640px) {

    /* ─── 2.1 Vars compactes ─── */
    .solea-studio {
        --st-topbar-h:    52px;
        --st-footer-h:    52px;
        --st-toolbar-h:   0px;          /* toolbar canvas masquée */
        --st-sidebar-l-w: 0px;
        --st-sidebar-r-w: 0px;
    }

    body.solea-studio-mode {
        position: fixed;
        inset: 0;
        width: 100%;
        height: 100dvh;                  /* dyn viewport mobile */
    }

    /* V14 FIX : la topbar mobile consomme topbar-h + safe-top (notch iPhone),
       le grid doit allouer la même hauteur sinon overflow 44px sur le canvas. */
    .solea-studio {
        grid-template-rows:
            calc(var(--st-topbar-h) + var(--st-safe-top))
            1fr
            calc(var(--st-bottom-tabs-h) + var(--st-safe-bottom));
    }

    /* ─── 2.2 Topbar simplifié ─── */
    .studio-topbar {
        padding: 0 10px;
        padding-top: var(--st-safe-top);
        height: calc(var(--st-topbar-h) + var(--st-safe-top));
    }
    .studio-topbar-divider,
    .studio-project-input,
    .studio-project-status,
    .studio-brand-text {
        display: none !important;
    }
    /* Boutons topbar : seul reste menu / save / preview */
    .studio-topbar .studio-btn:not([data-mobile-keep]) {
        display: none;
    }
    .studio-topbar .studio-btn[data-mobile-keep] {
        padding: 11px;
        min-width: var(--st-tap-target);
        min-height: var(--st-tap-target);
    }
    .studio-brand-link { padding: 6px; }
    .studio-brand-mark { width: 36px; height: 36px; }

    /* Hamburger menu topbar : injecté par JS */
    .studio-topbar-hamburger {
        display: inline-flex !important;
        align-items: center;
        justify-content: center;
        background: transparent;
        border: 0;
        color: var(--st-text);
        padding: 11px;
        min-width: var(--st-tap-target);
        min-height: var(--st-tap-target);
        cursor: pointer;
        border-radius: 6px;
    }
    .studio-topbar-hamburger:active { background: var(--st-panel-hover); }

    /* ─── 2.3 Shell : canvas only, sidebars deviennent drawers ─── */
    .studio-shell {
        grid-template-columns: 1fr;
        position: relative;
    }
    .studio-canvas-section {
        grid-column: 1;
    }

    /* Sidebars devenues drawers ─ overlay slide */
    .studio-sidebar {
        position: fixed;
        top: var(--st-topbar-h);
        bottom: var(--st-bottom-tabs-h);
        width: var(--st-drawer-w);
        max-width: 100vw;
        z-index: 80;
        background: var(--st-panel);
        box-shadow: 0 0 40px rgba(0, 0, 0, 0.5);
        transform: translateX(-105%);
        transition: transform var(--st-drawer-dur) var(--st-drawer-easing);
        will-change: transform;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
    .studio-sidebar-left  { left: 0;  border-right: 1px solid var(--st-line); }
    .studio-sidebar-right {
        right: 0;
        left: auto;
        border-left: 1px solid var(--st-line);
        border-right: 0;
        transform: translateX(105%);
    }

    .studio-sidebar.is-open { transform: translateX(0); }

    /* Backdrop ─ injecté par JS, ferme au tap */
    .studio-drawer-backdrop {
        display: block !important;
        position: fixed;
        inset: 0;
        z-index: 70;
        background: rgba(0, 0, 0, 0.45);
        opacity: 0;
        pointer-events: none;
        transition: opacity var(--st-drawer-dur) var(--st-drawer-easing);
        backdrop-filter: blur(2px);
        -webkit-backdrop-filter: blur(2px);
    }
    .studio-drawer-backdrop.is-visible {
        opacity: 1;
        pointer-events: auto;
    }

    /* Drag handle visuel en haut du drawer */
    .studio-sidebar::before {
        content: '';
        display: block;
        position: sticky;
        top: 0;
        width: 100%;
        height: 4px;
        background: linear-gradient(180deg, var(--st-panel) 0%, transparent 100%);
        z-index: 1;
        pointer-events: none;
    }

    /* Bouton fermeture drawer ─ injecté par JS */
    .studio-drawer-close {
        position: sticky;
        top: 6px;
        margin-left: auto;
        margin-right: 8px;
        display: flex !important;
        align-items: center;
        justify-content: center;
        width: var(--st-tap-target);
        height: var(--st-tap-target);
        background: var(--st-panel-2);
        border: 1px solid var(--st-line);
        border-radius: 50%;
        color: var(--st-text);
        cursor: pointer;
        z-index: 2;
    }

    /* ─── 2.4 Canvas occupe 100% ─── */
    .studio-canvas-stage {
        height: 100%;
        touch-action: none;          /* géré par JS (pinch / pan) */
    }
    .studio-canvas-toolbar {
        display: none !important;     /* toolbar canvas hidden */
    }
    .studio-stage-scale {
        bottom: 70px;                /* au-dessus tab bar */
        left: 10px;
    }

    /* ─── 2.5 FAB hamburgers gauche / droite ─── */
    .studio-fab {
        display: flex !important;
        align-items: center;
        justify-content: center;
        position: fixed;
        width: var(--st-fab-size);
        height: var(--st-fab-size);
        bottom: calc(var(--st-bottom-tabs-h) + 14px + var(--st-safe-bottom));
        background: var(--st-panel);
        color: var(--st-text);
        border: 1px solid var(--st-line-strong);
        border-radius: 50%;
        box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3);
        cursor: pointer;
        z-index: 60;
        transition: transform 0.2s var(--st-easing), opacity 0.2s;
    }
    .studio-fab svg { width: 22px; height: 22px; }
    .studio-fab:active { transform: scale(0.92); }
    .studio-fab.is-hidden { opacity: 0; pointer-events: none; transform: scale(0.6); }

    .studio-fab-left  { left: 14px; }
    .studio-fab-right { right: 14px; }

    /* Badge count sur FAB (features actives, items count) */
    .studio-fab-badge {
        position: absolute;
        top: -4px;
        right: -4px;
        min-width: 18px;
        height: 18px;
        padding: 0 4px;
        background: var(--st-gold);
        color: var(--st-ink);
        border-radius: 9px;
        font-size: 10px;
        font-weight: 800;
        display: flex;
        align-items: center;
        justify-content: center;
        border: 2px solid var(--st-panel);
        line-height: 1;
    }

    /* ─── 2.6 Bottom tab bar ─── */
    /* V14 FIX : 5 tabs (Carte/2D/3D/Chat/Outils) → repeat(5,1fr) (était 4 → 1 tab masqué) */
    .studio-bottom-tabs {
        display: grid !important;
        grid-template-columns: repeat(5, 1fr);
        grid-row: 3;
        position: relative;
        background: var(--st-panel);
        border-top: 1px solid var(--st-line);
        padding-bottom: var(--st-safe-bottom);
        z-index: 50;
        height: calc(var(--st-bottom-tabs-h) + var(--st-safe-bottom));
        overflow-x: auto;
        scrollbar-width: none;
        scroll-snap-type: x mandatory;
    }
    .studio-bottom-tabs::-webkit-scrollbar { display: none; }

    .studio-bottom-tab {
        scroll-snap-align: center;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 3px;
        padding: 8px 4px;
        background: transparent;
        border: 0;
        color: var(--st-text-mute);
        font-family: inherit;
        font-size: 10.5px;
        font-weight: 600;
        letter-spacing: 0.04em;
        cursor: pointer;
        position: relative;
        min-height: var(--st-tap-target);
        transition: color 0.2s;
    }
    .studio-bottom-tab svg {
        width: 22px;
        height: 22px;
        opacity: 0.85;
    }
    .studio-bottom-tab.is-active {
        color: var(--st-gold);
    }
    .studio-bottom-tab.is-active::after {
        content: '';
        position: absolute;
        top: 0;
        left: 25%;
        right: 25%;
        height: 3px;
        background: var(--st-gold);
        border-radius: 0 0 2px 2px;
    }
    .studio-bottom-tab:active {
        background: var(--st-panel-hover);
    }
    .studio-bottom-tab-badge {
        position: absolute;
        top: 4px;
        right: 22%;
        min-width: 16px;
        height: 16px;
        padding: 0 4px;
        background: var(--st-danger);
        color: #fff;
        border-radius: 8px;
        font-size: 9px;
        font-weight: 800;
        display: flex;
        align-items: center;
        justify-content: center;
        line-height: 1;
    }

    /* Footer desktop caché en mobile, remplacé par sticky budget ou tab bar */
    .studio-footer {
        display: none !important;
    }
    /* Sticky budget mini bar (au-dessus tab bar) */
    .studio-mobile-budget {
        display: flex !important;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        position: fixed;
        left: 12px;
        right: 12px;
        bottom: calc(var(--st-bottom-tabs-h) + 8px + var(--st-safe-bottom));
        padding: 8px 14px;
        background: rgba(15, 15, 18, 0.92);
        backdrop-filter: blur(12px);
        -webkit-backdrop-filter: blur(12px);
        color: var(--st-text);
        border: 1px solid var(--st-line);
        border-radius: 12px;
        font-size: 12px;
        z-index: 45;
        box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
        animation: studio-mobile-budget-in 0.3s var(--st-drawer-easing);
    }
    .studio-mobile-budget .studio-mobile-budget-label {
        color: var(--st-text-mute);
        font-size: 10.5px;
        letter-spacing: 0.04em;
        text-transform: uppercase;
        font-weight: 700;
    }
    .studio-mobile-budget .studio-mobile-budget-value {
        font-family: 'Cormorant Garamond', Georgia, serif;
        font-size: 17px;
        font-style: italic;
        color: var(--st-gold);
        font-weight: 600;
    }
    @keyframes studio-mobile-budget-in {
        from { transform: translateY(20px); opacity: 0; }
        to   { transform: translateY(0); opacity: 1; }
    }

    /* ─── 2.7 Catalogue : 2 colonnes plus tactiles ─── */
    .studio-catalog {
        grid-template-columns: 1fr 1fr;
        gap: 10px;
    }
    .studio-catalog-item {
        padding: 14px 12px;
        min-height: var(--st-tap-target);
        cursor: pointer;             /* pas de drag mobile, tap to add */
    }
    .studio-catalog-icon { width: 32px; height: 32px; }
    .studio-catalog-label { font-size: 12.5px; }

    .studio-shape-selector {
        /* V20.37 L73 : 5 cols (Rect / L / T / U / Libre) — avant : 4 cols sans Libre */
        grid-template-columns: repeat(5, 1fr);
        padding: 6px;
        gap: 6px;
    }
    .studio-shape-btn {
        padding: 11px 4px;
        min-height: var(--st-tap-target);
    }

    /* ─── 2.8 Tabs sidebar : scroll horizontal si trop ─── */
    .studio-tabs {
        overflow-x: auto;
        overflow-y: hidden;
        scrollbar-width: none;
        scroll-snap-type: x mandatory;
        flex-wrap: nowrap;
    }
    .studio-tabs::-webkit-scrollbar { display: none; }
    .studio-tab {
        flex: 0 0 auto;
        min-width: 84px;
        padding: 13px 12px 11px;
        scroll-snap-align: center;
    }

    .studio-panel { padding: 16px 14px 24px; }

    /* ─── 2.9 Options / finitions / swatches : touch padding ─── */
    .studio-option {
        padding: 13px 14px;
        min-height: var(--st-tap-target);
    }
    .studio-option-checkbox { width: 18px; height: 18px; }
    .studio-finition {
        padding: 14px;
        min-height: var(--st-tap-target);
    }
    .studio-finition-swatch { width: 40px; height: 40px; }
    .studio-swatch {
        padding: 11px 12px;
        min-height: var(--st-tap-target);
    }
    .studio-swatch-chip { width: 28px; height: 28px; }
    .studio-mat-swatches { grid-template-columns: 1fr 1fr; gap: 8px; }
    .studio-option-qty {
        width: 52px;
        padding: 8px;
        font-size: 13px;
        min-height: var(--st-tap-target);
    }

    /* ─── 2.10 Modales full screen ─── */
    .studio-modal,
    #studio-onboarding,
    #studio-contact {
        padding: 0 !important;
    }
    /* V14 FIX : .studio-modal-dialog ajoutée (HTML utilise ce nom, sélecteur cassé avant) */
    .studio-modal-content,
    .studio-modal-dialog,
    .studio-modal-card,
    .studio-onboarding-card,
    .studio-contact-card {
        width: 100vw !important;
        max-width: 100vw !important;
        height: 100vh !important;
        height: 100dvh !important;
        max-height: 100vh !important;
        border-radius: 0 !important;
        margin: 0 !important;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        padding-top: calc(20px + var(--st-safe-top)) !important;
        padding-bottom: calc(20px + var(--st-safe-bottom)) !important;
    }

    /* Step indicators onboarding */
    .studio-onb-steps {
        display: flex;
        gap: 8px;
        padding: 12px 18px;
        position: sticky;
        top: 0;
        background: var(--st-panel);
        z-index: 2;
        border-bottom: 1px solid var(--st-line);
    }
    .studio-onb-step {
        flex: 1;
        height: 3px;
        background: var(--st-line);
        border-radius: 2px;
        transition: background 0.3s;
    }
    .studio-onb-step.is-done,
    .studio-onb-step.is-current {
        background: var(--st-gold);
    }

    /* Bouton fermeture modal en haut à droite */
    .studio-modal-close {
        position: sticky;
        top: 12px;
        margin-left: auto;
        margin-right: 12px;
        z-index: 3;
        width: var(--st-tap-target);
        height: var(--st-tap-target);
    }

    /* ─── 2.11 Tooltips → popover tap ─── */
    /* V20.37.4 fix CSS scope leak : sélecteurs scopés à .solea-studio uniquement
       (avant : [data-tooltip] global contaminait tous les éléments du site
       qui auraient un attribut data-tooltip — admin bar WP, plugins, etc.) */
    .solea-studio [data-tooltip] {
        position: relative;
    }
    .solea-studio [data-tooltip]:hover::after,
    .solea-studio [data-tooltip]::before {
        display: none;
    }
    .solea-studio [data-tooltip].is-tap-active::after {
        content: attr(data-tooltip);
        position: absolute;
        bottom: calc(100% + 6px);
        left: 50%;
        transform: translateX(-50%);
        background: var(--st-bg);
        color: var(--st-text);
        padding: 8px 12px;
        border-radius: 6px;
        font-size: 11.5px;
        white-space: nowrap;
        z-index: 100;
        box-shadow: 0 4px 12px rgba(0,0,0,0.4);
        animation: studio-popover-in 0.18s var(--st-easing);
    }
    @keyframes studio-popover-in {
        from { opacity: 0; transform: translate(-50%, 4px); }
        to   { opacity: 1; transform: translate(-50%, 0); }
    }

    /* ─── 2.12 Suppression hover effects (touch) ─── */
    .studio-btn:hover,
    .studio-tool:hover,
    .studio-tab:hover,
    .studio-catalog-item:hover,
    .studio-option:hover,
    .studio-swatch:hover,
    .studio-finition:hover,
    .studio-bottom-tab:hover {
        background: inherit !important;
        color: inherit !important;
        transform: none !important;
    }
    .studio-catalog-item:hover { transform: none !important; }

    /* ─── 2.13 Walk HUD positionnement mobile ─── */
    .studio-walk-hud-minimap,
    .studio-walk-hud-compass {
        top: calc(var(--st-topbar-h) + 12px + var(--st-safe-top)) !important;
    }
    .studio-walk-hud-speed,
    .studio-walk-hud-position {
        bottom: calc(var(--st-bottom-tabs-h) + 12px + var(--st-safe-bottom)) !important;
    }
    .studio-walk-hud-minimap {
        width: 120px !important;
        height: 120px !important;
    }
    .studio-walk-hud-compass {
        width: 50px !important;
        height: 50px !important;
    }
}


/* ════════════════════════════════════════════════════
   3. MOBILE PETIT — <= 380px (iPhone SE etc.)
   ════════════════════════════════════════════════════ */
@media (max-width: 380px) {
    .solea-studio {
        --st-bottom-tabs-h: 56px;
        --st-fab-size:      48px;
    }
    .studio-catalog { grid-template-columns: 1fr 1fr; gap: 8px; }
    .studio-bottom-tab { font-size: 10px; gap: 2px; padding: 6px 2px; }
    .studio-bottom-tab svg { width: 20px; height: 20px; }
    .studio-mobile-budget { font-size: 11px; padding: 7px 11px; }
}


/* ════════════════════════════════════════════════════
   4. ORIENTATION LANDSCAPE — mobile horizontal
   ════════════════════════════════════════════════════ */
@media (max-width: 900px) and (orientation: landscape) and (max-height: 500px) {
    .solea-studio {
        --st-topbar-h:    44px;
        --st-bottom-tabs-h: 50px;
    }
    .studio-bottom-tab {
        flex-direction: row;
        gap: 6px;
    }
    .studio-bottom-tab svg { width: 18px; height: 18px; }
    .studio-fab {
        width: 44px;
        height: 44px;
        bottom: calc(var(--st-bottom-tabs-h) + 8px + var(--st-safe-bottom));
    }
    .studio-mobile-budget {
        font-size: 11px;
        padding: 6px 10px;
    }
}


/* ════════════════════════════════════════════════════
   5. POINTER COARSE — désactive hover universellement
   ════════════════════════════════════════════════════ */
@media (hover: none) and (pointer: coarse) {
    .studio-btn:hover,
    .studio-tool:hover,
    .studio-catalog-item:hover,
    .studio-tab:hover,
    .studio-option:hover,
    .studio-swatch:hover,
    .studio-finition:hover,
    .studio-shape-btn:hover,
    .studio-fab:hover,
    .studio-bottom-tab:hover {
        background: inherit;
        color: inherit;
        transform: none;
        box-shadow: none;
    }
    .studio-catalog-item { cursor: pointer; }
    .studio-catalog-item:active {
        background: var(--st-panel-hover);
        transform: scale(0.97);
    }
    /* Augmente tous les boutons interactifs */
    .studio-btn,
    .studio-tool,
    .studio-tab,
    .studio-option-checkbox + label {
        min-height: var(--st-tap-target);
    }
}


/* ════════════════════════════════════════════════════
   6. CONTEXT MENU (long-press) — mobile + tablet
   ════════════════════════════════════════════════════ */
.studio-context-menu {
    position: fixed;
    z-index: 200;
    background: var(--st-panel);
    border: 1px solid var(--st-line-strong);
    border-radius: 10px;
    padding: 6px;
    min-width: 180px;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.5);
    opacity: 0;
    transform: scale(0.9);
    pointer-events: none;
    transition: opacity 0.18s var(--st-easing), transform 0.18s var(--st-easing);
}
.studio-context-menu.is-visible {
    opacity: 1;
    transform: scale(1);
    pointer-events: auto;
}
.studio-context-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 11px 12px;
    background: transparent;
    border: 0;
    color: var(--st-text);
    font-family: inherit;
    font-size: 13px;
    border-radius: 6px;
    cursor: pointer;
    width: 100%;
    text-align: left;
    min-height: var(--st-tap-target);
}
.studio-context-item:hover,
.studio-context-item:active { background: var(--st-panel-hover); }
.studio-context-item-danger { color: #ff9d94; }
.studio-context-divider {
    height: 1px;
    background: var(--st-line);
    margin: 4px 0;
}


/* ════════════════════════════════════════════════════
   7. WALK MODE HUD — visible en mode walk only
   ════════════════════════════════════════════════════ */
.studio-walk-hud {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 10;
}
.studio-walk-hud > * { pointer-events: auto; }

.studio-walk-hud-minimap {
    position: absolute;
    top: 16px;
    left: 16px;
    width: 160px;
    height: 160px;
    background: rgba(15, 15, 18, 0.85);
    border: 1px solid var(--st-line-strong);
    border-radius: 12px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    overflow: hidden;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}
.studio-walk-hud-minimap canvas {
    width: 100%;
    height: 100%;
    display: block;
}
.studio-walk-hud-minimap-label {
    position: absolute;
    top: 6px;
    left: 8px;
    color: var(--st-gold);
    font-size: 9px;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    font-weight: 700;
    pointer-events: none;
    text-shadow: 0 1px 2px rgba(0,0,0,0.8);
}

.studio-walk-hud-compass {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 64px;
    height: 64px;
    background: rgba(15, 15, 18, 0.85);
    border: 1px solid var(--st-line-strong);
    border-radius: 50%;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}
.studio-walk-hud-compass-needle {
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-bottom: 22px solid var(--st-danger);
    transform-origin: 50% 75%;
    transition: transform 0.1s linear;
    position: relative;
    top: -4px;
}
.studio-walk-hud-compass-n {
    position: absolute;
    top: 4px;
    left: 50%;
    transform: translateX(-50%);
    color: var(--st-gold);
    font-size: 10px;
    font-weight: 800;
    letter-spacing: 0.05em;
}

.studio-walk-hud-speed {
    position: absolute;
    bottom: 16px;
    left: 16px;
    padding: 8px 12px;
    background: rgba(15, 15, 18, 0.85);
    border: 1px solid var(--st-line-strong);
    border-radius: 8px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: var(--st-text);
    font-size: 11px;
    font-weight: 600;
    min-width: 80px;
    text-align: center;
}
.studio-walk-hud-speed-value {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 18px;
    color: var(--st-gold);
    font-style: italic;
    display: block;
    line-height: 1;
}
.studio-walk-hud-speed-unit {
    font-size: 9px;
    color: var(--st-text-mute);
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.studio-walk-hud-position {
    position: absolute;
    bottom: 16px;
    right: 16px;
    padding: 8px 12px;
    background: rgba(15, 15, 18, 0.85);
    border: 1px solid var(--st-line-strong);
    border-radius: 8px;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: var(--st-text);
    font-size: 11px;
    font-family: 'JetBrains Mono', 'Courier New', monospace;
    font-weight: 600;
    text-align: right;
}
.studio-walk-hud-position-axis {
    color: var(--st-gold);
    font-weight: 700;
    margin-right: 3px;
}


/* ════════════════════════════════════════════════════
   8. ACCESSIBILITÉ — focus visible mobile
   ════════════════════════════════════════════════════ */
@media (max-width: 1023px) {
    .studio-fab:focus-visible,
    .studio-bottom-tab:focus-visible,
    .studio-drawer-close:focus-visible,
    .studio-topbar-hamburger:focus-visible {
        outline: 2px solid var(--st-gold);
        outline-offset: 2px;
    }
}


/* ════════════════════════════════════════════════════
   9. REDUCED MOTION
   ════════════════════════════════════════════════════ */
@media (prefers-reduced-motion: reduce) {
    .studio-sidebar,
    .studio-drawer-backdrop,
    .studio-fab,
    .studio-mobile-budget,
    .studio-context-menu {
        transition: none !important;
        animation: none !important;
    }
}
