/* Chassezac Quad : cartes topographiques, héros collant, planche des boucles (ordinateur) */
.topo { width: 100%; height: 100%; overflow: hidden; }
.topo .lv { fill: none; stroke: var(--c700); stroke-width: .8; vector-effect: non-scaling-stroke; transition: stroke .35s; }
.topo .lv.ix { stroke: var(--c600); stroke-width: 1.35; }
.topo .lv.hot { stroke: var(--or-l); stroke-width: 1.8; transition: none; }
.topo .lv.scan { stroke: var(--c400); stroke-width: 1.5; }
.topo .wa { fill: none; stroke: var(--eau); stroke-width: 1.1; vector-effect: non-scaling-stroke; opacity: .75; }
.topo .wa.mj { stroke-width: 2.6; opacity: 1; }
.topo .rnr { stroke: #e5704f; stroke-width: 1.4; vector-effect: non-scaling-stroke; }
.topo .lp { fill: none; stroke-linejoin: round; stroke-linecap: round; transition: opacity .25s; }
.topo .lp.l1 { stroke: #ffc4a6; } .topo .lp.l2 { stroke: var(--or-l); } .topo .lp.l3 { stroke: var(--or); }
.topo .case { fill: none; stroke: var(--c950); stroke-linejoin: round; stroke-linecap: round; }
.topo.has-hov .lp:not(.hov) { opacity: .25; }
.topo text { font-family: var(--f-b); font-size: calc(13px * var(--u, 1)); fill: var(--c200); paint-order: stroke; stroke: var(--c950); stroke-width: calc(3px * var(--u, 1)); stroke-linejoin: round; }
.topo text.p3 { font: 400 calc(15px * var(--u, 1)) var(--f-t); fill: var(--blanc); }
.topo text.p2 { font-weight: 700; font-size: calc(14px * var(--u, 1)); fill: var(--k100); }
.topo text.riv { font-style: italic; fill: var(--eau); font-size: calc(13.5px * var(--u, 1)); }
.topo text.bois { font-style: italic; fill: var(--c300); }
.topo text.rtx { fill: #f08f73; font-size: calc(12px * var(--u, 1)); }
.topo .ag rect { fill: var(--or); stroke: var(--blanc); stroke-width: 2; vector-effect: non-scaling-stroke; }
.topo .ag text { font-weight: 800; fill: var(--blanc); }
.topo .hq { --qb: var(--or); --qw: var(--k200); }
.topo .xh { fill: none; stroke: var(--blanc); stroke-width: 1.2; vector-effect: non-scaling-stroke; pointer-events: none; }
.topo .dirs path { fill: var(--noir); }
.topo .mk { --qb: var(--or); --qw: var(--noir); }
.topo .mk .halo { fill: rgba(255, 91, 20, .28); stroke: var(--or); stroke-width: 1.5; vector-effect: non-scaling-stroke; }
.topo.light .lv { stroke: #c3cbc1; }
.topo.light .lv.ix { stroke: #9aa996; }
.topo.light .wa { stroke: #5f97a0; }
.topo.light .lp { stroke: #8f9892; }
.topo.light .lp.on { stroke: var(--or); }
.topo.light .case { stroke: var(--noir); opacity: 0; transition: opacity .3s; }
.topo.light .case.on { opacity: 1; }
.topo.light text { fill: var(--k800); stroke: var(--k50); }
.topo.light text.p3 { fill: var(--noir); }
.topo.light text.riv { fill: #3f7c85; }
.topo.light text.bois { fill: var(--c500); }
.topo.light text.rtx { fill: #b8472a; }
.topo.light .ag text { fill: var(--noir); }

/* Héros : scène collante, recouverte par la planche */
.scene { position: relative; }
.hero { position: sticky; top: 0; z-index: 0; height: max(620px, calc(100svh - 36px)); overflow: clip; background: var(--c950); }
.hero-map { position: absolute; inset: var(--hd) 0 0 0; transform-origin: 62% 45%; }
.hero-map .topo { -webkit-mask-image: linear-gradient(90deg, rgba(0, 0, 0, .3) 0, rgba(0, 0, 0, .55) 30%, #000 50%); mask-image: linear-gradient(90deg, rgba(0, 0, 0, .3) 0, rgba(0, 0, 0, .55) 30%, #000 50%); }
.hero-map .lvs, .hero-map .lp { will-change: auto; }
.hero-in { position: relative; z-index: 2; height: 100%; display: flex; flex-direction: column; justify-content: center; padding-top: var(--hd); padding-bottom: 72px; pointer-events: none; }
.hero-in a { pointer-events: auto; }
.hero-t { max-width: 58%; font: 400 clamp(64px, 7.4vw, 118px)/.92 var(--f-t); color: var(--blanc); }
.hero-t .l { display: block; }
.hero-t em { font-style: normal; color: var(--or); }
.hero-l { max-width: 27em; margin: 28px 0 30px; font-size: clamp(18px, 1.3vw, 21px); line-height: 1.5; color: var(--c200); }
.hero-cta { display: flex; align-items: center; flex-wrap: wrap; gap: 14px 28px; }
.hero-cta .lnk { color: var(--blanc); }

.legend { position: absolute; z-index: 3; left: 0; right: 0; bottom: 0; height: 56px; background: linear-gradient(transparent, rgb(17 23 17 / .92) 40%); font-size: 15px; color: var(--c200); }
.legend-in { height: 100%; display: flex; align-items: center; gap: 28px; }
.legend-k { display: flex; gap: 22px; }
.legend-k button { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 0; border: 0; background: none; color: var(--k100); font-size: 15px; text-decoration: underline; text-decoration-color: transparent; text-decoration-thickness: 2px; text-underline-offset: 6px; transition: color .2s, text-decoration-color .2s; }
.legend-k button b { font-weight: 700; }
.legend-k button span { color: var(--c300); }
.legend-k button:hover, .legend-k button.on { color: var(--blanc); text-decoration-color: var(--or); }
.legend-r { display: flex; align-items: center; gap: 10px; margin: 0; }
.legend-sc { display: flex; align-items: center; gap: 10px; margin-left: auto; font-size: 14px; }
.legend-alt { display: flex; align-items: baseline; gap: 10px; min-width: 150px; margin: 0; }
.legend-alt b { font: 400 16px var(--f-t); color: var(--or); }
.legend .k { width: 26px; height: 4px; flex: none; }
.legend .k1 { background: #ffc4a6; } .legend .k2 { background: var(--or-l); } .legend .k3 { background: var(--or); }
.legend .kr { height: 12px; background: repeating-linear-gradient(135deg, #e5704f 0 2px, transparent 2px 5px); outline: 1.4px solid #e5704f; }
.sc-bar { height: 7px; width: 80px; border: 1.5px solid var(--c200); background: linear-gradient(90deg, var(--c200) 0 50%, transparent 50%); }
.n-arrow { width: 14px; height: 20px; }
.n-arrow path { fill: var(--c200); }

/* Planche claire posée sur la carte (ordinateur) */
.planche { position: relative; z-index: 2; background: var(--k50); color: var(--noir); }
.pl-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: clamp(24px, 2.4vw, 48px); padding-block: 72px 80px; }
.pl-l { grid-column: 1 / 6; }
.pl-r { grid-column: 6 / 13; position: sticky; top: calc(var(--demobar-offset, 0px) + var(--hd) + 24px); height: calc(100svh - 120px); min-height: 560px; display: grid; grid-template-rows: 68fr 22fr auto; gap: 12px; align-self: start; }
.scale { position: relative; display: grid; gap: 4px; padding: 30px 0 0 64px; }
.ruler { position: absolute; left: 0; top: 30px; bottom: 0; width: 52px; }
.ruler span { position: absolute; left: 0; transform: translateY(-50%); font: 700 14px var(--f-b); color: var(--k600); white-space: nowrap; }
.ruler::after { content: ""; position: absolute; right: 0; top: 0; bottom: 0; width: 2px; background: var(--k300); }
.ruler em { position: absolute; right: -4px; width: 10px; height: 3px; background: var(--k400); transform: translateY(-50%); }
.ruler i { position: absolute; right: -6px; width: 14px; height: 14px; background: var(--or); border: 2px solid var(--noir); transform: translateY(-50%); transition: top .5s var(--ease); }
.ruler b { position: absolute; left: 0; top: -30px; font: 700 14px var(--f-b); color: var(--k800); white-space: nowrap; }
.lvl { display: grid; grid-template-columns: 40px 1fr auto; align-items: center; gap: 14px; width: 100%; min-height: 62px; padding: 8px 14px; border: 0; border-radius: var(--r); background: transparent; text-align: left; color: var(--noir); transition: background .2s, color .2s; }
.lvl:hover { background: var(--k200); }
.lvl[aria-selected="true"] { background: var(--noir); color: var(--blanc); }
.lvl svg { width: 40px; height: 40px; fill: none; stroke: currentColor; stroke-width: 1.3; }
.lvl b { display: block; font-weight: 800; font-size: 18px; line-height: 1.15; }
.lvl small { display: block; font-size: 15px; opacity: .8; }
.lvl .d { font: 400 18px var(--f-t); white-space: nowrap; }
.lvl[aria-selected="true"] .d { color: var(--or); }
.lvl:focus-visible { outline-color: var(--or-d); }
.bc-info { margin-top: 36px; padding-top: 28px; border-top: 2px solid var(--noir); }
.bc-info h3 { font: 400 34px/1 var(--f-t); }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 22px 0 18px; border-block: 1px solid var(--k300); }
.stats div { padding: 12px 0; }
.stats div + div { padding-left: 14px; border-left: 1px solid var(--k300); }
.stats dt { font-size: 15px; color: var(--k600); }
.stats dd { font: 400 22px/1.15 var(--f-t); white-space: nowrap; }
.who { font-weight: 700; margin-bottom: .4em; }
.pax { font-size: 16px; color: var(--k800); margin-bottom: 18px; }
.prix { font-size: 17px; margin-bottom: 20px; }
.prix b { font: 400 24px var(--f-t); }
.bc-map { position: relative; min-height: 0; background: var(--blanc); border: 1px solid var(--k300); }
.bc-prof { position: relative; min-height: 120px; touch-action: pan-y; cursor: crosshair; }
.bc-prof svg, .fi-prof svg { width: 100%; height: 100%; overflow: visible; }
.bc-prof .ar, .fi-prof .ar { fill: url(#hach); }
.bc-prof .ln, .fi-prof .ln { fill: none; stroke: var(--noir); stroke-width: 2; vector-effect: non-scaling-stroke; }
.bc-prof .gl, .fi-prof .gl { stroke: var(--k300); stroke-width: 1; vector-effect: non-scaling-stroke; }
.bc-prof text, .fi-prof text { font: 600 13px var(--f-b); fill: var(--k600); }
.bc-prof .cur line, .fi-prof .cur line { stroke: var(--or-d); stroke-width: 2; vector-effect: non-scaling-stroke; }
.bc-prof .cur circle, .fi-prof .cur circle { fill: var(--or); stroke: var(--noir); stroke-width: 2; }
.bc-prof:focus-visible, .fi-prof:focus-visible { outline-color: var(--or-d); outline-offset: 4px; }
.bc-run { display: flex; align-items: center; gap: 12px 24px; }
.bc-read { margin: 0; font: 400 18px var(--f-t); min-width: 12ch; }
.bc-note { margin: 0 0 0 auto; font-size: 15px; color: var(--k600); }

@media (min-width: 900px) { .pile { display: none; } }
@media (max-width: 899px) {
  .pl-grid { display: none; }
  .hero { height: calc(max(560px, 100svh) - 36px - var(--bb)); }
  .hero-map { inset: 46% 0 0 0; }
  .hero-map .topo { -webkit-mask-image: linear-gradient(180deg, transparent 0, #000 48px); mask-image: linear-gradient(180deg, transparent 0, #000 48px); }
  .hero-in { height: 46%; justify-content: flex-end; padding-bottom: 8px; }
  .hero-t { max-width: none; font-size: clamp(40px, 11.3vw, 64px); line-height: .95; }
  .hero-l { margin: 16px 0 0; font-size: 17px; max-width: 24em; }
  .hero-cta { display: none; }
  .legend { height: auto; background: none; }
  .legend-in { display: block; padding: 0; }
  .legend-k { gap: 8px; padding: 0 16px 12px; overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-inline: 16px; scrollbar-width: none; }
  .legend-k::-webkit-scrollbar { display: none; }
  .legend-k button { flex: none; min-height: 48px; padding: 0 16px; gap: 8px; background: rgb(12 16 12 / .92); border: 1px solid var(--c700); border-radius: var(--r); text-decoration: none; scroll-snap-align: start; }
  .legend-k button.on { border-color: var(--or); }
  .legend-r, .legend-sc { display: none; }
  .legend-alt { position: absolute; right: 16px; bottom: calc(100% + 8px); min-width: 0; padding: 6px 10px; background: rgb(12 16 12 / .9); font-size: 15px; }
}
@media (min-width: 900px) and (max-width: 1279px) {
  .legend-r { display: none; }
  .hero-t { max-width: 66%; }
}
