/* TB Blocks : styles du bloc World Map (chargé uniquement quand le bloc est présent). Dépend de style.css. */
/* ===== World Map (1.6.0) ===== */
/* Planisphère : conteneur, thèmes de couleurs (parchemin, clair, sombre…) et scène zoomable. */
.tbb-wm { --wm-sea: #c9d8de; --wm-land: #ece4d0; --wm-border: #8c8068; --wm-pin: #a31d22; --wm-pbg: #fbf8f0; --wm-pc: #2a2620; --wm-bbg: var(--wm-pin); --wm-bc: #fff; --wm-ms: 30px; box-sizing: border-box; }
.tbb-wm--t-light { --wm-sea: #e6edf3; --wm-land: #ffffff; --wm-border: #b9c3cd; --wm-pin: #c4161c; --wm-pbg: #ffffff; --wm-pc: #16181d; }
.tbb-wm--t-dark { --wm-sea: #0f1720; --wm-land: #26313d; --wm-border: #4b5e72; --wm-pin: #ff5a4f; --wm-pbg: #17202a; --wm-pc: #e8ecf1; }
.tbb-wm--t-sea { --wm-sea: #1d5c85; --wm-land: #e9efe3; --wm-border: #6f8f78; --wm-pin: #d62828; --wm-pbg: #ffffff; --wm-pc: #12212b; }
.tbb-wm--t-mono { --wm-sea: #f1f1f1; --wm-land: #d3d3d3; --wm-border: #8d8d8d; --wm-pin: #111111; --wm-pbg: #ffffff; --wm-pc: #111111; }
.tbb-wm__stage { position: relative; overflow: hidden; background: var(--wm-sea); touch-action: pan-y; cursor: grab; user-select: none; -webkit-user-select: none; outline-offset: -3px; min-height: 340px; }
.tbb-wm__stage.is-dragging { cursor: grabbing; }
.tbb-wm--h-r169 .tbb-wm__stage { aspect-ratio: 16 / 9; }
.tbb-wm--h-r219 .tbb-wm__stage { aspect-ratio: 21 / 9; }
.tbb-wm--h-r32 .tbb-wm__stage { aspect-ratio: 3 / 2; }
.tbb-wm--h-r43 .tbb-wm__stage { aspect-ratio: 4 / 3; }
.tbb-wm--h-vh70 .tbb-wm__stage { height: 70vh; height: 70svh; }
.tbb-wm--h-vh100 .tbb-wm__stage { height: 100vh; height: 100svh; }
.tbb-wm:not(.alignfull) .tbb-wm__stage { border-radius: var(--tbb-radius, 14px); }
.tbb-wm__world { position: absolute; left: 0; top: 0; width: 100%; aspect-ratio: 1.735065 / 1; }
.tbb-wm__land, .tbb-wm__borders { position: absolute; inset: 0; pointer-events: none; -webkit-mask-repeat: no-repeat; mask-repeat: no-repeat; -webkit-mask-size: 100% 100%; mask-size: 100% 100%; -webkit-mask-position: 0 0; mask-position: 0 0; }
.tbb-wm__land { background: var(--wm-land); -webkit-mask-image: url(../img/map-land.svg); mask-image: url(../img/map-land.svg); }
.tbb-wm__borders { background: var(--wm-border); -webkit-mask-image: url(../img/map-borders.svg); mask-image: url(../img/map-borders.svg); opacity: .9; }
.tbb-wm /* Repères : la pointe du repère est exactement sur la position (left/top en %). */
.tbb-wm__pin { position: absolute; width: 0; height: 0; padding: 0; margin: 0; border: 0; background: none !important; box-shadow: none; cursor: pointer; text-decoration: none; overflow: visible; color: inherit; }
.tbb-wm__dot { position: absolute; left: calc(var(--wm-ms) / -2); top: calc(var(--wm-ms) * -1); width: var(--wm-ms); height: var(--wm-ms); box-sizing: border-box; border-radius: 50% 50% 50% 0; transform: rotate(-45deg); transform-origin: 50% 50%; background: var(--pc, var(--wm-pin)); border: 2px solid #fff; box-shadow: 0 3px 8px rgba(0, 0, 0, .35); display: flex; align-items: center; justify-content: center; transition: transform .2s ease; }
.tbb-wm__dot::after { content: ""; width: 34%; height: 34%; border-radius: 50%; background: #fff; }
.tbb-wm__dot b { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; transform: rotate(45deg); font-size: calc(var(--wm-ms) * .5); font-weight: 400; line-height: 1; color: #fff; }
.tbb-wm__dot:has(b)::after { display: none; }
.tbb-wm--m-dot .tbb-wm__dot, .tbb-wm--m-ring .tbb-wm__dot { left: calc(var(--wm-ms) * -.35); top: calc(var(--wm-ms) * -.35); width: calc(var(--wm-ms) * .7); height: calc(var(--wm-ms) * .7); border-radius: 50%; transform: none; }
.tbb-wm--m-dot .tbb-wm__dot b, .tbb-wm--m-ring .tbb-wm__dot b { transform: none; font-size: calc(var(--wm-ms) * .4); }
.tbb-wm--m-ring .tbb-wm__dot { background: rgba(255, 255, 255, .9); border: calc(var(--wm-ms) * .12) solid var(--pc, var(--wm-pin)); }
.tbb-wm--m-ring .tbb-wm__dot::after { background: var(--pc, var(--wm-pin)); }
.tbb-wm--m-ring .tbb-wm__dot b { color: var(--pc, var(--wm-pin)); }
.tbb-wm--pulse .tbb-wm__pin::before { content: ""; position: absolute; left: -9px; top: -9px; width: 18px; height: 18px; border-radius: 50%; background: var(--pc, var(--wm-pin)); opacity: .5; animation: tbbWmPulse 2.2s ease-out infinite; pointer-events: none; }
.tbb-wm--m-dot.tbb-wm--pulse .tbb-wm__pin::before, .tbb-wm--m-ring.tbb-wm--pulse .tbb-wm__pin::before { left: calc(var(--wm-ms) * -.35); top: calc(var(--wm-ms) * -.35); width: calc(var(--wm-ms) * .7); height: calc(var(--wm-ms) * .7); }
@keyframes tbbWmPulse { 0% { transform: scale(.6); opacity: .55; } 100% { transform: scale(3.2); opacity: 0; } }
.tbb-wm__pin:hover .tbb-wm__dot, .tbb-wm__pin:focus-visible .tbb-wm__dot, .tbb-wm__pin.is-active .tbb-wm__dot { transform: rotate(-45deg) scale(1.18); }
.tbb-wm--m-dot .tbb-wm__pin:hover .tbb-wm__dot, .tbb-wm--m-ring .tbb-wm__pin:hover .tbb-wm__dot, .tbb-wm--m-dot .tbb-wm__pin.is-active .tbb-wm__dot, .tbb-wm--m-ring .tbb-wm__pin.is-active .tbb-wm__dot { transform: scale(1.25); }
.tbb-wm__pin:hover, .tbb-wm__pin:focus-visible, .tbb-wm__pin.is-active { z-index: 999 !important; }
.tbb-wm__pin:focus-visible { outline: none; }
.tbb-wm__pin:focus-visible .tbb-wm__dot { box-shadow: 0 0 0 3px rgba(0, 120, 255, .6), 0 3px 8px rgba(0, 0, 0, .35); }
.tbb-wm__lbl { position: absolute; left: 0; bottom: calc(var(--wm-ms) + 8px); transform: translateX(-50%); padding: 4px 10px; border-radius: 99px; background: var(--wm-pbg); color: var(--wm-pc); font: 600 12px/1.3 inherit; white-space: nowrap; box-shadow: 0 2px 10px rgba(0, 0, 0, .25); opacity: 0; pointer-events: none; transition: opacity .15s ease; max-width: 60vw; overflow: hidden; text-overflow: ellipsis; }
.tbb-wm--m-dot .tbb-wm__lbl, .tbb-wm--m-ring .tbb-wm__lbl { bottom: calc(var(--wm-ms) * .5 + 8px); }
.tbb-wm__pin:hover .tbb-wm__lbl, .tbb-wm__pin:focus-visible .tbb-wm__lbl, .tbb-wm--labels .tbb-wm__lbl { opacity: 1; }
.tbb-wm__ctrl { position: absolute; top: 12px; right: 12px; display: flex; flex-direction: column; gap: 6px; z-index: 1000; }
.tbb-wm .tbb-wm__ctrl button { width: 38px; height: 38px; padding: 0; border: 0; border-radius: 10px; background: var(--wm-pbg); color: var(--wm-pc); font-size: 20px; line-height: 1; cursor: pointer; box-shadow: 0 2px 8px rgba(0, 0, 0, .28); transition: transform .15s ease; }
.tbb-wm .tbb-wm__ctrl button:hover { transform: scale(1.08); }
/* Fiche d'article qui s'ouvre au clic sur un repère (en bas à gauche, pleine largeur sur mobile). */
.tbb-wm__panel { position: absolute; left: 14px; bottom: 14px; z-index: 1001; width: min(350px, calc(100% - 28px)); max-height: calc(100% - 28px); overflow: auto; background: var(--wm-pbg); color: var(--wm-pc); border-radius: 14px; box-shadow: 0 12px 40px rgba(0, 0, 0, .35); cursor: default; animation: tbbWmIn .25s ease; }
.tbb-wm__panel[hidden] { display: none; }
.tbb-wm__panel.is-right { left: auto; right: 14px; }
@keyframes tbbWmIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
.tbb-wm .tbb-wm__x { position: absolute; top: 8px; right: 8px; z-index: 2; width: 30px; height: 30px; padding: 0; border: 0; border-radius: 50%; background: rgba(0, 0, 0, .55); color: #fff; font-size: 20px; line-height: 1; cursor: pointer; }
.tbb-wm__card-img { display: block; width: 100%; height: 160px; object-fit: cover; }
.tbb-wm__card-body { display: flex; flex-direction: column; gap: 6px; padding: 16px 18px 18px; }
.tbb-wm__card-year { font-size: .75rem; font-weight: 800; letter-spacing: .12em; color: var(--wm-pin); }
.tbb-wm .tbb-wm__card-title { font-size: 1.15rem; line-height: 1.25; color: var(--wm-pc); }
.tbb-wm .tbb-wm__card-text { margin: 0; font-size: .92rem; line-height: 1.55; color: var(--wm-pc); opacity: .85; }
.tbb-wm .tbb-wm__card-btn { align-self: flex-start; margin-top: 6px; padding: .6em 1.1em; border-radius: 8px; background: var(--wm-bbg) !important; color: var(--wm-bc) !important; font-weight: 700; font-size: .9rem; text-decoration: none !important; }
.tbb-wm .tbb-wm__card-btn:hover { filter: brightness(.92); }
.tbb-wm__hint { position: absolute; left: 50%; bottom: 14px; transform: translateX(-50%); margin: 0; padding: 6px 14px; border-radius: 99px; background: rgba(0, 0, 0, .7); color: #fff; font-size: 13px; opacity: 0; pointer-events: none; transition: opacity .2s ease; z-index: 1002; }
.tbb-wm__hint.is-on { opacity: 1; }
.tbb-wm__list:not(.screen-reader-text) { list-style: none; margin: 18px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 8px 24px; }
.tbb-wm__list a { text-decoration: none; }
.tbb-wm__list span { font-weight: 800; color: var(--wm-pin); margin-right: 4px; }
@media (max-width: 700px) { .tbb-wm__panel, .tbb-wm__panel.is-right { left: 10px; right: 10px; bottom: 10px; width: auto; max-height: 56%; } .tbb-wm__card-img { height: 110px; } .tbb-wm__stage { min-height: 380px; } }
@media (prefers-reduced-motion: reduce) { .tbb-wm--pulse .tbb-wm__pin::before { animation: none; opacity: 0; } }
.tbb-wm__stage { max-width: 100%; box-sizing: border-box; }
@media (max-width: 700px) {
	.tbb-wm .tbb-wm__stage { aspect-ratio: auto; min-height: 0; height: min(72svh, 460px); }
	.tbb-wm--h-r219 .tbb-wm__stage, .tbb-wm--h-r32 .tbb-wm__stage, .tbb-wm--h-r43 .tbb-wm__stage, .tbb-wm--h-r169 .tbb-wm__stage { aspect-ratio: auto; }
	.tbb-wm--h-vh100 .tbb-wm__stage { height: 100svh; }
}
.tbb.tbb-wm.alignfull { max-width: none; }
.tbb-wm__pin--multi .tbb-wm__dot b { font-size: .78em; font-weight: 800; color: #fff; }
.tbb-wm__multi { list-style: none; margin: 8px 0 0; padding: 0; display: grid; gap: 6px; }
.tbb-wm__multi li { margin: 0; padding: 0; }
.tbb-wm__multi a, .tbb-wm__multi li > span { display: flex; align-items: baseline; gap: 8px; padding: 7px 10px; border-radius: 9px; background: rgba(127, 127, 127, .1); color: inherit; text-decoration: none; font-weight: 600; font-size: .92rem; line-height: 1.3; }
.tbb-wm__multi a:hover { background: rgba(127, 127, 127, .2); }
.tbb-wm__multi-y { color: var(--wm-pin, #a31d22); font-weight: 800; flex: none; }
.tbb-wm__multi-t { flex: 1; min-width: 0; }
.tbb-wm__multi a i { font-style: normal; flex: none; }
