/* Studio Radar Expert : complète modeles-studio.css (mêmes variables --st-*, mêmes composants). */

.rs-body { --rs-sec-h: min(32vh, 290px); --rs-bottom: 160px; }
body.rs-has-section { --rs-bottom: calc(164px + var(--rs-sec-h)); }
body.rs-has-section { --st-bottom: calc(156px + var(--rs-sec-h)); }
body.rs-has-section .studio-rail .studio-param { min-height: 26px; padding-top: 3px; padding-bottom: 3px; }
body.rs-has-section .studio-rail .studio-cat-btn { padding-top: 1px; padding-bottom: 1px; }

.rs-body .studio-rail { width: 252px; padding: 8px; max-height: calc(100% - var(--st-top) - var(--rs-bottom) - 4px); }
.rs-pill-icon { color: var(--st-accent-hi); font-size: 16px; }
html[data-theme="light"] .rs-pill-icon { color: var(--st-accent); }
.rs-param-icon { flex: 0 0 16px; color: var(--st-muted); font-size: 12px; text-align: center; }
.studio-param.active .rs-param-icon { color: rgba(255, 255, 255, 0.85); }
.rs-elev-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 3px; }
.rs-elev-grid .rs-elev { justify-content: center; padding: 5px 4px; font-variant-numeric: tabular-nums; }

.rs-station-icon {
    display: grid;
    place-items: center;
    flex: 0 0 28px;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--st-chip);
    color: var(--st-text-2);
    font-size: 12px;
}
.studio-model-item.active .rs-station-icon { background: var(--st-accent); color: #fff; }

.rs-keys {
    margin: 14px 4px 0;
    color: var(--st-muted);
    font-size: 11.5px;
    line-height: 2;
}
.rs-keys kbd {
    padding: 1px 6px;
    border-radius: 6px;
    background: var(--st-chip);
    border: 1px solid var(--st-line);
    color: var(--st-text-2);
    font: inherit;
    font-size: 11px;
}

/* ---------- Sonde ---------- */
.rs-probe {
    display: flex;
    align-items: center;
    gap: 8px;
    height: 44px;
    min-width: 0;
    padding: 0 16px 0 14px;
    border-radius: 999px;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    pointer-events: none;
}
.rs-probe[hidden] { display: none !important; }
.rs-probe strong { font-size: 13.5px; }
.rs-probe small { color: var(--st-muted); font-size: 11.5px; overflow: hidden; text-overflow: ellipsis; }

/* ---------- Légende : graduations placées à leur valeur ---------- */
.rs-legend-labels {
    position: relative;
    height: 16px;
    margin-top: 3px;
    color: var(--st-text);
    font-size: 11.5px;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    line-height: 16px;
}
.rs-legend-labels span { position: absolute; top: 0; transform: translateX(-50%); white-space: nowrap; }
.rs-legend-labels span:first-child { transform: none; }
.rs-legend-labels span:last-child { transform: translateX(-100%); }

/* ---------- Coupe verticale ---------- */
.rs-section {
    display: flex;
    flex-direction: column;
    height: var(--rs-sec-h);
    padding: 8px 10px 10px;
    border-radius: 18px;
    background: var(--st-glass-strong);
}
.rs-section[hidden] { display: none !important; }
.rs-section-head {
    display: flex;
    align-items: center;
    gap: 10px;
    min-height: 36px;
    padding: 0 0 6px 4px;
}
.rs-section-title {
    display: flex;
    align-items: baseline;
    gap: 8px;
    flex: 1;
    min-width: 0;
    white-space: nowrap;
}
.rs-section-title i { color: var(--st-accent-hi); font-size: 13px; }
html[data-theme="light"] .rs-section-title i { color: var(--st-accent); }
.rs-section-title strong { font-size: 14px; }
.rs-section-title span {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    color: var(--st-muted);
    font-size: 12px;
    font-variant-numeric: tabular-nums;
}
.rs-section-tools { display: flex; align-items: center; gap: 2px; }
.rs-section-tops { grid-template-columns: repeat(4, minmax(0, 1fr)); width: 232px; margin-right: 6px; }
.rs-section-tools .studio-icon-btn[aria-pressed="true"] {
    background: var(--st-accent);
    color: #fff;
    box-shadow: 0 0 0 3px var(--st-accent-soft);
}
.rs-section-body {
    position: relative;
    flex: 1;
    min-height: 0;
    border-radius: 10px;
    overflow: hidden;
}
.rs-section-body canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    display: block;
    cursor: crosshair;
    touch-action: none;
}
.rs-section-tip {
    position: absolute;
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: 1px;
    padding: 6px 10px;
    border-radius: 10px;
    background: var(--st-glass-strong);
    border: 1px solid var(--st-line);
    box-shadow: var(--st-shadow);
    font-size: 11.5px;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    pointer-events: none;
}
.rs-section-tip[hidden] { display: none; }
.rs-section-tip strong { font-size: 13.5px; }
.rs-section-tip span { color: var(--st-text-2); }
.rs-section-empty {
    position: absolute;
    inset: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    color: var(--st-text-2);
    font-size: 13.5px;
    line-height: 1.6;
    text-align: center;
    pointer-events: none;
}
.rs-section-empty[hidden] { display: none; }
.rs-section-empty > i { color: var(--st-accent-hi); font-size: 22px; }
.rs-section-empty small { color: var(--st-muted); font-size: 12px; }
.rs-section-empty kbd {
    padding: 1px 6px;
    border-radius: 6px;
    background: var(--st-chip);
    border: 1px solid var(--st-line);
    font: inherit;
    font-size: 11px;
}

/* Poignées A / B / déplacement sur la carte */
.rs-handle {
    display: grid;
    place-items: center;
    border-radius: 50%;
    font-family: "Exo 2", system-ui, sans-serif;
    font-weight: 700;
    cursor: grab;
    user-select: none;
    -webkit-user-select: none;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
}
.rs-handle:active { cursor: grabbing; }
.rs-handle-end {
    width: 28px;
    height: 28px;
    background: var(--st-accent);
    border: 2px solid #fff;
    color: #fff;
    font-size: 13px;
}
.rs-handle-mid {
    width: 24px;
    height: 24px;
    background: var(--st-glass-strong);
    border: 1px solid var(--st-line);
    color: var(--st-text-2);
    font-size: 11px;
}
.rs-handle-mid:hover { color: var(--st-text); border-color: var(--st-accent-hi); }

@media (max-width: 860px) {
    .rs-body { --rs-sec-h: min(36vh, 280px); }
    body.rs-has-section { --st-bottom: calc(194px + var(--rs-sec-h)); }
    .rs-section-tops { width: 148px; }
    .rs-section-tops small { display: none; }
    .rs-section-title strong { display: none; }
    .rs-probe { order: -2; flex: 1 1 100%; justify-content: center; }
    .rs-body .studio-rail { width: auto; }
    .rs-elev-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
.rs-draw-hint[hidden] { display: none !important; }

/* ---------- Panneaux synchronisés ---------- */
.rs-panels {
    position: fixed;
    inset: 0;
    z-index: 0;
    display: grid;
    gap: 6px;
}
.rs-panels.rs-layout-2,
.rs-panels.rs-layout-4 {
    top: var(--st-top);
    bottom: var(--rs-bottom);
    left: var(--st-gap);
    right: calc(var(--st-gap) * 2 + 224px);
}
.rs-panels.rs-layout-2 { grid-template-columns: 1fr 1fr; }
.rs-panels.rs-layout-4 { grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; }
.rs-panel { position: relative; min-width: 0; min-height: 0; overflow: hidden; }
.rs-multi .rs-panel { border-radius: 14px; box-shadow: 0 0 0 1px var(--st-line); }
.rs-multi .rs-panel.is-active { box-shadow: 0 0 0 2px var(--st-accent-hi); }
.rs-panel-map { position: absolute; inset: 0; }
.rs-panel-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 7px;
    max-width: calc(100% - 16px);
    padding: 4px 10px 4px 5px;
    border-radius: 999px;
    background: var(--st-glass-strong);
    border: 1px solid var(--st-line);
    box-shadow: var(--st-shadow);
    color: var(--st-text);
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    pointer-events: none;
}
.rs-layout-1 .rs-panel-badge { display: none; }
.rs-panel-badge b {
    display: grid;
    place-items: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--st-chip);
    font-size: 11px;
}
.rs-panel.is-active .rs-panel-badge b { background: var(--st-accent); color: #fff; }
.rs-panel-badge span { overflow: hidden; text-overflow: ellipsis; }
.rs-panel-badge small { color: var(--st-muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.rs-panels .maplibregl-ctrl-attrib {
    border-radius: 999px;
    background: var(--st-glass) !important;
    color: var(--st-muted);
    font-size: 10px;
}
.rs-panels .maplibregl-ctrl-attrib a { color: var(--st-text-2); }
.rs-layout-1 .maplibregl-ctrl-bottom-right { bottom: calc(var(--st-bottom) - 4px); right: calc(var(--st-gap) + 250px); }

/* ---------- Commandes en en-tête ---------- */
.rs-seg-pill {
    height: 44px;
    align-items: center;
    padding: 4px;
    border-radius: 999px;
}
.rs-seg-pill .studio-filter-seg { height: 34px; padding: 0 10px; font-size: 13px; }
.rs-mode { grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100px; }
.rs-layout { grid-template-columns: repeat(3, minmax(0, 1fr)); width: 126px; }

/* ---------- Rail : vues, réglages ---------- */
.rs-view-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 3px; }
.rs-chip { justify-content: center; padding: 5px 4px; font-variant-numeric: tabular-nums; }
.rs-chip.is-off { opacity: 0.4; }
.rs-rail-panel {
    display: block;
    margin: 2px 6px 6px;
    color: var(--st-text-2);
    font-size: 12.5px;
}
.rs-rail-panel b { color: var(--st-text); }
.rs-rail-panel small { display: block; margin-top: 2px; color: var(--st-muted); font-size: 11px; }
.rs-rail-panel kbd { padding: 0 4px; border-radius: 4px; background: var(--st-chip); font: inherit; font-size: 10.5px; }
.rs-rail-range {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 6px 8px 8px;
    color: var(--st-text-2);
    font-size: 12.5px;
    cursor: default;
}
.rs-rail-range > span { display: flex; align-items: center; justify-content: space-between; gap: 6px; }
.rs-rail-range output {
    padding: 1px 8px;
    border-radius: 999px;
    background: var(--st-chip);
    color: var(--st-text-2);
    font-size: 11px;
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}
.rs-rail-range input[type="range"] { width: 100%; }
.rs-rail-note { margin: 4px 8px 6px; color: var(--st-muted); font-size: 11.5px; line-height: 1.45; }

/* Sonde multi-panneaux */
.rs-probe-item { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; font-weight: 600; }
.rs-probe-item i { width: 10px; height: 10px; border-radius: 3px; box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.25); }
.rs-probe-item b {
    display: grid;
    place-items: center;
    width: 17px;
    height: 17px;
    border-radius: 50%;
    background: var(--st-chip);
    font-size: 10px;
}

/* ---------- Vue 3D ---------- */
.re3d {
    position: fixed;
    top: var(--st-top);
    bottom: var(--rs-bottom);
    left: var(--st-gap);
    right: calc(var(--st-gap) * 2 + 224px);
    z-index: 1;
    display: none;
    overflow: hidden;
    border-radius: 18px;
    background: var(--st-solid);
    box-shadow: 0 0 0 1px var(--st-line);
}
.re-mode-3d .re3d { display: block; }
.re-mode-3d .rs-panels { visibility: hidden; }
.re-mode-3d #rsSection,
.re-mode-3d #rsProbe,
.re-mode-3d .rs-elev-cat,
.re-mode-3d #rsSectionBtn,
.re-mode-3d #rsLayout,
.re-mode-3d .rs-panel-badge { display: none !important; }
body.re-mode-3d.rs-has-section { --st-bottom: 132px; --rs-bottom: 160px; }
.re3d canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; touch-action: none; cursor: grab; }
.re3d canvas:active { cursor: grabbing; }
.re3d-panel {
    position: absolute;
    top: 10px;
    left: 10px;
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: 6px;
    width: 240px;
    max-width: calc(100% - 20px);
    overflow-y: auto;
    padding: 10px 10px 8px;
    border-radius: 14px;
    font-size: 12.5px;
}
.re3d-panel .studio-section-label { margin: 2px 2px 0; }
.re3d-seg .studio-filter-seg { padding: 5px 4px; font-size: 12px; }
.re3d-seg-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.re3d-seg-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.re3d-panel .rs-rail-range { padding: 2px 2px 4px; }
.re3d-hidden { display: none; }
.re3d-tilts-wrap summary { cursor: pointer; color: var(--st-text-2); font-weight: 600; padding: 2px; }
.re3d-tilts { list-style: none; margin: 6px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px 8px; color: var(--st-muted); font-variant-numeric: tabular-nums; }
.re3d-tilts li { display: flex; justify-content: space-between; gap: 4px; }
.re3d-tilts strong { color: var(--st-text); }
.re3d-panel .rs-keys { margin: 4px 2px 0; font-size: 11px; line-height: 1.8; }
.re3d-caption {
    position: absolute;
    z-index: 2;
    color: #ffffff;
    font-size: 11.5px;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.7);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    pointer-events: none;
}
.re3d-status,
.re3d-readout {
    position: absolute;
    z-index: 3;
    padding: 6px 12px;
    border-radius: 10px;
    background: var(--st-glass-strong);
    border: 1px solid var(--st-line);
    box-shadow: var(--st-shadow);
    color: var(--st-text);
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}
.re3d-status { left: 50%; top: 45%; transform: translate(-50%, -50%); font-size: 13px; }
.re3d-readout { pointer-events: none; font-variant-numeric: tabular-nums; }

@media (max-width: 860px) {
    .rs-layout { display: none !important; }
    .rs-body { --rs-bottom: 250px; }
    body.rs-has-section { --rs-bottom: calc(250px + var(--rs-sec-h)); }
    .rs-mode { width: 88px; }
    .rs-panels.rs-layout-2,
    .rs-panels.rs-layout-4 { top: 112px; right: var(--st-gap); }
    .rs-panels.rs-layout-2 { grid-template-columns: 1fr; grid-template-rows: 1fr 1fr; }
    .re3d { top: 112px; right: var(--st-gap); }
    .re3d-panel { width: 190px; }
    .re3d-panel .rs-keys { display: none; }
}
.re-mode-3d .rs-panels .maplibregl-ctrl { display: none; }
.rs-auto { width: 100%; gap: 6px; margin: 2px 0 2px; }
.rs-rail-note i { color: var(--st-gold); margin-right: 4px; }
.rs-presets { margin: 2px 0 4px; }

/* ---------- Profil de vent VAD ---------- */
.rs-wind {
    position: absolute;
    top: var(--st-top);
    left: var(--st-gap);
    z-index: 3;
    display: flex;
    flex-direction: column;
    width: min(340px, calc(100vw - 24px));
    max-height: calc(100% - var(--st-top) - var(--st-bottom));
    border-radius: 18px;
}
.rs-wind[hidden] { display: none !important; }
.rs-wind .studio-drawer-head h2 small { margin-left: 6px; color: var(--st-muted); font-size: 11.5px; font-weight: 600; }
.rs-wind-svg { display: block; width: 100%; height: auto; font-family: inherit; }
.rs-wind-axis { margin: 2px 0 8px; color: var(--st-muted); font-size: 11px; text-align: center; }
.rs-wind-table { width: 100%; margin: 8px 0; border-collapse: collapse; font-size: 12px; font-variant-numeric: tabular-nums; }
.rs-wind-table th { color: var(--st-muted); font-weight: 600; text-align: left; padding: 3px 4px; border-bottom: 1px solid var(--st-line); }
.rs-wind-table td { padding: 3px 4px; border-bottom: 1px solid var(--st-line-soft); color: var(--st-text-2); }
.re-mode-3d .rs-wind { display: none !important; }
.studio-legend-cats { margin-top: 2px; }

/* ---------- Rail (refonte ergonomique) ---------- */
.rs-rail-head {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 2px 2px 8px 6px;
    border-bottom: 1px solid var(--st-line-soft);
}
.rs-rail-min .rs-rail-head { padding-bottom: 2px; border-bottom: 0; }
.rs-rail-sum { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; }
.rs-rail-sum > span { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.rs-rail-sum strong { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rs-rail-sum small { color: var(--st-muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.rs-rail-num {
    display: grid;
    place-items: center;
    flex: 0 0 22px;
    height: 22px;
    border-radius: 50%;
    background: var(--st-accent);
    color: #fff;
    font-size: 11px;
}
.rs-rail-toggle { flex: 0 0 auto; width: 30px !important; height: 30px !important; }
.rs-sec { margin-top: 8px; }
.rs-sec-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 2px 6px;
    border: 0;
    background: transparent;
    color: var(--st-muted);
    font: inherit;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    cursor: pointer;
}
.rs-sec-head:hover { color: var(--st-text); }
.rs-sec-head i { font-size: 10px; transition: transform 0.15s; }
.rs-sec.is-folded .rs-sec-head i { transform: rotate(-90deg); }
.rs-sec-head kbd {
    margin-left: 3px;
    padding: 0 4px;
    border-radius: 4px;
    background: var(--st-chip);
    font: inherit;
    font-size: 9.5px;
    letter-spacing: 0;
}
.rs-sec-body { margin-top: 5px; }
.rs-tiles { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 4px; }
.rs-tile {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    min-width: 0;
    padding: 7px 2px 6px;
    border: 1px solid transparent;
    border-radius: 10px;
    background: var(--st-chip);
    color: var(--st-text-2);
    font: inherit;
    font-size: 11.5px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.12s, color 0.12s, border-color 0.12s;
}
.rs-tile i { font-size: 14px; color: var(--st-muted); }
.rs-tile span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rs-tile:hover { background: var(--st-hover); color: var(--st-text); border-color: var(--st-line); }
.rs-tile.active { background: var(--st-accent); color: #fff; box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25); }
.rs-tile.active i { color: rgba(255, 255, 255, 0.9); }
.rs-pills, .rs-chips { display: flex; flex-wrap: wrap; gap: 4px; }
.rs-pill, .rs-chip2 {
    padding: 4px 9px;
    border: 1px solid transparent;
    border-radius: 999px;
    background: var(--st-chip);
    color: var(--st-text-2);
    font: inherit;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    cursor: pointer;
    transition: background 0.12s, color 0.12s;
}
.rs-pill { padding: 3px 8px; font-size: 11.5px; font-variant-numeric: tabular-nums; }
.rs-pill:hover, .rs-chip2:hover { background: var(--st-hover); color: var(--st-text); border-color: var(--st-line); }
.rs-pill.active, .rs-chip2.active { background: var(--st-accent); color: #fff; }
.rs-tabs {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 2px;
    padding: 3px;
    border-radius: 12px;
    background: var(--st-chip);
}
.rs-tab {
    position: relative;
    height: 30px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: var(--st-muted);
    font-size: 13px;
    cursor: pointer;
    transition: background 0.12s, color 0.12s;
}
.rs-tab:hover { color: var(--st-text); background: var(--st-hover); }
.rs-tab.active { background: var(--st-solid); color: var(--st-text); box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25); }
.rs-tab.has-active::after {
    content: "";
    position: absolute;
    top: 4px;
    right: 5px;
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--st-accent-hi);
}
.rs-tab-name { margin: 6px 4px 5px; color: var(--st-text); font-size: 12px; font-weight: 700; }
.rs-empty { color: var(--st-muted); font-size: 12px; padding: 2px 4px; }
.rs-method { margin: 4px 2px 2px; color: var(--st-muted); font-size: 11.5px; }
.rs-method summary { cursor: pointer; padding: 3px 4px; list-style: none; }
.rs-method summary::-webkit-details-marker { display: none; }
.rs-method summary i { color: var(--st-accent-hi); margin-right: 3px; }
.rs-method p { margin: 2px 4px 4px; line-height: 1.45; }
.rs-sec .rs-auto { margin-top: 4px; }
.rs-sec .rs-rail-range { padding: 6px 4px 6px; }
.rs-sec .rs-presets { display: flex; flex-wrap: wrap; gap: 4px; margin: 2px 0 4px; }
.rs-sec .rs-presets .rs-chip { flex: 1 1 0; }
@media (max-width: 860px) {
    .rs-body .studio-rail { width: auto; }
    .rs-tiles { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}

/* Isotherme 0 °C AROME PI (légende) */
.rs-iso0-note { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; font-size: 11px; margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--st-border, rgba(127,127,127,0.25)); }
.studio-legend > .rs-iso0-note:first-child { margin-top: 0; padding-top: 0; border-top: 0; }
.rs-iso0-title { flex-basis: 100%; font-weight: 600; }
.rs-iso0-ramp { flex-basis: 100%; height: 6px; border-radius: 3px; }
.rs-iso0-ticks { position: relative; flex-basis: 100%; height: 13px; margin-top: -2px; color: var(--st-muted); }
.rs-iso0-ticks span { position: absolute; top: 0; transform: translateX(-50%); }
.rs-iso0-ticks span:first-child { transform: none; }
.rs-iso0-ticks em { position: absolute; right: -2px; top: 0; font-style: normal; transform: translateX(100%); padding-left: 4px; }
.rs-iso0-note small { flex-basis: 100%; color: var(--st-muted); }
.rs-iso0-key { display: inline-block; width: 16px; height: 0; vertical-align: middle; border-top: 3px solid rgb(40, 120, 230); }
.rs-iso0-key-g2 { border-top-width: 1.5px; margin-left: 6px; }

/* La légende ne passe plus sous le panneau latéral (classes de type de précipitation coupées). */
@media (min-width: 861px) {
    .rs-body .studio-dock { padding-right: calc(252px + var(--st-gap)); }
}

/* ---------- Vue 3D + carte (coupe A→B déplaçable sur la carte, rideau dans le volume) ---------- */
.rs-split-btn { display: none !important; }
.re-mode-3d .rs-split-btn { display: inline-flex !important; align-items: center; justify-content: center; }
.rs-split-btn[aria-pressed="true"] { background: var(--st-accent); color: #ffffff; }
.rs-body { --rs-split-map: calc((100vw - var(--st-gap) * 4 - 224px) * 0.42); }
body.rs-split3d .re3d { right: calc(var(--st-gap) * 3 + 224px + var(--rs-split-map)); }
body.rs-split3d .rs-panels {
    visibility: visible;
    inset: auto;
    top: var(--st-top);
    bottom: var(--rs-bottom);
    right: calc(var(--st-gap) * 2 + 224px);
    width: var(--rs-split-map);
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 0 0 0 1px var(--st-line);
}
body.rs-split3d #rsSectionBtn { display: inline-flex !important; }
body.rs-split3d .rs-panels .maplibregl-ctrl { display: none; }
@media (max-width: 860px) {
    .rs-body { --rs-split-map: 34vh; }
    body.rs-split3d .re3d { right: var(--st-gap); bottom: calc(var(--rs-bottom) + var(--rs-split-map) + var(--st-gap)); }
    body.rs-split3d .rs-panels { left: var(--st-gap); right: var(--st-gap); width: auto; top: auto; height: var(--rs-split-map); }
}
.re-mode-3d .rs-mode { grid-template-columns: repeat(3, minmax(0, 1fr)); width: 144px; }
@media (max-width: 860px) { .re-mode-3d .rs-mode { width: 126px; } }
.studio-legend-cat .studio-legend-swatch + .studio-legend-swatch { margin-left: -2px; }
.rs-legend-foot { margin-top: 5px; color: var(--st-muted); font-size: 11px; }
/* Légende du type de précipitation : une seule ligne si la place le permet. */
.studio-legend.rs-legend-wide { width: auto; max-width: 100%; }
.studio-legend.rs-legend-wide .studio-legend-cats { gap: 4px 9px; }

/* ---------- Rail : affichage, analyses (accordéon du studio Modèles), réglages en interrupteurs ---------- */
.rs-seg-scan { display: grid; width: 100%; }
.rs-seg-scan .studio-filter-seg { padding: 6px 4px; font-size: 12.5px; }
#rsRail .studio-cat { margin: 1px 0; }
#rsRail .studio-cat-items { padding-bottom: 4px; }
#rsRail .studio-param-line .studio-param { min-height: 28px; }
.rs-switch-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    width: 100%;
    padding: 6px 4px 6px 6px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: var(--st-text);
    font: inherit;
    font-size: 12.5px;
    font-weight: 600;
    text-align: left;
    cursor: pointer;
}
.rs-switch-row:hover { background: var(--st-chip); }
.rs-switch-row:focus-visible { outline: 2px solid var(--st-accent-hi); outline-offset: 1px; }
.rs-sw { position: relative; flex: 0 0 auto; width: 34px; height: 20px; border-radius: 999px; background: var(--st-track-strong); transition: background 0.18s; }
.rs-sw::before { content: ""; position: absolute; top: 3px; left: 3px; width: 14px; height: 14px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, 0.35); transition: transform 0.18s; }
.rs-sw.on { background: var(--st-accent); }
.rs-sw.on::before { transform: translateX(14px); }
.rs-rail-status { margin: -2px 6px 6px; color: var(--st-muted); font-size: 11.5px; line-height: 1.4; }
