/* Styles des pages (2/2) : session live, connexions, labo, terminal, radar, mémoire, réglages, recherche */

/* ——— Session Live ——— */
.live { position: fixed; inset: 0; z-index: 100; display: flex; flex-direction: column; background: var(--bg); animation: fade-up 0.25s var(--ease); }
.live::before { content: ""; position: absolute; inset: 0; pointer-events: none; background: radial-gradient(900px 500px at 50% 0%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 70%); }
.live-top { position: relative; display: flex; align-items: center; gap: 14px; padding: 16px 20px calc(10px + env(safe-area-inset-top)); }
.live-title { font: 700 20px/1.2 var(--font-ui); letter-spacing: 0.05em; text-transform: uppercase; }
.live-timer { font: 400 26px/1 var(--font-gta); color: var(--text-2); }
.live-progress { position: relative; height: 6px; margin: 0 20px; background: var(--surface-3); overflow: hidden; }
.live-progress i { position: absolute; inset: 0 auto 0 0; background: var(--brand); transition: width 0.3s var(--ease); }
.live-body { position: relative; flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px; padding: 24px; text-align: center; }
.live-step { margin: 0; max-width: 30ch; font: 400 clamp(28px, 4.8vw, 58px)/1.12 var(--font-gta); letter-spacing: 0.01em; text-shadow: 3px 3px 0 #000; animation: fade-up 0.3s var(--ease); }
.live-bottom { position: relative; display: flex; gap: 10px; padding: 16px 20px calc(18px + env(safe-area-inset-bottom)); max-width: 820px; width: 100%; margin: 0 auto; }
.live-bottom .btn.lg { height: 68px; font-size: 20px; }
.live-bottom .btn.lg.icon { width: 68px; }
.live-hint { position: relative; text-align: center; color: var(--text-3); font-size: 12px; margin: 0 0 14px; }

/* ——— Connexions ——— */
.graph-wrap { position: relative; height: min(68vh, 680px); border-radius: var(--radius-xl); border: 1px solid var(--line); background: radial-gradient(800px 500px at 50% 40%, var(--surface-2), var(--surface) 70%); overflow: hidden; touch-action: none; }
.graph-wrap canvas { width: 100%; height: 100%; cursor: grab; }
.graph-wrap canvas:active { cursor: grabbing; }
.graph-tip { position: absolute; pointer-events: none; padding: 8px 11px; border-radius: var(--radius); background: var(--panel); border: 1px solid var(--line-2); font-size: 12.5px; max-width: 260px; box-shadow: var(--shadow-pop); transform: translate(12px, 12px); }
.graph-legend { position: absolute; left: 14px; bottom: 12px; display: flex; flex-wrap: wrap; gap: 10px; font-size: 11.5px; color: var(--text-2); background: var(--panel); padding: 8px 10px; border-radius: var(--radius); backdrop-filter: blur(8px); }
.graph-legend span { display: inline-flex; align-items: center; gap: 5px; }
.graph-tools { position: absolute; right: 12px; top: 12px; display: flex; gap: 6px; }
.matrix { display: grid; gap: 4px; }
.matrix .cell { aspect-ratio: 1.6; border-radius: var(--radius); display: grid; place-items: center; font: 700 13px/1 var(--mono); color: var(--text); background: color-mix(in srgb, var(--accent) calc(var(--v) * 70%), var(--surface-2)); border: 1px solid var(--line); }
.matrix .cell.self { background: var(--surface); color: var(--text-3); }
.matrix .hd { display: grid; place-items: center; font: 700 12.5px var(--font-ui); letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-2); text-align: center; }
.path { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.path .node { padding: 8px 12px; border-radius: var(--radius); border: 1px solid var(--line-2); background: var(--surface); font-size: 13.5px; font-weight: 600; }
.path .node.hub { border-style: dashed; color: var(--violet); }
.thread-member { display: grid; grid-template-columns: 92px minmax(0, 1fr); gap: 16px; position: relative; }
.thread-member .yr { font: 400 30px/1 var(--font-gta); color: var(--gc); letter-spacing: 0.02em; text-align: right; padding-top: 14px; text-shadow: 2px 2px 0 #000; }
.thread-line { border-left: 3px solid var(--line-2); padding-left: 16px; }

/* ——— Labo ——— */
.exp { display: flex; flex-direction: column; gap: 12px; }
.exp-head { display: flex; align-items: flex-start; gap: 12px; }
.exp-pot { flex: none; width: 60px; height: 60px; border-radius: 50%; display: grid; place-items: center; text-align: center; background: conic-gradient(var(--accent) calc(var(--p) * 1%), var(--surface-3) 0); position: relative; }
.exp-pot::after { content: ""; position: absolute; inset: 5px; border-radius: 50%; background: var(--surface); }
.exp-pot span { position: relative; z-index: 1; font: 400 17px/1 var(--font-gta); }
.exp-why { color: var(--text-2); font-size: 14px; margin: 0; }
.exp ol { margin: 0; padding-left: 20px; color: var(--text-2); font-size: 14px; display: flex; flex-direction: column; gap: 4px; }
.exp-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.exp.status-success { border-color: color-mix(in srgb, var(--ok) 55%, var(--line)); box-shadow: inset 4px 0 0 var(--ok), var(--shadow); }
.exp.status-fail { opacity: 0.72; }
.lab-hero { padding: 22px; border-radius: var(--radius-xl); border: 1px solid var(--line); border-left: 5px solid var(--violet); background: linear-gradient(135deg, color-mix(in srgb, var(--violet) 16%, var(--surface)), var(--surface) 60%); }

/* ——— Terminal ——— */
.ticker { display: flex; gap: 28px; overflow: hidden; white-space: nowrap; padding: 10px 0; border-block: 1px solid var(--line); background: color-mix(in srgb, var(--bg) 50%, #000); mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent); }
.ticker-track { display: inline-flex; gap: 28px; animation: ticker 60s linear infinite; }
.ticker:hover .ticker-track { animation-play-state: paused; }
@keyframes ticker { from { transform: translateX(0); } to { transform: translateX(-50%); } }
.tick { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; }
.tick b { font-family: var(--mono); font-weight: 650; }
.fresh { display: inline-flex; align-items: center; gap: 6px; }
.fresh i { width: 34px; height: 5px; background: linear-gradient(90deg, var(--tone) calc(var(--f) * 1%), var(--surface-3) 0); }
.plan-step { display: grid; grid-template-columns: 70px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 12px 14px; border-radius: var(--radius); border: 1px solid var(--line); border-left: 3px solid var(--money); background: var(--surface); }
.plan-step .when { font: 700 13px/1 var(--mono); color: var(--text-3); }
.journal-row { display: grid; grid-template-columns: 110px minmax(0, 1fr) auto auto; gap: 14px; align-items: center; padding: 12px 14px; border-bottom: 1px solid var(--line); }
@media (max-width: 760px) { .journal-row { grid-template-columns: minmax(0, 1fr) auto; } .journal-row .when, .journal-row .del { display: none; } }

/* ——— Radar ——— */
.radar-status { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; color: var(--text-2); font-size: 13px; }
.radar-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 4px color-mix(in srgb, var(--ok) 20%, transparent); animation: pulse 2s infinite; }
.radar-dot.off { background: var(--bad); box-shadow: 0 0 0 4px color-mix(in srgb, var(--bad) 20%, transparent); animation: none; }
.signal { display: grid; grid-template-columns: 52px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 13px 16px; border-radius: var(--radius); border: 1px solid var(--line); border-left: 3px solid var(--tone, var(--line-2)); background: var(--surface); }
.signal + .signal { margin-top: 6px; }
.sig-strength { font: 400 26px/1 var(--font-gta); text-align: center; color: var(--tone); text-shadow: 2px 2px 0 #000; }
.sig-strength small { display: block; margin-top: 4px; font: 600 11px/1 var(--font-ui); color: var(--text-3); letter-spacing: 0.08em; text-transform: uppercase; text-shadow: none; }
.signal .t { font-weight: 600; font-size: 14.5px; line-height: 1.35; }
.signal .m { margin-top: 6px; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; color: var(--text-3); font-size: 12px; }

/* ——— Chronologie & cimetière ——— */
.timeline { position: relative; padding-left: 26px; }
.timeline::before { content: ""; position: absolute; left: 7px; top: 6px; bottom: 6px; width: 3px; background: var(--line-2); }
.tl-year { margin: 28px 0 10px -26px; font: 400 34px/1 var(--font-head); letter-spacing: 0.02em; text-shadow: 3px 3px 0 var(--h-shadow); }
.tl-item { position: relative; display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 12px; padding: 9px 0; }
.tl-item::before { content: ""; position: absolute; left: -24px; top: 15px; width: 12px; height: 12px; transform: rotate(45deg); background: var(--gc); box-shadow: 0 0 0 4px var(--bg); }
.tl-item.future::before { background: transparent; border: 2px solid var(--gc); }
.tl-date { color: var(--text-3); font: 600 12.5px/1.6 var(--mono); }
/* Les tombes : pierre grise, et le tampon rouge « PATCHÉ ». */
.grave { position: relative; overflow: hidden; text-align: center; padding: 24px 18px 18px; border-radius: 80px 80px 6px 6px; border: 2px solid var(--line-2); background: linear-gradient(180deg, color-mix(in srgb, var(--surface-3) 80%, #888 6%), var(--surface)); filter: grayscale(0.55); transition: filter 0.2s var(--ease), transform 0.2s var(--ease); }
.grave:hover { filter: none; transform: translateY(-2px); }
.grave .rip { font: 400 18px/1 var(--font-head); letter-spacing: 0.3em; color: var(--text-3); }
.grave h3 { margin: 10px 0 6px; font-size: 16px; }

/* ——— Contribuer & réglages ——— */
.form-grid { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 22px; align-items: start; }
@media (max-width: 1000px) { .form-grid { grid-template-columns: minmax(0, 1fr); } }
.qc { display: flex; flex-direction: column; gap: 8px; }
.qc-item { display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; }
.qc-item .i { flex: none; margin-top: 2px; }
.qc-item.ok .i { color: var(--ok); } .qc-item.warn .i { color: var(--warn); } .qc-item.bad .i { color: var(--bad); }
.setting { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 16px 0; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.setting:last-child { border-bottom: 0; }
.setting .d { color: var(--text-2); font-size: 13px; margin-top: 2px; max-width: 52ch; }

/* ——— Recherche : onglets, réponses directes, web des fans ——— */
.stabs { display: flex; gap: 2px; margin-top: 16px; padding: 0; border-bottom: 2px solid var(--line-2); overflow-x: auto; scrollbar-width: none; }
.stabs::-webkit-scrollbar { display: none; }
.stabs[hidden] { display: none; }
.stab { flex: none; display: inline-flex; align-items: center; gap: 7px; height: 38px; padding: 0 14px; background: var(--row); color: var(--text-2); font: 700 15px/1 var(--font-ui); letter-spacing: 0.06em; text-transform: uppercase; white-space: nowrap; transition: background 0.12s var(--ease), color 0.12s var(--ease); }
.stab:hover { color: var(--text); background: var(--row-hover); }
.stab[aria-selected="true"] { background: var(--sel-bg); color: var(--sel-text); }
.stab .n { font-size: 12.5px; color: inherit; opacity: 0.7; font-variant-numeric: tabular-nums; padding: 1px 6px; border-radius: var(--radius-s); background: color-mix(in srgb, currentColor 12%, transparent); }
.spinner.sm { width: 13px; height: 13px; border-width: 2px; }

.answer-card { margin-top: 18px; padding: 20px; border-radius: var(--radius-l); border: 1px solid color-mix(in srgb, var(--gc, var(--accent)) 45%, var(--line)); border-left: 5px solid var(--gc, var(--accent)); background: linear-gradient(140deg, color-mix(in srgb, var(--gc, var(--accent)) 14%, var(--surface)), var(--surface) 62%); }
.answer-card .eyebrow { color: var(--gc, var(--accent)); }
.answer-big { margin-top: 10px; font: 400 clamp(40px, 7vw, 66px)/1.02 var(--font-gta); letter-spacing: 0.01em; color: #fff; text-shadow: -2px -2px 0 #000, 2px -2px 0 #000, -2px 2px 0 #000, 2px 2px 0 #000, 5px 5px 0 var(--gc, var(--accent)); overflow-wrap: anywhere; }
.answer-title { margin: 8px 0 6px; font-size: 21px; }
.answer-text { margin: 10px 0 6px; font-size: 16px; color: var(--text); }

.search-side { align-items: start; }
.article-thumb { width: 96px; flex: none; border-radius: var(--radius); overflow: hidden; aspect-ratio: 16 / 10; background: var(--surface-2); border: 2px solid #000; }
.article-thumb svg { display: block; width: 100%; height: 100%; }
.thread-ico.sm { width: 38px; height: 38px; }

.web-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 8px; }
.web-item { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface); min-width: 0; transition: border-color 0.15s var(--ease), transform 0.15s var(--ease), box-shadow 0.15s var(--ease); }
.web-item:hover { border-color: var(--line-2); transform: translateY(-1px); box-shadow: inset 4px 0 0 var(--neon); }
.web-item > .i { color: var(--text-3); flex: none; }
.web-item .grow { min-width: 0; }
.web-item .t { display: block; font-weight: 650; font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.web-item .d { display: block; margin-top: 3px; color: var(--text-3); font-size: 12.5px; }
.web-item .m { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin-top: 6px; }
.web-item.forum { align-items: flex-start; }
.web-item.forum .t { white-space: normal; }
.web-thumb { width: 54px; height: 54px; flex: none; border-radius: var(--radius); overflow: hidden; display: grid; place-items: center; color: var(--text-3); background: var(--surface-2); border: 1px solid var(--line); }
.web-thumb img { width: 100%; height: 100%; object-fit: cover; }
.web-item.forum .web-thumb { width: 40px; height: 40px; color: var(--accent); }
.web-loading { display: flex; align-items: center; gap: 10px; padding: 16px; border-radius: var(--radius); border: 2px dashed var(--line-2); color: var(--text-2); font: 600 15px var(--font-ui); letter-spacing: 0.06em; text-transform: uppercase; }
.elsewhere { gap: 8px; margin-top: 14px; align-items: center; }

.ops-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 8px; }
.ops-line { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: var(--radius); border: 1px solid var(--line); min-width: 0; }
.ops-line:hover { border-color: var(--line-2); background: var(--row-hover); }
.ops-line .kbd { flex: none; font-size: 12px; max-width: 58%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-transform: none; font-family: var(--mono); font-weight: 600; letter-spacing: 0; }

.result.kb, .k-item.kb { outline: 2px solid var(--focus); outline-offset: 2px; background: var(--row-hover); }
#s-out > section { margin-top: 30px; }
#s-out > section:first-child { margin-top: 20px; }

/* ——— Fiche : progression d'une collection, pour aller plus loin ——— */
.progress-box { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; padding: 16px; border-radius: var(--radius-l); border: 1px solid var(--line); border-left: 4px solid var(--gold); background: var(--surface); }
.progress-box .count { font: 400 40px/1 var(--font-gta); min-width: 110px; text-shadow: 2px 2px 0 #000; }
.progress-box .count small { font: 600 15px var(--font-ui); color: var(--text-3); margin-left: 4px; text-shadow: none; }
.progress-box .meter { flex: 1; min-width: 140px; }
.progress-box.done { border-color: color-mix(in srgb, var(--ok) 55%, var(--line)); border-left-color: var(--ok); }
