/* Carte du parcours (onglet Parcours) : composant isolé dans un shadow DOM, voir js/carte.js.
   Les couleurs du site (--ink, --paper, --blue…) traversent l'ombre : les humeurs du classeur s'appliquent aussi ici. */
:host {
  --white: #ffffff; --sea: #d8ecf7; --land: #fffaf0; --land-2: #f2e8d5; --muted: #9a93a8;
  --mary: #ff8a3d; --gemy: #ff5fae;
  display: block; color: var(--ink); font: 15px/1.5 var(--body);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
@media print { :host { display: none; } }
.panel { border: 2.5px solid var(--ink); background: var(--yellow); padding: clamp(16px, 3vw, 32px); }
.eyebrow { font: 700 11px/1 var(--body); letter-spacing: .1em; text-transform: uppercase; }
.layout { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, .7fr); gap: 24px; align-items: start; }
.map-box { position: relative; min-width: 0; background: var(--sea); border: 2.5px solid var(--ink); box-shadow: 7px 7px 0 var(--ink); overflow: hidden; }
.map-box svg { display: block; width: 100%; height: auto; aspect-ratio: 640 / 520; }
.zoom-tag { position: absolute; left: 10px; top: 10px; padding: 4px 9px; border: 2px solid var(--ink); background: var(--white); font: italic 900 11.5px/1 var(--display); text-transform: uppercase; box-shadow: 2px 2px 0 var(--ink); }
.legend { position: absolute; right: 10px; bottom: 10px; display: grid; gap: 4px; padding: 7px 10px; border: 2px solid var(--ink); background: var(--white); font: 600 11.5px/1.2 var(--body); box-shadow: 2px 2px 0 var(--ink); transition: opacity .3s; }
.legend[hidden] { display: none; }
.legend span { display: flex; align-items: center; gap: 6px; }
.legend i { width: 11px; height: 11px; border: 1.5px solid var(--ink); border-radius: 50%; flex: none; }
.legend i.sq { border-radius: 1px; } .legend i.ds { border-style: dashed; background: var(--white) !important; }
.tip { position: absolute; z-index: 3; pointer-events: none; max-width: 220px; padding: 7px 10px; border: 2px solid var(--ink); background: var(--white); box-shadow: 3px 3px 0 var(--ink); font: 600 12.5px/1.35 var(--body); }
.tip b { display: block; font: italic 900 13px/1.1 var(--display); text-transform: uppercase; }
.tip small { color: var(--ink-soft); }
.side { min-width: 0; display: grid; gap: 16px; }
.card { background: var(--white); border: 2.5px solid var(--ink); box-shadow: 6px 6px 0 var(--ink); }
.card-h { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; padding: 9px 14px; border-bottom: 2.5px solid var(--ink); background: var(--c, var(--blue)); }
.card-h b { font: italic 900 15px/1.1 var(--display); text-transform: uppercase; }
.card-h small { font: 700 12px/1 var(--body); font-variant-numeric: tabular-nums; }
.card-b { padding: 12px 14px 14px; }
#fiche h3 { margin: 0 0 2px; font: italic 900 22px/1.05 var(--display); text-transform: uppercase; text-wrap: balance; }
#fiche .role { margin: 0 0 8px; font-weight: 700; font-size: 14px; }
#fiche p { margin: 0 0 6px; color: var(--ink-soft); font-size: 14px; }
#fiche .src { font-size: 12px; }
.stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.stat { padding: 8px 6px; border: 2px solid var(--ink); background: var(--paper); text-align: center; min-width: 0; }
.stat b { display: block; font: italic 900 24px/1 var(--display); font-variant-numeric: tabular-nums; text-shadow: -2px 2px 0 var(--orange); }
.stat span { display: block; margin-top: 3px; font: 600 11.5px/1.2 var(--body); color: var(--ink-soft); }

.timeline { margin-top: 20px; background: var(--white); border: 2.5px solid var(--ink); box-shadow: 6px 6px 0 var(--ink); padding: 12px 14px 14px; }
.tl-top { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.play { flex: none; width: 46px; height: 46px; border: 2.5px solid var(--ink); border-radius: 50%; background: var(--red); color: var(--white); cursor: pointer;
  font: 900 17px/1 var(--display); box-shadow: 3px 3px 0 var(--ink); }
.play:active { transform: translate(2px, 2px); box-shadow: 1px 1px 0 var(--ink); }
.year { font: italic 900 34px/1 var(--display); font-variant-numeric: tabular-nums; text-shadow: -3px 2px 0 var(--yellow); }
.tl-top small { color: var(--ink-soft); font-weight: 600; }
input[type=range] { width: 100%; accent-color: var(--ink); height: 28px; }
.ticks { position: relative; height: 34px; margin: 0 11px; font: 700 11px/1 var(--body); color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.ticks span { position: absolute; top: 0; transform: translateX(-50%); white-space: nowrap; padding-top: 6px; }
.ticks span::before { content: ""; position: absolute; left: 50%; top: -2px; width: 2px; height: 6px; background: var(--ink); }
.ticks span.low { top: 15px; } .ticks span.low::before { height: 17px; top: -13px; }
.ticks span:first-child { transform: none; } .ticks span:first-child::before { left: 0; }
.ticks span:last-child { transform: translateX(-100%); } .ticks span:last-child::before { left: auto; right: 0; }
.chips { position: relative; height: 34px; margin: 6px 11px 0; }
.chip { position: absolute; top: 0; height: 30px; min-width: 0; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; text-align: center; padding: 0 8px; border: 2px solid var(--ink); border-radius: 999px; background: var(--c); cursor: pointer; font: italic 900 12px/1.1 var(--display); text-transform: uppercase; box-shadow: 2px 2px 0 var(--ink); color: var(--ink); }
.chip small { font: 600 11px/1 var(--body); text-transform: none; }
.chip[aria-pressed="true"] { z-index: 1; box-shadow: 0 0 0 3px var(--white), 0 0 0 5px var(--ink); }
@media (max-width: 640px) { .chip { padding: 0 3px; font-size: 10.5px; } }
.ticks span.l2 { top: 30px; } .ticks span.l2::before { height: 32px; top: -28px; }
.ticks.three { height: 50px; }
.play:focus-visible, .chip:focus-visible, .pin:focus, .site:focus { outline: 3px dashed var(--ink); outline-offset: 3px; }
.foot { margin: 12px 0 0; font-size: 12.5px; color: var(--ink-soft); }

/* SVG : les tailles sont recalculées en JS à chaque image du zoom */
.france { fill: var(--land-2); stroke: var(--ink); stroke-linejoin: round; vector-effect: non-scaling-stroke; stroke-width: 2; }
.region { fill: var(--land); stroke: var(--ink); stroke-linejoin: round; vector-effect: non-scaling-stroke; stroke-width: 2.5; }
.region.mayenne { fill: url(#hatch); }
.wave { fill: none; stroke: #9cc8e2; stroke-linecap: round; vector-effect: non-scaling-stroke; stroke-width: 1.5; }
.lbl { font-family: var(--body); font-weight: 600; fill: var(--muted); }
.dep-t { font-family: var(--body); font-weight: 700; fill: var(--muted); letter-spacing: .14em; text-transform: uppercase; }
.sea-t { font-family: var(--display); font-style: italic; font-weight: 900; fill: #7fb2cf; letter-spacing: .25em; text-transform: uppercase; }
.route { fill: none; stroke: var(--ink); stroke-dasharray: 2 7; stroke-linecap: round; vector-effect: non-scaling-stroke; stroke-width: 2.5; }
.pin { cursor: pointer; }
.pin .dot { stroke: var(--ink); vector-effect: non-scaling-stroke; stroke-width: 2.5; }
.pin .lab rect { fill: var(--white); stroke: var(--ink); stroke-width: 2; }
.pin .lab text { font: italic 900 12px var(--display); text-transform: uppercase; fill: var(--ink); }
.pin .lab .sh { fill: var(--ink); stroke: none; }
.pin.off { opacity: .28; }
.site { cursor: pointer; opacity: 0; transition: opacity .35s; }
.site.show { opacity: 1; }
.site .m { stroke: var(--ink); vector-effect: non-scaling-stroke; stroke-width: 1.4; }
.site.occ .m { stroke-dasharray: none; }
.site.tbc .m { fill: var(--white) !important; stroke-dasharray: 2 2; }
.site:hover .m, .site:focus .m { stroke-width: 3; }
.halo-t { font-family: var(--display); font-style: italic; font-weight: 900; text-transform: uppercase; fill: var(--ink); opacity: 0; transition: opacity .4s; paint-order: stroke; stroke: var(--land); }
.halo-t.show { opacity: 1; }
.commune { fill: var(--pink); stroke: var(--ink); vector-effect: non-scaling-stroke; stroke-width: 1; opacity: 0; transition: opacity .3s; }
.commune.show { opacity: 1; }
@media (max-width: 860px) { .layout { grid-template-columns: minmax(0, 1fr); } }

/* Points du site : tapis qui glisse dans le panneau, points fixes sur certains blocs */
.panel { position: relative; overflow: hidden; }
.panel::before { content: ""; position: absolute; inset: -12px; z-index: 0; pointer-events: none;
  background-image: radial-gradient(rgba(23,20,31,.2) 1px, transparent 1.5px); background-size: 12px 12px; animation: dotsP 3.4s linear infinite; }
.panel > * { position: relative; z-index: 1; }
.dotted { background-image: radial-gradient(rgba(23,20,31,.11) 1px, transparent 1.4px); background-size: 10px 10px; }
@media (prefers-reduced-motion: reduce) { .panel::before { animation: none; } }
.map-box { background: radial-gradient(rgba(60,120,160,.22) 1px, transparent 1.5px) 0 0 / 12px 12px, var(--sea); }
.stat { background: radial-gradient(rgba(23,20,31,.12) 1px, transparent 1.4px) 0 0 / 9px 9px, var(--paper); }
.card-h { background-image: radial-gradient(rgba(23,20,31,.14) 1px, transparent 1.4px); background-size: 8px 8px; }
.win { margin: 8px 0 6px; padding: 8px 10px; border: 2px solid var(--ink); background: radial-gradient(rgba(23,20,31,.12) 1px, transparent 1.4px) 0 0 / 9px 9px, #fff6c9; font-size: 13.5px; font-weight: 600; }
.win b { display: block; margin-bottom: 2px; font: italic 900 11.5px/1 var(--display); text-transform: uppercase; letter-spacing: .04em; }
.all-fr { position: absolute; right: 10px; top: 10px; z-index: 2; padding: 6px 10px; border: 2px solid var(--ink); background: var(--white); color: var(--ink); cursor: pointer;
  font: italic 900 11.5px/1 var(--display); text-transform: uppercase; box-shadow: 2px 2px 0 var(--ink); }
.all-fr[aria-pressed="true"] { background: var(--yellow); transform: translate(1px, 1px); box-shadow: 1px 1px 0 var(--ink); }
.all-fr:focus-visible, .brand:focus-visible { outline: 3px dashed var(--ink); outline-offset: 2px; }
.brand-list { display: flex; flex-wrap: wrap; gap: 6px; }
.brand { padding: 4px 10px; border: 2px solid var(--ink); border-radius: 999px; background: var(--white); color: var(--ink); cursor: pointer; font: 700 12px/1.2 var(--body); }
.brand small { font-weight: 600; color: var(--ink-soft); font-variant-numeric: tabular-nums; }
.brand[aria-pressed="true"] { background: var(--ink); color: var(--white); } .brand[aria-pressed="true"] small { color: #d9d3e3; }
.site.dim { opacity: .12 !important; pointer-events: none; }
@media (max-width: 520px) { .legend { gap: 2px; padding: 4px 7px; font-size: 10px; } .legend i { width: 8px; height: 8px; } .zoom-tag, .all-fr { font-size: 10px; } }
