/* Eurathos Navigateur: a compact toolbar and tabs over the remote page, in the
   colours of the shell (light and dark). Sized for the web panel (from 360 px). */
:root {
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Inter", system-ui, "Segoe UI", Roboto, sans-serif;
  --ink: #1d1d1f;
  --muted: #6e6e73;
  --accent: #0071e3;
  --bg: #f5f5f7;
  --bar: rgba(250, 250, 252, .92);
  --field: rgba(118, 118, 128, .12);
  --hover: rgba(0, 0, 0, .06);
  --hairline: rgba(0, 0, 0, .1);
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root { --ink: #f5f5f7; --muted: #a1a1a6; --accent: #0a84ff; --bg: #1c1c1e; --bar: rgba(30, 30, 32, .94); --field: rgba(118, 118, 128, .24); --hover: rgba(255, 255, 255, .08); --hairline: rgba(255, 255, 255, .12); }
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { display: flex; flex-direction: column; background: var(--bg); color: var(--ink); font: 13px/1.4 var(--font); -webkit-font-smoothing: antialiased; }
[hidden] { display: none !important; }
svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
button { font: inherit; color: inherit; }
button:focus-visible, input:focus-visible, a:focus-visible, canvas:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }

.bar { position: relative; display: flex; align-items: center; gap: 2px; padding: 6px 6px 4px; background: var(--bar); }
.icon { display: inline-flex; align-items: center; justify-content: center; flex: none; width: 32px; height: 32px; padding: 0; border: 0; border-radius: 9px; background: none; cursor: pointer; }
.icon:hover { background: var(--hover); }
.icon[aria-pressed="true"] svg { fill: #f5b301; stroke: #f5b301; }
.icon.loading svg { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.address { flex: 1; min-width: 0; margin: 0 4px; }
.address input { width: 100%; height: 32px; padding: 0 12px; border: 0; border-radius: 10px; background: var(--field); color: var(--ink); font: inherit; outline: none; }
.address input:focus { box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 35%, transparent); }
.menu { position: absolute; top: 42px; right: 6px; z-index: 5; display: flex; flex-direction: column; min-width: 260px; padding: 6px; border-radius: 14px; background: var(--bar); box-shadow: 0 0 0 .5px var(--hairline), 0 18px 40px -12px rgba(0, 0, 0, .35); }
.menu button { padding: 8px 10px; border: 0; border-radius: 9px; background: none; text-align: left; cursor: pointer; }
.menu button:hover, .menu button:focus-visible { background: var(--hover); }
.menu .danger { color: #ff3b30; }

.tabs { display: flex; align-items: center; gap: 4px; padding: 0 6px 6px; background: var(--bar); box-shadow: inset 0 -.5px 0 var(--hairline); }
#tabs { display: flex; gap: 4px; min-width: 0; overflow-x: auto; scrollbar-width: none; }
.tab { display: flex; align-items: center; flex: 0 1 180px; min-width: 70px; height: 28px; border-radius: 8px; background: var(--field); }
.tab[aria-selected="true"] { background: var(--bg); box-shadow: 0 0 0 .5px var(--hairline); }
.tab .label { flex: 1; min-width: 0; height: 100%; padding: 0 4px 0 10px; border: 0; background: none; text-align: left; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; cursor: pointer; }
.tab .close { width: 22px; height: 22px; margin-right: 3px; border: 0; border-radius: 6px; background: none; color: var(--muted); cursor: pointer; }
.tab .close:hover { background: var(--hover); color: var(--ink); }
.tabs .icon { width: 28px; height: 28px; }

.driver { display: flex; align-items: center; gap: 8px; padding: 6px 12px; background: linear-gradient(90deg, #6366f1, #22d3ee); color: #ffffff; font-weight: 600; }
.driver span { flex: 1; }
.driver button { padding: 4px 10px; border: 0; border-radius: 999px; background: rgba(255, 255, 255, .25); color: #ffffff; font-weight: 600; cursor: pointer; }

.view { position: relative; flex: 1; min-height: 0; overflow: hidden; background: #ffffff; }
#screen { display: block; width: 100%; height: 100%; object-fit: contain; object-position: top left; cursor: default; touch-action: none; }
.start { position: absolute; inset: 0; overflow-y: auto; padding: 28px 20px; background: var(--bg); }
.start h1 { margin: 0 0 6px; font-size: 22px; letter-spacing: -.01em; }
.start h2 { margin: 24px 0 10px; font-size: 13px; color: var(--muted); }
.status, .hint { margin: 0 0 14px; color: var(--muted); }
.primary { display: inline-block; padding: 9px 16px; border: 0; border-radius: 999px; background: var(--accent); color: #ffffff; font-weight: 600; text-decoration: none; cursor: pointer; }
.primary:disabled { opacity: .5; cursor: default; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 6px; margin: 0; padding: 0; list-style: none; }
.tiles button { display: flex; flex-direction: column; align-items: center; gap: 6px; width: 100%; min-width: 0; padding: 10px 4px; border: 0; border-radius: 14px; background: none; cursor: pointer; }
.tiles button:hover { background: var(--hover); }
.tiles .badge { display: flex; align-items: center; justify-content: center; width: 44px; height: 44px; border-radius: 12px; color: #ffffff; font-size: 18px; font-weight: 700; }
.tiles .name { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; max-width: 100%; overflow: hidden; overflow-wrap: anywhere; font-size: 12px; text-align: center; }
.toast { position: fixed; left: 50%; bottom: 16px; transform: translateX(-50%); max-width: calc(100% - 32px); margin: 0; padding: 10px 14px; border-radius: 12px; background: rgba(28, 28, 30, .92); color: #ffffff; }
.signin { margin: auto; padding: 24px; text-align: center; }
@media (pointer: coarse) { .icon { width: 40px; height: 40px; } }
@media (prefers-reduced-motion: reduce) { .icon.loading svg { animation: none; } }
