:root, [data-bs-theme] { --bs-body-font-family: "Google Sans", system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif; }
body, button, input, select, textarea { font-family: var(--bs-body-font-family); }
:root { --ug-green: #19aa5a; --ug-bg: #0b1220; }
html, body { height: 100%; }
body { background: var(--ug-bg); }
.ug-nav { background: #000; }
body.home { overflow: hidden; }
#globe { position: fixed; inset: 0; cursor: grab; }
#globe:active { cursor: grabbing; }
.hud { position: fixed; bottom: 1.2rem; left: 0; right: 0; pointer-events: none; padding: 0 1rem; }
.loader { position: fixed; inset: 0; display: flex; align-items: center; justify-content: center; background: #0b1220; transition: opacity .5s, visibility .5s; }
.loader.done { opacity: 0; visibility: hidden; pointer-events: none; }
.globe-tip { background: rgba(0,0,0,.8); color: #fff; padding: .3rem .6rem; border-radius: .4rem; font-size: .85rem; white-space: nowrap; display: inline-flex; align-items: center; gap: .35rem; }

/* pages pays / fédération */
.page-wrap { padding-top: 68px; min-height: 100%; }
#map { height: calc(100vh - 96px); height: calc(100dvh - 96px); min-height: 360px; }
.ug-pin { display: flex; align-items: center; justify-content: center; border-radius: 50%; color: #fff; border: 2px solid #fff; box-shadow: 0 2px 6px rgba(0,0,0,.5); }
.ug-pin.org { background: var(--ug-green); width: 30px; height: 30px; }
.ug-pin.fed { background: var(--ug-green); width: 52px; height: 52px; border: 2px solid #fff; }
.ug-pin.logo { background: #fff; overflow: hidden; /* padding: 2px; */ }
.ug-pin.org.logo { width: 44px; height: 44px; }
.ug-pin.fed.logo { width: 68px; height: 68px; border-color: #fff; }
.ug-pin.logo img { width: 100%; height: 100%; object-fit: contain; border-radius: 50%; }
.ug-pin .material-symbols-outlined { font-size: 20px; }
.ug-pin.fed .material-symbols-outlined { font-size: 30px; }
.org-type { font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; }
.leaflet-container { background: #1b2433; }

/* survol des marqueurs : agrandissement */
.leaflet-marker-icon .ug-pin { transition: transform .15s ease; }
@media (hover: hover) { .leaflet-marker-icon:hover .ug-pin { transform: scale(1.25); } }
.globe-dot { pointer-events: auto; cursor: pointer; width: 26px; height: 26px; border-radius: 50%; background: #fff; padding: 2px; border: 2px solid #fff; display: grid; place-items: center; box-shadow: 0 1px 5px rgba(0,0,0,.5); transition: transform .15s ease; }
.globe-dot:hover { transform: scale(1.35); }
.globe-dot img { width: 100%; height: 100%; display: block; }

/* zoom : loupe + curseur vertical + loupe (comme zon.events) */
.ug-zoom { position: fixed; right: 14px; width: 52px; top: 78px; bottom: 108px; z-index: 1000; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 6px 4px; background: transparent; border-radius: 26px; }
.ug-zoom-btn { width: 38px; height: 38px; padding: 0; border: 0; border-radius: 50%; background: transparent; color: #19aa5a; display: grid; place-items: center; cursor: pointer; }
.ug-zoom-btn:hover, .ug-zoom-btn:focus-visible { color: #148f4c; }
.ug-zoom-btn .material-symbols-outlined { font-size: 26px; }
.ug-zoom-range { writing-mode: vertical-lr; direction: rtl; width: 24px; flex: 1 1 0; min-height: 40px; height: auto; margin: 0; accent-color: #19aa5a; cursor: pointer; }


/* pied de page */
.ug-footer { position: fixed; left: 0; right: 0; bottom: 0; text-align: center; white-space: nowrap; z-index: 1040; font-size: .75rem; height: 28px; line-height: 20px; color: #8b95a5; background: #000; padding: 4px 8px; }
.ug-footer a { color: var(--ug-green); text-decoration: none; cursor: pointer; }
.ug-footer a:hover { color: #5ee08f; }
.ug-footer .material-symbols-outlined { font-size: 14px; vertical-align: -3px; }

/* regroupement de marqueurs */
.ug-cluster { display: grid; place-items: center; border-radius: 50%; background: #19aa5a; color: #fff; font-weight: 700; border: 2px solid #fff; box-shadow: 0 2px 6px rgba(0,0,0,.5); }

/* palmarès */
#palModal .material-symbols-outlined { font-size: 20px; vertical-align: middle; }
#palModal .material-symbols-outlined { font-variation-settings: 'FILL' 1; }
#palModal .material-symbols-outlined.pal-gold, .pal-gold { color: #f5b400; }
#palModal .material-symbols-outlined.pal-pink, .pal-pink { color: #ff5fa2; }
.pal-silver { color: #b8c2cc; }
.pal-bronze { color: #cd7f32; }
.pal-chips { display: flex; gap: .4rem; overflow-x: auto; scrollbar-width: none; }
.pal-chips::-webkit-scrollbar { display: none; }
.pal-chips .btn { flex: none; }
.pal-rank { width: 1.8rem; text-align: center; color: var(--bs-secondary-color); }

/* logo */
.ug-logo { height: 28px; width: 28px; vertical-align: -6px; }
.ug-spin { width: 90vmin; height: 90vmin; max-width: 90vw; max-height: 90vh; animation: ug-pulse 1.1s ease-in-out infinite; }
@keyframes ug-pulse { 0%,100% { transform: scale(.94); opacity: .55; } 50% { transform: scale(1); opacity: 1; } }
#loader.loader { z-index: 2000; }

/* boutons de navigation uniformes */
.ug-btn { background: var(--ug-green); border: 1px solid var(--ug-green); color: #fff; padding: .25rem .5rem; }
.ug-btn:hover, .ug-btn:focus-visible { background: #148f4c; border-color: #148f4c; color: #fff; }

/* tous les liens en vert */
[data-bs-theme=dark], :root {
  --bs-link-color: #19aa5a; --bs-link-color-rgb: 25,170,90;
  --bs-link-hover-color: #5ee08f; --bs-link-hover-color-rgb: 94,224,143;
}
a:not(.btn):not(.navbar-brand):not(.list-group-item):not(.dropdown-item) { color: var(--bs-link-color); }
a:not(.btn):not(.navbar-brand):not(.list-group-item):not(.dropdown-item):hover { color: var(--bs-link-hover-color); }
#palBody { touch-action: pan-y; min-height: 40vh; }

.ug-flag { height: 18px; width: 24px; object-fit: cover; border-radius: 3px; margin-right: .45rem; vertical-align: -3px; box-shadow: 0 0 0 1px rgba(255,255,255,.25); }

/* bouton flottant « Ajouter une entité » */
.ug-fab { position: fixed; right: 14px; bottom: 44px; z-index: 1040; width: 52px; height: 52px; border-radius: 50%; border: 0; background: var(--ug-green); color: #fff; display: grid; place-items: center; box-shadow: 0 3px 10px rgba(0,0,0,.5); }
.ug-fab:hover { background: #148f4c; }
.ug-fab .material-symbols-outlined { font-size: 28px; }
.ug-flag-ph { width: 24px; margin-right: .45rem; text-align: center; color: var(--bs-secondary-color); }

/* bandeau d'installation PWA */
.ug-banner { position: fixed; left: 50%; transform: translateX(-50%); bottom: 70px; z-index: 1060; display: flex; align-items: center; gap: .75rem; max-width: calc(100vw - 24px); padding: .5rem .75rem; background: #111a2c; border: 1px solid var(--ug-green); border-radius: 12px; color: #fff; box-shadow: 0 4px 14px rgba(0,0,0,.5); font-size: .9rem; }
.ug-fa { width: 24px; flex: none; text-align: center; font-size: 1.15rem; line-height: 1.5; }
.ug-toast { position: fixed; left: 50%; bottom: 90px; transform: translateX(-50%) translateY(10px); z-index: 3000; background: #111a2c; color: #fff; border: 1px solid var(--ug-green); border-radius: 20px; padding: .4rem 1rem; font-size: .9rem; opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s; }
.ug-toast.show { opacity: 1; transform: translateX(-50%); }

/* header : alignement vertical */
.ug-nav .navbar-brand { display: inline-flex; align-items: center; gap: .3rem; padding: 0; margin-right: .5rem; line-height: 1; }
.ug-nav .navbar-brand .material-symbols-outlined, .ug-nav .ug-btn .material-symbols-outlined { vertical-align: middle; line-height: 1; }
.ug-nav .ug-logo { display: block; }
.ug-nav #title { display: inline-flex; align-items: center; line-height: 1; }
.ug-nav #title .ug-flag { vertical-align: middle; margin-right: .45rem; }
.ug-nav .ug-btn { display: inline-flex; align-items: center; justify-content: center; }
.ug-nav .text-secondary { line-height: 1; }
/* header compact : marges égales au-dessus et en dessous des boutons */
.ug-nav { padding: 0; height: 68px; }
.ug-nav > .container-fluid { height: 100%; align-items: center; }
.ug-nav .ug-btn { height: 36px; padding-top: 0; padding-bottom: 0; }

/* header sur une seule ligne (smartphone) */
.ug-nav > .container-fluid { flex-wrap: nowrap; gap: .4rem; }
.ug-nav > .container-fluid > div:first-child { min-width: 0; flex: 1 1 auto; flex-wrap: nowrap; white-space: nowrap; }
.ug-nav #title { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ug-nav > .container-fluid > div:last-child { flex: 0 0 auto; flex-wrap: nowrap; }
@media (max-width: 575.98px) {
  .ug-nav .navbar-brand { font-size: .95rem; margin-right: .25rem; gap: .2rem; }
  .ug-nav .ug-logo { height: 22px; width: 22px; }
  .ug-nav #title { font-size: .9rem; margin-left: .25rem !important; }
  .ug-nav #title .ug-flag { height: 15px; width: 20px; margin-right: .3rem; }
  .ug-nav .ug-btn { height: 34px; padding-left: .4rem; padding-right: .4rem; }
  .ug-nav > .container-fluid { padding-left: .5rem; padding-right: .5rem; gap: .25rem; }
  .ug-nav > .container-fluid > div:last-child { gap: .3rem !important; }
}

/* événements : marqueurs carrés avec date + cluster dédié */
.ug-ev { width: 44px; height: 49px; display: block; filter: drop-shadow(0 2px 3px rgba(0,0,0,.5)); }
.ug-ev svg { display: block; }
.ug-ev.past { opacity: .55; filter: grayscale(.6); }
.ug-evcl { width: 46px; height: 46px; border-radius: 6px; background: #0b1220; border: 2px solid #fff; color: #fff; box-shadow: 0 2px 6px rgba(0,0,0,.5); display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1; }
.ug-evcl .material-symbols-outlined { font-size: 17px; }
.ug-evcl b { font-size: 15px; }
.ug-fab-left { right: auto; left: 14px; }

/* menu d'en-tête */
.ug-menu { min-width: 340px; padding: .5rem 0; }
.ug-sw { cursor: pointer; }
.ug-menu .material-symbols-outlined { font-size: 22px; }
.ug-menu .ug-support .btn { display: flex; align-items: center; justify-content: center; gap: .35rem; }
.ug-evg { pointer-events: auto; cursor: pointer; transform: scale(.8); }

/* modales : lignes d'information alignées (icône sur la première ligne du texte) */
.ug-row { display: flex; gap: .75rem; align-items: flex-start; margin-bottom: .6rem; line-height: 24px; }
.ug-row > .material-symbols-outlined, .ug-row > .ug-fa { flex: 0 0 24px; width: 24px; text-align: center; font-size: 22px; line-height: 24px; }
.ug-row > div { flex: 1; min-width: 0; overflow-wrap: anywhere; }
/* événements : en-tête vert, texte blanc */
.ug-ev-head { background: var(--ug-green); color: #fff; border-bottom: 0; }
.ug-ev-head .modal-title { color: #fff; }
/* marqueurs du globe : survol net */
.ug-evg { transition: transform .15s ease; }
.ug-evg:hover { transform: scale(.98); }
.globe-dot, .ug-evg { touch-action: manipulation; }
.ug-menu .ug-btn .material-symbols-outlined { font-size: 20px; }
/* menu : interrupteurs verts, boutons pleine largeur */
.ug-menu .form-check-input:checked { background-color: var(--ug-green); border-color: var(--ug-green); }
.ug-menu .form-check-input:focus { border-color: var(--ug-green); box-shadow: 0 0 0 .2rem rgba(25,170,90,.25); }
.ug-menu .ug-btn { display: flex; align-items: center; justify-content: center; gap: .35rem; width: 100%; }
.ug-menu .ug-btn.d-none { display: none; }

.no-loader #loader { display: none !important; }
/* globe → pays : dernier plan du globe en fond, fondu vers la carte pendant qu'elle zoome */
html.has-bridge::before { content: ''; position: fixed; inset: 0; z-index: 500; background: var(--bridge) center / cover no-repeat #0b1220; transition: opacity .5s ease; pointer-events: none; }
html.has-bridge.bridge-off::before { opacity: 0; }
/* pays → globe : fondu vers le fond du globe pendant le dézoom */
#ugOut { position: fixed; inset: 0; z-index: 900; background: #0b1220; opacity: 0; transition: opacity .3s ease; pointer-events: all; }
#ugOut.on { opacity: 1; }

/* axe vertical commun : menu (header), zoom et bouton d'ajout = 52px, 14px du bord */
.ug-nav > .container-fluid { padding-right: 14px; }
#ugMenu > .dropdown > .ug-btn { width: 52px; padding-left: 0; padding-right: 0; }
@media (max-width: 575.98px) {
  .ug-nav > .container-fluid { padding-right: 14px; }
  .ug-nav #ugMenu > .dropdown > .ug-btn { width: 52px; padding-left: 0; padding-right: 0; }
}

img[data-zoom] { cursor: zoom-in; }
#ugLb img { background: transparent; }
#ugLb { position: fixed; inset: 0; z-index: 2000; background: rgba(0,0,0,.92); display: none; align-items: center; justify-content: center; padding: 12px; }
#ugLb.on { display: flex; }
#ugLb img { width: auto; height: auto; max-width: 100%; max-height: 100%; object-fit: contain; background: #fff0; border-radius: 6px; }
#ugLb button { position: absolute; top: 12px; right: 14px; width: 44px; height: 44px; border: 0; border-radius: 50%; background: rgba(255,255,255,.15); color: #fff; display: grid; place-items: center; }

/* zoom des cartes de formulaire : dans la carte, pas en plein écran */
.ug-zoom.ug-zoom-in { position: absolute; top: 8px; right: 8px; bottom: auto; width: auto; padding: 2px; background: rgba(255,255,255,.85); border-radius: 22px; z-index: 1000; }
.ug-zoom.ug-zoom-in .ug-zoom-range { display: none; }
body.ug-busy, body.ug-busy * { cursor: progress; }

/* texte des boutons toujours sur une seule ligne ; le menu s'élargit au besoin */
.btn { white-space: nowrap; }
.ug-menu { width: max-content; max-width: calc(100vw - 16px); }
.ug-menu .btn { font-size: .85rem; }

/* barre du slider de zoom : noir à 50 %, curseur vert */
.ug-zoom-range { -webkit-appearance: none; appearance: none; background: transparent; }
.ug-zoom-range::-webkit-slider-runnable-track { block-size: 6px; border-radius: 3px; background: rgba(0,0,0,.15); }
.ug-zoom-range::-moz-range-track { block-size: 6px; border-radius: 3px; background: rgba(0,0,0,.15); }
.ug-zoom-range::-webkit-slider-thumb { -webkit-appearance: none; appearance: none; inline-size: 18px; block-size: 18px; margin-block-start: -6px; border-radius: 50%; background: #19aa5a; }
.ug-zoom-range::-moz-range-thumb { inline-size: 14px; block-size: 14px; border-radius: 50%; background: #19aa5a; }

/* bouton menu carré (52 × 52), marges égales de 8 px au-dessus et en dessous dans le header (68 px) */
.ug-nav #ugMenu > .dropdown > .ug-btn { width: 52px; height: 52px; padding: 0; }
.ug-nav #ugMenu > .dropdown > .ug-btn .material-symbols-outlined { font-size: 30px; }

/* lien vers le classement live (compétition en cours), sous le header, en haut à gauche */
.ug-live { position: fixed; left: 14px; top: 78px; z-index: 1000; max-width: calc(100vw - 100px); }
.ug-live-h { display: inline-flex; align-items: center; gap: .45rem; max-width: 100%; padding: .4rem .6rem .4rem .8rem; border: 0; border-radius: 2rem; background: #000; color: #fff; font-weight: 700; font-size: .85rem; white-space: nowrap; box-shadow: 0 2px 8px rgba(0,0,0,.4); cursor: pointer; }
.ug-live-t { overflow: hidden; text-overflow: ellipsis; }
.ug-live-h:hover { background: #111; }
.ug-live-h .material-symbols-outlined { font-size: 20px; transition: transform .2s; }
.ug-live-p { margin-top: 0; background: #0b1220; color: #fff; padding: .8rem; }
/* ouvert : la pastille elle-même devient une modale qui couvre toute la carte (sous l'en-tête) */
.ug-live.open { left: 14px; right: 14px; top: 78px; bottom: 14px; max-width: none; z-index: 1500; display: flex; flex-direction: column; background: #0b1220; border-radius: 1.2rem; overflow: hidden; box-shadow: 0 8px 30px rgba(0,0,0,.6); transform-origin: 14px 14px; animation: ug-live-grow .28s ease-out; }
.ug-prev .ug-live.open { bottom: 42px; }
.ug-live.open .ug-live-h { width: 100%; max-width: none; border-radius: 0; background: #000; padding: .7rem 1rem; box-shadow: none; flex: none; justify-content: space-between; font-size: 1rem; }
.ug-live.open .ug-live-t { flex: 1; text-align: left; }
.ug-live.open .ug-live-p { flex: 1; min-height: 0; overflow: auto; width: 100%; max-height: none; border-radius: 0; box-shadow: none; padding-bottom: 2rem; }
@keyframes ug-live-grow { from { opacity: .5; transform: scale(.35); } to { opacity: 1; transform: none; } }
.ug-live-tabs { display: flex; gap: .3rem; flex-wrap: wrap; margin-bottom: .5rem; }
.ug-live-tabs button { border: 1px solid #334; background: transparent; color: #fff; border-radius: 1rem; padding: .15rem .6rem; font-size: .8rem; }
.ug-live-tabs button.on { background: #19aa5a; border-color: #19aa5a; }
.ug-live-act { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: .6rem; }
.ug-live-act a, .ug-live-act button { display: inline-flex; align-items: center; gap: .3rem; color: #fff; background: #1a2740; border: 0; border-radius: 1rem; padding: .25rem .7rem; font-size: .82rem; text-decoration: none; }
.ug-live-act .material-symbols-outlined { font-size: 18px; }
.ug-live-dot { flex: none; width: 10px; height: 10px; border-radius: 50%; background: #ff3b3b; animation: ug-pulse 1.1s ease-in-out infinite; }

/* leaderboard en direct (modale d'événement) */
.lb-head{display:flex;align-items:center;gap:.6rem;margin-bottom:.4rem}
.lb-live{color:#d62839;font-size:.75rem;font-weight:700;animation:lbp 1.6s infinite}@keyframes lbp{50%{opacity:.45}}
.lb-fin{font-size:.75rem;opacity:.7}
.lb-tabs{display:flex;gap:.3rem;margin-bottom:.4rem;flex-wrap:wrap}
.lb-tabs button{border:1px solid rgba(0,0,0,.2);background:transparent;border-radius:2rem;padding:.1rem .7rem;font-size:.8rem}
.lb-tabs button.on{background:var(--ug-green,#19aa5a);color:#fff;border-color:transparent}
.lb-t{width:100%;border-collapse:collapse;font-size:.9rem}
.lb-t th{font-size:.7rem;text-transform:uppercase;opacity:.6;font-weight:600;padding:.25rem .3rem;text-align:right}
.lb-t th:nth-child(2){text-align:left}
.lb-t td{padding:.4rem .3rem;border-top:1px solid rgba(0,0,0,.1);text-align:right;vertical-align:middle}
.lb-t td:nth-child(2){text-align:left}
.lb-r{cursor:pointer}.lb-r:hover,.lb-r.on{background:rgba(0,0,0,.04)}
.lb-pos{font-weight:700;width:2.2rem;text-align:left!important}
.lb-sc{font-weight:800;font-size:1.05rem}
.lb-who{display:flex;align-items:center;gap:.5rem}.lb-who img{width:28px;height:28px;object-fit:contain;background:#fff;border-radius:4px;border:1px solid rgba(255,255,255,.12)}
.lb-sub{font-size:.75rem;opacity:.65;font-weight:400}
.lb-d>td{padding:0!important;background:rgba(0,0,0,.03)}
.lb-scroll{overflow-x:auto;padding:.4rem}
.lb-card{border-collapse:collapse;font-size:clamp(.62rem,1.9vw,.8rem);white-space:nowrap;width:100%;table-layout:fixed}
.lb-card th,.lb-card td{padding:.2rem .1rem;overflow:hidden;text-align:center;border:1px solid rgba(255,255,255,.12)}
.lb-card th{color:#e6edf7;font-weight:600}
.lb-card th:first-child{width:clamp(78px,16vw,150px);text-overflow:ellipsis;padding-left:.4rem;text-align:left;position:sticky;left:0;background:#1a2740;color:#e6edf7}
.lb-p th{font-weight:400}.lb-na{opacity:.35}
.lb-v{display:inline-block;min-width:1.5rem;line-height:1.5rem;border-radius:50%}
.lb-u{background:#19aa5a;color:#fff}.lb-o{background:#d62839;color:#fff;border-radius:3px}
.lb-card .lb-v{min-width:0;width:1.5em;height:1.5em;line-height:1.5em;font-size:.92em;padding:0;margin:0 auto;display:block;text-align:center}
.lb-card td{overflow:visible;padding:.2rem 0}
@media(max-width:576px){.lb-card{font-size:.58rem}.lb-card th:first-child{width:62px;padding-left:.25rem}.lb-card .lb-v{width:1.45em;height:1.45em;line-height:1.45em}}

/* marqueur Leaflet par défaut : vert */
img.leaflet-marker-icon{filter:hue-rotate(-95deg) saturate(1.4)}

/* pieds de modale (signaler / partager) et icônes centrées dans les boutons */
.ug-mf { justify-content: center; gap: .75rem; }
.ug-mf-b { width: 44px; height: 44px; padding: 0; }
.modal .ug-btn { display: inline-flex; align-items: center; justify-content: center; }
.modal .ug-btn .material-symbols-outlined { display: block; line-height: 1; vertical-align: baseline; }

/* signalement ouvert par-dessus une autre modale */
#reportModal { z-index: 1070; }
.modal-backdrop ~ .modal-backdrop { z-index: 1065; }
.ug-mf .d-contents { display: contents; }
.ug-mf .ug-mf-b { text-decoration: none; }

/* proposition de géolocalisation à l'arrivée */
.ug-geoask { position: fixed; left: 50%; bottom: 20px; transform: translateX(-50%); z-index: 3000; width: min(94vw, 460px); display: flex; align-items: center; gap: .6rem; background: #111a2c; color: #fff; border: 1px solid var(--ug-green); border-radius: 14px; padding: .6rem .8rem; box-shadow: 0 6px 24px rgba(0,0,0,.45); }

/* ma position (cartes 2D et globe) */
.ug-me-w { background: none; border: 0; }
.ug-me { position: relative; width: 18px; height: 18px; margin: -9px 0 0 -9px; border-radius: 50%; background: #4285f4; border: 3px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,.5); }
.ug-me i { position: absolute; inset: -3px; border-radius: 50%; border: 2px solid rgba(66,133,244,.6); animation: ugme 2s ease-out infinite; }
@keyframes ugme { from { transform: scale(1); opacity: 1; } to { transform: scale(3); opacity: 0; } }

/* hiérarchie du menu Parcours : traits verticaux fins sous l'icône Parcours et sous chaque icône de ville */
.ug-tree { position: relative; }
.ug-tree::before { content: ''; position: absolute; left: 27px; top: 0; bottom: 0; width: 1px; background: rgba(255,255,255,.28); }
.ug-tree.ug-tree2::before { left: 52px; }
/* colonne de droite du menu : interrupteurs, chevrons, compteurs et cases alignés */
.ug-menu .ug-r { width: 2.5rem; flex: none; display: flex; align-items: center; justify-content: center; padding: 0; margin: 0; min-height: 0; }
.ug-menu .form-switch.ug-r .form-check-input { margin: 0; float: none; }

/* bouton « globe 3D » (carte pays) : entre le zoom − et le bouton d'ajout */
.ug-globe-btn { position: fixed; right: 14px; bottom: 102px; z-index: 1040; width: 52px; height: 52px; padding: 0; border: 0; border-radius: 50%; background: transparent; display: block; overflow: hidden; cursor: pointer; box-shadow: 0 3px 10px rgba(0,0,0,.45); }
.ug-globe-btn:hover { transform: scale(1.06); }
.ug-globe-btn { background: #0b3d6b; }
/* vrai petit globe : texture satellite qui tourne d'ouest en est, alvéoles et ombrage sphérique par-dessus */
.ug-gb-map { position: absolute; inset: 0; border-radius: 50%; background: url(../img/earth-blue-marble.jpg) var(--gx, 0) 0 / auto 100% repeat-x; animation: ug-gb-spin 40s linear infinite; }
@keyframes ug-gb-spin { to { background-position-x: calc(var(--gx, 0px) + 104px); } }
.ug-globe-btn::after { content: ''; position: absolute; inset: 0; border-radius: 50%; pointer-events: none;
  background: radial-gradient(circle at 35% 30%, rgba(255,255,255,.55), rgba(255,255,255,0) 45%), radial-gradient(circle at 50% 50%, rgba(0,0,0,0) 55%, rgba(0,0,0,.45) 100%), url(../img/dimples-tile.png) 0 0 / 14px auto;
  mix-blend-mode: normal; opacity: .9; }
@media (prefers-reduced-motion: reduce) { .ug-gb-map { animation: none; } }
body.has-globe-btn .ug-zoom { bottom: 164px; }
/* palmarès France : couleurs des puces (pleines, lisibles aussi en thème sombre) */
.pal-chips .btn.pal-fcpt { --c: #019AFF; }
.pal-chips .btn.pal-cf { --c: #02178F; }
.pal-chips .btn.pal-fcpt, .pal-chips .btn.pal-cf { background: var(--c); border: 2px solid var(--c); color: #fff; opacity: .7; }
.pal-chips .btn.pal-fcpt:hover, .pal-chips .btn.pal-cf:hover { opacity: 1; color: #fff; background: var(--c); border-color: var(--c); }
.pal-chips .btn.pal-fcpt.active, .pal-chips .btn.pal-cf.active { opacity: 1; color: #fff; background: var(--c); border-color: #fff; }

/* globe miniature réel (globe.gl) : recouvre le globe CSS une fois prêt */
.ug-gb-live { position: absolute; inset: 0; border-radius: 50%; overflow: hidden; opacity: 0; transition: opacity .4s; pointer-events: none; }
.ug-gb-live canvas { pointer-events: none; }
.ug-globe-btn.live .ug-gb-live { opacity: 1; }
.ug-globe-btn.live .ug-gb-map, .ug-globe-btn.live::after { opacity: 0; transition: opacity .4s; }
/* en-têtes de modales compacts */
.modal-header { padding: .5rem 1rem; }
.modal-header .btn-close { margin: -.25rem -.25rem -.25rem auto; padding: .5rem; }
.modal-title.h5, .modal-header .h5 { font-size: 1.1rem; line-height: 1.25; }

/* palmarès : trait vertical sous l'icône du titre (comme la hiérarchie du menu) */
.pal-tree { position: relative; }
.pal-tree::before { content: ''; position: absolute; left: 12px; top: 0; bottom: 0; width: 1px; background: rgba(255,255,255,.28); }
.pal-tree > .list-group-item { padding-left: 2.25rem; }

/* croix « fermer » : blanc opaque sur fond foncé, noir sur fond clair */
.btn-close { opacity: 1; }
.btn-close:hover { opacity: .8; }

/* palmarès : boutons précédent / suivant verts, chevrons centrés */
.pal-nav { background: #19aa5a; border: 0; color: #fff; display: inline-flex; align-items: center; justify-content: center; padding: 0; width: 2.25rem; flex: none; }
.pal-nav:hover, .pal-nav:focus-visible { background: #148a49; color: #fff; }
.pal-nav:disabled { background: #19aa5a; color: #fff; opacity: .35; }
.pal-nav .material-symbols-outlined { font-size: 1.5rem; line-height: 1; display: block; }

/* boutons d'ajout (événement, entité, parcours) regroupés en bas à gauche */
#addEntity { right: auto; left: 74px; }
.ug-fab-3 { right: auto; left: 134px; }

/* boutons : icône et texte alignés sur la même ligne */
.btn:has(> .material-symbols-outlined):not(.btn-close):not(.btn-link) { display: inline-flex; align-items: center; justify-content: center; gap: .3rem; }
.btn > .material-symbols-outlined { line-height: 1; }
.btn-sm > .material-symbols-outlined { font-size: 1.2rem; }
.ug-ev-head .modal-title .material-symbols-outlined { font-size: 1.4rem; }

/* boutons d'ajout alignés en bas à gauche : entité, événement, parcours, globe 3D */
#addEntity { right: auto; left: 14px; }
.ug-fab-left { left: 74px; }
.ug-fab-3 { left: 134px; }
.ug-globe-btn { right: 14px; left: auto; bottom: 44px; }
body.has-globe-btn .ug-zoom { bottom: 108px; }
/* bouton « partie amicale » : même taille que le bouton menu */
.ug-nav #ugMenu > #ugPlay, .ug-nav #ugMenu > #ugPal { width: 52px; height: 52px; padding: 0; }
.ug-nav #ugMenu > #ugPlay .material-symbols-outlined, .ug-nav #ugMenu > #ugPal .material-symbols-outlined { font-size: 30px; }

/* attribution des cartes : réduite au minimum (© OpenStreetMap reste visible, la licence l'exige) */
.leaflet-control-attribution { font-size: 9px !important; line-height: 1.2 !important; padding: 0 3px !important; background: rgba(255,255,255,.55) !important; }

/* fiches d'ajout sur la page d'un pays : panneau fixé en bas, 50 % de la hauteur, la carte principale reste visible et utilisable */
.modal.ug-sheet { pointer-events: none; }
.modal.ug-sheet .modal-dialog { pointer-events: auto; position: fixed; left: 0; right: 0; bottom: 0; margin: 0 auto; width: 100%; max-width: 720px; height: 50vh; min-height: 0 !important; max-height: 50vh; transform: none !important; }
.modal.ug-sheet .modal-content { height: 100%; max-height: 100%; border-radius: .8rem .8rem 0 0; box-shadow: 0 -4px 18px rgba(0,0,0,.5); }

/* boutons réduire / plein écran des panneaux du bas */
.ug-sc { background: none; border: 0; color: #fff; padding: 0; width: 32px; height: 32px; display: inline-flex; align-items: center; justify-content: center; margin-left: auto; border-radius: .4rem; opacity: .9; }
.ug-sc ~ .ug-sc { margin-left: .1rem; }
.modal-header .ug-sc ~ .btn-close { margin-left: .4rem; }
.ug-sc:hover { background: rgba(255,255,255,.18); opacity: 1; }
.ug-crs.ug-min, .ug-game.ug-min { height: auto; }
.ug-crs.ug-min .ug-crs-b, .ug-crs.ug-min .ug-crs-f, .ug-game.ug-min .ug-game-b { display: none; }
.ug-crs.ug-max, .ug-game.ug-max { height: 100dvh; max-height: 100dvh; }
.modal.ug-sheet.ug-min .modal-dialog, .modal.ug-sheet.ug-min .modal-content { height: auto; }
.modal.ug-sheet.ug-min .modal-body, .modal.ug-sheet.ug-min .modal-footer { display: none; }
.modal.ug-sheet.ug-max .modal-dialog { height: 100dvh; max-height: 100dvh; }
.modal.ug-sheet.ug-max .modal-content { border-radius: .8rem .8rem 0 0; }

/* les panneaux du bas reposent sur le haut du pied de page (28 px) */
.ug-crs.ug-crs, .ug-game.ug-game { bottom: 28px; }
.modal.ug-sheet .modal-dialog { bottom: 28px; }
.ug-crs.ug-max, .ug-game.ug-max { height: calc(100dvh - 28px); max-height: calc(100dvh - 28px); }
.modal.ug-sheet.ug-max .modal-dialog { height: calc(100dvh - 28px); max-height: calc(100dvh - 28px); }

.ug-zoom-btn.on { background: #19aa5a; color: #fff; }

/* carte en noir et blanc hors du pays courant (la copie en couleur est découpée sur le pays) ; curseur de zoom plus foncé */
#map .leaflet-tile-pane { filter: grayscale(1); }
.ug-zoom-range::-webkit-slider-runnable-track { background: rgba(0,0,0,.55); }
.ug-zoom-range::-moz-range-track { background: rgba(0,0,0,.55); }

/* Play d'un parcours : gris, vert seulement si une partie est en cours */
.ug-play { color: #8b95a5 !important; }
.ug-play.on { color: #19aa5a !important; }

/* boutons de fond de carte : trois largeurs égales */
#ugBaseOpt .btn-group > .btn { flex: 1 1 0; width: 0; padding-left: .25rem; padding-right: .25rem; }

/* boutons principaux : 50 px, à 8 px du bord de l'écran (en bas : 8 px au-dessus du pied de page de 28 px) */
.ug-fab { width: 50px; height: 50px; right: 8px; bottom: 36px; }
#addEntity.ug-fab { right: auto; left: 8px; }
.ug-fab.ug-fab-left { right: auto; left: 66px; }
.ug-fab.ug-fab-3 { right: auto; left: 124px; }
.ug-globe-btn { width: 50px; height: 50px; right: 8px; left: auto; bottom: 36px; }
.ug-zoom { right: 8px; width: 50px; }
body.has-globe-btn .ug-zoom { bottom: 98px; }
.ug-nav > .container-fluid { padding-left: 8px; padding-right: 8px; }
.ug-nav #ugMenu > .dropdown > .ug-btn, .ug-nav #ugMenu > #ugPlay, .ug-nav #ugMenu > #ugPal { width: 50px; height: 50px; padding: 0; }
#ugMenu > .dropdown > .ug-btn { width: 50px; }
