/* Page /globe/ : HUD cyan/magenta sur fond sombre. Polices et accent orange repris du site (static/style.css).
 * Feuille autonome : on ne charge pas style.css, qui est écrit pour des pages éditoriales qui défilent. */
@font-face{font-family:"IBM Plex Sans";font-style:normal;font-weight:100 700;font-display:swap;src:url(/fonts/plex-sans-var-latin.woff2) format("woff2");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}
@font-face{font-family:"JetBrains Mono";font-style:normal;font-weight:100 800;font-display:swap;src:url(/fonts/jetbrains-mono-var-latin.woff2) format("woff2");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}

:root {
  --bg: #02050d;
  --cyan: #00e5ff;
  --magenta: #ff2bd6;
  --acc: #ff8a3d;               /* accent du site (thème sombre) */
  --panel: rgba(4, 14, 30, 0.78);
  --line: rgba(0, 229, 255, 0.35);
  --txt: #bfeeff;
  --dim: #7fa6ba;
  --sans: "IBM Plex Sans", ui-sans-serif, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
  --bar: 38px;                  /* hauteur de la barre du site */
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); overflow: hidden; font-family: var(--mono); color: var(--txt); }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--acc); outline-offset: 2px; }
.sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; border: 0; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: .5rem; z-index: 200; background: #fff; color: #000; padding: .5rem 1rem; font-size: .85rem; }
.skip:focus { left: .5rem; }

/* ---- Barre du site ---- */
#sitebar { position: fixed; top: 0; left: 0; right: 0; height: var(--bar); z-index: 70; display: flex; align-items: center; gap: 18px;
  padding: 0 28px; background: rgba(2, 5, 13, .85); border-bottom: 1px solid var(--line); font-size: 12px; }
#sitebar a { text-decoration: none; color: var(--txt); }
#sitebar a:hover { color: #fff; text-decoration: underline; }
#sitebar .logo { display: flex; align-items: center; gap: .45rem; font-weight: 700; font-size: 14px; letter-spacing: -.02em; color: #ececec; }
#sitebar .logo i { width: 9px; height: 9px; background: var(--acc); display: inline-block; }
#sitebar .sp { flex: 1; }
#sitebar .langsw { position: relative; }
#sitebar .langsw summary { color: var(--acc); cursor: pointer; list-style: none; padding: 4px 8px; border: 1px solid var(--line); letter-spacing: 1px; }
#sitebar .langsw summary::-webkit-details-marker { display: none; }
#sitebar .langsw .lang-options { position: absolute; right: 0; top: calc(100% + 6px); display: flex; flex-direction: column; min-width: 130px;
  background: rgba(2, 5, 13, .96); border: 1px solid var(--line); padding: 4px 0; }
#sitebar .langsw .lang-options a { padding: 7px 14px; white-space: nowrap; }
#sitebar .langsw .lang-options a:hover, #sitebar .langsw .lang-options a:focus-visible { background: rgba(0, 229, 255, .12); }

#globe { position: fixed; inset: 0; }
#globe canvas { outline: none; }

/* ---- Calques de décor ---- */
#scanlines { position: fixed; inset: 0; pointer-events: none; z-index: 50;
  background: repeating-linear-gradient(to bottom, rgba(0,0,0,0) 0, rgba(0,0,0,0) 2px, rgba(0,229,255,0.035) 3px, rgba(0,0,0,0) 4px); mix-blend-mode: screen; }
#vignette { position: fixed; inset: 0; pointer-events: none; z-index: 49; background: radial-gradient(ellipse at center, rgba(0,0,0,0) 55%, rgba(0,0,0,0.65) 100%); }
.corner { position: fixed; width: 34px; height: 34px; border: 2px solid var(--cyan); pointer-events: none; z-index: 60; filter: drop-shadow(0 0 4px var(--cyan)); }
.corner.tl { top: calc(var(--bar) + 10px); left: 10px; border-right: 0; border-bottom: 0; }
.corner.tr { top: calc(var(--bar) + 10px); right: 10px; border-left: 0; border-bottom: 0; }
.corner.bl { bottom: 10px; left: 10px; border-right: 0; border-top: 0; }
.corner.br { bottom: 10px; right: 10px; border-left: 0; border-top: 0; }

/* ---- HUD haut ---- */
#hud-top { position: fixed; top: calc(var(--bar) + 16px); left: 28px; z-index: 60; pointer-events: none; }
#title { margin: 0; font-family: var(--sans); font-weight: 700; font-size: 22px; letter-spacing: 4px; text-transform: uppercase; color: var(--cyan); text-shadow: 0 0 12px rgba(0,229,255,0.7); }
#title b { color: var(--magenta); text-shadow: 0 0 12px rgba(255,43,214,0.8); }
#subtitle { font-size: 12px; color: var(--dim); letter-spacing: 2px; margin-top: 4px; text-transform: uppercase; }
#clock { font-family: var(--sans); font-size: 26px; font-weight: 500; margin-top: 12px; color: #fff; text-shadow: 0 0 10px rgba(0,229,255,0.6); letter-spacing: 2px; font-variant-numeric: tabular-nums; }
#clock small { font-size: 12px; color: var(--cyan); margin-left: 6px; }
#date { font-size: 12px; color: var(--dim); letter-spacing: 1px; text-transform: uppercase; }
#readout { margin-top: 10px; font-size: 11px; color: var(--dim); line-height: 1.6; text-transform: uppercase; }
#readout span { color: var(--cyan); }

/* ---- HUD bas ---- */
#hud-bottom { position: fixed; left: 28px; bottom: 24px; z-index: 60; display: flex; flex-wrap: wrap; gap: 10px 14px; align-items: center; max-width: calc(100vw - 420px); }
.hud-btn { font-family: var(--sans); font-weight: 600; font-size: 11px; letter-spacing: 2px; text-transform: uppercase; color: var(--cyan); background: var(--panel); border: 1px solid var(--line);
  padding: 9px 14px; cursor: pointer; clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px); transition: background .2s, color .2s; }
.hud-btn:hover:not(:disabled) { background: rgba(0,229,255,0.18); color: #fff; }
.hud-btn:disabled { opacity: .45; cursor: not-allowed; }
.hud-btn:focus-visible { clip-path: none; }
.hud-btn.paused { color: var(--magenta); border-color: var(--magenta); }
#counter { font-size: 12px; color: var(--dim); letter-spacing: 1px; text-transform: uppercase; }
#counter b { font-family: var(--sans); color: var(--magenta); font-size: 18px; margin-right: 6px; }
#status { font-size: 11px; color: var(--dim); text-transform: uppercase; }
#status.warn { color: #ffb347; }
#srcmode { font-family: var(--sans); font-weight: 600; font-size: 10px; letter-spacing: 2px; padding: 3px 8px; border: 1px solid; text-transform: uppercase; }
#srcmode.live { color: #4dff9a; border-color: #4dff9a; }
#srcmode.snap { color: var(--dim); border-color: var(--dim); }
#srcmode.down { color: #ffb347; border-color: #ffb347; }

/* ---- Panneau ---- */
#panel { position: fixed; top: calc(var(--bar) + 16px); right: 28px; bottom: 24px; width: 340px; z-index: 60; display: flex; flex-direction: column; background: var(--panel);
  border: 1px solid var(--line); backdrop-filter: blur(6px); transition: transform .3s ease; }
#panel-head { display: flex; align-items: center; justify-content: space-between; padding: 12px 14px; border-bottom: 1px solid var(--line); }
#panel-head h2 { margin: 0; font-family: var(--sans); font-weight: 700; font-size: 13px; letter-spacing: 3px; text-transform: uppercase; color: var(--cyan); }
#panel-head .dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--magenta); box-shadow: 0 0 8px var(--magenta); margin-right: 8px; animation: blink 1.2s infinite; }
#panel.paused .dot { animation: none; background: var(--dim); box-shadow: none; }
#panel-toggle { display: none; background: none; border: 1px solid var(--line); color: var(--cyan); font-family: var(--sans); font-weight: 600; font-size: 10px; padding: 4px 8px; cursor: pointer; text-transform: uppercase; }
#feed-wrap { flex: 1; overflow-y: auto; padding: 8px; scrollbar-width: thin; scrollbar-color: var(--cyan) transparent; }
#feed { list-style: none; margin: 0; padding: 0; }
.item { border: 1px solid rgba(0,229,255,0.18); padding: 9px 10px; margin-bottom: 8px; background: rgba(0,229,255,0.03); position: relative; animation: slidein .45s ease; cursor: pointer; }
.item:hover { border-color: var(--cyan); background: rgba(0,229,255,0.1); }
.item.active { border-color: var(--magenta); background: rgba(255,43,214,0.09); }
.item.noloc { cursor: default; opacity: .88; }
.item.flash { border-color: #ffb347; }
.item .t { font-family: var(--sans); font-size: 13px; line-height: 1.35; color: #e8fbff; padding-right: 26px; }
.item .t a { text-decoration: none; }
.item .t a:hover { text-decoration: underline; color: var(--cyan); }
.item .m { font-size: 10.5px; color: var(--dim); margin-top: 6px; display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.item .locate { position: absolute; top: 6px; right: 6px; width: 24px; height: 24px; padding: 0; background: none; border: 1px solid rgba(0,229,255,.4); color: var(--cyan); cursor: pointer; font-size: 14px; line-height: 1; }
.item .locate:hover { background: rgba(0,229,255,.18); color: #fff; }
.badge { color: var(--cyan); border: 1px solid rgba(0,229,255,0.4); padding: 0 5px; font-size: 10px; letter-spacing: 1px; text-transform: uppercase; }
.badge.none { color: #ffb347; border-color: rgba(255,179,71,0.55); }
#empty { color: var(--dim); font-size: 12px; padding: 14px; text-align: center; }
#empty.warn { color: #ffb347; }
#panel-note { margin: 0; padding: 8px 14px 10px; font-size: 10px; line-height: 1.45; color: var(--dim); border-top: 1px solid var(--line); }

/* ---- Étiquettes de fuseaux et carte d'article (HTML posé sur le globe) ---- */
.anchor { position: absolute; width: 0; height: 0; transition: opacity .25s; pointer-events: none; }
.tzl { position: absolute; transform: translate(-50%, -50%); text-align: center; white-space: nowrap; font-size: 9px; line-height: 1.2; color: rgba(0,229,255,0.8); text-shadow: 0 0 4px #000, 0 0 6px rgba(0,229,255,0.4); }
.tzl .h { color: #fff; font-size: 10px; }
.tzl.me { color: var(--cyan); font-weight: bold; text-shadow: 0 0 8px var(--cyan); }
.tzl.mid { color: var(--magenta); text-shadow: 0 0 8px var(--magenta); }
.tzl.noon { color: #ffe27a; text-shadow: 0 0 8px #ffb300; }
.card { position: absolute; left: 0; bottom: 0; transform: translate(-50%, 0); width: 260px; padding: 12px 14px; background: rgba(2, 10, 24, 0.86); border: 1px solid rgba(0,229,255,0.35);
  backdrop-filter: blur(3px); animation: cardin .45s cubic-bezier(.2,.9,.3,1.2); pointer-events: none; }
.card .src { font-size: 10px; letter-spacing: 2px; color: var(--magenta); text-transform: uppercase; }
.card .ttl { font-family: var(--sans); font-weight: 600; font-size: 12px; line-height: 1.45; margin: 6px 0 8px; color: #fff; min-height: 3em; }
.card .ttl::after { content: '\2588'; color: var(--cyan); animation: blink .7s infinite; margin-left: 2px; }
.card.done .ttl::after { content: ''; }
.card .ttl a { color: inherit; text-decoration: none; pointer-events: auto; cursor: pointer; }
.card .ttl a:hover { text-decoration: underline; color: var(--cyan); }
.card .loc { font-size: 10.5px; color: var(--cyan); }
.card i { position: absolute; width: 12px; height: 12px; border: 2px solid var(--magenta); }
.card i:nth-child(1) { top: -4px; left: -4px; border-right: 0; border-bottom: 0; }
.card i:nth-child(2) { top: -4px; right: -4px; border-left: 0; border-bottom: 0; }
.card i:nth-child(3) { bottom: -4px; left: -4px; border-right: 0; border-top: 0; }
.card i:nth-child(4) { bottom: -4px; right: -4px; border-left: 0; border-top: 0; }
.card.glitch { animation: glitch .35s steps(2, end); }
.card.glitch .ttl { text-shadow: 2px 0 var(--magenta), -2px 0 var(--cyan); }

@keyframes blink { 50% { opacity: .15; } }
@keyframes slidein { from { opacity: 0; transform: translateX(24px); } to { opacity: 1; transform: none; } }
@keyframes cardin { from { opacity: 0; transform: translate(-50%, 14px) scale(.85); } to { opacity: 1; transform: translate(-50%, 0) scale(1); } }
@keyframes glitch {
  0% { transform: translate(-50%, 0); clip-path: inset(0 0 0 0); }
  25% { transform: translate(calc(-50% + 4px), 0); clip-path: inset(10% 0 55% 0); }
  50% { transform: translate(calc(-50% - 5px), 1px); clip-path: inset(55% 0 8% 0); }
  75% { transform: translate(calc(-50% + 2px), 0); clip-path: inset(0 0 30% 0); }
  100% { transform: translate(-50%, 0); clip-path: inset(0 0 0 0); }
}

/* ---- Sans WebGL : la liste d'articles seule ---- */
#nogl { display: none; position: fixed; top: calc(var(--bar) + 16px); left: 28px; right: 380px; z-index: 60; padding: 14px 16px; border: 1px solid #ffb347; color: #ffb347; background: var(--panel); font-size: 13px; line-height: 1.5; }
body.nogl #nogl { display: block; }
body.nogl #globe, body.nogl #vignette, body.nogl #scanlines, body.nogl #hud-top, body.nogl #btn-sim, body.nogl #btn-pause, body.nogl .corner { display: none; }
body.nogl #hud-bottom { top: calc(var(--bar) + 120px); bottom: auto; }

/* ---- Mouvement réduit : pas d'animation, la carte apparaît d'un bloc ---- */
@media (prefers-reduced-motion: reduce) {
  .item, .card, .card.glitch { animation: none; }
  #panel-head .dot, .card .ttl::after { animation: none; }
  #panel { transition: none; }
}

/* ---- Écrans étroits ---- */
@media (max-width: 760px) {
  #sitebar { padding: 0 16px; gap: 12px; }
  #title { font-size: 16px; letter-spacing: 2px; }
  #clock { font-size: 20px; }
  #readout { display: none; }
  #hud-top { left: 20px; top: calc(var(--bar) + 10px); }
  #hud-bottom { max-width: none; left: 16px; bottom: auto; top: calc(var(--bar) + 108px); flex-direction: column; align-items: flex-start; gap: 8px; }
  #panel { top: auto; right: 10px; left: 10px; bottom: 10px; width: auto; height: 42vh; }
  #panel.collapsed { transform: translateY(calc(100% - 46px)); }
  #panel-toggle { display: block; }
  .card { width: 210px; }
  #nogl { right: 16px; left: 16px; }
  body.nogl #panel { position: fixed; top: auto; height: 55vh; }
}
@media (max-width: 760px) and (prefers-reduced-motion: reduce) { #panel.collapsed { transform: translateY(calc(100% - 46px)); } }
