/* Sorts des monstres (assets/sorts.js) */
.so { --so-po: #4f8ef7; --so-zone: #ff5c61; --so-pm: #4ade80; --so-cible: #ffc35c;
  --so-sol: #1a2c40; --so-sol2: #172739; --so-trait: #26405a; --so-vide: #070d14;
  --so-neutre: #b4bcc6; --so-terre: #c9924f; --so-feu: #ff7a45; --so-eau: #4fb0ff; --so-air: #4ade80;
  display: flex; flex-direction: column; gap: 10px; container-type: inline-size; }
.so [hidden] { display: none !important; }
.so kbd { font: 700 11px ui-monospace, monospace; padding: 1px 6px; border-radius: 5px; background: var(--inset); color: var(--mut); border: 1px solid var(--line); }

/* Recherche */
.so-haut { display: flex; flex-direction: column; gap: 8px; }
.so-cherche { position: relative; max-width: 640px; }
.so-loupe { position: absolute; left: 15px; top: 50%; transform: translateY(-52%); color: var(--or); font-size: 20px; pointer-events: none; }
.so-cherche input { width: 100%; padding: 10px 48px 10px 42px; border-radius: 14px; border: 1px solid var(--line); background: var(--card); color: var(--txt); font-size: 16px; font-weight: 600; }
.so-cherche input:focus { outline: none; border-color: rgba(245,166,35,.55); box-shadow: 0 0 0 4px rgba(245,166,35,.12); }
.so-cherche > kbd { position: absolute; right: 14px; top: 50%; transform: translateY(-50%); pointer-events: none; }
.so-cherche input:focus ~ kbd { display: none; }
.so-res { position: absolute; z-index: 40; left: 0; right: 0; top: calc(100% + 6px); padding: 6px; border-radius: 14px; background: var(--card-hi); border: 1px solid var(--line);
  box-shadow: 0 18px 40px rgba(0,0,0,.45); max-height: min(62vh, 480px); overflow: auto; scrollbar-width: thin; animation: so-apparait .15s ease-out; }
.so-r { display: flex; align-items: center; gap: 12px; width: 100%; padding: 7px 10px; border: 0; border-radius: 10px; background: none; color: var(--txt); text-align: left; cursor: pointer; }
.so-r:hover, .so-r.actif { background: rgba(255,255,255,.06); }
.so-r.actif { box-shadow: inset 3px 0 0 var(--or); }
.so-r-img { display: grid; place-items: center; width: 40px; height: 40px; flex: none; border-radius: 10px; background: var(--inset); color: var(--mut); }
.so-r-img img { width: 36px; height: 36px; object-fit: contain; }
.so-r-t { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.so-r-t b { font-size: 14px; font-weight: 800; }
.so-r-t small { font-size: 12px; color: var(--mut); font-weight: 700; }
.so-r-vide { margin: 0; padding: 12px; color: var(--mut); font-size: 14px; }
.so-tag { font-style: normal; flex: none; padding: 2px 8px; border-radius: 99px; font-size: 11px; font-weight: 800; letter-spacing: .03em;
  background: rgba(245,166,35,.15); color: var(--or-hi); }
.so-tag.dj { background: rgba(79,142,247,.16); color: #8db8ff; }

.so-recents { display: flex; gap: 6px; align-items: center; overflow-x: auto; scrollbar-width: none; padding-bottom: 2px; }
.so-recents:empty { display: none; }
.so-recents > span { font: 600 11px var(--f-titre); letter-spacing: .08em; text-transform: uppercase; color: var(--mut2); margin-right: 4px; flex: none; }
.so-recent { flex: none; display: inline-flex; align-items: center; gap: 6px; padding: 4px 12px 4px 5px; border-radius: 99px; border: 1px solid var(--line);
  background: var(--card); color: #a9b6c4; font-size: 13px; font-weight: 700; cursor: pointer; }
.so-recent img { width: 24px; height: 24px; object-fit: contain; }
.so-recent i { font-style: normal; display: grid; place-items: center; width: 24px; height: 24px; color: var(--mut); }
.so-recent:hover { color: #fff; border-color: rgba(245,166,35,.35); }
.so-recent.on { background: rgba(245,166,35,.15); border-color: rgba(245,166,35,.4); color: #fff; }

/* Accueil */
.so-accueil { padding: 20px; border-radius: 16px; border: 1px solid var(--line);
  background: radial-gradient(120% 140% at 100% 0, rgba(79,142,247,.12), transparent 55%), radial-gradient(90% 120% at 0 100%, rgba(255,92,97,.1), transparent 60%), var(--card); }
.so-accueil-t { font: 600 22px/1.3 var(--f-titre); max-width: 560px; }
.so-accueil-t b { color: var(--or-hi); font-weight: 600; }
.so-pas { list-style: none; margin: 16px 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.so-pas li { display: flex; gap: 12px; align-items: center; padding: 14px; border-radius: 14px; background: var(--inset); border: 1px solid var(--line); font-size: 14px; font-weight: 700; color: #c3cdd8; }
.so-pas b { display: grid; place-items: center; width: 30px; height: 30px; flex: none; border-radius: 9px; background: rgba(245,166,35,.16); color: var(--or-hi); font: 700 15px var(--f-titre); }
.so-pas em { font-style: normal; color: #fff; }
.so-pas em.po { color: #8db8ff; } .so-pas em.zo { color: #ff9497; }
.so-ex { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.so-ex > span { font-size: 13px; color: var(--mut); font-weight: 700; margin-right: 2px; }
.so-ex .ad12-chip:hover { color: #fff; border-color: rgba(245,166,35,.4); }
.so-attente { display: flex; align-items: center; gap: 10px; padding: 40px 0; color: var(--mut); font-weight: 700; }
.so-attente span { width: 18px; height: 18px; border-radius: 50%; border: 2px solid rgba(245,166,35,.25); border-top-color: var(--or); animation: so-tourne .7s linear infinite; }
@keyframes so-tourne { to { transform: rotate(360deg); } }
@keyframes so-apparait { from { opacity: 0; transform: translateY(4px); } }
.so-erreur { padding: 30px 0; color: var(--mut); }

/* Mise en page : panneau à gauche, carte collante à droite */
.so-grille { display: grid; grid-template-columns: minmax(320px, 410px) minmax(0, 1fr); grid-template-rows: auto auto 1fr;
  grid-template-areas: "tete carte" "sorts carte" "fiche carte"; gap: 10px 14px; align-items: start; animation: so-apparait .2s ease-out; }
.so-tete { grid-area: tete; } .so-sorts-b { grid-area: sorts; } .so-fiche { grid-area: fiche; }
.so-carte-l { grid-area: carte; position: sticky; top: calc(16px + var(--barre-wp)); min-width: 0; }
.so-bloc { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 10px 12px 12px; }
.so-bloc > h4 { display: flex; align-items: center; margin: 0 0 8px; font: 600 14px var(--f-titre); }
.so-bloc > h4 span { margin-left: auto; font: 700 11px var(--f-txt); color: var(--mut2); }
.so-vide { margin: 0; font-size: 13px; color: var(--mut); }

/* Monstre */
.so-tete { padding: 12px; border-radius: 14px; border: 1px solid var(--line);
  background: linear-gradient(160deg, rgba(245,166,35,.1), transparent 45%), var(--card); display: flex; flex-direction: column; gap: 8px; }
.so-dj { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 800; color: #8db8ff; }
.so-dj i { font-style: normal; } .so-dj small { color: var(--mut); font-weight: 700; }
.so-id { display: flex; align-items: center; gap: 12px; }
.so-portrait { position: relative; display: grid; place-items: center; width: 58px; height: 58px; flex: none; border-radius: 15px;
  background: radial-gradient(circle at 50% 70%, rgba(255,255,255,.1), transparent 70%), var(--inset); border: 1px solid var(--line); }
.so-portrait.boss { border-color: rgba(245,166,35,.45); box-shadow: 0 0 0 4px rgba(245,166,35,.08), 0 8px 26px rgba(245,166,35,.15); }
.so-portrait img { width: 52px; height: 52px; object-fit: contain; filter: drop-shadow(0 4px 6px rgba(0,0,0,.5)); }
.so-id-t { min-width: 0; }
.so-id-t h2 { margin: 0 0 4px; font: 700 19px/1.15 var(--f-titre); }
.so-id-tags { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.so-grade-b, .so-partager { padding: 3px 10px; border-radius: 99px; border: 1px solid var(--line); background: var(--inset); color: #c3cdd8; font-size: 12px; font-weight: 800; cursor: pointer; }
.so-grade-b.fixe { cursor: default; }
.so-grade-b span { color: var(--mut); font-size: 10px; display: inline-block; transition: transform .15s; }
.so-grade-b[aria-expanded=true] span { transform: rotate(180deg); }
.so-grade-b:not(.fixe):hover, .so-partager:hover { border-color: rgba(245,166,35,.4); color: #fff; }
.so-partager { background: none; color: var(--mut); }
.so-partager.fait { color: var(--ok); border-color: rgba(74,222,128,.4); }
.so-grades { display: flex; gap: 4px; padding: 4px; border-radius: 12px; background: var(--inset); border: 1px solid var(--line); animation: so-apparait .15s ease-out; }
.so-grades button { flex: 1; display: flex; flex-direction: column; align-items: center; padding: 5px 0; border: 0; border-radius: 9px; background: none; color: var(--mut); cursor: pointer; }
.so-grades button b { font: 700 15px var(--f-titre); color: var(--txt); }
.so-grades button small { font-size: 10px; font-weight: 800; }
.so-grades button:hover { background: rgba(255,255,255,.05); }
.so-grades button[aria-pressed=true] { background: var(--or); color: #1a1004; } .so-grades button[aria-pressed=true] b { color: #1a1004; }
.so-stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(54px, 1fr)); gap: 5px; }
.so-stat { padding: 5px 4px 4px; border-radius: 9px; background: var(--inset); text-align: center; }
.so-stat b { display: block; font: 700 15px/1.1 var(--f-titre); }
.so-stat small { font-size: 10px; font-weight: 800; color: var(--mut2); letter-spacing: .05em; text-transform: uppercase; }
.so-stat.pv b { color: #ff9497; } .so-stat.pa b { color: #8db8ff; } .so-stat.pm b { color: var(--ok); }
.so-resist { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 5px; }
.so-re { position: relative; padding: 3px 4px 6px; border-radius: 9px; background: var(--inset); text-align: center; overflow: hidden; border: 1px solid transparent; }
.so-re span { display: block; font-size: 10px; font-weight: 800; color: var(--c); letter-spacing: .03em; }
.so-re b { font: 700 13px var(--f-titre); }
.so-re i { position: absolute; left: 0; bottom: 0; height: 3px; width: var(--v); background: var(--c); opacity: .8; }
.so-re.neg b { color: #ff9497; }
.so-re.faible { border-color: var(--c); background: color-mix(in srgb, var(--c) 14%, var(--inset)); }
.so-faible { grid-column: 1 / -1; margin: 2px 0 0; font-size: 12px; font-weight: 700; color: var(--mut); }
.so-faible b { color: var(--c); font-weight: 800; } .so-faible span { color: var(--mut2); }

/* Sorts */
.so-sorts { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 5px; }
.so-sort { position: relative; display: flex; align-items: center; gap: 9px; min-width: 0; padding: 5px 8px 5px 5px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--inset); color: var(--txt); text-align: left; cursor: pointer; transition: border-color .15s, background .15s, transform .1s; }
.so-sort:hover { border-color: rgba(245,166,35,.35); }
.so-sort:active { transform: scale(.98); }
.so-sort[aria-pressed=true] { border-color: var(--or); background: linear-gradient(150deg, rgba(245,166,35,.2), rgba(245,166,35,.05)); box-shadow: 0 6px 18px rgba(245,166,35,.15); }
.so-ico { position: relative; width: 32px; height: 32px; flex: none; border-radius: 10px; background: rgba(0,0,0,.25); }
.so-ico img { width: 32px; height: 32px; object-fit: contain; border-radius: 10px; }
.so-ico b { position: absolute; right: -5px; bottom: -5px; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 9px; display: grid; place-items: center;
  background: #2f6fd8; color: #fff; font: 700 10px var(--f-titre); border: 2px solid var(--inset); }
.so-sort-t { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.so-sort-t > span { font-size: 13px; font-weight: 800; line-height: 1.2; overflow: hidden; text-overflow: ellipsis; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.so-sort-t small { font-size: 11px; font-weight: 700; color: var(--mut); white-space: nowrap; }
.so-sort-t small em { font-style: normal; color: var(--c); margin-left: 3px; }
.so-sort kbd { position: absolute; top: 4px; right: 5px; padding: 0 4px; font-size: 9px; opacity: .7; }

/* Fiche du sort */
.so-fiche-vide { font-size: 14px; color: var(--mut); }
.so-fiche-vide b { color: var(--ok); }
.so-fiche > .so-bloc { animation: so-apparait .18s ease-out; }
.so-fiche-h { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
.so-fiche-h img { width: 36px; height: 36px; object-fit: contain; border-radius: 11px; background: rgba(0,0,0,.25); }
.so-fiche-h h3 { margin: 0; font: 700 16px/1.2 var(--f-titre); }
.so-badges { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 6px; }
.so-badge { padding: 3px 9px; border-radius: 99px; background: var(--inset); border: 1px solid var(--line); font-size: 12px; font-weight: 700; color: #c3cdd8; white-space: nowrap; }
.so-badge b { font: 700 13px var(--f-titre); color: #fff; }
.so-badge small { color: var(--mut); font-size: 10px; }
.so-badge.pa { background: rgba(47,111,216,.22); border-color: rgba(79,142,247,.4); }
.so-badge.po { background: rgba(79,142,247,.12); border-color: rgba(79,142,247,.3); }
.so-badge.fort { background: rgba(245,166,35,.14); border-color: rgba(245,166,35,.35); color: var(--or-hi); } .so-badge.fort b { color: var(--or-hi); }
.so-badge.cd { color: #ffb4b6; border-color: rgba(255,92,97,.3); }
.so-badge.non { color: var(--mut2); text-decoration: line-through; }
.so-desc { margin: 0 0 6px; font-size: 13px; color: var(--mut); font-style: italic; }
.so-st { display: flex; align-items: baseline; gap: 8px; margin: 8px 0 4px; font: 600 11px var(--f-titre); letter-spacing: .08em; text-transform: uppercase; color: var(--mut2); }
.so-st span { font: 700 11px var(--f-txt); letter-spacing: 0; text-transform: none; color: var(--mut2); opacity: .8; }
.so-effet { display: flex; align-items: center; gap: 8px; width: 100%; padding: 4px 6px; border: 1px solid transparent; border-radius: 10px; background: none; color: var(--txt); text-align: left; }
button.so-effet { cursor: pointer; }
button.so-effet:hover { background: rgba(255,255,255,.04); }
.so-effet[aria-pressed=true] { border-color: rgba(255,92,97,.55); background: rgba(255,92,97,.08); }
.so-effet-t { flex: 1; min-width: 0; }
.so-effet-t b { font-size: 14px; font-weight: 700; }
.so-effet.dg .so-effet-t b { color: var(--c); font-weight: 800; }
.so-effet-t small { display: block; font-size: 11px; color: var(--mut2); font-weight: 600; }
.so-duree { font-size: 11px; font-weight: 800; color: var(--or-hi); background: rgba(245,166,35,.12); padding: 1px 6px; border-radius: 6px; margin-left: 4px; white-space: nowrap; }
.so-mini { width: 46px; height: 31px; flex: none; }
.so-mini .m { fill: var(--so-sol); stroke: var(--so-trait); stroke-width: .5; }
.so-mini .m.z { fill: var(--so-zone); stroke: color-mix(in srgb, var(--so-zone) 60%, #000); }
.so-mini .m.o { stroke: var(--so-cible); stroke-width: 1.2; }
.so-crit { margin-top: 8px; border-top: 1px solid var(--line); padding-top: 8px; }
.so-crit summary { cursor: pointer; font-size: 13px; font-weight: 800; color: var(--mut); }
.so-crit summary em { font-style: normal; color: var(--or-hi); margin-left: 4px; }

/* Carte */
.so-carte-c { display: flex; flex-direction: column; gap: 8px; padding: 8px; border-radius: 14px; border: 1px solid var(--line); background: var(--card); }
.so-salle { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.so-salle .so-select { flex: 1; min-width: 200px; }
.so-salle .so-note { flex-basis: 100%; }
.so-select { display: flex; align-items: center; gap: 10px; padding: 4px 4px 4px 12px; border-radius: 12px; background: var(--inset); border: 1px solid var(--line); }
.so-select:focus-within { border-color: rgba(245,166,35,.5); }
.so-select span { font: 600 11px var(--f-titre); letter-spacing: .08em; text-transform: uppercase; color: var(--mut2); }
.so-select select { flex: 1; min-width: 0; padding: 5px 8px; border: 0; background: none; color: var(--txt); font-size: 14px; font-weight: 700; color-scheme: dark; cursor: pointer; }
.so-select select:focus { outline: none; }
.so-note { margin: 0 2px; font-size: 12px; color: var(--mut2); }
.so-note:empty { display: none; }
.so-equipe { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.so-membre { display: inline-flex; align-items: center; border-radius: 99px; border: 1px solid var(--line); background: var(--inset); overflow: hidden; font-size: 12px; font-weight: 700; }
.so-membre > span, .so-membre button { display: inline-flex; align-items: center; gap: 5px; padding: 2px 10px 2px 3px; border: 0; background: none; color: #c3cdd8; font: inherit; cursor: pointer; }
.so-membre img { width: 24px; height: 24px; object-fit: contain; }
.so-membre button.suppr { padding: 2px 9px; color: var(--mut); border-left: 1px solid var(--line); }
.so-membre button.suppr:hover { color: #ff9497; }
.so-membre button:not(.suppr):hover { color: #fff; }
.so-membre.actif { border-color: rgba(245,166,35,.55); background: rgba(245,166,35,.12); }
.so-membre.actif > span { color: #fff; cursor: default; }
.so-ajout { position: relative; display: inline-flex; padding: 5px 12px; border-radius: 99px; border: 1px dashed rgba(255,255,255,.18); color: var(--mut); font-size: 12px; font-weight: 800; cursor: pointer; }
.so-ajout:hover { color: #fff; border-color: rgba(245,166,35,.5); }
.so-ajout select { position: absolute; inset: 0; opacity: 0; cursor: pointer; color-scheme: dark; }
.so-barre { display: flex; flex-wrap: wrap; gap: 8px; justify-content: space-between; align-items: center; }
.so-seg { display: inline-flex; padding: 3px; border-radius: 12px; background: var(--inset); border: 1px solid var(--line); }
.so-seg button { display: inline-flex; align-items: center; gap: 5px; padding: 5px 10px; border: 0; border-radius: 9px; background: none; color: var(--mut); font-size: 13px; font-weight: 800; cursor: pointer; }
.so-seg button i { font-style: normal; font-size: 12px; }
.so-seg button:hover { color: #fff; }
.so-seg button[aria-pressed=true] { background: var(--or); color: #1a1004; }
.so-bascules { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.so-bascule { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 99px; border: 1px solid var(--line); background: none; color: var(--mut); font-size: 12px; font-weight: 800; cursor: pointer; }
.so-bascule i { font-style: normal; width: 10px; height: 10px; border-radius: 3px; background: var(--mut2); opacity: .5; }
.so-bascule i.pm { background: var(--so-pm); } .so-bascule i.dp { border-radius: 50%; background: linear-gradient(90deg, #ff5c61 50%, #4f8ef7 50%); }
.so-bascule i.vg { background: var(--so-sol); border: 1px solid #3a5878; border-radius: 2px; transform: rotate(45deg) scale(.85); }
.so-bascule i.zm { width: auto; height: auto; background: none; font-size: 13px; line-height: 1; }
.so-bascule[aria-pressed=true] { color: #fff; border-color: rgba(255,255,255,.18); background: rgba(255,255,255,.05); }
.so-bascule[aria-pressed=true] i { opacity: 1; }
.so-bascule:hover { color: #fff; }
.so-effacer { color: #ff9497; border-color: rgba(255,92,97,.3); }

/* Aide rappelée au-dessus de la carte (masquable, le « ? » la rouvre) */
.so-aide { position: relative; display: flex; align-items: center; gap: 8px; padding: 7px 34px 7px 10px; border-radius: 11px; background: rgba(245,166,35,.08); border: 1px solid rgba(245,166,35,.22); }
.so-aide ol { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: 12px; font-weight: 700; color: #c3cdd8; }
.so-aide li b { display: inline-grid; vertical-align: 1px; margin-right: 5px; }
.so-aide li b { place-items: center; width: 18px; height: 18px; flex: none; border-radius: 6px; background: rgba(245,166,35,.2); color: var(--or-hi); font: 700 11px var(--f-titre); }
.so-aide em { font-style: normal; } .so-aide em.po { color: #8db8ff; } .so-aide em.zo { color: #ff9497; }
.so-aide-x { position: absolute; top: 4px; right: 6px; width: 24px; height: 24px; border: 0; border-radius: 7px; background: none; color: var(--mut); font-size: 16px; cursor: pointer; }
.so-aide-x:hover { color: #fff; background: rgba(255,255,255,.06); }

/* Réglages de la carte (salle, équipe, aide, outils) : à leur place hors plein écran. */
.so-pc { display: flex; flex-direction: column; gap: 8px; }
.so-grip { display: none; }
.so-sort.aucun .so-ico { display: grid; place-items: center; color: var(--mut); font: 700 18px var(--f-titre); }
.so-sort.aucun[aria-pressed=true] .so-ico { color: var(--ok); }

/* Plein écran : la carte seule, panneaux flottants déplaçables par leur poignée (⠿). */
html.so-fige { overflow: hidden; }
.so-hud { display: none; }
.so.grand .so-grille { position: fixed; inset: 0; z-index: 1000; display: block; padding: 0; background: var(--so-vide); animation: none; }
.so.grand :is(.so-tete, .so-sorts-b, .so-fiche, .so-aide, .so-legende, #so-outils, #so-aide-b, #so-grand, .so-note) { display: none !important; }
.so.grand .so-carte-l { position: absolute; inset: 0; }
.so.grand .so-carte-c { height: 100%; margin: 0; padding: 0; border: 0; border-radius: 0; background: none; }
.so.grand .so-carte-f { flex: 1; min-height: 0; border-radius: 0; }
.so.grand .so-carte { width: 100%; height: 100%; max-height: none; }
.so.grand .so-info { position: absolute; left: 50%; bottom: 90px; transform: translateX(-50%); max-width: calc(100% - 20px); border-radius: 99px; border: 1px solid var(--line); background: rgba(9,17,26,.85); }
.so.grand .so-hud { display: block; position: absolute; inset: 0; pointer-events: none; }
.so-hud > * { pointer-events: auto; }
.so.grand .so-flot { position: absolute; z-index: 5; border-radius: 14px; background: rgba(9,17,26,.84); border: 1px solid var(--line); backdrop-filter: blur(8px); box-shadow: 0 10px 30px rgba(0,0,0,.35); }
.so.grand .so-flot.libre { right: auto; bottom: auto; transform: none; }
.so.grand .so-flot.tire { opacity: .85; box-shadow: 0 16px 40px rgba(0,0,0,.55); }
.so.grand .so-grip { display: grid; place-items: center; position: absolute; left: 2px; top: 50%; transform: translateY(-50%); width: 16px; height: 30px; border-radius: 6px;
  color: var(--mut2); font-size: 14px; cursor: grab; touch-action: none; user-select: none; }
.so.grand .so-grip:hover { color: #fff; background: rgba(255,255,255,.06); }
.so.grand .so-flot.tire .so-grip { cursor: grabbing; }
.so.grand .so-pc { top: 12px; right: 130px; max-width: min(640px, calc(100vw - 520px)); padding: 7px 10px 7px 22px; gap: 6px; }
.so.grand .so-salle .so-select { min-width: 160px; }
.so-hud-fiche { top: 12px; left: 12px; width: min(340px, 70vw); padding: 10px 12px 10px 22px; }
.so.grand .so-hud-fiche .so-grip { top: 18px; transform: none; }
.so-hud-m { display: flex; align-items: center; gap: 8px; }
.so-hud-m img { width: 34px; height: 34px; object-fit: contain; }
.so-hud-m b { display: block; font: 700 14px/1.1 var(--f-titre); }
.so-hud-m small { font-size: 11px; font-weight: 700; color: var(--mut); }
.so-hud-s { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--line); font-size: 13px; }
.so-hud-s > b { font: 700 14px var(--f-titre); margin-right: 4px; }
.so-hud-s small { color: var(--mut); font-weight: 700; }
.so-hud-s .so-badge { padding: 1px 7px; font-size: 11px; }
.so-hud-s ul { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-direction: column; gap: 2px; max-height: 30vh; overflow: auto; }
.so-hud-s li { font-size: 12px; font-weight: 700; color: #c3cdd8; }
.so-hud-s li.dg { color: var(--c); font-weight: 800; }
.so-hud-b { position: absolute; top: 12px; right: 12px; display: inline-flex; align-items: center; gap: 4px; padding: 8px 14px; border-radius: 99px; border: 1px solid var(--line); background: rgba(9,17,26,.82); color: var(--txt); font-size: 13px; font-weight: 800; cursor: pointer; backdrop-filter: blur(8px); }
.so-hud-b:hover { border-color: rgba(245,166,35,.5); }
.so-hud-bas { left: 50%; bottom: 12px; transform: translateX(-50%); max-width: calc(100% - 24px); display: flex; align-items: center; gap: 6px; padding: 5px 5px 5px 22px; border-radius: 18px !important; }
.so-hud-outils, .so-hud-sorts { display: flex; gap: 4px; }
.so-hud-outils { padding-right: 6px; border-right: 1px solid var(--line); }
.so-hud-sorts { min-width: 0; overflow-x: auto; scrollbar-width: none; }
.so-hud-outils button { width: 44px; height: 50px; border: 0; border-radius: 11px; background: none; color: var(--mut); font-size: 17px; cursor: pointer; }
.so-hud-outils button:hover { color: #fff; background: rgba(255,255,255,.06); }
.so-hud-outils button[aria-pressed=true] { background: var(--or); color: #1a1004; }
.so-hs { position: relative; flex: none; width: 50px; height: 50px; padding: 3px; border: 2px solid transparent; border-radius: 12px; background: rgba(255,255,255,.04); cursor: pointer; transition: transform .1s, border-color .15s; }
.so-hs img { width: 40px; height: 40px; object-fit: contain; border-radius: 8px; display: block; }
.so-hs > i { display: grid; place-items: center; width: 40px; height: 40px; font: 700 16px var(--f-titre); font-style: normal; color: var(--txt); }
.so-hs.aucun > i { color: var(--mut); font-size: 20px; }
.so-hs.aucun[aria-pressed=true] > i { color: var(--ok); }
.so-hs:hover { transform: translateY(-2px); border-color: rgba(245,166,35,.4); }
.so-hs[aria-pressed=true] { border-color: var(--or); background: rgba(245,166,35,.18); box-shadow: 0 0 14px rgba(245,166,35,.35); }
.so-hs b { position: absolute; right: 1px; bottom: 1px; min-width: 16px; height: 16px; padding: 0 3px; border-radius: 8px; display: grid; place-items: center; background: #2f6fd8; color: #fff; font: 700 9px var(--f-titre); }
.so-hs kbd { position: absolute; left: 2px; top: 1px; padding: 0 3px; font-size: 9px; border: 0; background: rgba(0,0,0,.55); color: #fff; }

/* Menu du clic droit */
.so-menu { position: fixed; z-index: 1100; min-width: 210px; max-width: 280px; max-height: 70vh; overflow: auto; padding: 5px; border-radius: 12px;
  background: var(--card-hi); border: 1px solid rgba(255,255,255,.1); box-shadow: 0 18px 40px rgba(0,0,0,.5); animation: so-apparait .1s ease-out; scrollbar-width: thin; }
.so-menu-t { padding: 6px 10px 4px; font: 600 11px var(--f-titre); letter-spacing: .06em; text-transform: uppercase; color: var(--mut2); }
.so-menu-s { padding: 8px 10px 3px; font-size: 11px; font-weight: 800; color: var(--mut2); border-top: 1px solid var(--line); margin-top: 4px; }
.so-menu hr { border: 0; border-top: 1px solid var(--line); margin: 4px 0; }
.so-menu button { display: flex; align-items: center; gap: 8px; width: 100%; padding: 7px 10px; border: 0; border-radius: 8px; background: none; color: var(--txt); font-size: 13px; font-weight: 700; text-align: left; cursor: pointer; }
.so-menu button:hover { background: rgba(245,166,35,.14); }
.so-menu button span { flex: 1; min-width: 0; }
.so-menu button img { width: 22px; height: 22px; object-fit: contain; }
.so-menu button kbd { font-size: 10px; }
.so-menu button.on { color: var(--or-hi); }
.so-menu button.on::before { content: '●'; font-size: 8px; }
.so-menu button.danger { color: #ff9497; }

.so-carte-f { position: relative; border-radius: 12px; overflow: hidden;
  background: radial-gradient(120% 90% at 50% 40%, #0f1d2c, var(--so-vide)); }
.so-carte { display: block; width: 100%; height: auto; max-height: calc(100vh - 260px - var(--barre-wp)); touch-action: pinch-zoom; user-select: none; -webkit-user-select: none; cursor: crosshair; }
.so-carte.peindre { cursor: cell; }
.so-carte.tire { cursor: grabbing; }
.so-carte .c { fill: var(--so-sol); stroke: var(--so-trait); stroke-width: .6; transition: fill .08s; }
.so-carte .c.imp { fill: var(--so-sol2); }
.so-carte .c.pm { fill: color-mix(in srgb, var(--so-pm) 30%, var(--so-sol)); }
.so-carte .c.po { fill: color-mix(in srgb, var(--so-po) 45%, var(--so-sol)); stroke: color-mix(in srgb, var(--so-po) 55%, var(--so-trait)); }
.so-carte .c.pl { fill: url(#so-hach); }
.so-carte .c.z { fill: color-mix(in srgb, var(--so-zone) 72%, var(--so-sol)); stroke: color-mix(in srgb, var(--so-zone) 85%, #fff); }
.so-carte .c.z.attenue { fill: color-mix(in srgb, var(--so-zone) 28%, var(--so-sol)); stroke: var(--so-trait); }
.so-carte .c.lc { fill: color-mix(in srgb, var(--so-cible) 30%, var(--so-sol)); }
.so-carte .c.cb { stroke: var(--so-cible); stroke-width: 2.6; }
.so-carte .c.trou { fill: #04080c; stroke: #04080c; }
.so-carte .c.hors { fill: transparent; stroke: transparent; }
.so-carte .c.dehors { opacity: .3; }
#so-hach rect { fill: color-mix(in srgb, var(--so-po) 14%, var(--so-sol)); }
#so-hach line { stroke: color-mix(in srgb, var(--so-po) 60%, var(--so-sol)); stroke-width: 2.2; }
.so-carte .bloc-h { fill: #4d5d72; stroke: #2b3646; stroke-width: .6; }
.so-carte .bloc-g { fill: #36445a; stroke: #2b3646; stroke-width: .6; }
.so-carte .bloc-d { fill: #2c384b; stroke: #2b3646; stroke-width: .6; }
.so-carte #so-departs ellipse { pointer-events: none; stroke: rgba(255,255,255,.7); stroke-width: .8; }
.so-carte #so-departs .r { fill: #ff5c61; } .so-carte #so-departs .b { fill: #4f8ef7; }
.so-carte .socle { fill: none; stroke: var(--so-cible); stroke-width: 2; pointer-events: none; }
.so-carte .socle.autre { stroke: #ff9497; stroke-width: 1.6; }
.so-carte #so-halo-l { pointer-events: none; }
.so-carte image, .so-carte circle.ent { cursor: grab; }
.so-carte circle.ent { fill: var(--mut); }
.so-info { position: absolute; left: 50%; bottom: 10px; transform: translateX(-50%); max-width: calc(100% - 20px); padding: 6px 14px; border-radius: 99px;
  background: rgba(9,17,26,.85); border: 1px solid var(--line); backdrop-filter: blur(6px); color: #c3cdd8; font-size: 12px; font-weight: 700; text-align: center; pointer-events: none; }
.so-info b { color: #fff; }
.so-info.alerte { color: #ffb4b6; border-color: rgba(255,92,97,.4); }
.so-legende { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12px; font-weight: 700; color: var(--mut); }
.so-legende > span { display: inline-flex; align-items: center; gap: 5px; }
.so-legende b { font-weight: 700; }
.so-legende i { width: 12px; height: 12px; border-radius: 3px; background: var(--c); }
.so-legende i.rond { border-radius: 50%; width: 10px; height: 10px; }
.so-legende i.hach { background: repeating-linear-gradient(45deg, color-mix(in srgb, var(--so-po) 60%, var(--so-sol)) 0 2px, color-mix(in srgb, var(--so-po) 14%, var(--so-sol)) 2px 5px); }
.so-legende .so-clavier { margin-left: auto; color: var(--mut2); }

@media (pointer: coarse) { .so .so-clavier { display: none; } }
/* Deux colonnes seulement si la carte garde de la place (barre latérale du site comprise). */
@container (max-width: 900px) {
  .so-grille { grid-template-columns: minmax(0, 1fr); grid-template-rows: none; grid-template-areas: "tete" "sorts" "carte" "fiche"; }
  .so-carte-l { position: static; }
  .so-carte { max-height: none; }
  .so-hud-s ul { display: none; }
  .so-hud-b span { display: none; }
  .so-hud-outils button { width: 38px; }
  .so.grand .so-pc:not(.libre) { top: auto; bottom: 80px; left: 12px; right: 12px; max-width: none; }
  .so.grand .so-info { top: 112px; bottom: auto; }
  .so.grand .so-pc .so-bascules { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; }
}
@media (max-width: 1000px) { .so-pas { grid-template-columns: 1fr; } }
@media (max-width: 560px) {
  .so-accueil { padding: 18px; }
  .so-accueil-t { font-size: 18px; }
  .so-carte-c { margin: 0 -6px; padding: 8px; }
  .so-sorts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .so-seg button { padding: 6px 8px; }
  .so-info { position: static; transform: none; max-width: none; margin: 0; border-radius: 0; border: 0; border-top: 1px solid var(--line); background: rgba(9,17,26,.6); }
  .so-id-t h2 { font-size: 19px; }
  .so-portrait { width: 64px; height: 64px; } .so-portrait img { width: 58px; height: 58px; }
}
