/* Satoria Dev Console. Design choisi par Occikat le 23 oct. 2026 : les couleurs du modele 6 (clair et chaleureux, accent
   orange) avec la disposition du modele 4 (une seule barre en haut, toute la largeur pour le travail). Toutes les
   couleurs passent par les variables ci-dessous : les changer ici change toute la console. */
:root {
  --fond: #faf6f0; --barre: #fffdf9; --panneau: #f5efe6; --carte: #fffdf9; --champ: #f8f2ea;
  --bord: #eadfcf; --bord2: #dccbb3; --ligne: #f0e7da;
  --txt: #2d241a; --txt2: #7a6650; --txt3: #ab977f;
  --acc: #c96d1c; --acc-fonce: #a85613; --sel: #fbe7d3; --sur-acc: #fff;
  --ok: #2f8a57; --ok-fond: #e3f3e8; --ko: #c0392b; --ko-fond: #fbe4e1; --info: #2f6fb0; --info-fond: #e4eef9;
  --ombre: #5a3a1a22; --ombre-forte: #2d241a40; --voile: #2d241a55; --ko-bord: #e5aaa3; --ok-bord: #b9dcc5;
  --fige-bord: #e9c9a6; --barre-debut: #e9a868;
  --mer: #f3e9db; --terre: #e6d7c2; --terre-bord: #f8f1e7; --terre-active: #ecc9a2; --point: #ff7a00; --point-lueur: #ff9a2e;
  --point-halo: #ff8a1e; --point-bord: #fff;
  --r: 16px; --rb: 10px; --titre: Georgia, 'Times New Roman', serif;
  color-scheme: light;
}
/* Le mode sombre (Ssik, 24 oct. 2026 : « ça me prend absolument un dark mode sur le backend ») : par defaut ; le bouton de la
   barre du haut repasse au clair d Occikat, et chaque navigateur garde son choix (localStorage « console.theme »). Memes
   roles que le clair : seules les valeurs changent. */
:root[data-theme="dark"] {
  --fond: #15120f; --barre: #1d1914; --panneau: #241e18; --carte: #1d1914; --champ: #2a231c;
  --bord: #382e25; --bord2: #4a3d31; --ligne: #2b241d;
  --txt: #efe5d8; --txt2: #b9a690; --txt3: #8b7a66;
  --acc: #e8893a; --acc-fonce: #f29d55; --sel: #3b2a1b; --sur-acc: #1b120a;
  --ok: #5ec98c; --ok-fond: #17311f; --ko: #ef7466; --ko-fond: #3a1c19; --info: #6fa9e6; --info-fond: #16283a;
  --ombre: #00000066; --ombre-forte: #00000080; --voile: #000000a0; --ko-bord: #7a3a33; --ok-bord: #2f6b48;
  --fige-bord: #6b4a2c; --barre-debut: #9a5a24;
  --mer: #1a1713; --terre: #362d24; --terre-bord: #221c16; --terre-active: #6e4b2a; --point: #ff8a1e; --point-lueur: #ffad52;
  --point-halo: #ff8a1e; --point-bord: #1d1914;
  color-scheme: dark;
}
* { box-sizing: border-box; }
body { margin: 0; font: 13px/1.45 'Segoe UI', system-ui, sans-serif; background: var(--fond); color: var(--txt); }
a { color: var(--acc); }

/* ---- barre du haut ---- */
header.barre { display: flex; align-items: center; gap: 6px; padding: 8px 16px; background: var(--barre);
  border-bottom: 1px solid var(--bord); position: sticky; top: 0; z-index: 10; }
.logo { font: 700 16px var(--titre); color: var(--acc); padding-right: 14px; white-space: nowrap; }
.logo i { font: 400 11px 'Segoe UI', system-ui, sans-serif; color: var(--txt2); margin-left: 4px; }
.tabs { display: flex; flex-wrap: wrap; gap: 2px; }
.tabs button { background: transparent; border: none; color: var(--txt2); padding: 6px 11px; border-radius: var(--rb);
  cursor: pointer; font: inherit; }
.tabs button:hover { background: var(--panneau); color: var(--txt); }
.tabs button.active { background: var(--sel); color: var(--acc); font-weight: 600; }
.conn { margin-left: auto; position: relative; }
.conn summary { list-style: none; cursor: pointer; }
.conn summary::-webkit-details-marker { display: none; }
.conn-panneau { position: absolute; right: 0; top: 34px; background: var(--carte); border: 1px solid var(--bord);
  border-radius: var(--rb); padding: 12px; display: flex; flex-direction: column; gap: 8px; width: 280px;
  box-shadow: 0 10px 30px var(--ombre); }
.conn-panneau label { display: flex; flex-direction: column; gap: 3px; font-size: 11px; color: var(--txt2); }
.status { font-size: 11px; padding: 3px 10px; border-radius: 20px; background: var(--panneau); color: var(--txt2); white-space: nowrap; }
.status.ok { background: var(--ok-fond); color: var(--ok); }
.status.err { background: var(--ko-fond); color: var(--ko); }

.banner { background: var(--panneau); color: var(--txt2); padding: 6px 16px; font-size: 12px; border-bottom: 1px solid var(--bord); }
.banner b { color: var(--txt); }

/* ---- champs et boutons ---- */
input, select, textarea { background: var(--champ); border: 1px solid var(--bord); color: var(--txt); padding: 5px 8px;
  border-radius: var(--rb); font: inherit; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--sel); border-color: var(--acc); }
input:disabled, select:disabled { opacity: .6; }
input[type=checkbox] { accent-color: var(--acc); }
button { font: inherit; }
.toolbar button, button.ghost, main button:not([class]) { background: var(--carte); border: 1px solid var(--bord2); color: var(--txt); border-radius: var(--rb);
  cursor: pointer; padding: 5px 11px; }
.toolbar button:hover, button.ghost:hover, main button:not([class]):hover { border-color: var(--acc); color: var(--acc); }
button.primary { background: var(--acc); border: 1px solid var(--acc); color: var(--sur-acc); padding: 7px 16px; border-radius: var(--rb);
  cursor: pointer; font-weight: 600; }
button.primary:hover { background: var(--acc-fonce); }
button.danger { background: var(--carte); border: 1px solid var(--ko-bord); color: var(--ko); padding: 7px 12px; border-radius: var(--rb); cursor: pointer; }
button.danger:hover { background: var(--ko-fond); }

/* ---- la page : une liste a gauche, la fiche a droite ---- */
main { padding: 14px 16px; }
.tab { display: none; grid-template-columns: 290px 1fr; gap: 14px; }
.tab.active { display: grid; }
.col.list { background: var(--carte); border: 1px solid var(--bord); border-radius: var(--r); overflow: hidden; display: flex;
  flex-direction: column; max-height: calc(100vh - 130px); }
.toolbar { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; padding: 10px; border-bottom: 1px solid var(--bord); }
.toolbar input { flex: 1; min-width: 0; }
ul { list-style: none; margin: 0; padding: 0; overflow-y: auto; }
ul li { padding: 7px 12px; cursor: pointer; border-bottom: 1px solid var(--ligne); display: flex; justify-content: space-between; gap: 6px; }
ul li:hover { background: var(--panneau); }
ul li.sel { background: var(--sel); color: var(--acc); font-weight: 600; }
ul li .tag { font-size: 11px; color: var(--txt3); font-weight: 400; }
ul li .tag.ov { color: var(--ok); }

.col.editor { background: var(--carte); border: 1px solid var(--bord); border-radius: var(--r); padding: 18px 20px;
  max-height: calc(100vh - 130px); overflow-y: auto; }
.empty { color: var(--txt3); padding: 40px; text-align: center; }
.editor h2 { margin: 0 0 12px; font: 700 18px var(--titre); color: var(--txt); }
.editor h3 { font: 700 14px var(--titre); color: var(--txt); }
.grid { display: grid; grid-template-columns: 140px 1fr; gap: 6px 12px; align-items: center; margin-bottom: 12px; }
.grid label { color: var(--txt2); text-align: right; }
.grid input, .grid select, .grid textarea { width: 100%; }
fieldset { border: 1px solid var(--bord); border-radius: var(--rb); margin: 12px 0; padding: 10px 12px; background: var(--fond); }
legend { color: var(--acc); padding: 0 6px; font-weight: 600; }
.row { display: flex; gap: 6px; align-items: center; margin: 4px 0; }
.actions { display: flex; gap: 8px; margin-top: 14px; }
table { border-collapse: collapse; width: 100%; margin-top: 6px; }
th, td { border-bottom: 1px solid var(--ligne); padding: 5px 8px; text-align: left; }
th { color: var(--txt2); font-weight: 600; font-size: 12px; }
.inv-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px,1fr)); gap: 8px; }
.inv-cell { border: 1px solid var(--bord); background: var(--champ); border-radius: var(--rb); padding: 8px; font-size: 12px; }
.inv-cell .x { float: right; color: var(--ko); cursor: pointer; }
.inv-cell .stats { margin-top: 4px; color: var(--ok); font-size: 11px; }
.hint { color: var(--txt3); font-size: 12px; margin: 4px 0 8px; }
#toast { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); background: var(--txt); color: var(--barre);
  padding: 9px 18px; border-radius: 20px; opacity: 0; transition: opacity .2s; pointer-events: none; z-index: 20; }
#toast.show { opacity: 1; }

/* ---- fiche joueur ---- */
.fiche-tete { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; }
.fiche-id { display: flex; align-items: center; gap: 12px; }
.avatar { width: 44px; height: 44px; border-radius: 50%; background: var(--sel); color: var(--acc); display: flex;
  align-items: center; justify-content: center; font-weight: 700; }
.fiche-id h2 { margin: 0; }
.classe { font: 400 12px 'Segoe UI', system-ui, sans-serif; color: var(--txt2); margin-left: 6px; padding: 2px 8px;
  border: 1px solid var(--bord); border-radius: 20px; background: var(--champ); }
.carte { border: 1px solid var(--bord); border-radius: var(--r); background: var(--fond); padding: 12px 14px; margin-bottom: 12px; }
.carte > .titre { font-size: 12px; font-weight: 600; color: var(--txt2); margin-bottom: 8px; }

/* ---- Live / Moderation (2026-09-26) ---- */
table.live { width: 100%; border-collapse: collapse; font-size: 13px; }
table.live th { text-align: left; font-weight: 600; color: var(--txt2); padding: 7px 8px; border-bottom: 1px solid var(--bord); }
table.live td { padding: 6px 8px; border-bottom: 1px solid var(--ligne); }
table.live tr.enligne td { color: var(--txt); }
table.live tr.parti td { opacity: .45; }
table.live button { margin-right: 6px; }
.mono { font-family: ui-monospace, Consolas, monospace; font-size: 12px; }
.tagrole { font-size: 11px; padding: 1px 8px; border-radius: 20px; background: var(--info-fond); color: var(--info); }
.keynew { margin: 8px 0; padding: 10px; border: 1px solid var(--ok-bord); background: var(--ok-fond); border-radius: var(--rb); font-size: 12px; }
.keynew code { display: block; margin-top: 6px; word-break: break-all; color: var(--ok); }
.tagland  { font-size: 11px; padding: 1px 8px; border-radius: 20px; background: var(--ok-fond); color: var(--ok); }
.tagworld { font-size: 11px; padding: 1px 8px; border-radius: 20px; background: var(--info-fond); color: var(--info); }

/* La colonne de gauche est figee a 290 px par .tab : bien trop etroit pour un tableau
   de sept colonnes. L onglet de moderation prend donc sa propre repartition. */
#tab-live { grid-template-columns: minmax(560px, 1.7fr) 1fr; }
/* Le conteneur qui defile : sans lui le tableau depasse et se fait couper, parce que
   .col.list masque ce qui deborde et que seules les listes ul defilent. */
.scroll { overflow-y: auto; flex: 1; min-height: 0; }
#liveTable thead th { position: sticky; top: 0; background: var(--carte); z-index: 1; }
#tab-errors .col.list > .hint { padding: 0 12px; }

/* L economie et les erreurs prennent toute la largeur (Ssik, 17 oct. 2026 : « pas trop beau, pas assez grande ») :
   la regle .tab (290 px + 1fr) les coinçait dans la colonne de la liste des objets. */
#tab-economy, #tab-errors { grid-template-columns: 1fr; }
/* La moitie de la fenetre (Ssik, 17 oct. 2026 : « pas toute la fenetre mais la moitie ») ; toute la largeur sur un
   petit ecran. Les deux tableaux l un sous l autre. */
.eco { display: flex; flex-direction: column; gap: 12px; min-width: 0; width: 50%; }
@media (max-width: 1200px) { .eco { width: 100%; } }
.eco-tete { display: flex; flex-wrap: nowrap; gap: 10px; align-items: stretch; }
.eco-carte { flex: 1 1 0; min-width: 0; display: flex; flex-direction: column; gap: 4px; padding: 12px 16px;
  border: 1px solid var(--bord); border-radius: var(--r); background: var(--carte); }
.eco-carte.eco-principale { flex: 2 1 0; border-color: var(--acc); background: var(--sel); }
.eco-etiquette { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--txt2); }
.eco-chiffre { font-size: 18px; font-weight: 600; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.eco-principale .eco-chiffre { color: var(--acc); font: 700 26px var(--titre); }
.eco-tete button { align-self: center; }
.eco-corps { display: grid; grid-template-columns: 1fr; gap: 14px; min-height: 0; }
.eco-bloc { max-height: 40vh; }
.eco-titre { margin: 12px 14px 6px; font: 700 14px var(--titre); }
.eco-table th.nb, .eco-table td.nb { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.eco-table thead th { position: sticky; top: 0; background: var(--carte); z-index: 1; }
.eco-table tbody tr { cursor: pointer; }
.eco-table tbody tr:hover td { background: var(--panneau); }
.eco-table tr.choisi td { background: var(--sel); }
.eco-table td.plus { color: var(--ok); }
.eco-table td.moins { color: var(--ko); }
/* Le butin d un monstre, dans sa fiche (onglet Mobs) */
.loot { border-top: 1px solid var(--bord); padding-top: 10px; margin-bottom: 12px; }
.loot h3 { margin: 0 0 4px; font-size: 14px; color: var(--acc); }
.loot table { width: auto; min-width: 320px; }
.loot td, .loot th { padding: 3px 12px 3px 0; text-align: left; }
.loot .nb { text-align: right; font-variant-numeric: tabular-nums; }

/* ---- Quetes (Occikat, 23 oct. 2026) ---- */
.quete .qid { font: 400 11px 'Segoe UI', system-ui, sans-serif; color: var(--txt3); margin-left: 6px; }
.quete .donneur { margin: 0 0 12px; padding: 8px 12px; border: 1px solid var(--bord); border-radius: var(--rb); background: var(--fond); }
.quete .case { text-align: left; color: var(--txt); }
.quete .case input { width: auto; }
.quete .etape { border: 1px solid var(--bord); border-radius: var(--rb); padding: 8px 10px; margin: 8px 0; background: var(--carte); }
.quete .etape.fige { border-color: var(--fige-bord); background: var(--sel); }
.quete .etape .num { width: 22px; color: var(--acc); font-weight: 700; }
.quete .intitule { flex: 1; }
.quete .nomcible { font-size: 11px; color: var(--ok); flex: 1; }
.quete .nomcible.ko { color: var(--ko); }
.quete .outils { display: flex; gap: 4px; margin-left: auto; }
.quete button.petit { padding: 2px 9px; font-size: 12px; }
.quete .dialogues { margin: 6px 0 2px 28px; }
.quete .repl { display: grid; grid-template-columns: 1fr 1fr auto; gap: 6px; margin: 4px 0; align-items: start; }
.quete .repl textarea { width: 100%; resize: vertical; }
.quete .erreurs { color: var(--ko); margin-top: 10px; }
.quete .erreurs ul { margin: 4px 0 0 16px; list-style: disc; overflow: visible; }
.quete .erreurs li { cursor: default; border: none; padding: 1px 0; display: list-item; }
.quete .row { flex-wrap: wrap; }
/* blocs de la liste des quetes (Occikat, 23 oct.) : un titre par categorie, discret ; les suites numerotees */
#questList li.groupe { cursor: default; background: var(--panneau); color: var(--txt2); font-size: 11px; font-weight: 600;
  text-transform: uppercase; letter-spacing: .05em; border-top: 6px solid var(--carte); border-left: 3px solid var(--acc); padding: 7px 12px; }
#questList li.groupe:first-child { border-top: none; }
#questList li.groupe .compte { font-weight: normal; text-transform: none; color: var(--txt3); letter-spacing: 0; }
#questList li.separe { cursor: default; padding: 0; height: 6px; background: var(--panneau); border-bottom: none; }
#questList .rang { display: inline-block; min-width: 24px; color: var(--txt3); font-variant-numeric: tabular-nums; }

/* Fenetre etroite : la liste au-dessus de la fiche plutot que cote a cote. */
@media (max-width: 900px) { .tab, #tab-live { grid-template-columns: 1fr; } .col.list { max-height: 40vh; } .logo i { display: none; } }

/* ---- Pastilles en ligne / hors ligne, vue du compte, journal, carte du monde (Occikat, 23 oct. 2026) ---- */
.pastille { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--bord2); margin-right: 8px; vertical-align: middle; }
.pastille.on { background: var(--ok); box-shadow: 0 0 0 3px var(--ok-fond); }
.etat { font: 400 11px 'Segoe UI', system-ui, sans-serif; margin-left: 6px; padding: 2px 9px; border-radius: 20px; background: var(--panneau); color: var(--txt2); vertical-align: middle; }
.etat.on { background: var(--ok-fond); color: var(--ok); }
.etat.ko { background: var(--ko-fond); color: var(--ko); }
.row .lib { width: 70px; color: var(--txt2); }
details.carte > summary { cursor: pointer; list-style: none; margin-bottom: 0; }
details.carte[open] > summary { margin-bottom: 8px; }
details.carte > summary::before { content: '▸ '; } details.carte[open] > summary::before { content: '▾ '; }
.carte > .titre { display: flex; justify-content: space-between; gap: 8px; align-items: baseline; }
.perso { padding: 6px 0; border-bottom: 1px solid var(--ligne); }
.perso .outils { margin-left: auto; display: flex; gap: 6px; }
.perso button { padding: 3px 10px; font-size: 12px; }
#accountView { margin-bottom: 18px; padding-bottom: 6px; border-bottom: 2px solid var(--bord); }
#accountView .grid { grid-template-columns: 90px 1fr; margin: 0; }
.avap { color: var(--txt2); font-size: 12px; word-break: break-word; }
.journal { max-height: 360px; }

/* Live & moderation : a gauche la carte puis les joueurs en ligne, a droite le compte, les bans, les cles, le journal */
.live-gauche { display: flex; flex-direction: column; gap: 14px; min-width: 0; max-height: calc(100vh - 130px); overflow-y: auto; }
.live-gauche .col.list { max-height: none; flex: 1 0 auto; }
#geoCarte { background: var(--carte); margin: 0; }
#geoMap { border-radius: var(--rb); background: var(--mer); overflow: hidden; }
svg.geo { display: block; width: 100%; height: auto; }
svg.geo .terre { fill: var(--terre); stroke: var(--terre-bord); stroke-width: .6; }
svg.geo .terre.active { fill: var(--terre-active); }
svg.geo .coeur { fill: var(--point); stroke: var(--point-bord); stroke-width: .9; filter: drop-shadow(0 0 2px var(--point-lueur)); }
svg.geo .halo { fill: var(--point-halo); opacity: .3; transform-box: fill-box; transform-origin: center; animation: pulse 2.2s ease-out infinite; animation-delay: var(--decalage, 0s); }
@keyframes pulse { 0% { transform: scale(.4); opacity: .55; } 100% { transform: scale(1.3); opacity: 0; } }
.geo-pays { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.pu { border: 1px solid var(--bord); border-radius: 20px; padding: 3px 10px; background: var(--champ); font-size: 12px; }
details.carte > summary.titre { display: block; }

/* ---- Fiche joueur : Give a gauche, ce que le joueur a a droite (Occikat, 23 oct. 2026) ---- */
.fiche-jeu { display: grid; grid-template-columns: minmax(260px, 320px) 1fr; gap: 12px; align-items: start; }
.fiche-jeu .carte { margin-bottom: 0; }
.pile { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.ico { width: 44px; height: 44px; image-rendering: pixelated; flex: none; object-fit: contain; }
.ico.lettre { display: inline-flex; align-items: center; justify-content: center; border-radius: 8px; background: var(--sel); color: var(--acc); font-weight: 700; font-size: 13px; }
.cats { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 8px; }
.cat { border: 1px solid var(--bord); border-radius: 20px; padding: 3px 10px; font-size: 12px; color: var(--txt2); cursor: pointer; background: var(--carte); }
.cat.on { background: var(--sel); color: var(--acc); border-color: var(--acc); font-weight: 600; }
.give .row input:first-child { flex: 1; min-width: 0; }
.give-liste { max-height: 560px; overflow-y: auto; margin-top: 6px; display: flex; flex-direction: column; gap: 4px; }
.obj { display: flex; align-items: center; gap: 8px; padding: 4px 6px; border: 1px solid var(--bord); border-radius: var(--rb); background: var(--carte); cursor: grab; }
.obj .nom { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.obj.refuse { opacity: .5; cursor: not-allowed; }
.obj button.petit { padding: 1px 9px; }
.slots { display: grid; grid-template-columns: repeat(5, 1fr); gap: 6px; }
.slot { border: 1px solid var(--bord); background: var(--champ); border-radius: var(--rb); height: 62px; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 3px; font-size: 11px; color: var(--txt2); }
.slot .ico { width: 52px; height: 52px; }
.slot.vide { border-style: dashed; }
.sac { display: grid; grid-template-columns: repeat(auto-fill, minmax(50px, 1fr)); gap: 5px; max-height: 260px; overflow-y: auto; }
.case { position: relative; border: 1px solid var(--bord); background: var(--champ); border-radius: var(--rb); height: 50px; display: flex; align-items: center; justify-content: center; }
.case .ico { width: 54px; height: 54px; }
.case b { position: absolute; right: 4px; bottom: 1px; font-size: 11px; }
.case .x, .pu .x { color: var(--ko); cursor: pointer; }
.case .x { position: absolute; top: 0; right: 4px; display: none; }
.case:hover .x { display: block; }
.puces { display: flex; flex-wrap: wrap; gap: 6px; }
.pu { display: inline-flex; align-items: center; gap: 2px; }
.pu .ico { width: 30px; height: 30px; }
.carte.survol { outline: 2px dashed var(--acc); outline-offset: 2px; background: var(--sel); }
@media (max-width: 1100px) { .fiche-jeu { grid-template-columns: 1fr; } }

/* ---- La confirmation de la console, la meme partout (Occikat, 23 oct. 2026) ---- */
.voile { position: fixed; inset: 0; background: var(--voile); display: flex; align-items: center; justify-content: center; z-index: 50; padding: 16px; }
.boite { background: var(--carte); border: 1px solid var(--acc); border-radius: var(--r); padding: 18px 20px; width: min(460px, 100%);
  box-shadow: 0 18px 50px var(--ombre-forte); }
.boite.danger { border-color: var(--ko-bord); }
.boite > b { font: 700 16px var(--titre); display: block; }
.boite-texte { white-space: pre-wrap; color: var(--txt2); margin-top: 8px; max-height: 50vh; overflow-y: auto; font-size: 12.5px; }
.boite .actions { justify-content: flex-end; }
button.danger.plein { background: var(--ko); border-color: var(--ko); color: var(--sur-acc); font-weight: 600; }

/* Les blocs des fiches (fieldset) prennent l allure des cartes : titre dedans, coins arrondis (onglets Items, Mobs, Quests) */
fieldset { border-radius: var(--r); padding: 12px 14px; background: var(--fond); }
fieldset > legend { float: left; width: 100%; padding: 0; margin-bottom: 8px; color: var(--txt2); font-size: 12px; font-weight: 600; }
fieldset > legend + * { clear: both; }
.editor h2 { font-family: var(--titre); }

/* ---- Items & gear : liste par ensemble, ajustement en %, stats en barres et comparaison (Occikat, 23 oct. 2026) ---- */
.ligne-obj { display: flex; align-items: center; gap: 7px; min-width: 0; }
.ligne-obj .ico { width: 34px; height: 34px; }
.ligne-obj input[type=checkbox] { margin: 0; }
ul li.groupe { cursor: default; background: var(--panneau); color: var(--txt2); font-size: 11px; font-weight: 600; text-transform: uppercase;
  letter-spacing: .04em; border-left: 3px solid var(--acc); }
ul li.groupe .compte { font-weight: 400; color: var(--txt3); }
.bulk { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding: 8px 10px; background: var(--sel); border-bottom: 1px solid var(--bord); font-size: 12px; }
.bulk select, .bulk input { padding: 3px 6px; }
button.petit { padding: 3px 10px; font-size: 12px; }
.fiche-id > .ico { width: 72px; height: 72px; }
.stats-grille { display: grid; grid-template-columns: 130px 110px minmax(80px, 1fr) 110px 110px; gap: 5px 10px; align-items: center; }
.stats-grille label { color: var(--txt2); text-align: right; }
.stats-grille input { width: 100%; }
.barre-stat { height: 8px; border-radius: 4px; background: var(--panneau); overflow: hidden; }
.barre-stat > div { height: 100%; background: linear-gradient(90deg, var(--barre-debut), var(--acc)); border-radius: 4px; }
.cmp { font-size: 12px; color: var(--txt2); font-variant-numeric: tabular-nums; white-space: nowrap; }
.ecart { font-size: 11px; padding: 0 5px; border-radius: 8px; }
.ecart.plus { color: var(--ok); background: var(--ok-fond); }
.ecart.moins { color: var(--ko); background: var(--ko-fond); }
.bulk[hidden] { display: none; }
.ligne-drop .ico-place { width: 40px; display: inline-flex; justify-content: center; }
.ligne-drop .ico { width: 38px; height: 38px; }
.ligne-drop .part { width: 60px; text-align: right; font-variant-numeric: tabular-nums; color: var(--acc); font-weight: 600; }
.ligne-drop .nomcible { flex: 1; font-size: 12px; color: var(--txt2); }
.ligne-drop .nomcible.ko { color: var(--ko); }
/* la carte : un point par pays, un clic montre le nombre de joueurs (Occikat, 24 oct. 2026) */
#geoMap { position: relative; }
svg.geo .point { cursor: pointer; }
svg.geo .cible { fill: transparent; }
.geo-bulle { position: absolute; transform: translate(-50%, calc(-100% - 10px)); background: var(--txt); color: var(--barre); padding: 5px 10px;
  border-radius: 10px; font-size: 12px; white-space: nowrap; pointer-events: none; box-shadow: 0 4px 14px var(--ombre-forte); }
.geo-bulle b { font-size: 14px; }
.geo-bulle span { display: block; font-size: 11px; opacity: .75; }
.geo-bulle::after { content: ''; position: absolute; left: 50%; bottom: -5px; margin-left: -5px; border: 5px solid transparent; border-bottom: 0; border-top-color: var(--txt); }
.geo-bulle.dessous { transform: translate(-50%, 16px); }
.geo-bulle.dessous::after { bottom: auto; top: -5px; border-top: 0; border-bottom: 5px solid var(--txt); }

/* quetes par classe (24 oct. 2026) : l etiquette de la classe dans la liste */
.etiquette-classe { margin-left: 6px; font-size: 10px; padding: 1px 7px; border-radius: 20px; background: var(--info-fond); color: var(--info); }

/* ---- le bouton du theme et le credit de la base des pays ---- */
.theme { background: transparent; border: 1px solid var(--bord2); color: var(--txt2); border-radius: var(--rb); cursor: pointer;
  padding: 4px 10px; font: inherit; font-size: 12px; white-space: nowrap; margin-left: auto; }
.theme:hover { color: var(--acc); border-color: var(--acc); }
.theme + .conn { margin-left: 6px; }
.theme:focus-visible { outline: 2px solid var(--acc); outline-offset: 2px; }
.credit { font-size: 11px; color: var(--txt3); padding: 6px 2px 0; }
.credit a { color: var(--txt2); }


/* Skill trees (29 oct. 2026) : la grille branches x paliers, la case Master a part, les erreurs de validation, le journal
   des reglages sous les deux colonnes de l onglet. */
.arb-journal { grid-column: 1 / -1; }
.arb-journal h3 { margin: 4px 0 6px; }
.arb-journal .scroll { max-height: 240px; }
.arb-actions button { flex: 1 1 auto; }
.arb-grille { display: grid; gap: 8px; align-items: start; }
.arb-branche { display: flex; gap: 6px; align-items: center; font-weight: 600; color: var(--txt2); min-width: 0; }
.arb-branche input { min-width: 0; flex: 1; }
.arb-case { border: 1px solid var(--bord); border-radius: var(--rb); background: var(--carte); padding: 8px; min-width: 0; }
.arb-case.vide { display: flex; align-items: center; justify-content: center; min-height: 64px; border-style: dashed; background: transparent; }
.arb-case.master { border-color: var(--acc); }
.arb-case .grid { grid-template-columns: 82px minmax(0, 1fr); gap: 3px 6px; margin-bottom: 4px; }
.arb-case .grid label { font-size: 11px; }
.arb-case .grid input, .arb-case .grid select, .arb-case .grid textarea { font-size: 12px; padding: 3px 6px; }
.arb-option { border-top: 1px dashed var(--bord); margin-top: 6px; padding-top: 6px; }
.arb-option .entete { display: flex; justify-content: space-between; align-items: center; color: var(--txt2); font-size: 11px; font-weight: 600; margin-bottom: 4px; }
.arb-sens { font-size: 11px; color: var(--txt3); margin: 0 0 4px; }
.arb-resultats { list-style: none; margin: 0 0 10px; padding: 0; }
.arb-pas-prise td { color: var(--txt3); }
.grid input[type=checkbox] { width: auto; justify-self: start; }
.erreurs { border: 1px solid var(--ko); border-radius: var(--rb); padding: 8px 12px; margin-bottom: 12px; background: var(--fond); }
.erreurs:empty { display: none; }
.erreurs.info { border-color: var(--ok); }
.erreurs ul { margin: 6px 0 0; padding-left: 18px; }

/* Les bugs signales (4 nov. 2026) : la liste a gauche, le rapport a droite (capture en grand, contexte, journal). */
.bug-liste { list-style: none; margin: 0; padding: 0; }
/* ul li les met en colonnes (display: flex) : ici, un bloc de trois lignes */
#bugList li.bug-ligne { display: block; font-size: 13px; }
#bugList li.bug-ligne.actif { background: var(--sel); }
.bug-ligne.statut-fixed { opacity: .55; }
.bug-pastille { float: right; font-size: 11px; padding: 1px 6px; border-radius: 8px; border: 1px solid currentColor; }
.bug-ligne.statut-new .bug-pastille { color: var(--ko); }
.bug-ligne.statut-fixed .bug-pastille { color: var(--ok); }
.bug-extrait { color: var(--txt2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 2px; }
.bug-age { color: var(--txt2); font-size: 11px; margin-top: 2px; }
#bugDetail { overflow-y: auto; min-width: 0; }
.bug-capture { margin: 10px 0; color: var(--txt2); }
.bug-capture img { max-width: 100%; max-height: 60vh; display: block; border-radius: var(--rb); }
.bug-contexte th { text-align: left; padding-right: 14px; color: var(--txt2); font-weight: normal; }
.bug-fait { display: inline-block; margin: 8px 8px 0 0; padding: 1px 8px; border-radius: 8px; border: 1px solid var(--txt2); color: var(--txt2); font-size: 12px; opacity: .5; }
.bug-fait.oui { opacity: 1; color: var(--ko); border-color: var(--ko); }
/* ---- Farm (15 nov. 2026) : un id d objet inconnu en rouge, la grille des recettes de depart ---- */
input.inconnu { border-color: var(--ko); color: var(--ko); }
.ferme-coches { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 2px 10px; max-height: 340px; overflow-y: auto; }
.ferme-coches label { display: flex; align-items: center; gap: 4px; font-size: 12px; cursor: pointer; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ferme-coches label .hint { margin: 0; font-size: 11px; }
#tab-farm .arb-case { margin-bottom: 8px; }
#tab-farm .arb-case .grid { grid-template-columns: 110px minmax(0, 1fr); }

/* ---- le serveur connecte, les etats des reglages, LIVE <-> DEV (15-16 nov. 2026) ---- */
.bandeau-serveur { padding: 6px 16px; font-weight: 700; font-size: 13px; letter-spacing: .02em; border-bottom: 1px solid var(--bord); }
.bandeau-serveur.live { background: #c0392b; color: #fff; }
.bandeau-serveur.dev { background: #e8893a; color: #1b120a; }
.bandeau-serveur.local { background: var(--panneau); color: var(--txt2); }
.bandeau-serveur.inconnu { background: #8a6d1a; color: #fff; }
.bandeau-serveur .attente { margin-left: 14px; padding: 1px 8px; border-radius: 10px; background: #00000030; cursor: pointer; }
.etat-fichier { padding: 4px 16px; font-size: 12px; color: var(--txt2); background: var(--barre); border-bottom: 1px solid var(--bord); display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; }
.etat-fichier:empty { display: none; }
.etat-fichier .ko { color: var(--ko); font-weight: 600; }
.etat-fichier .ok { color: var(--ok); }
.compte-attente:not(:empty) { margin-left: 4px; padding: 0 6px; border-radius: 9px; background: var(--ko); color: #fff; font-size: 11px; }
.sync-etat { display: flex; flex-wrap: wrap; gap: 10px; margin: 8px 0; }
.sync-etat .carte-etat { background: var(--carte); border: 1px solid var(--bord); border-radius: var(--rb); padding: 8px 12px; min-width: 220px; }
.sync-etat .carte-etat b { display: block; margin-bottom: 2px; }
.proposition { border: 1px solid var(--bord); border-radius: var(--rb); padding: 8px 10px; margin: 6px 0; background: var(--carte); }
.proposition.conflit { border-color: var(--ko-bord); background: var(--ko-fond); }
.proposition .champs { font-family: Consolas, monospace; font-size: 12px; margin: 4px 0; }
.proposition .champs td { padding: 1px 8px 1px 0; vertical-align: top; word-break: break-all; }
.proposition .avert { color: var(--ko); font-weight: 600; }
.lot-tete { display: flex; gap: 8px; align-items: center; margin: 12px 0 4px; flex-wrap: wrap; }

/* ---- lot 2 : les onglets en familles, la lecture seule (16 nov. 2026) ---- */
/* En-tete B (Occikat, 16 nov. 2026) : chaque famille dans un cadre, son titre de sa couleur ; Technical en menu. */
/* Trop etroit pour une ligne : les familles restent ensemble, la recherche et les reglages passent dessous, a droite. */
header.barre { gap: 6px 10px; flex-wrap: wrap; }
nav.tabs { flex: 0 1 auto; min-width: 0; gap: 6px 8px; align-items: stretch; }
nav.tabs > .groupe { flex: none; }
.tabs .groupe { --c: var(--txt2); display: flex; flex-direction: column; justify-content: space-between; position: relative;
  border: 1px solid var(--bord); border-top: 3px solid var(--c); border-radius: var(--rb); padding: 2px 4px 4px; background: var(--fond); }
.tabs .groupe[hidden], .tabs .groupe-menu[hidden] { display: none; }
.tabs .groupe.f-jeu { --c: var(--acc); }
.tabs .groupe.f-joueurs { --c: var(--info); }
.tabs .groupe.f-eco { --c: var(--ok); }
.tabs .groupe.f-tech { --c: var(--txt2); }
.tabs .groupe-titre { font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--c); padding: 0 7px; line-height: 1.6; white-space: nowrap; }
.tabs .groupe-onglets { display: flex; gap: 1px; }
.tabs .groupe button { padding: 4px 8px; border-radius: 7px; white-space: nowrap; }
.tabs .menu-tech { display: inline-flex; align-items: center; }
.tabs .menu-tech .fleche { margin-left: 6px; color: var(--txt3); font-size: 10px; }
.tabs .menu-tech.contient-actif { background: var(--sel); color: var(--acc); font-weight: 600; }
.tabs .groupe-menu { position: absolute; top: 100%; left: 0; margin-top: 6px; min-width: 230px; display: flex; flex-direction: column; gap: 1px;
  background: var(--carte); border: 1px solid var(--bord2); border-radius: var(--rb); padding: 6px; box-shadow: 0 10px 30px var(--ombre-forte); z-index: 40; }
.tabs .groupe-menu button { text-align: left; color: var(--txt); padding: 6px 10px; }
header.barre .barre-droite { margin-left: auto; display: flex; align-items: center; gap: 6px; min-width: 0; }
header.barre .recherche { margin: 0; flex: 0 1 200px; min-width: 150px; }
header.barre .recherche-resultats { left: auto; right: 0; }
header.barre .theme { margin-left: 0; }
[data-lecture] { opacity: .75; cursor: not-allowed; }

/* ---- lots 3 et 5 : liens, « Used in », recherche globale, « Advanced », simulateurs, apercu de l arbre (16 nov. 2026) ---- */
.lien-fiche { color: var(--acc); text-decoration: none; display: inline-flex; align-items: center; gap: 4px; cursor: pointer; }
.lien-fiche:hover { text-decoration: underline; }
.lien-texte { display: inline-flex; align-items: center; gap: 4px; }
.lien-fiche .ico, .lien-texte .ico { width: 30px; height: 30px; font-size: 13px; border-radius: 6px; }
button.vers { padding: 0 7px; min-width: 0; }
.ico.lettre.mobs { background: var(--ko-fond); color: var(--ko); }
.ico.lettre.buildings { background: var(--info-fond); color: var(--info); }
.ico.lettre.mecanique { background: var(--panneau); color: var(--txt2); }
fieldset.usages { background: var(--carte); }
.usages-table { border-collapse: collapse; width: 100%; }
.usages-table th { text-align: left; vertical-align: top; font-weight: 600; color: var(--txt2); padding: 4px 12px 4px 0; white-space: nowrap; width: 1%; }
.usages-table td { padding: 4px 0; vertical-align: top; line-height: 1.9; }
.usages-table tr + tr th, .usages-table tr + tr td { border-top: 1px solid var(--ligne); }
.usages-table td.nb, .usages-table th.nb { text-align: right; padding-left: 12px; width: auto; }
details.avance { margin: 8px 0; border: 1px dashed var(--bord2); border-radius: var(--rb); padding: 4px 10px; }
details.avance > summary { cursor: pointer; color: var(--txt2); font-size: 12px; }
details.avance[open] > summary { margin-bottom: 8px; }
.genre-batiment { margin-left: 8px; font: 600 11px 'Segoe UI', system-ui, sans-serif; color: var(--info); background: var(--info-fond); padding: 1px 8px; border-radius: 9px; vertical-align: middle; }
fieldset.simulateur { background: var(--carte); border-color: var(--bord2); }
.sim-sortie { margin-top: 6px; }
.sim-ligne { margin-top: 4px; }
.loot tr.vide td { color: var(--txt3); }
.ligne-drop .parmort { min-width: 150px; }
.recherche { position: relative; flex: 0 1 300px; min-width: 160px; margin-right: 8px; }
.recherche input { width: 100%; }
.recherche-resultats { position: absolute; top: 34px; left: 0; width: min(560px, 92vw); max-height: 70vh; overflow: auto; background: var(--carte);
  border: 1px solid var(--bord); border-radius: var(--rb); box-shadow: 0 10px 30px var(--ombre); z-index: 30; padding: 4px 0; }
.recherche-groupe { display: flex; justify-content: space-between; padding: 6px 12px 2px; font-size: 11px; font-weight: 600; color: var(--txt2); text-transform: uppercase; letter-spacing: .04em; }
.recherche-groupe .compte { font-weight: 400; text-transform: none; color: var(--txt3); }
.recherche-ligne { display: flex; align-items: center; gap: 6px; padding: 4px 12px; cursor: pointer; }
.recherche-ligne:hover, .recherche-ligne:focus { background: var(--sel); outline: none; }
.recherche-ligne .ico { width: 34px; height: 34px; font-size: 13px; }
.arb-apercu { background: var(--carte); }
.arb-apercu-grille { display: grid; gap: 8px; margin-top: 8px; }
.arb-apercu-tete { text-align: center; padding: 6px; border-bottom: 2px solid var(--acc); }
.arb-apercu-case { border: 1px solid var(--bord); border-radius: var(--rb); background: var(--fond); padding: 6px 8px; min-width: 0; }
.arb-apercu-case.haut { border-color: var(--fige-bord); }
.arb-apercu-case.vide { color: var(--txt3); font-size: 12px; text-align: center; border-style: dashed; }
.arb-apercu-case.master { margin: 10px auto 0; max-width: 420px; border: 2px solid var(--acc); }
.arb-apercu-cout { display: flex; justify-content: space-between; font-size: 11px; color: var(--txt2); font-weight: 600; margin-bottom: 4px; }
.arb-apercu-option { display: flex; align-items: center; gap: 6px; margin: 3px 0; min-width: 0; }
.arb-apercu-option > span:nth-child(2) { flex: 1; min-width: 0; overflow-wrap: anywhere; line-height: 1.25; }
.arb-apercu-option .ico { width: 36px; height: 36px; font-size: 14px; }
/* Drop tables <-> Mobs (16 nov. 2026) : les images des monstres dans la liste et la fiche d une table */
.drop-images { display: inline-flex; flex: none; align-items: center; min-width: 34px; }
.drop-images .ico { width: 30px; height: 30px; font-size: 12px; }
.drop-images .ico + .ico { margin-left: -8px; }
.drop-qui { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; margin: 2px 0 12px; }
.drop-qui-titre { color: var(--txt2); font-weight: 600; }
.drop-monstres { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 4px 14px; }
.champ-table { display: flex; align-items: center; gap: 6px; }
/* Historique de navigation (16 nov. 2026) : « ‹ Back » et « Forward › » a cote du nom */
.historique { display: flex; gap: 3px; flex: none; }
.historique .hist { background: transparent; border: 1px solid var(--bord2); color: var(--txt); border-radius: var(--rb); padding: 4px 9px;
  cursor: pointer; font: inherit; font-size: 12px; white-space: nowrap; }
.historique .hist:hover:not(:disabled) { border-color: var(--acc); color: var(--acc); }
.historique .hist:disabled { opacity: .35; cursor: default; }
.historique .hist:focus-visible { outline: 2px solid var(--acc); outline-offset: 2px; }
/* Entrepot et recettes desactivees (16 nov. 2026) */
#fermeList li.desactivee > span:first-child { color: var(--txt3); text-decoration: line-through; }
#fermeList li.desactivee .tag { color: var(--ko); }
.tag-desactivee { margin-left: 6px; padding: 0 6px; border-radius: 8px; background: var(--ko-fond); color: var(--ko); font-size: 11px; }
tr.desactivee td { color: var(--txt3); }
.hint.ko { color: var(--ko); }
