:root {
  --bg: #0b111d; --panel: rgba(13, 20, 35, 0.88); --line: rgba(140, 170, 220, 0.14);
  --text: #e7edf7; --muted: #8b9ab3; --accent: #5ee0c8; --left: 270px; --right: 370px; --top: 58px;
  font-family: "Inter", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); color: var(--text); overflow: hidden; }
button, select, input { font: inherit; color: inherit; }
button { cursor: pointer; }

#top3 { position: fixed; inset: 0 0 auto 0; height: var(--top); display: flex; align-items: center; gap: 14px; padding: 0 16px; background: rgba(8, 12, 21, 0.92); border-bottom: 1px solid var(--line); z-index: 20; backdrop-filter: blur(10px); }
.brand { white-space: nowrap; font-size: 17px; } .brand b { color: var(--accent); }
.search-wrap { position: relative; flex: 1; max-width: 560px; margin: 0 auto; }
#search3 { width: 100%; height: 38px; padding: 0 14px; border-radius: 12px; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.05); outline: none; }
#search3:focus { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(94, 224, 200, 0.12); }
#results3 { position: absolute; top: 44px; left: 0; right: 0; max-height: 62vh; overflow: auto; background: #0e1628; border: 1px solid var(--line); border-radius: 12px; padding: 6px; opacity: 0; transform: translateY(-6px); pointer-events: none; transition: 0.18s; box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5); }
#results3.on { opacity: 1; transform: none; pointer-events: auto; }
.res { display: block; width: 100%; text-align: left; padding: 7px 10px; border: 0; background: none; border-radius: 8px; }
.res small { display: block; color: var(--muted); font-size: 11.5px; }
.res.on, .res:hover { background: rgba(122, 162, 255, 0.12); }
.none { padding: 10px; color: var(--muted); }
.seg { display: flex; background: rgba(255, 255, 255, 0.05); border: 1px solid var(--line); border-radius: 11px; padding: 3px; gap: 2px; }
.seg button { border: 0; background: none; padding: 6px 11px; border-radius: 8px; color: var(--muted); transition: 0.2s; font-size: 13px; }
.seg button:hover { color: var(--text); }
.seg button.on { background: var(--accent); color: #04211c; font-weight: 700; }
.seg.col { flex-direction: column; }
.seg.col button { text-align: left; }
.link2d { background: none; cursor: pointer; font-family: inherit; color: var(--muted); font-size: 13px; text-decoration: none; border: 1px solid var(--line); padding: 7px 11px; border-radius: 10px; white-space: nowrap; }
.link2d:hover { color: var(--accent); border-color: var(--accent); }

#left3 { position: fixed; top: var(--top); bottom: 0; left: 0; width: var(--left); overflow: auto; padding: 14px; border-right: 1px solid var(--line); background: var(--panel); z-index: 10; backdrop-filter: blur(12px); }
#left3 h3 { font-size: 11px; text-transform: uppercase; letter-spacing: 0.14em; color: var(--muted); margin: 4px 0 10px; }
#left3 h3 small { text-transform: none; letter-spacing: 0; font-weight: 400; opacity: 0.8; }
#left3 section { margin-bottom: 18px; }
.grid-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; }
.grid-btns button { border: 1px solid var(--line); background: rgba(255, 255, 255, 0.03); padding: 7px; border-radius: 9px; font-size: 12.5px; transition: 0.18s; }
.grid-btns button.on, .grid-btns button:hover { border-color: var(--accent); background: rgba(94, 224, 200, 0.1); }
.sysrow { display: grid; grid-template-columns: 1fr 64px; gap: 8px; align-items: center; margin-bottom: 5px; }
.sys { display: flex; align-items: center; gap: 9px; text-align: left; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.03); padding: 7px 9px; border-radius: 9px; font-size: 12.5px; opacity: 0.55; transition: 0.2s; }
.sys i { width: 11px; height: 11px; border-radius: 4px; border: 1.5px solid var(--c); flex: none; }
.sys.on { opacity: 1; border-color: rgba(255, 255, 255, 0.22); }
.sys.on i { background: var(--c); box-shadow: 0 0 10px var(--c); }
input[type=range] { width: 100%; accent-color: var(--accent); }
select { width: 100%; background: #111a2e; border: 1px solid var(--line); border-radius: 9px; padding: 7px; margin-bottom: 8px; }
.opts { display: flex; flex-direction: column; gap: 6px; }
.toggle, .plain { text-align: left; border: 1px solid var(--line); background: none; padding: 7px 10px; border-radius: 9px; font-size: 12.5px; color: var(--muted); }
.toggle::before { content: ""; display: inline-block; width: 24px; height: 13px; border-radius: 8px; margin-right: 9px; vertical-align: -2px; background: #2a3550; box-shadow: inset -11px 0 0 2px #2a3550, inset 0 0 0 2px #2a3550; background: #8b9ab3; transition: 0.2s; }
.toggle.on { color: var(--text); }
.toggle.on::before { background: #04211c; box-shadow: inset 11px 0 0 2px var(--accent), inset 0 0 0 2px var(--accent); }
.plain:hover { border-color: var(--accent); color: var(--text); }

#view3d { position: fixed; top: var(--top); bottom: 0; left: var(--left); right: var(--right); overflow: hidden; background: radial-gradient(ellipse at 50% 35%, #182640 0%, #0b111d 60%, #05080f 100%); }
#gl { width: 100%; height: 100%; display: block; touch-action: none; }
#tip3 { position: absolute; top: 0; left: 0; pointer-events: none; background: rgba(9, 14, 26, 0.95); border: 1px solid var(--line); padding: 7px 11px; border-radius: 10px; font-size: 13px; opacity: 0; transition: opacity 0.12s; max-width: 260px; }
#tip3.on { opacity: 1; }
#tip3 small { display: block; color: var(--muted); font-size: 11.5px; margin-top: 2px; }
.credit { position: absolute; right: 10px; bottom: 8px; font-size: 10.5px; color: rgba(160, 175, 200, 0.6); background: none; border: 0; padding: 0; cursor: pointer; }
.credit:hover, .credits-lien:hover { color: var(--accent); text-decoration: underline; }
.credits-lien { margin-top: 6px; background: none; border: 0; padding: 0; color: var(--muted); font-size: 12px; cursor: pointer; text-decoration: underline dotted; }
.modale3 { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 20px; background: rgba(3, 6, 12, 0.72); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); animation: avIn 0.3s ease; }
.credits-carte { position: relative; max-width: 620px; max-height: 86vh; overflow: auto; padding: 24px 28px; border-radius: 18px; background: #0f1626; border: 1px solid var(--line); box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6); animation: avCarte 0.45s cubic-bezier(0.16, 1, 0.3, 1); }
.credits-carte h2 { margin: 0 0 10px; font-size: 20px; }
.credits-carte h4 { margin: 16px 0 6px; font-size: 11px; text-transform: uppercase; letter-spacing: 0.12em; color: var(--accent); }
.credits-carte p, .credits-carte li { font-size: 13.5px; line-height: 1.55; color: #d3dbe8; margin: 0 0 6px; }
.credits-carte ul { margin: 0; padding-left: 18px; }
.credits-carte a { color: var(--accent); }
.credits-x { position: absolute; top: 12px; right: 14px; width: 30px; height: 30px; border-radius: 50%; border: 1px solid var(--line); background: none; cursor: pointer; font-size: 18px; color: var(--muted); }
.credits-x:hover { color: var(--text); border-color: var(--accent); }
.bl-relu { margin: 6px 0 0; font-size: 12px; color: var(--accent); }
.bl-nonrelu { margin: 6px 0; padding: 6px 10px; border-radius: 8px; font-size: 12px; color: #ffb4a8; background: rgba(255, 59, 48, 0.1); border: 1px dashed rgba(255, 106, 85, 0.5); }

#panel3 { position: fixed; top: var(--top); bottom: 0; right: 0; width: var(--right); overflow: auto; padding: 16px; border-left: 1px solid var(--line); background: var(--panel); z-index: 10; backdrop-filter: blur(12px); }
.card h2 { margin: 6px 0 4px; font-size: 23px; line-height: 1.15; }
.sub { color: var(--accent); font-weight: 600; }
.en { color: var(--muted); font-size: 12.5px; margin: 4px 0 10px; }
.kicker { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; font-size: 11.5px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.06em; }
.badge { padding: 3px 8px; border-radius: 20px; border: 1px solid var(--accent); color: var(--accent); }
.lead { color: #c9d4e6; line-height: 1.6; font-size: 14.5px; }
.fn { border-left: 3px solid var(--accent); background: rgba(255, 255, 255, 0.035); padding: 10px 14px; border-radius: 0 12px 12px 0; margin: 14px 0; }
.fn h4, .rel { margin: 0 0 6px; font-size: 11px; text-transform: uppercase; letter-spacing: 0.12em; color: var(--accent); }
.fn p { margin: 0; line-height: 1.65; font-size: 14px; }
dl { margin: 10px 0; } dt { font-size: 11px; text-transform: uppercase; letter-spacing: 0.1em; color: var(--muted); margin-top: 10px; } dd { margin: 2px 0 0; line-height: 1.5; font-size: 14px; }
.muted { color: var(--muted); font-size: 13px; line-height: 1.6; }
.actions { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0; }
.actions button { border: 1px solid var(--line); background: rgba(255, 255, 255, 0.04); border-radius: 9px; padding: 6px 11px; font-size: 12.5px; }
.actions button:hover { border-color: var(--accent); }
.actions button.ok { border-color: var(--accent); color: var(--accent); }
.rel { margin-top: 18px !important; color: var(--muted) !important; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.chip { border: 1px solid var(--line); background: rgba(255, 255, 255, 0.04); border-radius: 20px; padding: 4px 10px; font-size: 12.5px; }
.chip:hover { border-color: var(--accent); }
.anim-in > * { animation: rise 0.5s cubic-bezier(0.2, 0.8, 0.2, 1) both; }
.anim-in > *:nth-child(2) { animation-delay: 0.04s; } .anim-in > *:nth-child(3) { animation-delay: 0.08s; } .anim-in > *:nth-child(n+4) { animation-delay: 0.12s; }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }

#loader { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; background: radial-gradient(ellipse at center, #10203c, #04060c 70%); transition: opacity 0.9s, visibility 0.9s, background 0.9s; }
#loader.soft { background: rgba(4, 6, 12, 0.35); pointer-events: none; }
#loader.soft .ld-inner { transform: translateY(36vh) scale(0.7); opacity: 0.85; }
#loader.gone { opacity: 0; visibility: hidden; }
.ld-inner { text-align: center; transition: transform 0.9s cubic-bezier(0.6, 0, 0.2, 1), opacity 0.9s; }
.intro-kicker { color: var(--accent); letter-spacing: 0.4em; text-transform: uppercase; font-size: 12px; animation: rise 0.8s both; }
#loader h1 { font-size: clamp(38px, 6.5vw, 80px); margin: 12px 0 18px; font-weight: 800; letter-spacing: -0.03em; }
#loader h1 span { display: inline-block; animation: rise 0.9s cubic-bezier(0.2, 0.8, 0.2, 1) both; background: linear-gradient(120deg, #fff, #9fe9da 60%, #7aa2ff); -webkit-background-clip: text; background-clip: text; color: transparent; }
#loader h1 span:nth-child(2) { animation-delay: 0.12s; } #loader h1 span:nth-child(3) { animation-delay: 0.24s; }
#loadBar { width: 260px; height: 3px; margin: 0 auto 14px; background: rgba(255, 255, 255, 0.1); border-radius: 3px; overflow: hidden; }
#loadBar i { display: block; height: 100%; background: var(--accent); transform: scaleX(0); transform-origin: left; transition: transform 0.5s; }
#loadList { list-style: none; padding: 0; margin: 0 auto; display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 14px; max-width: 520px; font-size: 12.5px; color: var(--muted); }
#loadList li::before { content: "○ "; }
#loadList li.done { color: var(--accent); } #loadList li.done::before { content: "● "; }
#loaderMsg { color: var(--muted); font-size: 12px; margin-top: 12px; }

/* ---------------------------------------------------------------- plongée dans le corps (zoom) */
#plg { position: absolute; inset: 0; pointer-events: none; overflow: hidden; }
#plg > * { visibility: hidden; }
#plg.on > * { visibility: visible; }
.plg-vig { position: absolute; inset: 0; opacity: 0;
  background: radial-gradient(ellipse 75% 70% at 50% 50%, transparent 45%, rgba(20, 6, 14, 0.55) 78%, rgba(4, 2, 6, 0.92) 100%),
              radial-gradient(circle at 50% 50%, rgba(94, 224, 200, 0.05), transparent 60%); }
.plg-anneau, .plg-onde { position: absolute; left: 0; top: 0; margin: 0; border-radius: 50%; }
.plg-anneau { opacity: 0; translate: -50% -50%; box-shadow: 0 0 0 1px rgba(94, 224, 200, 0.55), 0 0 28px rgba(94, 224, 200, 0.25), inset 0 0 40px rgba(94, 224, 200, 0.12); }
.plg-anneau i { position: absolute; inset: -9px; border-radius: 50%; border: 1px dashed rgba(94, 224, 200, 0.5); animation: plgTour 14s linear infinite; }
.plg-anneau::after { content: ""; position: absolute; inset: -18px; border-radius: 50%;
  background: conic-gradient(from 0deg, transparent 0 82%, rgba(94, 224, 200, 0.7) 92%, transparent 100%);
  -webkit-mask: radial-gradient(closest-side, transparent calc(100% - 2px), #000 calc(100% - 1px)); mask: radial-gradient(closest-side, transparent calc(100% - 2px), #000 calc(100% - 1px));
  animation: plgTour 2.6s linear infinite; }
@keyframes plgTour { to { transform: rotate(360deg); } }
.plg-onde { width: 40px; height: 40px; translate: -50% -50%; opacity: 0; border: 2px solid rgba(160, 255, 235, 0.9); box-shadow: 0 0 30px rgba(94, 224, 200, 0.8), inset 0 0 20px rgba(94, 224, 200, 0.6); }
.plg-onde.go { animation: plgOnde 0.9s cubic-bezier(0.16, 1, 0.3, 1) forwards; }
@keyframes plgOnde { 0% { opacity: 1; scale: 0.4; } 60% { opacity: 0.55; } 100% { opacity: 0; scale: 26; border-width: 0.5px; } }
.plg-hud { position: absolute; left: 50%; top: 16px; translate: -50% 0; opacity: 0; display: grid; justify-items: center; gap: 2px;
  padding: 10px 20px 11px; border-radius: 16px; background: rgba(8, 12, 22, 0.62); border: 1px solid rgba(94, 224, 200, 0.28);
  backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); box-shadow: 0 10px 40px rgba(0, 0, 0, 0.45); text-align: center; min-width: 230px; }
.plg-k { font-size: 10.5px; letter-spacing: 0.32em; text-transform: uppercase; color: var(--accent); }
.plg-k::before { content: ""; display: inline-block; width: 7px; height: 7px; margin: 0 8px 1px 0; border-radius: 50%; background: var(--accent); box-shadow: 0 0 10px var(--accent); animation: plgPouls 1.6s ease-in-out infinite; }
@keyframes plgPouls { 50% { opacity: 0.35; transform: scale(0.7); } }
.plg-nom { font-size: 16px; font-weight: 650; }
.plg-prof { font-size: 12.5px; color: #c9d6ea; font-variant-numeric: tabular-nums; transition: color 0.3s; }
.plg-hud.dedans .plg-prof { color: var(--accent); }
.plg-hud small { font-size: 11px; color: var(--muted); margin-top: 2px; }
.plg-sortir { pointer-events: auto; margin-top: 6px; padding: 4px 14px; border-radius: 20px; cursor: pointer; font-size: 12px;
  background: rgba(94, 224, 200, 0.12); border: 1px solid rgba(94, 224, 200, 0.45); }
.plg-sortir:hover { background: rgba(94, 224, 200, 0.25); }
@media (prefers-reduced-motion: reduce) { .plg-anneau i, .plg-anneau::after, .plg-k::before { animation: none; } .plg-onde.go { animation-duration: 0.01s; } }

/* ---------------------------------------------------------------- localisation */
.loc { display: grid; grid-template-columns: auto 1fr; gap: 12px; margin: 14px 0; padding: 12px; border-radius: 14px;
  background: linear-gradient(160deg, rgba(255, 106, 85, 0.07), rgba(94, 224, 200, 0.04)); border: 1px solid rgba(255, 106, 85, 0.22); }
.loc-cartes { display: flex; gap: 6px; }
.loc figure { margin: 0; text-align: center; }
.loc figcaption { font-size: 10px; color: var(--muted); letter-spacing: 0.04em; margin-top: 2px; }
.loc-img { position: relative; width: 68px; height: 152px; }
.loc-img img { width: 100%; height: 100%; display: block; }
.loc-img i { position: absolute; width: 8px; height: 8px; margin: -4px 0 0 -4px; border-radius: 50%; background: #ffd2c9; box-shadow: 0 0 8px 2px rgba(255, 106, 85, 0.9); }
.loc-img i::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 1.5px solid rgba(255, 106, 85, 0.9); animation: locPouls 1.8s ease-out infinite; }
@keyframes locPouls { from { transform: scale(0.6); opacity: 1; } to { transform: scale(3.2); opacity: 0; } }
.loc-txt h4 { margin: 0 0 6px; font-size: 11px; text-transform: uppercase; letter-spacing: 0.12em; color: #ff8a78; }
.loc-txt p { margin: 0 0 4px; font-size: 13px; line-height: 1.4; }
.loc-region { font-size: 16px !important; font-weight: 650; }
.loc-btn { margin-top: 6px; display: inline-flex; align-items: center; gap: 8px; padding: 5px 12px; border-radius: 20px; cursor: pointer; font-size: 12.5px;
  background: rgba(255, 106, 85, 0.12); border: 1px solid rgba(255, 106, 85, 0.5); }
.loc-btn:hover { background: rgba(255, 106, 85, 0.24); }
.loc-btn i { width: 9px; height: 9px; border-radius: 50%; border: 2px solid #ff8a78; box-shadow: 0 0 6px #ff6a55; }

/* ---------------------------------------------------------------- blessures */
.bl-chips { display: grid; gap: 8px; margin-top: 8px; }
.bl-det summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 8px; }
.bl-det summary::-webkit-details-marker { display: none; }
.bl-det summary h3 { margin: 0; flex: 1; }
.bl-det summary::after { content: "+"; color: #ff8a78; font-size: 16px; transition: transform 0.25s; }
.bl-det[open] summary::after { transform: rotate(45deg); }
.bl-zone { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; }
.bl-zone > small { width: 100%; font-size: 10.5px; color: #ff8a78; letter-spacing: 0.08em; text-transform: uppercase; }
.bl-zone .chip { font-size: 11.5px; padding: 3px 9px; text-align: left; }
.bl-zone .chip:hover, .bl-item:hover { border-color: #ff6a55; }
.res.bl span::before { content: "✚"; color: #ff6a55; margin-right: 7px; font-size: 11px; }
.bl-liste { display: grid; gap: 6px; margin-bottom: 10px; }
.bl-item { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 12px; cursor: pointer; text-align: left;
  background: rgba(255, 59, 48, 0.07); border: 1px solid rgba(255, 106, 85, 0.25); }
.bl-item small { color: #ff8a78; font-size: 11px; white-space: nowrap; }
.bl-badge { border-color: #ff6a55 !important; color: #ff8a78 !important; }
.bl-retour { background: none; border: 0; padding: 0 0 10px; color: var(--muted); cursor: pointer; font-size: 12.5px; }
.bl-retour:hover { color: var(--text); }
.bl-tabs { display: flex; flex-wrap: wrap; gap: 4px; margin: 14px 0 10px; padding: 4px; border-radius: 12px; background: rgba(255, 255, 255, 0.04); border: 1px solid var(--line); }
.bl-tabs { flex-wrap: nowrap !important; }
.bl-tabs button { flex: 1 1 auto; white-space: nowrap; padding: 6px 4px; border-radius: 9px; border: 0; background: none; cursor: pointer; font-size: 12px; color: var(--muted); }
.bl-tabs button.on { background: #ff6a55; color: #2a0805; font-weight: 700; }
.bl-pane { display: none; }
.bl-pane.on { display: block; animation: blIn 0.35s cubic-bezier(0.16, 1, 0.3, 1); }
@keyframes blIn { from { opacity: 0; transform: translateY(6px); } }
.bl-pane h4 { margin: 12px 0 6px; font-size: 11px; text-transform: uppercase; letter-spacing: 0.12em; color: #ff8a78; }
.bl-ul { margin: 0; padding-left: 18px; } .bl-ul li { margin: 0 0 6px; line-height: 1.45; font-size: 13.5px; }
.bl .fn { border-left-color: #ff6a55; } .bl .fn h4 { color: #ff8a78; }
.bl-op { padding: 12px 14px; margin: 0 0 10px; border-radius: 12px; background: rgba(255, 255, 255, 0.035); border: 1px solid var(--line); }
.bl-op h5 { margin: 0 0 6px; font-size: 14px; } .bl-op p { margin: 0; font-size: 13px; line-height: 1.5; }
.bl-prel { margin-top: 10px; display: grid; grid-template-columns: auto 1fr; column-gap: 10px; align-items: center; text-align: left; width: 100%; padding: 8px 12px; border-radius: 10px; cursor: pointer;
  background: rgba(255, 167, 38, 0.1); border: 1px solid rgba(255, 167, 38, 0.45); font-size: 12.5px; font-weight: 600; }
.bl-prel i { grid-row: span 2; width: 10px; height: 10px; border-radius: 50%; background: #ffa726; box-shadow: 0 0 8px #ffa726; }
.bl-prel small { font-weight: 400; color: var(--muted); }
.bl-prel:hover { background: rgba(255, 167, 38, 0.2); }
.small { font-size: 11.5px; margin-top: 6px !important; }
.bl-time { list-style: none; margin: 6px 0 12px; padding: 0 0 0 18px; position: relative; }
.bl-time::before { content: ""; position: absolute; left: 5px; top: 6px; bottom: 6px; width: 2px; background: linear-gradient(#ff6a55, #5ee0c8); border-radius: 2px; }
.bl-time li { position: relative; margin: 0 0 12px; display: grid; gap: 2px; font-size: 13px; line-height: 1.45; }
.bl-time li::before { content: ""; position: absolute; left: -18px; top: 4px; width: 10px; height: 10px; border-radius: 50%; background: var(--bg); border: 2px solid #ff8a78; }
.bl-time li b { font-size: 12px; color: #ff8a78; }
.bl-reprise { padding: 8px 12px; border-radius: 10px; background: rgba(94, 224, 200, 0.08); border: 1px solid rgba(94, 224, 200, 0.3); font-size: 13px; }
.bl-reprise b { color: var(--accent); margin-right: 6px; }
.bl-avert { margin-top: 18px; padding: 12px 14px; border-radius: 12px; background: rgba(255, 196, 0, 0.06); border: 1px solid rgba(255, 196, 0, 0.3); }
.bl-avert h4 { margin: 0 0 6px; font-size: 11px; text-transform: uppercase; letter-spacing: 0.12em; color: #ffc940; }
.bl-avert p { margin: 0 0 6px; font-size: 11.5px; line-height: 1.5; color: #c9d2e0; }
.bl-banniere { display: flex; gap: 10px; align-items: center; margin: 8px 0 4px; padding: 8px 12px; border-radius: 10px; font-size: 12.5px; line-height: 1.35;
  background: rgba(255, 196, 0, 0.1); border: 1px solid rgba(255, 196, 0, 0.45); color: #ffe7a6; }
.bl-banniere b, .avert-ico { flex: none; display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: #ffc940; color: #2a1d00; font-weight: 800; font-size: 13px; }
.bl-note { margin: 0; font-size: 11px; color: #ffd772; }
#avert3 { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 20px; background: rgba(3, 6, 12, 0.72);
  backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); animation: avIn 0.3s ease; }
#avert3.out { opacity: 0; transition: opacity 0.3s; }
@keyframes avIn { from { opacity: 0; } }
.avert-carte { max-width: 560px; padding: 26px 28px; border-radius: 18px; background: #0f1626; border: 1px solid rgba(255, 196, 0, 0.45); box-shadow: 0 30px 80px rgba(0, 0, 0, 0.6); animation: avCarte 0.45s cubic-bezier(0.16, 1, 0.3, 1); }
@keyframes avCarte { from { transform: translateY(14px) scale(0.98); opacity: 0; } }
.avert-carte .avert-ico { width: 34px; height: 34px; font-size: 20px; margin-bottom: 10px; }
.avert-carte h2 { margin: 0 0 12px; font-size: 20px; }
.avert-carte p { margin: 0 0 9px; font-size: 13.5px; line-height: 1.55; color: #d3dbe8; }
.avert-carte p:last-of-type { color: #ffd772; }
.avert-carte button { margin-top: 10px; padding: 9px 22px; border-radius: 22px; border: 0; cursor: pointer; font-weight: 700; background: #ffc940; color: #2a1d00; }
.avert-carte button:hover { filter: brightness(1.08); }

/* ---------------------------------------------------------------- interface mobile (≤ 980 px) */
#tabs3 { display: none; }
@media (max-width: 980px) {
  :root { --left: 0px; --right: 0px; --top: 56px; --tabs: calc(62px + env(safe-area-inset-bottom)); }
  .brand, .link2d, .credit { display: none; }
  #top3 { z-index: 45; padding: 0 10px; gap: 8px; padding-top: env(safe-area-inset-top); height: calc(var(--top) + env(safe-area-inset-top)); }
  #top3 .search-wrap { flex: 1; max-width: none; }
  #search3 { font-size: 16px; height: 40px; } /* ≥ 16 px : pas de zoom automatique sur iPhone */
  #results3 { position: fixed; left: 8px; right: 8px; top: calc(var(--top) + env(safe-area-inset-top) + 4px); max-height: calc(100dvh - var(--top) - var(--tabs) - 24px); }
  #results3 .res { padding: 11px 12px; }
  #view3d { top: calc(var(--top) + env(safe-area-inset-top)); bottom: var(--tabs); left: 0; right: 0; }
  #gl { touch-action: none; }

  /* barre d’onglets */
  #tabs3 { display: flex; position: fixed; left: 0; right: 0; bottom: 0; height: var(--tabs); padding-bottom: env(safe-area-inset-bottom); z-index: 40;
    background: rgba(8, 12, 21, 0.94); border-top: 1px solid var(--line); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
  #tabs3 button { position: relative; flex: 1; display: grid; place-items: center; align-content: center; gap: 3px; border: 0; background: none; color: var(--muted); font-size: 11px; letter-spacing: 0.02em; -webkit-tap-highlight-color: transparent; }
  #tabs3 svg { width: 23px; height: 23px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linejoin: round; stroke-linecap: round; transition: transform 0.25s cubic-bezier(0.2, 0.9, 0.25, 1.4); }
  #tabs3 button.on { color: var(--accent); }
  #tabs3 button.on svg { transform: translateY(-2px) scale(1.08); }
  #tabs3 button.on::before { content: ""; position: absolute; top: 0; left: 30%; right: 30%; height: 2px; border-radius: 2px; background: var(--accent); box-shadow: 0 0 10px var(--accent); }
  .pastille { position: absolute; top: 9px; left: calc(50% + 9px); width: 8px; height: 8px; border-radius: 50%; background: #ff6a55; box-shadow: 0 0 8px #ff6a55; transform: scale(0); transition: transform 0.25s; }
  .pastille.on { transform: scale(1); }

  /* panneaux glissants */
  #left3, #panel3 { display: block; position: fixed; left: 0; right: 0; top: auto; bottom: var(--tabs); width: auto; z-index: 30;
    border: 1px solid var(--line); border-bottom: 0; border-radius: 20px 20px 0 0; background: rgba(12, 18, 32, 0.97);
    box-shadow: 0 -18px 50px rgba(0, 0, 0, 0.5); overflow-y: auto; overscroll-behavior: contain; padding-top: 0;
    transform: translateY(calc(100% + var(--tabs) + 20px)); transition: transform 0.42s cubic-bezier(0.2, 0.9, 0.25, 1); }
  #left3 { height: min(72dvh, calc(100dvh - var(--top) - var(--tabs) - 20px)); padding: 0 16px 20px; }
  #panel3 { height: min(86dvh, calc(100dvh - var(--top) - var(--tabs) - 8px)); padding: 0 14px 24px; }
  #left3[data-etat="full"], #panel3[data-etat="full"] { transform: none; }
  #panel3[data-etat="peek"] { transform: translateY(calc(100% - 42dvh)); }
  .poignee { position: sticky; top: 0; z-index: 2; display: grid; place-items: center; height: 26px; margin: 0 -16px 4px; cursor: grab; touch-action: none;
    background: linear-gradient(rgba(12, 18, 32, 1) 70%, rgba(12, 18, 32, 0)); }
  .poignee i { width: 40px; height: 5px; border-radius: 3px; background: rgba(180, 200, 230, 0.35); }
  #panel3 .poignee { margin: 0 -14px 0; }
  #left3 section { margin-bottom: 20px; }
  #left3 .grid-btns button, #depth button, .toggle, .plain, #cutAxis { min-height: 40px; }
  #systems .sys { min-height: 40px; }

  /* barre de vues flottante */
  #views { position: fixed; left: 50%; bottom: calc(var(--tabs) + 14px); z-index: 35; transform: translate(-50%, 16px); opacity: 0; pointer-events: none;
    transition: opacity 0.25s, transform 0.3s cubic-bezier(0.2, 0.9, 0.25, 1.3); background: rgba(10, 16, 28, 0.95); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5); }
  body.vues-on #views { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
  #views button { padding: 10px 12px; font-size: 14px; }

  /* contenus */
  .plg-hud { top: 10px; min-width: 0; width: calc(100% - 24px); padding: 8px 12px; }
  .plg-hud small { display: none; }
  .avert-carte, .credits-carte { max-height: 82dvh; overflow: auto; padding: 20px; }
  #fiche3 .card { padding-top: 4px; }
}
@media (max-width: 380px) { .loc { grid-template-columns: 1fr; } .loc-cartes { justify-content: center; } }

/* ------------------------------------------------ recherche : ensembles en mots courants */
.res.grp span::before { content: "◎"; color: var(--accent); margin-right: 7px; font-size: 11px; }
.accueil-liens { display: flex; gap: 16px; flex-wrap: wrap; }

/* ------------------------------------------------ visite guidée */
#visite3 { position: fixed; inset: 0; z-index: 90; animation: vsIn .3s ease both; }
#visite3.out { opacity: 0; transition: opacity .25s; }
#visite3 .vs-spot { position: fixed; border-radius: 14px; box-shadow: 0 0 0 9999px rgba(4, 8, 16, 0.62), 0 0 0 2px var(--accent), 0 0 28px 4px rgba(94, 224, 200, 0.35);
  transition: left .35s cubic-bezier(.2,.8,.2,1), top .35s cubic-bezier(.2,.8,.2,1), width .35s cubic-bezier(.2,.8,.2,1), height .35s cubic-bezier(.2,.8,.2,1); pointer-events: none; }
#visite3 .vs-bulle { position: fixed; background: rgba(16, 24, 38, 0.97); border: 1px solid rgba(94, 224, 200, 0.4); border-radius: 14px; padding: 16px 18px 14px;
  box-shadow: 0 18px 50px rgba(0, 0, 0, 0.5); transition: left .35s cubic-bezier(.2,.8,.2,1), top .35s cubic-bezier(.2,.8,.2,1); }
#visite3 .vs-num { font-size: 11px; letter-spacing: .12em; color: var(--accent); font-weight: 600; }
#visite3 h3 { margin: 4px 0 6px; font-size: 17px; }
#visite3 p { margin: 0 0 14px; font-size: 13.5px; line-height: 1.5; color: #c9d3e2; }
#visite3 .vs-pied { display: flex; align-items: center; gap: 10px; }
#visite3 .vs-points { display: flex; gap: 5px; margin-right: auto; }
#visite3 .vs-points i { width: 6px; height: 6px; border-radius: 50%; background: rgba(255, 255, 255, 0.2); transition: background .2s, width .2s; }
#visite3 .vs-points i.on { background: var(--accent); width: 16px; border-radius: 3px; }
#visite3 button { border-radius: 9px; padding: 7px 14px; font-size: 13px; cursor: pointer; }
#visite3 .vs-passer { background: none; border: 0; color: var(--muted); }
#visite3 .vs-suite { background: var(--accent); color: #062019; border: 0; font-weight: 600; }
@keyframes vsIn { from { opacity: 0; } }
@media (prefers-reduced-motion: reduce) { #visite3 .vs-spot, #visite3 .vs-bulle { transition: none; } }

/* ------------------------------------------------ clavier et accessibilité */
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
#search3:focus-visible { outline: none; }
input[type="range"]:focus-visible { outline-offset: 4px; }
kbd { display: inline-block; min-width: 1.5em; padding: 1px 6px; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 5px; font: 600 11px/1.5 ui-monospace, monospace; color: var(--text); background: rgba(255, 255, 255, 0.05); text-align: center; }
.toggle kbd { margin-left: 6px; opacity: .7; }
.raccourcis { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.raccourcis td { padding: 7px 4px; border-bottom: 1px solid var(--line); color: #d3dbe8; }
.raccourcis td:first-child { white-space: nowrap; padding-right: 18px; color: var(--text); }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }
@media (pointer: coarse) { .toggle kbd { display: none; } }

/* ------------------------------------------------ quiz */
#btnQuiz { color: var(--accent); border-color: rgba(94, 224, 200, 0.4); }
.quiz .qz-modes { display: flex; gap: 6px; flex-wrap: wrap; margin: 12px 0 4px; }
.quiz .qz-modes button { border: 1px solid var(--line); background: rgba(255, 255, 255, 0.03); border-radius: 999px; padding: 6px 12px; font-size: 12.5px; color: var(--muted); }
.quiz .qz-modes button.on { border-color: var(--accent); color: var(--accent); background: rgba(94, 224, 200, 0.1); }
.qz-themes { display: grid; gap: 6px; }
.qz-theme { display: flex; gap: 6px; }
.qz-go { flex: 1; text-align: left; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.03); border-radius: 11px; padding: 9px 12px; display: grid; gap: 2px; }
.qz-go span { font-size: 13.5px; font-weight: 600; color: var(--text); }
.qz-go small { font-size: 11.5px; color: var(--muted); }
.qz-go:hover { border-color: var(--accent); }
.qz-revoir { border: 1px solid rgba(255, 166, 77, 0.45); background: rgba(255, 166, 77, 0.08); color: #ffb366; border-radius: 11px; padding: 0 10px; font-size: 12px; white-space: nowrap; }
.qz-barre { height: 5px; border-radius: 3px; background: rgba(255, 255, 255, 0.07); overflow: hidden; margin: 10px 0 6px; }
.qz-barre i { display: block; height: 100%; background: var(--accent); border-radius: 3px; transition: width .4s cubic-bezier(.2,.8,.2,1); }
.qz-etat { display: flex; gap: 12px; font-size: 12px; color: var(--muted); }
.qz-serie { color: #ffb366; font-weight: 600; }
.qz-type { margin-top: 14px; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--accent); font-weight: 600; }
.qz-question { margin: 4px 0 8px !important; font-size: 21px !important; line-height: 1.3; }
.qz-question b { color: var(--accent); }
.qz-choix { display: grid; gap: 7px; margin: 12px 0; }
.qz-choix button { display: flex; align-items: center; gap: 10px; text-align: left; border: 1px solid var(--line); background: rgba(255, 255, 255, 0.035); border-radius: 11px; padding: 10px 12px; font-size: 14px; color: var(--text); transition: border-color .15s, background .15s; }
.qz-choix button:hover:not(:disabled) { border-color: var(--accent); }
.qz-choix button.ok { border-color: #3ddc84; background: rgba(61, 220, 132, 0.14); }
.qz-choix button.ko { border-color: #ff4d4d; background: rgba(255, 77, 77, 0.14); }
.qz-choix button:disabled:not(.ok):not(.ko) { opacity: .5; }
.qz-retour { min-height: 0; font-size: 13.5px; line-height: 1.5; border-radius: 11px; }
.qz-retour.ok, .qz-retour.ko { padding: 10px 12px; margin: 6px 0 10px; animation: qzIn .3s ease; }
.qz-retour.ok { background: rgba(61, 220, 132, 0.12); border: 1px solid rgba(61, 220, 132, 0.4); }
.qz-retour.ko { background: rgba(255, 77, 77, 0.1); border: 1px solid rgba(255, 77, 77, 0.4); }
.qz-retour.ok b:first-child { color: #3ddc84; } .qz-retour.ko b:first-child { color: #ff7070; }
.qz-suivant { border-color: var(--accent) !important; color: var(--accent); font-weight: 600; }
.qz-resultat { display: flex; align-items: baseline; gap: 14px; margin: 16px 0 6px; }
.qz-resultat b { font-size: 56px; line-height: 1; color: var(--accent); }
.qz-resultat b small { font-size: 22px; color: var(--muted); }
.qz-resultat span { font-size: 18px; font-weight: 600; }
@keyframes qzIn { from { opacity: 0; transform: translateY(4px); } }
@media (max-width: 980px) { #tabs3 button span { font-size: 10.5px; } .qz-question { font-size: 18px !important; } }
.badge.absent { border-color: rgba(255, 167, 38, 0.6) !important; color: #ffb74d !important; }
.res.grp.absent span::before { content: "!"; color: #ffb74d; font-weight: 800; }

/* ------------------------------------------------ plongée : carottage (structures traversées) */
.plg-carotte { position: absolute; left: 16px; top: 50%; translate: 0 -50%; width: 290px; opacity: 0; transition: opacity .3s; pointer-events: auto;
  background: rgba(10, 16, 28, 0.82); border: 1px solid rgba(94, 224, 200, 0.3); border-radius: 14px; padding: 12px 12px 12px 10px; backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px); }
.plg-carotte.vide { display: none; }
.plg-c-titre { font-size: 10.5px; letter-spacing: .22em; text-transform: uppercase; color: var(--accent); margin: 0 0 10px 4px; font-weight: 600; }
.plg-c-titre small { display: block; letter-spacing: 0; text-transform: none; color: var(--muted); font-size: 11px; font-weight: 400; margin-top: 2px; }
.plg-c-corps { display: flex; gap: 10px; }
.plg-c-regle { position: relative; flex: none; height: 300px; margin: 6px 0 6px 18px; border-left: 1px solid rgba(255, 255, 255, 0.18); }
.plg-c-regle i { position: absolute; width: 5px; margin-left: 4px; border-radius: 3px; filter: brightness(1.35) saturate(1.1); }
.plg-c-regle b { position: absolute; left: -20px; translate: 0 -50%; font: 500 9.5px/1 ui-monospace, monospace; color: var(--muted); }
.plg-c-regle b::after { content: ""; position: absolute; left: 16px; top: 50%; width: 5px; border-top: 1px solid rgba(255, 255, 255, 0.25); }
.plg-c-ici { position: absolute; left: -6px; right: -4px; height: 0; border-top: 2px solid var(--accent); box-shadow: 0 0 10px var(--accent); transition: top .12s linear; }
.plg-c-ici::before { content: ""; position: absolute; left: -4px; top: -5px; border: 4px solid transparent; border-left: 6px solid var(--accent); }
.plg-c-liste { list-style: none; margin: 0; padding: 0; display: grid; gap: 3px; max-height: 312px; overflow: auto; flex: 1; }
.plg-c-liste button { width: 100%; display: grid; grid-template-columns: 9px 1fr; column-gap: 8px; align-items: center; text-align: left; border: 1px solid transparent; background: none; border-radius: 8px; padding: 4px 6px; cursor: pointer; color: var(--text); transition: background .2s, border-color .2s, opacity .3s; }
.plg-c-liste button > span:first-child { width: 9px; height: 9px; border-radius: 50%; grid-row: span 2; filter: brightness(1.35); }
.plg-c-liste .n { font-size: 12.5px; line-height: 1.25; }
.plg-c-liste small { grid-column: 2; font-size: 10.5px; color: var(--muted); font-variant-numeric: tabular-nums; }
.plg-c-liste button:hover { border-color: rgba(94, 224, 200, 0.4); }
.plg-c-liste li.passe button { opacity: .45; }
.plg-c-liste li.ici button { background: rgba(94, 224, 200, 0.13); border-color: rgba(94, 224, 200, 0.5); }
.plg-c-liste li.ici .n { font-weight: 650; }
@media (max-width: 980px) {
  .plg-carotte { left: 8px; top: 132px; translate: 0 0; width: 200px; padding: 8px; }
  .plg-c-titre small { display: none; }
  .plg-c-regle { height: 190px; margin-left: 16px; }
  .plg-c-liste { max-height: 200px; }
  .plg-c-liste .n { font-size: 11.5px; }
}
.plg-c-liste { position: relative; scroll-behavior: smooth; }
.plg-c-liste li[data-cible] .n::after { content: " ◎ cible"; color: var(--accent); font-size: 10.5px; font-weight: 600; white-space: nowrap; }
.plg-c-liste li[data-cible] button { border-color: rgba(94, 224, 200, 0.35); }

/* ------------------------------------------------ soutenir le projet */
#btnSoutien { color: #ff7a8a; border-color: rgba(255, 122, 138, 0.35); padding-inline: 10px; }
#btnSoutien:hover { color: #ff96a3; border-color: #ff7a8a; }
.sout-cartes { display: grid; gap: 10px; margin-top: 14px; }
.sout-carte { display: grid; grid-template-columns: 40px 1fr; gap: 12px; align-items: start; padding: 12px 14px; border: 1px solid var(--line); border-radius: 13px; background: rgba(255, 255, 255, 0.03); }
.sout-ico { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; font-size: 18px; background: rgba(94, 224, 200, 0.1); color: var(--accent); }
.sout-carte:first-child .sout-ico { background: rgba(255, 122, 138, 0.12); color: #ff7a8a; }
.sout-carte h4 { margin: 0 0 3px !important; font-size: 14px !important; letter-spacing: 0 !important; text-transform: none !important; color: var(--text) !important; }
.sout-carte p { margin: 0 0 8px !important; font-size: 13px !important; }
.sout-btn { display: inline-block; border: 1px solid var(--accent); color: var(--accent); background: rgba(94, 224, 200, 0.08); border-radius: 9px; padding: 6px 12px; font-size: 13px; font-weight: 600; text-decoration: none; cursor: pointer; }
.sout-btn:hover { background: rgba(94, 224, 200, 0.18); }
