/* panel-rotation.css — Panneau Isométries (#isometriesPanel) */
/* Version 1.3.1 — panneau 85px, joystick ring 65px, jauge slider seul */

#isometriesPanel .panel-title {
    position: relative;
    overflow: visible;
}
#isoPanelCamImg {
    position: absolute;
    top: 0;
    right: 0;
    height: 130%;
    width: auto;
    pointer-events: none;
}

#isometriesPanel.panel-floating {
    background: rgb(0 0 0 / 15%);
    width: 90px;
    backdrop-filter: blur(10px);
    border-radius: 8px;
    box-shadow:
        0 4px 20px rgba(0, 0, 0, 0.15),
        0 2px 10px rgba(0, 0, 0, 0.1);
}

#isometriesPanel {
    pointer-events: auto;
    padding: 0;
    width: 90px;
    box-sizing: border-box;
}

.isometries-panel-body {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    width: 100%;
    box-sizing: border-box;
}

.isometries-joystick-slot {
    width: 100%;
    display: flex;
    justify-content: center;
    padding: 4px 8px 2px;
    box-sizing: border-box;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.isometries-joystick-slot .translation-joystick-wrap {
    width: 100%;
    min-height: 54px;
}

.isometries-joystick-slot [data-topology-joystick="ring"] {
    width: 65px;
    height: auto;
    aspect-ratio: 1;
    box-sizing: border-box;
}

.isometries-morph-slot {
    width: 100%;
    box-sizing: border-box;
}

.isometries-morph-slot .morph-gauge--translation-panel {
    width: 100%;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    margin-top: 0;
    padding: 6px 8px 8px;
    box-sizing: border-box;
}

.isometries-morph-slot .morph-gauge--translation-panel #morphDurationSlider {
    flex: 1 1 0;
    min-width: 0;
}

.rotation-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 2px 6px 4px;
}

.rotation-axis {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2px;
    color: #f0f0f0;
}

.axis-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
}

.angle-display {
    width: 36px;
    text-align: right;
    font-family: monospace;
    font-size: 11px;
    color: #f0f0f0;
}

.scale-display {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 11px;
    color: #f0f0f0;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    margin-top: 2px;
    padding-top: 2px;
}

/* Icônes SVG axes : couleurs natives du fichier (pas de filter) */

.scale-label {
    font-size: 13px;
}

/* Loupe flat CSS (remplace ⊕) */
.zoom-icon {
    display: inline-block;
    width: 11px;
    height: 11px;
    border: 1.5px solid #f0f0f0;
    border-radius: 50%;
    position: relative;
    flex-shrink: 0;
}
.zoom-icon::before,
.zoom-icon::after {
    content: "";
    position: absolute;
    background: #f0f0f0;
    border-radius: 1px;
}
.zoom-icon::before {
    width: 1.5px;
    height: 6px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}
.zoom-icon::after {
    width: 6px;
    height: 1.5px;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* Inputs angles éditables */
.angle-input {
    width: 23px;
    background: transparent;
    border: none;
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    color: #f0f0f0;
    font-family: monospace;
    font-size: 10px;
    text-align: right;
    padding: 0;
    outline: none;
    -moz-appearance: textfield;
}
.angle-input::-webkit-inner-spin-button,
.angle-input::-webkit-outer-spin-button {
    -webkit-appearance: none;
}
.angle-input:focus {
    border-bottom-color: rgba(255, 255, 255, 0.8);
}

.angle-deg {
    font-family: monospace;
    font-size: 11px;
    color: #f0f0f0;
}

/* Labels lon/lat sur le joystick */
[data-joy-label] {
    font-size: 8px;
    line-height: 1;
}
[data-joy-label^="lon-"],
[data-joy-label^="lat-"] {
    text-align: center;
}
[data-joy-label^="lon-"] {
    position: absolute;
    color: rgba(255, 255, 255, 0.65);
    min-width: 14px;
    pointer-events: none;
}
[data-joy-label="lon-left"]  { left: 1px;  top: 60%;    text-align: left; }
[data-joy-label="lon-right"] { right: 1px; bottom: 60%; text-align: right; }
[data-joy-label="lat-top"],
[data-joy-label="lat-bot"]   { text-align: center; }

/* Bouton auto-rotation axe rouge */
.autorot-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2px 4px;
    margin-left: auto;
}

#scaleDisplay {
    font-family: monospace;
    font-size: 11px;
}

/* ── Jauge « morph smoothness » : bary-équivalent @ 60fps (log) ─────────── */
.morph-gauge {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    color: #f0f0f0;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    margin-top: 2px;
    padding-top: 4px;
}

/* Dans le shapePanel (topology), on ajuste le padding horizontal pour
   s'aligner avec la grille (8px de padding sur le container). */
.morph-gauge--shape-panel {
    padding-left: 10px;
    padding-right: 10px;
    padding-bottom: 6px;
    margin-top: 0;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.morph-label {
    font-size: 14px;
    line-height: 1;
    color: var(--theme-band-text, #fbc02d);
    flex-shrink: 0;
    width: 16px;
    text-align: center;
}

.morph-value {
    font-family: monospace;
    font-size: 11px;
    color: var(--theme-band-text, #fbc02d);
    min-width: 32px;
    text-align: right;
}

/* ── Boutons caméra 2 états (Away / Center) ──────────────────────────────── */
.camera-mode-btns {
    display: flex;
    gap: 3px;
    flex-shrink: 0;
    align-items: center;
}

.cam-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.18);
    border-radius: 4px;
    padding: 2px;
    cursor: pointer;
    filter: saturate(0);
    transition:
        filter 0.2s,
        border-color 0.15s,
        box-shadow 0.15s;
    line-height: 0;
}

.cam-btn:hover {
    filter: saturate(1);
    border-color: rgba(255, 255, 255, 0.5);
}

.cam-btn.active {
    filter: saturate(1);
    border-color: var(--theme-band-text, #fbc02d);
    box-shadow: 0 0 5px rgba(251, 192, 45, 0.45);
}

.cam-btn img {
    display: block;
    width: 20px;
    height: 20px;
    object-fit: contain;
}

/* ── Barre bas #shapePanel : smooth | grille | Ext/Int ─────────────────── */
.shape-panel-bottom-bar {
    display: flex;
    width: 100%;
    box-sizing: border-box;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.shape-panel-bottom-zone {
    flex: 1 1 0;
    min-width: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 6px 8px;
    gap: 6px;
    box-sizing: border-box;
}

.shape-panel-bottom-zone + .shape-panel-bottom-zone {
    border-left: 1px solid rgba(255, 255, 255, 0.2);
}

.shape-panel-bottom-zone--view .camera-mode-btns {
    justify-content: center;
    width: 100%;
}

/* Slider HTML5 natif — look flat, track amber */
#morphDurationSlider {
    flex: 1 1 0;
    min-width: 40px;
    appearance: none;
    -webkit-appearance: none;
    height: 6px;
    background: linear-gradient(
        90deg,
        rgba(251, 192, 45, 0.6) 0%,
        rgba(251, 192, 45, 0.25) 100%
    );
    border-radius: 2px;
    outline: none;
    cursor: pointer;
    margin: 0;
    padding: 0;
}

/* Thumb losange 12×12 — visuel léger, zone de contact = track entier */
#morphDurationSlider::-webkit-slider-thumb,
#distLightSlider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 12px;
    height: 12px;
    border-radius: 1px;
    background: var(--theme-band-text, #fbc02d);
    border: 1px solid rgba(0, 0, 0, 0.4);
    cursor: grab;
    box-shadow: 0 0 4px rgba(251, 192, 45, 0.55);
    transform: rotate(45deg);
    transition: transform 0.1s;
}

#morphDurationSlider::-moz-range-thumb,
#distLightSlider::-moz-range-thumb {
    width: 12px;
    height: 12px;
    border-radius: 1px;
    background: var(--theme-band-text, #fbc02d);
    border: 1px solid rgba(0, 0, 0, 0.4);
    cursor: grab;
    box-shadow: 0 0 4px rgba(251, 192, 45, 0.55);
    transform: rotate(45deg);
}

#morphDurationSlider::-webkit-slider-thumb:active,
#distLightSlider::-webkit-slider-thumb:active {
    transform: rotate(45deg) scale(1.2);
    cursor: grabbing;
}

#morphDurationSlider:focus::-webkit-slider-thumb,
#distLightSlider:focus::-webkit-slider-thumb {
    box-shadow: 0 0 6px rgba(251, 192, 45, 0.85);
}

/* ── Jauge stéréoscopie : cyan, centre=neutre, bords=effet ─────────────── */
.isometries-stereo-slot .morph-gauge--translation-panel {
    width: 100%;
    border-top: 1px solid rgba(0, 188, 212, 0.2);
    margin-top: 0;
    padding: 6px 8px 8px;
    box-sizing: border-box;
}

.isometries-stereo-slot .morph-gauge--translation-panel #stereoSlider {
    flex: 1 1 0;
    min-width: 0;
}

/* Emojis aux extrémités de la jauge cyan : 😖 loucher (négatif) / 😳 diverger (positif) */
.stereo-end {
    flex-shrink: 0;
    font-size: 12px;
    line-height: 1;
    user-select: none;
    cursor: default;
}

#stereoSlider {
    flex: 1 1 0;
    min-width: 40px;
    appearance: none;
    -webkit-appearance: none;
    height: 6px;
    background: linear-gradient(
        90deg,
        rgba(0, 188, 212, 0.12) 0%,
        rgba(0, 188, 212, 0.65) 100%
    );
    border-radius: 2px;
    outline: none;
    cursor: pointer;
    margin: 0;
    padding: 0;
}

#stereoSlider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 12px;
    height: 12px;
    border-radius: 1px;
    background: #00bcd4;
    border: 1px solid rgba(0, 0, 0, 0.4);
    cursor: grab;
    box-shadow: 0 0 4px rgba(0, 188, 212, 0.55);
    transform: rotate(45deg);
    transition: transform 0.1s;
}

#stereoSlider::-moz-range-thumb {
    width: 12px;
    height: 12px;
    border-radius: 1px;
    background: #00bcd4;
    border: 1px solid rgba(0, 0, 0, 0.4);
    cursor: grab;
    box-shadow: 0 0 4px rgba(0, 188, 212, 0.55);
    transform: rotate(45deg);
}

#stereoSlider::-webkit-slider-thumb:active {
    transform: rotate(45deg) scale(1.2);
    cursor: grabbing;
}

#stereoSlider::-moz-range-thumb:active {
    transform: rotate(45deg) scale(1.2);
}

#stereoSlider:focus::-webkit-slider-thumb {
    box-shadow: 0 0 6px rgba(0, 188, 212, 0.85);
}

/* distLightSlider — track identique, taille fixe */
#distLightSlider {
    appearance: none;
    -webkit-appearance: none;
    height: 6px;
    background: linear-gradient(
        90deg,
        rgba(251, 192, 45, 0.6) 0%,
        rgba(251, 192, 45, 0.25) 100%
    );
    border-radius: 2px;
    outline: none;
    cursor: pointer;
    margin: 0;
    padding: 0;
}
