/* Le plan du salon (js/plan.js) : cadre, recherche, couche des repères, fiche d'un stand, mode agrandi.
   Le sol et les stands sont peints dans un <canvas> par plan.js ; ici ne vivent que l'habillage et la fine couche SVG posée dessus. */

/* ---------- cadre et manipulation ---------- */
.plan-ui { display: grid; gap: 10px; min-width: 0; color: #fff; scroll-margin: 84px 0 28px; }
.plan-top { display: none; }
.plan-vp { position: relative; aspect-ratio: 436 / 272; min-height: 0; border-radius: 18px; overflow: hidden; cursor: grab; touch-action: pan-y; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.plan-vp:focus { outline: none; } .plan-vp:focus-visible, .plan-vp:has(.plan-sr :focus-visible) { outline: 2px solid rgba(255,255,255,.7); outline-offset: 2px; }
.plan-ui.zoomed .plan-vp, .plan-ui.full .plan-vp { touch-action: none; }   /* plan entier : la page défile au doigt ; plan zoomé : le doigt déplace le plan */
.plan-vp.over { cursor: pointer; } .plan-vp.drag { cursor: grabbing; }
.plan-cv, .plan-rt, .plan-lb, .plan-fx, .plan-ov { position: absolute; inset: 0; width: 100%; height: 100%; display: block; pointer-events: none; }
.plan-ov { overflow: hidden; }
/* petit salon : la liste des stands reste atteignable au clavier, sans être affichée */
.plan-sr { position: absolute; left: 0; top: 0; width: 1px; height: 1px; margin: 0; padding: 0; overflow: hidden; clip-path: inset(50%); list-style: none; }

/* ---------- couche SVG : repères d'étape. Le ruban, les perles et les ondes sont peints par js/plan-lumiere.js. --u : unités du dessin par pixel ---------- */
.plan-ov .here-dot { r: calc(4px * var(--k, 1)); fill: #fff; filter: drop-shadow(0 0 4px rgba(255,255,255,.9)); } .plan-ov .here-dot.small { r: calc(2.6px * var(--k, 1)); }
.plan-ov .ks { transform: scale(var(--u, 1)); }
.plan-ov .sel-mk path { fill: #fff; stroke: rgba(8,12,26,.6); stroke-width: 1; animation: plan-bob .9s ease-in-out infinite alternate; } @keyframes plan-bob { to { transform: translateY(-4px); } }

/* repères d'étape ; quand plusieurs se touchent en vue d'ensemble, une pastille porte leurs numéros */
.plan-ov .stp { outline: none; animation: plan-fade .45s var(--d, 0ms) both; } @keyframes plan-fade { from { opacity: 0; } }
.plan-ov .stp line, .plan-ov .stp-c line { stroke: rgba(255,255,255,.78); stroke-width: 1.3; } .plan-ov .stp-b { fill: rgba(0,0,0,.45); }
.plan-ov .stp-in { animation: plan-pin .7s var(--spring) var(--d, 0ms) both; transform-box: fill-box; transform-origin: center; } @keyframes plan-pin { from { transform: translateY(-14px) scale(.5); } }
.plan-ov.hold .stp, .plan-ov.hold .stp-c, .plan-ov.hold .stp-in { animation: none; opacity: 0; }
.plan-ov .stp circle { fill: var(--night); stroke: var(--a2); stroke-width: 1.8; transition: fill .25s, stroke-width .25s; } .plan-ov .stp.rdv circle { fill: var(--accent); stroke: #fff; } .plan-ov .stp.match circle { stroke: #fff; } .plan-ov .stp.conf circle, .plan-ov .stp.lunch circle { stroke: var(--a3); } .plan-ov .stp.here circle { fill: #fff; stroke: var(--night); } .plan-ov .stp.here text { fill: var(--night); } .plan-ov .stp.dest circle { fill: var(--accent); stroke: #fff; } .plan-ov .stp.dest text { fill: var(--night); }
.plan-ov .stp .stp-o { fill: none; stroke: #fff; stroke-width: 1.4; opacity: 0; transform-box: fill-box; transform-origin: center; }
.plan-ov .stp text, .plan-ov .stp-c text { font: 400 15.5px/1 var(--serif); text-anchor: middle; fill: #fff; font-variant-numeric: lining-nums; }
.plan-ov .stp.pop .stp-in { animation: plan-pop .7s var(--spring); } @keyframes plan-pop { 0% { transform: none; } 35% { transform: translateY(-5px) scale(1.2); } 100% { transform: none; } }
.plan-ov .stp.pop .stp-o { animation: plan-halo .9s ease-out; } @keyframes plan-halo { from { opacity: .95; transform: scale(.8); } to { opacity: 0; transform: scale(1.9); } }
.plan-ov .stp.same { animation: none; } .plan-ov .stp.same .stp-in { animation: none; } .plan-ov .stp.renum .stp-in { animation: plan-flip 1.1s var(--ease) both; } @keyframes plan-flip { 0% { transform: rotateY(0) scale(1); } 45% { transform: rotateY(90deg) scale(1.15); } 100% { transform: none; } }
.plan-ov .stp.sel circle:not(.stp-o) { fill: #fff; stroke-width: 2.8; } .plan-ov .stp.sel text { fill: var(--night); }
.plan-ov .stp:focus-visible circle:not(.stp-o) { stroke: #fff; stroke-width: 3.2; }
.plan-ov .stp-c rect { fill: rgba(255,255,255,.96); stroke: var(--a2); stroke-width: 1.8; } .plan-ov .stp-c text { fill: var(--night); }

/* ---------- recherche et sauts (grands salons) ---------- */
.plan-find { position: relative; z-index: 3; display: flex; align-items: center; gap: 10px; min-width: 0; }
.plan-search { position: relative; flex: 0 1 300px; min-width: 0; color: rgba(255,255,255,.72); }
.plan-search > svg { position: absolute; left: 13px; top: 50%; width: 17px; height: 17px; margin-top: -8.5px; pointer-events: none; }
.plan-ui .plan-search input { width: 100%; min-height: 42px; padding: 8px 14px 8px 38px; border-radius: 999px; border: 1px solid rgba(255,255,255,.17); background: rgba(255,255,255,.1); color: #fff; font-size: 16px; -webkit-appearance: none; appearance: none; }
.plan-ui .plan-search input::placeholder { color: rgba(255,255,255,.55); }
.plan-ui .plan-search input:focus { border-color: var(--a2); box-shadow: 0 0 0 4px color-mix(in srgb, var(--a2) 26%, transparent); background: rgba(255,255,255,.14); }
.plan-res { position: absolute; left: 0; right: 0; top: calc(100% + 6px); min-width: 250px; margin: 0; padding: 6px; list-style: none; border-radius: 18px; color: var(--ink); background: rgba(255,255,255,.97); border: 1px solid #fff; box-shadow: var(--sh3); }
.plan-res li { display: flex; align-items: center; gap: 10px; min-height: 44px; padding: 4px 9px; border-radius: 12px; cursor: pointer; line-height: 1.25; }
.plan-res li.on, .plan-res li[data-i]:hover { background: var(--accent-bg); }
.plan-res span { min-width: 0; } .plan-res b { display: block; font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .plan-res small { color: var(--mut); font-size: 12.5px; }
.plan-res .none { color: var(--mut); font-size: 13.5px; cursor: default; }
.plan-jump { flex: 1; display: flex; gap: 6px; min-width: 0; padding: 2px; overflow-x: auto; scrollbar-width: none; -webkit-mask: linear-gradient(90deg, #000 calc(100% - 24px), transparent); mask: linear-gradient(90deg, #000 calc(100% - 24px), transparent); } .plan-jump::-webkit-scrollbar { display: none; }
.plan-chip { flex: none; height: 36px; padding: 0 14px; border-radius: 999px; display: inline-flex; align-items: center; gap: 6px; color: #fff; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.17); font-size: 13px; font-weight: 550; white-space: nowrap; transition: background .2s, transform .25s var(--spring); }
.plan-chip:hover { background: rgba(255,255,255,.2); } .plan-chip:active { transform: scale(.95); } .plan-chip:focus-visible { outline-color: #fff; }
.plan-chip.go { background: rgba(255,255,255,.94); border-color: transparent; color: var(--ink); } .plan-chip.go:hover { background: #fff; } .plan-chip svg { width: 15px; height: 15px; }
.plan-jump .plan-chip:last-child { margin-right: 20px; }
@media (pointer: coarse) { .plan-chip { height: 40px; } }

/* ---------- boutons sous le plan ---------- */
.plan-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.plan-tools { display: flex; gap: 6px; }
.plan-b { flex: none; min-width: 40px; height: 40px; padding: 0; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; color: #fff; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.17); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); transition: background .2s, opacity .2s, transform .25s var(--spring); }
.plan-b.wide { padding: 0 16px 0 13px; font-size: 13.5px; font-weight: 550; }
.plan-b svg { width: 18px; height: 18px; flex: none; }
.plan-b:hover:not(:disabled) { background: rgba(255,255,255,.2); } .plan-b:active:not(:disabled) { transform: scale(.93); } .plan-b:disabled { opacity: .34; cursor: default; }
.plan-b:focus-visible { outline-color: #fff; }
@media (pointer: coarse) { .plan-b { min-width: 44px; height: 44px; } }

/* ---------- fiche du stand ---------- */
.plan-slot { min-width: 0; }
.plan-empty { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 8px 14px; border-radius: 16px; border: 1px dashed rgba(255,255,255,.2); color: rgba(255,255,255,.66); font-size: 13px; line-height: 1.3; }
.plan-empty svg { width: 17px; height: 17px; flex: none; }
.plan-next { width: 100%; min-height: 52px; display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 8px 14px 8px 10px; border-radius: 18px; text-align: left; color: #fff; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.14); transition: background .2s, border-color .2s; }
.plan-next:hover { background: rgba(255,255,255,.12); border-color: rgba(255,255,255,.26); } .plan-next:focus-visible { outline-color: #fff; }
.pn-n { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font: 400 18px/1 var(--serif); background: var(--night); border: 1.8px solid var(--a2); }
.pn-t small { display: block; color: rgba(255,255,255,.62); font-size: 12.5px; } .pn-t b { display: block; font-size: 14.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pn-w { font: 500 13px var(--mono); color: #fff; white-space: nowrap; }
.plan-card .tag.walk { font-variant-numeric: tabular-nums; }
.plan-card { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; padding: 14px; border-radius: 20px; color: var(--ink); background: var(--glass2); border: 1px solid #fff; box-shadow: var(--sh2); backdrop-filter: blur(18px) saturate(1.4); -webkit-backdrop-filter: blur(18px) saturate(1.4); animation: plan-card .4s var(--ease) both; } @keyframes plan-card { from { opacity: 0; transform: translateY(8px); } }
.pc-head { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; }
.pc-head h4 { font: 400 23px/1.1 var(--serif); letter-spacing: -.01em; } .pc-head p { margin-top: 3px; color: var(--mut); font-size: 13px; line-height: 1.35; }
.pc-ic { width: 40px; height: 40px; border-radius: 30%; display: grid; place-items: center; background: var(--gold-bg); color: var(--gold); } .pc-ic svg { width: 19px; height: 19px; }
.pc-x { align-self: start; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; color: var(--mut); background: rgba(11,16,32,.06); transition: background .2s; } .pc-x:hover { background: rgba(11,16,32,.12); } .pc-x svg { width: 16px; height: 16px; }
.pc-tag { font-size: 14px; line-height: 1.4; color: var(--ink2); }
.pc-facts { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.pc-score { display: inline-flex; align-items: baseline; gap: 4px; padding: 4px 11px; border-radius: 999px; font-size: 12.5px; font-weight: 600; background: rgba(11,16,32,.06); color: var(--ink2); white-space: nowrap; } .pc-score b { font-size: 14px; font-weight: 700; font-variant-numeric: tabular-nums; }
.pc-score.mid { background: var(--accent-bg); color: var(--accent-ink); } .pc-score.hi { background: var(--aurora); color: #fff; }
.plan-card .btn { justify-self: start; }

/* ---------- légende ---------- */
.plan-legend { list-style: none; margin: 0; padding: 0 4px; display: flex; flex-wrap: wrap; gap: 6px 16px; color: rgba(255,255,255,.68); font-size: 12.5px; }
.plan-legend li { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
.plan-legend i { flex: none; width: 13px; height: 10px; border-radius: 3px; background: #3A4670; border: 1px solid rgba(255,255,255,.3); }
.plan-legend .k-on { background: linear-gradient(135deg, var(--a3), var(--accent)); border-color: rgba(255,255,255,.8); } .plan-legend .k-off { background: #343F68; border-color: rgba(255,255,255,.28); }
.plan-legend .k-ia { border: 2px solid var(--a3); } .plan-legend .k-busy { background: color-mix(in srgb, var(--a3) 22%, transparent); border-color: var(--a3); }
.plan-legend .k-pin { width: 13px; height: 13px; border-radius: 50%; background: var(--night); border: 2px solid var(--a2); } .plan-legend .k-pin.rdv { background: var(--accent); border-color: #fff; } .plan-legend .k-pin.match { border-color: #fff; } .plan-legend .k-pin.conf, .plan-legend .k-pin.lunch { border-color: var(--a3); } .plan-legend .k-pin.here { background: #fff; border-color: var(--night); } .plan-legend .k-pin.dest { background: var(--accent); border-color: #fff; }

/* ---------- mode agrandi : le plan prend tout l'écran, par-dessus la page ---------- */
html.plan-lock, html.plan-lock body { overflow: hidden; }
.plan-ui.full { position: fixed; inset: 0; z-index: 90; display: flex; flex-direction: column; gap: 10px; padding: calc(10px + env(safe-area-inset-top)) 12px calc(12px + env(safe-area-inset-bottom)); background: radial-gradient(70% 60% at 0% 0%, color-mix(in srgb, var(--accent) 38%, transparent), transparent 62%), radial-gradient(60% 60% at 100% 100%, color-mix(in srgb, var(--a2) 22%, transparent), transparent 62%), var(--night); animation: plan-full .32s var(--ease) both; }
@keyframes plan-full { from { opacity: 0; transform: scale(.985); } }
.plan-ui.full .plan-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 0 0 0 6px; }
.plan-top b { display: block; font: 400 25px/1.05 var(--serif); } .plan-top small { color: rgba(255,255,255,.6); font-size: 12.5px; }
.plan-ui.full .plan-vp { flex: 1 1 0; aspect-ratio: auto !important; border: 1px solid rgba(255,255,255,.08); background: rgba(255,255,255,.02); }
.plan-ui.full .plan-legend { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; } .plan-ui.full .plan-legend::-webkit-scrollbar { display: none; }
@media (min-width: 861px) {
  .plan-ui.full { display: grid; grid-template: "top top" auto "find find" auto "vp slot" minmax(0, 1fr) "bar legend" auto / minmax(0, 1fr) 360px; gap: 12px 18px; padding: 16px 20px 18px; }
  .plan-ui.full .plan-top { grid-area: top; } .plan-ui.full .plan-find { grid-area: find; } .plan-ui.full .plan-vp { grid-area: vp; } .plan-ui.full .plan-bar { grid-area: bar; } .plan-ui.full .plan-slot { grid-area: slot; align-self: start; }
  .plan-ui.full .plan-legend { grid-area: legend; flex-wrap: wrap; align-content: center; overflow: visible; }
}
@media (max-width: 860px) {
  .plan-ui:not(.full) { gap: 8px; } .plan-ui { scroll-margin: 58px 0 100px; }   /* la barre d'onglets du bas ne cache pas la fiche */
  .plan-find { flex-direction: column; align-items: stretch; gap: 8px; } .plan-search { flex: none; }
  .plan-card { padding: 11px 12px; gap: 7px; } .pc-facts .tag, .pc-score { padding: 3px 9px; } .plan-card .btn { justify-self: stretch; } .plan-card .offer { padding: 7px 11px; } .plan-card .offer span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
}

/* ---------- parcours du visiteur : le plan prend la place, la liste l'accompagne ; une étape de la liste montre son stand sur le plan ---------- */
.v-main.routepage { max-width: 1280px; }
.guide { margin-top: 22px; display: grid; gap: 14px; padding: 20px 22px; border-radius: 24px; background: #fff; box-shadow: var(--sh2); } .guide h3 { font: 400 26px/1.1 var(--serif); } .guide-h p { margin-top: 4px; }
.guide-f { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr) auto; gap: 12px; align-items: end; } .guide-f label { display: grid; gap: 6px; font-weight: 550; font-size: 14px; } .guide-a { display: flex; gap: 8px; } .guide-a select { flex: 1; min-width: 0; } .guide-a .btn, .guide-f > .btn { white-space: nowrap; } .guide-f .btn svg { width: 17px; height: 17px; }
.guide-res { display: flex; align-items: center; gap: 18px; padding: 14px 16px; border-radius: 18px; background: rgba(11,16,32,.04); } .guide-res p { display: grid; gap: 2px; } .guide-res p:first-child { flex: 1; } .guide-res small { color: var(--mut); } .guide-km { text-align: right; } .guide-km b { font-size: 20px; }
@media (max-width: 900px) { .guide-f { grid-template-columns: 1fr; } .guide-res { flex-wrap: wrap; } }
.route-grid.rt { grid-template: "map stats" auto "map list" auto "map more" 1fr / minmax(0, 1.72fr) minmax(330px, 1fr); gap: 14px 24px; margin-top: 18px; }
.rt .stats3 { grid-area: stats; } .rt .stats3 b { white-space: nowrap; } .rt .mapbox { grid-area: map; position: sticky; top: 88px; padding: 14px 12px; animation: rise .55s var(--ease) both; } .rt .tl { grid-area: list; } .rt .demo-btn { grid-area: more; }
.tl li { scroll-margin: 90px 0; } .tl li[data-stop] { cursor: pointer; transition: background .2s, box-shadow .2s; }
.tl li[data-stop]:hover { background: var(--glass); }
.tl li.on { background: var(--glass2); box-shadow: 0 0 0 2px var(--accent), var(--sh1); }
.tl li.hit i { animation: tl-pass 1s ease-out; } @keyframes tl-pass { from { box-shadow: 0 0 0 0 color-mix(in srgb, var(--a2) 80%, transparent); } to { box-shadow: 0 0 0 11px transparent; } }
.tl li.gap { display: block; padding: 0 14px 0 66px; min-height: 0; font-size: 13px; color: var(--mut); } .tl li.gap span { display: block; padding: 5px 0 5px 22px; border-left: 2px dotted var(--line2); }
@media (min-width: 861px) { .rt .tl li { padding-top: 9px; padding-bottom: 9px; } .rt .plan-vp { max-height: max(360px, calc(100dvh - 350px)); } }   /* le plan entier, boutons compris, tient à l'écran à côté de la liste */
@media (max-width: 860px) { .route-grid.rt { grid-template: "stats" auto "map" auto "list" auto "more" auto / minmax(0, 1fr); gap: 12px; margin-top: 12px; } .rt .mapbox { position: static; padding: 12px 10px; } }

@media (prefers-reduced-motion: reduce) {
  .plan-ov .sel-mk path, .plan-ov .stp.pop .stp-in, .plan-ov .stp.pop .stp-o { animation: none; }
}
