/* panels.css — floating panel layer, module bar, connection widget,
 * adapted from ostnoctua's .on-glass/.on-modbar/.on-conn-cluster/.on-mod/
 * .on-float (ostnoctua.css) onto UI3's own theme.css tokens. See
 * js/panels.js for the panel drag/resize/show-hide behavior this styles -
 * a panel has no minimize button of its own, only its own quicknav button
 * (Gilles, 2026-10-03).
 *
 * .glass is ostnoctua's actual "frosted" recipe (translucent background +
 * backdrop-filter blur + subtle border + soft shadow) — the one visual
 * ingredient an earlier, flat-opaque-box version of this file was missing
 * entirely (Gilles, 2026-09-25: "c'est tout moisi ... regarde comment
 * c'est fait sur ostnoctua"). Every floating surface in UI3 uses it. */
.glass {
  background: var(--bg-panel);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-panel);
}

/* ------------------------------------------------------------ module bar
 * One glass pill floating top-left over the canvas (ostnoctua's
 * "on-glass on-modbar" nav) — not a boxed-off full-width strip. */
#modbar {
  /* top: not flush with the edge - Android's immersive mode (hides the
     status bar, MainActivity.java) reserves a swipe-to-reveal gesture zone
     right at the physical top edge, which can swallow a tap before the
     WebView sees it; a plain mobile browser tab never hides its bars, so
     this only bites inside the packaged app. */
  position: fixed; top: 24px; left: 12px; z-index: 20;
  display: flex; align-items: center; gap: 6px;
  padding: 8px;
  max-width: calc(100vw - 24px);
  overflow-x: auto; overflow-y: hidden;
}
/* Generic divider, shared by any glass bar that groups buttons into zones
   (currently just #quicknav's nav/actions split — see below). */
.bar-sep { width: 1px; align-self: stretch; margin: 2px 4px; background: var(--border); flex-shrink: 0; }
/* Exactly ostnoctua's .on-mod recipe (ostnoctua/web/ostnoctua.css): fixed
   56x56 square, icon above a small label, not a variable-width inline
   pill — Gilles, 2026-09-25, after an inline-pill attempt: "reprend
   exactement le principe de ostnoctua (taille fixe, libellé en dessous
   police reduite)". */
.mod-btn {
  position: relative;
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 2px; width: 60px; height: 64px; flex-shrink: 0;
  background: var(--accent-faint); color: var(--text-muted);
  border: 1px solid var(--border-subtle); border-radius: var(--radius);
  cursor: pointer; font: inherit;
  transition: border-color 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}
/* Global-state dot (Gilles, 2026-09-27) — same .status-dot component as the
   module's own "signals" property, just relocated to the button's corner.
   Absent (.hidden) for modules that never declare a "state" element. */
.mod-btn-dot { position: absolute; top: 5px; right: 5px; margin-right: 0; }
/* This module's own worst log level (views.js's renderModbar()) - top-left
   corner, .mod-btn-dot above already owns top-right. Same .log-badge-dot
   colour classes as the GlobalDatastore vignette's own equivalent dot
   (panels.css further down), just repositioned - the compound selector
   beats that rule's own right-side placement regardless of source order. */
.mod-btn-log-dot.log-badge-dot { top: 5px; left: 5px; right: auto; margin-right: 0; }
.mod-btn:hover { color: var(--text-secondary); border-color: var(--accent-dim); }
.mod-btn:hover .material-icons { transform: scale(1.15); }
.mod-btn.active {
  background: var(--accent-subtle); color: var(--accent); border-color: var(--accent);
  box-shadow: var(--shadow-glow);
}
.mod-btn .material-icons { font-size: 22px; transition: transform 0.2s; }
/* Icon-only vignette (GlobalDatastore) - no label/profile text to balance
   against, so the icon itself scales up (x1.5) to fill the button. */
.mod-btn-icon-only .material-icons { font-size: 33px; }
.mod-btn-label {
  font-size: 9px; letter-spacing: 0.5px; max-width: 56px;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
/* Loaded profile name plus its own "unsaved changes" dot, on the same
   line (views.js's renderModbar()) rather than a separate corner marker,
   so the two read together as one fact instead of two unrelated-looking
   signals. The row (not just the text) is .hidden (base.css) when the
   module has no profile loaded, rather than reserving blank space. */
.mod-btn-profile-row { display: flex; align-items: center; justify-content: center; gap: 3px; max-width: 56px; }
.mod-btn-profile {
  font-size: 8px; color: var(--text-muted); opacity: 0.75; min-width: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
/* Same blue/blinking marker as the params gear button's own
   .icon-chip.has-changes (panels.css further down), just a real inline
   dot here instead of an absolutely-positioned pseudo-element, to sit in
   the profile row above rather than float over a corner. */
.mod-btn-changed-dot {
  width: 6px; height: 6px; border-radius: 50%; flex-shrink: 0;
  background: #2196f3; box-shadow: 0 0 4px rgba(33, 150, 243, 0.7);
  animation: pulse-dot 1s ease-in-out infinite;
}
/* Switch-backend button's own per-backend color marker (issue #256,
   Gilles, 2026-11-02) - a plain flow child, not an absolute dot like
   .mod-btn-dot above, specifically so it doesn't read as another status
   indicator. Width matches .mod-btn-label's own max-width. */
.mod-btn-color-bar { width: 44px; height: 6px; border-radius: 3px; }

/* --------------------------------------------------------------- quicknav
 * Per-module bottom bar, one glass pill like #modbar — Gilles, 2026-09-27:
 * generic across every module. Two zones: navigation (left — one button per
 * panel/level1, filled by render.js's setQuickNavRoot()/views.js's
 * renderQuickNav()) and actions (right — params, this same
 * module's own controls, moved out of #top-right since "le bouton params
 * ... se rapporte au module en cours d'affichage"). The whole bar is hidden
 * for non-module views (docked screens have neither); the nav zone alone
 * (plus its separator) additionally hides itself when a module has no
 * panels to jump to, since the actions zone still matters then. */
#quicknav {
  position: fixed; bottom: 12px; left: 50%; transform: translateX(-50%); z-index: 20;
  display: flex; align-items: center; gap: 6px;
  padding: 8px;
  max-width: calc(100vw - 24px);
  overflow-x: auto;
}
.quicknav-zone { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
/* The params chip (and, before it was removed, reorganize alongside it)
   doesn't carry its own standalone .glass background (it sits inside
   #quicknav's shared pill instead) but keeps a faint background/border of
   its own so it still reads as a button — same scoping convention as
   #modbar's own .mod-btn. */
#quicknav-actions .icon-chip { background: var(--accent-faint); border: 1px solid var(--border-subtle); border-radius: var(--radius); }
.quicknav-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  height: 36px; padding: 0 12px; flex-shrink: 0;
  background: var(--accent-faint); color: var(--text-secondary);
  border: 1px solid var(--border-subtle); border-radius: var(--radius);
  cursor: pointer; font: inherit; font-size: 12px; white-space: nowrap;
  transition: border-color 0.15s ease, color 0.15s ease;
}
.quicknav-btn .material-icons { font-size: 16px; }
.quicknav-btn:hover { color: var(--accent); border-color: var(--accent-dim); }
/* Gilles, 2026-10-06: navigator's "center on mount" button, inactive
 * until a mount position is known - same opacity/cursor language as
 * .btn:disabled (components.css), this class just never needed it before
 * (every earlier quicknav entry always toggles a panel, never gated on
 * data availability). */
.quicknav-btn:disabled { opacity: 0.45; cursor: not-allowed; }
.quicknav-btn:disabled:hover { color: var(--text-secondary); border-color: var(--border-subtle); }
/* The actions window's own button (render.js's renderActionsPanel()) -
 * icon only, no label span at all, so the wide text-oriented padding
 * above would leave it looking oddly stretched - square it up instead,
 * same width as it is tall. */
.quicknav-btn-icon-only { width: 36px; padding: 0; }
.quicknav-btn.active {
  background: var(--accent-subtle); color: var(--accent); border-color: var(--accent);
  box-shadow: var(--shadow-glow);
}

/* ------------------------------------------------------------ top-right
 * Theme toggle + connection widget, each its own glass chip, floating at
 * the same level as #modbar (Gilles, 2026-09-25: "tout au meme niveau, un
 * seul conteneur commun"). The theme toggle is deliberately its own
 * always-visible chip, never nested inside the collapsible connection
 * panel — burying it there once meant Gilles genuinely couldn't find it. */
/* top: see #modbar's own comment above on why this isn't flush with the edge. */
#top-right { position: fixed; top: 24px; right: 12px; z-index: 20; display: flex; align-items: flex-start; gap: 8px; }
#top-right-items { display: flex; align-items: flex-start; gap: 8px; }
/* Gilles, 2026-10-16: "sur smartphone en mode portrait les deux menus du
 * haut arrivent a se superposer ... j'aimerais que dans ces cas de
 * collision le menu general soit transforme en un seul bouton '...'" -
 * app.js's own updateTopRightCollapse() toggles this ".collapsed" class
 * once it measures #modbar's own right edge reaching #top-right-items'
 * natural left edge. Normal state (no class) renders the plain inline row
 * above; collapsed hides it (not just visibility:hidden - it must stop
 * actually occupying space, that's the whole point) behind #top-right-more
 * instead, which only ever shows in that state. */
#top-right-more { display: none; }
#top-right.collapsed #top-right-more { display: inline-flex; }
#top-right.collapsed #top-right-items { display: none; }
/* Clicking #top-right-more while collapsed (app.js) unfolds the exact same
 * row as a dropdown instead of inline - same floating-popover idea as
 * .conn-panel/.zoom-panel, own glass styling spelled out here rather than
 * toggling the shared .glass class from app.js (JS only ever flips
 * "collapsed"/"open", nothing else). */
#top-right.collapsed.open #top-right-items {
  display: flex; flex-direction: column; gap: 8px;
  position: absolute; top: calc(100% + 6px); right: 0;
  padding: var(--space-3); border-radius: var(--radius-lg); z-index: 30;
  background: var(--bg-panel);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--border);
  box-shadow: var(--shadow-panel);
}

/* UI zoom (font size + everything else, incl. floating panels) — Gilles,
   2026-09-28: "ajuster la taille de police de tous les composants ... la
   taille des fenetres doit s'ajuster en consequence"; 2026-09-29:
   "remplace les boutons +/- par un slider qui s'affiche quand on clic sur
   un bouton unique". One icon chip (like the theme toggle); clicking it
   folds out a small glass popover with the slider, same collapsible
   pattern as #conn-widget. Applied via CSS `zoom` on <body> (app.js)
   rather than a transform: zoom is a real browser-level scale, so
   panels.js's own drag/resize math (getBoundingClientRect/clientX/
   clientY) keeps working unmodified, and position:fixed chrome (this very
   bar included) stays anchored to the real viewport instead of being
   caught in a transformed containing block. */
/* The toggle chip itself scales with everything else, like every other
   #top-right chip — no exception there (Gilles, 2026-09-29: "le bouton Tt
   doit se comporter comme les autres"). Only the popup is the exception:
   position:fixed (its own app.js-computed top/left, in real viewport px —
   taken out of #top-right's flex flow entirely, so it can no longer shift
   position as its own size changes) + zoom: calc(1/--ui-zoom) (app.js sets
   --ui-zoom to the same value as body's own zoom) to counter that
   inherited zoom back out to an effective 1x, constant size regardless of
   the level currently set — the first attempt put both the button and the
   popup in one zoom-countering wrapper, which shifted the whole thing
   around inside the flex row as its box's own contribution to that row's
   layout changed size ("le slide ne devrait pas changer de taille" turned
   into "la ca change de position aussi"). */
#zoom-widget { position: relative; flex-shrink: 0; }
.zoom-panel {
  position: fixed; z-index: 30; padding: 8px 12px; display: flex; align-items: center;
  zoom: calc(1 / var(--ui-zoom, 1));
}
/* .hidden (base.css, !important) toggles this panel's visibility. */
#zoom-slider { width: 110px; accent-color: var(--accent); cursor: pointer; }

/* Backend-switch flyout (issue #256) - same construction as .zoom-panel
   right above: reparented onto <body> once at boot (app.js), positioned
   from the clicked modbar button's own getBoundingClientRect() rather
   than flowing in place, to escape #modbar's own backdrop-filter (.glass)
   containing-block trap - the exact bug already hit once with the zoom
   panel itself, see NOTES-frontend-ostcore-multi-backend.md. */
.backend-switch-panel {
  position: fixed; z-index: 30; padding: var(--space-2); display: flex; flex-direction: column; gap: 2px;
  min-width: 180px; max-height: 60vh; overflow-y: auto;
  zoom: calc(1 / var(--ui-zoom, 1));
}
.backend-switch-panel ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.backend-switch-panel li button { width: 100%; justify-content: flex-start; gap: var(--space-2); }
.backend-switch-panel li button.active { border-color: var(--accent); color: var(--accent); }

.icon-chip {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px; flex-shrink: 0;
  color: var(--text-secondary); cursor: pointer;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.icon-chip:hover { color: var(--accent); border-color: var(--accent-dim); }
.icon-chip .material-icons { font-size: 19px; }
.icon-chip:disabled { color: var(--text-dim); cursor: not-allowed; opacity: 0.5; }
.icon-chip.active { color: var(--accent); border-color: var(--accent); box-shadow: var(--shadow-glow); }
/* Unsaved profile changes (module.profile.changed) — params gear button.
   Same blue/blinking colour as the modbar's own .mod-btn-changed-dot
   above, so the two visibly read as the same signal. */
.icon-chip.has-changes::after {
  content: ""; position: absolute; top: 3px; right: 3px;
  width: 7px; height: 7px; border-radius: 50%;
  background: #2196f3; box-shadow: 0 0 4px rgba(33, 150, 243, 0.7);
  animation: pulse-dot 1s ease-in-out infinite;
}
/* Login button (#top-right): its own icon colour tracks the current
 * grant-client (Gilles, 2026-10-03: "change la couleur interne du bouton
 * de login en fonction de grant-client (rouge -1 jaune 0 vert 1)") - same
 * --error/--busy/--ok palette .conn-dot already uses below, not colours of
 * their own. .icon-chip's own :hover/.active rules already work this way
 * (set `color`, the unstyled .material-icons span just inherits it). */
#login-toggle.grant-denied { color: var(--error); }
#login-toggle.grant-readonly { color: var(--busy); }
#login-toggle.grant-full { color: var(--ok); }

/* Per-module logs button (#quicknav-actions): same corner-dot badge type
 * as a module button's own global-state dot (.mod-btn-dot above, same
 * .status-dot base), but coloured from the worst level among this
 * module's own log entries (jaune=warning orange=error rouge=critical,
 * rien sinon - app.js's own updateModuleLogsBadge()). Colour classes of
 * its own rather than reusing .status-ok/.status-busy/.status-error -
 * those are a different, 4-state vocabulary (standby/ok/busy/error) with
 * no "nothing above warning" case, and no yellow at all. */
.log-badge-dot { position: absolute; top: 5px; right: 5px; margin-right: 0; }
.log-badge-dot.level-warning { background: var(--warn); box-shadow: 0 0 8px rgba(var(--busy-rgb), 0.5); }
.log-badge-dot.level-error { background: var(--orange); box-shadow: 0 0 8px rgba(var(--orange-rgb), 0.5); }
.log-badge-dot.level-critical { background: var(--error); box-shadow: 0 0 8px rgba(var(--error-rgb), 0.5); }

/* ------------------------------------------------------- connection widget
 * A plain .icon-chip (same 36x36 size as theme-toggle) - Gilles,
 * 2026-10-03: "diminue la taille du bouton connection = taille identique
 * au toggle jour/nuit, juste icone power_settings_new ... avec la couleur
 * qui change en fonction de l'etat de la connection (pas de libelle)".
 * .conn-toggle itself only carries the status-based colour now (app.js's
 * own onStatus()) - connecting pulses the same way a module button's own
 * "busy" status dot already does (.status-dot.status-busy, panels.css
 * above), not a colour of its own. Gilles, 2026-10-18: used to fold out a
 * dropdown of its own (#conn-panel, .settings-nav) - opens a plain modal
 * dialog instead now (app.js's own openSettingsDialog()), so there is
 * nothing left to toggle open here; #controller-settings-box (index.html)
 * is that dialog's own content, no dropdown-specific CSS of its own. */
#conn-widget { position: relative; flex-shrink: 0; }
.conn-toggle.status-connected { color: var(--ok); }
.conn-toggle.status-connecting { color: var(--busy); animation: pulse-dot 1s ease-in-out infinite; }
.conn-toggle.status-disconnected { color: var(--error); }

.settings-sep { height: 1px; background: var(--border); margin: 2px 0; }

/* ------------------------------------------------------------- canvas ---
 * Fills #app edge to edge (#modbar/#top-right float on top of it, see
 * above). Hosts either #panel-layer (floating panels, one module at a
 * time) or #docked-view (Home, or the bare connect screen before any
 * backend's first session dump), toggled via .hidden — see js/app.js. */
#canvas { position: absolute; inset: 0; background: var(--bg); }
/* Full-viewport background image (a template's own module.image, e.g. the
   guider template's guide frame) — sits behind #panel-layer/#docked-view
   (DOM order, both position:absolute with no z-index of their own, so
   later siblings paint on top), letterboxed (resized, aspect ratio kept —
   never stretched or cropped), click opens the fullscreen viewer. Ported
   from ostnoctua's own #on-bg/#on-bg-img (Gilles, 2026-09-29: "affiche
   l'image derriere en ecran de fond, comme dans ostnoctua") — see
   js/imagelayer.js. Letterbox bars follow the theme (same var(--bg) as
   #canvas itself, so they blend into it rather than reading as a boxed-in
   image) — was fixed near-black regardless of theme until Gilles caught
   it looking wrong in the light theme, 2026-10-05: "il y a deux zones
   noires ajoutees de part et d'autre de l'image, il faudrait qu'elles
   soient claires sur le theme clair". */
#bg-layer { position: absolute; inset: 0; z-index: 0; overflow: hidden; }
#bg-layer.img-active { background: var(--bg); }
#bg-image { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; image-rendering: pixelated; opacity: 0.92; cursor: zoom-in; }
/* Sky-dome view (templates/navigator.js, js/sky-engine.js) — same shared
   #bg-layer, a <canvas> instead of an <img>. Deep space black regardless
   of theme, same reasoning as .img-active. */
#bg-layer.sky-active { background: #05070c; }
#sky-canvas { position: absolute; inset: 0; width: 100%; height: 100%; cursor: grab; }
#sky-canvas.dragging { cursor: grabbing; }
/* HiPS background (js/hips-background.js, Gilles, 2026-10-13: "ajouter
   les images de fond 'hips'") - sits behind #sky-canvas (DOM order, see
   that file's own header), hidden until actually switched on in the
   display settings panel so an uninitialized/empty Aladin container
   never flashes anything of its own. */
.hips-bg { position: absolute; inset: 0; width: 100%; height: 100%; display: none; }
.hips-bg.active { display: block; }
/* Root-caused with a real Chromium browser (Playwright spike, not a
   guess - 4 earlier blind attempts in a row all failed): Gilles,
   2026-10-14, "le Tt general ... ne doit pas influer ... quand je le
   bouge ca deconne". Aladin's own canvas(es) (lib/aladin.js's own
   fixLayoutDimensions()) get their CSS size set as a LITERAL pixel
   string ("1879px"), not a percentage - and body's own CSS `zoom` (Tt,
   app.js's applyZoom()) visually stretches a literal-px box by that
   same factor while leaving its backing/drawing-buffer resolution
   untouched (confirmed measured in-browser: the canvas's own
   getBoundingClientRect() grew by exactly the zoom factor while its
   width/height attributes and even its own .style.width/height never
   changed) - a pure visual over-magnification of the SAME pixels,
   unrelated to any RA/Dec/FOV math (already proven Tt-independent
   separately). #sky-canvas never shows this because its own CSS is
   percentage-based (width:100%), which stays stable under zoom - this
   just forces Aladin's canvas(es) to the same percentage sizing,
   !important since Aladin re-asserts its own inline px style on every
   resize/redraw and a plain override would lose that race. */
.hips-bg canvas { width: 100% !important; height: 100% !important; }
/* Aladin's own logo/toolbar (js/hips-background.js's init options already
   disable every chrome piece that HAS a documented toggle - these two
   don't, grepped lib/aladin.js directly to confirm). Gilles, 2026-10-14:
   "des petites vignettes pour faire la pub de Aladin ... des boites
   monochromes qui apparaissent sous mes fenetres de controle" - masked
   for now; a general "credits" box covering every third-party data
   source this app uses (CDS/Aladin included) is a separate future piece,
   not yet built (Gilles: "ensuite on ajoute une boite plus generale pour
   tous les credits"). */
.hips-bg .aladin-logo, .hips-bg .aladin-widgets-toolbar { display: none !important; }
#panel-layer, #docked-view { position: absolute; inset: 0; overflow: auto; }
/* #panel-layer now stays visible even over a docked view (Home - see
   app.js's renderContentNow(), Gilles, 2026-10-06: "on doit pouvoir
   ouvrir les logs sans selection du module"), so its own
   stacking order against #docked-view now actually matters for the first
   time - it used to simply come first in DOM order with #docked-view
   right after it, which put the docked view's own content (e.g. Home's
   cards) ON TOP of any panel (Gilles, same day, next: "elle est
   inutilisable: cachee derriere les vignettes"). Explicit z-index fixes
   that regardless of DOM order - harmless to #docked-view's own
   clickability since #panel-layer itself stays pointer-events:none
   (below), only an actual .panel-float opts back into being interactive. */
#panel-layer { z-index: 5; }
/* #modbar floats fixed over the canvas (top:24px, ~64px-tall buttons, 8px
   padding - see above), so anything docked at inset:0 starts right behind
   it. Floating panels already dodge this by hand (every template's own
   Panels.make() call uses y:92 or more for its top row, below panels.js's
   own SAFE_TOP clamp which keeps anything lower anyway) - #docked-view
   (the Home dashboard/the bare connect screen) needs the same top
   clearance, just reserved once here instead of per-view. Gilles,
   2026-10-06, caught on the Home dashboard: "la position par defaut des
   vignettes positionne les premieres sous la barre de menu general :
   interdit". */
#docked-view { padding: var(--space-5); padding-top: 104px; }
/* A flat max-width wasted a lot of width on an actually wide window,
   caught at 1920px wide at plain zoom 1 (no zoom slider involved at
   all) - measured 59.7% of the viewport used at that width against a
   flat 1180px cap. min(1600px, 94vw) scales with the real window
   instead (94% used at both 800px and 1600px wide, capped at 1600px
   beyond that so lines of text don't get silly-wide on an ultrawide
   monitor) - same rule for Home, GlobalDatastore and indipanel alike,
   all #docked-view.
   / min(--ui-zoom, 1) on top: the zoom slider's own "mini" end (< 1)
   shrinks the real browser zoom while the viewport itself doesn't
   (vw is zoom-invariant), so without this the box would additionally
   shrink below its own zoom-1 size the lower you zoom; zoom >= 1 is
   left alone (already comfortable, approaching full width on its own).
   No extra overflow guard needed - #docked-view already scrolls
   (overflow: auto above), and checked at phone width (390px) this
   still renders with no horizontal scrollbar at zoom 0.7. */
#docked-view > * { max-width: calc(min(1600px, 94vw) / min(var(--ui-zoom, 1), 1)); margin: 0 auto; }
#panel-layer.hidden, #docked-view.hidden { display: none; }
/* #panel-layer fills the whole canvas even where no panel actually sits,
   so by default it would swallow every pointer event aimed at empty space
   before it could reach #bg-layer's own content underneath (the image
   viewer's click, the sky dome's wheel-zoom/drag — see js/sky-engine.js) —
   caught live, 2026-09-29: "le clic sur l'image de fond ne marche pas",
   then the same root cause again for the sky dome. Fixed generically
   rather than forwarding one event type at a time: the layer itself is
   click-through, only actual panels opt back into being interactive.
   pointer-events:none does mean #panel-layer's own wheel-scroll no longer
   works when hovering genuinely empty space - not a real loss here, since
   the established way to reach a panel stacked below the fold is already
   its quicknav button (panels.js's togglePanel() calls scrollIntoView()),
   not manually scrolling the layer. */
#panel-layer { pointer-events: none; }
.panel-float { pointer-events: auto; }

/* ------------------------------------------------------- fullscreen image
 * viewer (js/imagelayer.js's openImageViewer()) — wheel zooms toward the
 * cursor, drag pans, Esc/backdrop/close button closes. Same behavior and
 * class shapes as ostnoctua's .oi-viewer/.oi-stage/.oi-img/.oi-close. */
.img-viewer { position: fixed; inset: 0; z-index: 9999; background: rgba(2, 3, 8, 0.93); backdrop-filter: blur(3px); }
.img-viewer-stage { position: absolute; inset: 0; overflow: hidden; cursor: grab; }
.img-viewer-stage.grabbing { cursor: grabbing; }
.img-viewer-img { position: absolute; top: 0; left: 0; transform-origin: 0 0; image-rendering: pixelated; user-select: none; -webkit-user-drag: none; }
.img-viewer-close {
  position: absolute; top: 14px; right: 18px;
  width: 34px; height: 34px; border-radius: var(--radius);
  font-size: 22px; line-height: 1; cursor: pointer;
  border: 1px solid var(--border); background: var(--bg-panel); color: var(--text);
}
.img-viewer-close:hover { border-color: var(--accent-dim); }

.panel-float {
  position: absolute;
  min-width: 200px; max-width: 92%;
  display: flex; flex-direction: column;
  background: var(--bg-panel-solid);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-panel);
}
.panel-float:hover { border-color: var(--border-strong); }
.panel-float-bar {
  display: flex; align-items: center; gap: 6px;
  padding: 6px 6px 6px 10px;
  cursor: grab; user-select: none;
  border-bottom: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}
.panel-float.dragging { opacity: 0.92; box-shadow: var(--shadow-pop); }
.panel-float.dragging .panel-float-bar { cursor: grabbing; }
/* Brief highlight when a quicknav button brings this panel forward. */
.panel-float.flash { animation: panel-flash 0.9s ease; }
@keyframes panel-flash {
  0%, 100% { box-shadow: var(--shadow-panel); }
  25% { box-shadow: 0 0 0 3px var(--accent-subtle), 0 0 24px rgba(var(--accent-rgb), 0.35); }
}
.panel-float-grip { opacity: 0.3; letter-spacing: -3px; font-size: 12px; color: var(--text-muted); }
.panel-float-title {
  flex: 1; font-size: 11px; font-weight: 700; letter-spacing: 0.5px;
  text-transform: uppercase; color: var(--text-secondary);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.panel-float-close {
  display: inline-flex; align-items: center; justify-content: center;
  width: 20px; height: 20px; border-radius: var(--radius-sm);
  background: transparent; border: 1px solid transparent; color: var(--text-muted);
  cursor: pointer; flex-shrink: 0; padding: 0; transition: all 0.15s ease;
}
.panel-float-close .material-icons { font-size: 14px; }
.panel-float-close:hover { color: var(--btn-danger); background: rgba(var(--error-rgb), 0.12); border-color: var(--border-subtle); }
.panel-float-body { padding: var(--space-3) var(--space-4); overflow: auto; max-height: 74vh; }
/* Gilles, 2026-10-03: "soit la fenetre est completement masquee (invisible)
 * soit elle est completement visible jamais elle ne doit avoir cet etat
 * reduit avec juste son header, ca ne sert a rien" - the whole panel, not
 * just its body, so "collapsed" (quicknav button off) means genuinely
 * gone, not a bare title bar left floating on screen with nothing in it. */
.panel-float.collapsed { display: none; }

.panel-float-resize {
  position: absolute; right: 3px; bottom: 3px;
  width: 15px; height: 15px; cursor: nwse-resize; opacity: 0.4;
  background:
    linear-gradient(135deg, transparent 44%, var(--accent) 44% 56%, transparent 56%),
    linear-gradient(135deg, transparent 66%, var(--accent) 66% 80%, transparent 80%);
}
.panel-float-resize:hover { opacity: 0.9; }
.panel-float.resizing { user-select: none; }
.panel-float.resized { max-width: none; }
.panel-float.resized .panel-float-body { flex: 1 1 auto; min-height: 0; max-height: none; }

.hint-card {
  position: absolute; left: var(--space-5); top: var(--space-5);
  padding: 14px 18px; opacity: 0.75; max-width: 340px;
}

/* ------------------------------------------------------------------ toast
 * js/toast.js's own showToast() - transient notifications for log
 * entries that deserve more visibility than the log panel alone (first
 * use: a critical-level module crash, issue #234). Above everything
 * else on screen, including the fullscreen image viewer (z-index 9999)
 * and every dialog (50) - a critical notification should never be
 * hidden behind whatever else happens to be open. */
#toast-stack {
  position: fixed; left: 50%; bottom: 24px; transform: translateX(-50%);
  display: flex; flex-direction: column-reverse; gap: 8px; align-items: center;
  z-index: 10000; pointer-events: none;
}
.toast {
  padding: 10px 18px; border-radius: var(--radius);
  font-size: 13px; max-width: min(420px, 80vw); text-align: center;
  border: 1px solid var(--border);
  opacity: 0; transform: translateY(8px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}
.toast-in { opacity: 1; transform: translateY(0); }
/* Same 4-tier palette as the log panel's own .log-warning/.log-error/
 * .log-critical rows (components.css) - warning yellow, error orange,
 * critical red. */
.toast-critical { border-color: var(--error); color: var(--error); }
.toast-error { border-color: var(--orange); color: var(--orange); }
.toast-warning { border-color: var(--warn); color: var(--warn); }
.toast-info { border-color: var(--border); color: var(--text); }
.toast-debug { border-color: var(--border); color: var(--text-muted); }
