/* Palette reprise de creation_equipe.tscn : fond Color(0.53, 0.48, 0.32) */
:root {
  --fond: #877a51; --fond-sombre: #5b4f35; --fond-clair: #a89a66; --encre: #2a2416; --or: #f0d78a; --bleu: #4f8fd6; --rouge: #c95b5b;
}
/* Le HUD du vrai client (timeline, barre de combat, chat, fenêtres…) est dans css/hud.css ;
   le socle du thème (polices, couleurs, styles .ui-*) dans css/theme.css + theme-gen.css. */
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--fond); color: var(--encre); font-family: Georgia, "Times New Roman", serif; }
.hidden { display: none !important; }
h1, h2 { margin: 0; }
kbd { background: #d9c79a; border: 1px solid #5b4f35; border-radius: 4px; padding: 0 4px; font-family: inherit; font-size: 12px; }

/* Boutons image Godot (130x32 base ; variantes hovered / clicked) — plus utilisés par les écrans, gardés pour compatibilité */
.gbtn { position: relative; width: 130px; height: 32px; border: 0; background: transparent center / 100% 100% no-repeat; cursor: pointer;
  color: transparent; font-size: 0; image-rendering: auto; }
.gbtn.big { width: 258px; height: 58px; }
.gbtn:disabled { filter: grayscale(1) brightness(0.8); cursor: not-allowed; }
button:disabled { cursor: not-allowed; }

/* ---------- Boîte de menu (écran de création du coach) ---------- */
.menu-box { text-align: center; padding: 40px 48px; background: rgba(60, 50, 30, 0.35); border: 3px solid var(--fond-sombre); border-radius: 14px; box-shadow: 0 10px 0 #3b3220; }
.menu-box h1 { font-size: 56px; color: var(--or); text-shadow: 0 3px 0 #2a2416, 0 0 18px rgba(0,0,0,.4); letter-spacing: 4px; }
.menu-box .sub { color: #e9dcb4; margin: 4px 0 24px; font-style: italic; }

/* ---------- Barres (écrans Équipe / Carte) ---------- */
.bar { display: flex; align-items: center; gap: 14px; padding: 10px 16px; }
.bar h2 { flex: 1; text-align: center; font-size: 22px; }
.team-tabs { display: flex; gap: 6px; }
.budget { margin-left: auto; width: 197px; height: 28px; position: relative; font-weight: bold; font-size: 15px; color: #2a2416; }
.budget span { position: absolute; left: 24px; top: 4px; width: 52px; text-align: right; }
.budget.over span { color: #b1261e; }

/* ---------- Équipe ---------- */
#team-strip { display: flex; justify-content: center; gap: 0; }
.tslot { position: relative; width: 146px; height: 182px; cursor: pointer; }
.tslot.sel::after { content: ""; position: absolute; inset: 6px 4px; border: 3px solid var(--or); border-radius: 8px; box-shadow: 0 0 10px var(--or); pointer-events: none; }
.tslot .fig { position: absolute; left: 50%; top: 34px; width: 70px; height: 128px; margin-left: -35px; }
.tslot .fig img { position: absolute; left: 0; top: 0; width: 70px; height: 128px; }
.tslot .fig img.classe { left: 5px; top: 10px; width: 60px; height: 108px; }
.tslot .lbl { position: absolute; left: 0; right: 0; bottom: 6px; text-align: center; font-size: 12px; font-weight: bold; color: #f6e7b8; text-shadow: 0 1px 2px #000; }
.tslot .kam { position: absolute; left: 0; right: 0; top: 8px; text-align: center; font-size: 11px; color: #f6e7b8; text-shadow: 0 1px 2px #000; }
.editor { display: flex; gap: 18px; width: 876px; margin: 14px auto; align-items: flex-start; }
.editor-left { flex: 0 0 250px; }
.stats-primaires { position: relative; width: 250px; height: 111px; font-size: 13px; font-weight: bold; }
.stats-primaires .sp { position: absolute; top: 18px; width: 23px; text-align: center; }
.stats-primaires .pm { left: 10px; } .stats-primaires .hp { left: 53px; } .stats-primaires .ini { left: 174px; } .stats-primaires .pa { left: 218px; }
.stats-primaires .kamas { left: 105px; top: 12px; width: 40px; }
.stats-secondaires { position: relative; width: 248px; height: 453px; font-size: 11px; font-weight: bold; margin-top: 8px; }
.stats-secondaires span { position: absolute; left: 211px; width: 26px; text-align: center; }
.editor-actions { margin-top: 10px; display: flex; gap: 8px; }
.editor-right { flex: 1; min-height: 560px; padding: 10px; }
.etabs { display: flex; gap: 6px; margin-bottom: 10px; }
.classes-grid { display: grid; grid-template-columns: repeat(7, 76px); gap: 8px; }
.classes-grid button { width: 76px; height: 76px; border: 0; background: transparent center / 100% 100% no-repeat; cursor: pointer; font-size: 0; }
.classes-grid button.sel { outline: 3px solid var(--or); border-radius: 8px; }
.liste { display: flex; flex-direction: column; gap: 4px; max-height: 500px; overflow: auto; }
.item { display: flex; align-items: center; gap: 10px; padding: 4px 8px; border: 2px solid transparent; border-radius: 6px; cursor: pointer; background: rgba(255,255,255,0.08); }
.item:hover { background: rgba(255,255,255,0.18); }
.item.sel { border-color: var(--or); background: rgba(240,215,138,0.25); }
.item img { width: 38px; height: 38px; }
.item .nom { flex: 1; font-size: 13px; }
.item .cout { font-size: 12px; color: #4a3a10; font-weight: bold; }
.item .meta { font-size: 11px; color: #4a3a10; }
.equip-cats { display: flex; gap: 6px; margin-bottom: 8px; }
.equip-cats button { width: 44px; height: 44px; border: 2px solid #2b2418; border-radius: 6px; background: #d9c79a center / 36px no-repeat; cursor: pointer; }
.equip-cats button.active { background-color: var(--or); }
.equip-grid { display: grid; grid-template-columns: repeat(6, 72px); gap: 8px; max-height: 470px; overflow: auto; }
.equip-grid button { width: 72px; height: 72px; border: 0; background: transparent center / 100% 100% no-repeat; cursor: pointer; font-size: 0; border-radius: 8px; }
.equip-grid button.sel { outline: 3px solid var(--or); }

/* ---------- Cartes ---------- */
#maps-grid { display: grid; grid-template-columns: repeat(auto-fill, 220px); gap: 14px; justify-content: center; padding: 20px; }
#maps-grid button { width: 220px; height: 124px; border: 0; background: transparent center / 100% 100% no-repeat; cursor: pointer; color: #fff; font-family: inherit; text-shadow: 0 1px 2px #000; font-size: 13px; display: flex; align-items: flex-end; justify-content: center; padding-bottom: 4px; border-radius: 6px; }
#maps-grid button.sel { outline: 4px solid var(--or); }
.maps-titre { grid-column: 1 / -1; color: var(--or); font-size: 18px; margin: 10px 0 0; text-shadow: 0 1px 0 #2a2416; }

/* ---------- Multijoueur ---------- */
.multi-box { display: flex; gap: 24px; justify-content: center; padding: 30px 20px 10px; flex-wrap: wrap; }
.multi-col { width: 360px; padding: 18px 22px; color: #f3e9c8; text-align: center; }
.multi-col h3 { margin: 0 0 8px; color: var(--or); }
.multi-col p { font-size: 14px; }
.multi-col input { display: block; margin: 8px auto; width: 160px; padding: 6px; font-family: inherit; font-size: 22px; text-align: center; letter-spacing: 4px; text-transform: uppercase; }
.multi-col .code { margin-top: 12px; font-size: 34px; letter-spacing: 6px; font-weight: bold; color: var(--or); text-shadow: 0 2px 0 #2a2416; }
.statut { text-align: center; color: #f3e9c8; font-size: 15px; min-height: 20px; }
#screen-multi .help { text-align: center; color: #cbbf9a; font-size: 12px; }

/* ---------- Boutons texte génériques (bulle / panneaux de l'île) ---------- */
.btn { font-family: Georgia, serif; font-size: 13px; background: linear-gradient(#e7cd84, #a8843a); color: #2a1f10; border: 2px solid #2b2418; border-radius: 6px; padding: 5px 10px; cursor: pointer; margin: 2px; }
.btn:disabled { background: #6f6a5a; color: #c9c3ae; cursor: not-allowed; }
.btn.rouge { background: linear-gradient(#d4664a, #8e2e1f); color: #fff; }
.btn.grand { font-size: 16px; padding: 8px 18px; }
.btn.ferme { padding: 2px 8px; }
.muted { color: #cbbf9a; font-size: 12px; }
.etat { color: #ffd36b; font-size: 12px; }

/* ---------- Connexion / coach ---------- */
#screen-login, #screen-coach { display: flex; align-items: center; justify-content: center; background: #000 url(../assets/gui/theme/images/fullBackground.png) center / cover no-repeat; }
@font-face { font-family: 'Copperplate DA'; src: url(../assets/gui/theme/fonts/COPRGTB.TTF); }
/* Panneau de connexion du vrai client (logonDialog.xml : conteneur 754x730, boîte 275x325 centrée, décalée de 60 px) */
.login-panneau { position: relative; width: 754px; height: 730px; background: url(../assets/gui/theme/images/loginBackground.png) no-repeat; flex: none; }
.logon-box { position: absolute; left: 240px; top: 263px; width: 275px; height: 325px; }
.logon-titre { position: absolute; left: 0; top: 0; width: 275px; height: 25px; display: flex; align-items: center; justify-content: space-between; padding: 0 10px 0 10px; box-sizing: border-box; }
.da-titre { font: bold 14px 'Copperplate DA', Georgia, serif; color: #e6dcb8; text-shadow: 0 1px 1px #000; }
.logon-langues i { display: inline-block; width: 20px; height: 28px; background: url(../assets/gui/ui/radio_login.png) center no-repeat; margin-right: 2px; opacity: 0.55; }
.logon-langues i.sel { opacity: 1; }
#logon-form { position: absolute; left: 30px; top: 50px; width: 215px; }
.da-etiquette { font: 11px Tahoma, Verdana, sans-serif; color: #efe6cc; background: rgba(60,45,25,0.6); padding: 3px 6px; margin-top: 4px; }
.da-input { display: block; width: 100%; box-sizing: border-box; height: 20px; margin: 2px 0 6px; padding: 1px 4px; font: 11px Tahoma, Verdana, sans-serif; color: #000; border: 1px solid #7b6a48; border-image: url(../assets/gui/ui/input.png) 1 fill stretch; background: #e9dfc2; outline: none; }
.da-check { display: flex; align-items: center; gap: 5px; font: 11px Tahoma, Verdana, sans-serif; color: #4a2b12; margin: 2px 0 6px; cursor: pointer; }
.da-check input { display: none; }
.da-check span { width: 15px; height: 15px; background: url(../assets/gui/ui/check_off.png); }
.da-check input:checked + span { background: url(../assets/gui/ui/check_on.png); }
.da-combo { width: 150px; margin: 0 auto; height: 18px; line-height: 18px; text-align: center; font: 11px Tahoma, Verdana, sans-serif; color: #000; border-image: url(../assets/gui/ui/input.png) 1 fill stretch; border: 1px solid #7b6a48; background: #e9dfc2; }
.da-btn-green { position: absolute; left: 47px; bottom: 30px; width: 180px; height: 25px; font: bold 14px 'Copperplate DA', Georgia, serif; color: #4a2b12; cursor: pointer; border: 0; padding: 0; border-image: url(../assets/gui/ui/btn_green.png) 5 3 fill stretch; border-width: 5px 3px; background: none; }
.da-btn-green:hover { border-image-source: url(../assets/gui/ui/btn_green_over.png); }
.da-btn-green:active { border-image-source: url(../assets/gui/ui/btn_green_pressed.png); }
.da-btn, .btn.da { font: 11px Tahoma, Verdana, sans-serif; color: #e6e6cc; cursor: pointer; padding: 2px 10px; min-height: 22px; border: 0; border-image: url(../assets/gui/ui/btn_default.png) 2 fill stretch; border-width: 2px; background: none; }
.da-btn:hover { border-image-source: url(../assets/gui/ui/btn_over.png); }
.da-btn:active { border-image-source: url(../assets/gui/ui/btn_pressed.png); }
.da-btn-light { font: bold 13px Tahoma, Verdana, sans-serif; color: #e6e6cc; background: none; border: 0; cursor: pointer; text-shadow: 0 1px 2px #000; }
.logon-quit { position: absolute; right: 25px; top: 15px; width: 30px; height: 60px; }
.logon-aide { position: absolute; left: 0; bottom: 4px; width: 275px; text-align: center; font: 10px Tahoma, Verdana, sans-serif; color: #5a4328; }
/* Création du coach (coachCreationDialog.xml : conteneur 754x600 centré ; coordonnées « sld » du client, y mesuré depuis le bas) */
.creation-fond { position: relative; width: 754px; height: 600px; flex: none; }
.creation { position: relative; width: 754px; height: 600px; }
.creation .cr-titre { position: absolute; left: 265px; top: 47px; width: 225px; height: 20px; display: flex; align-items: center; justify-content: center; text-align: center; }
.creation .cr-panneau { position: absolute; width: 240px; height: 300px; top: 176px; }
.creation .cr-gauche { left: 104px; display: flex; flex-direction: column; }
.creation .cr-droite { left: 428px; }
.cr-etiq { display: inline-flex; align-items: center; justify-content: center; height: 30px; padding: 0 6px; min-width: 100px; white-space: nowrap; }
.cr-etiq-court { height: 20px; }
.cr-nom { display: flex; align-items: center; gap: 4px; padding: 0 2px 2px 10px; }
.cr-nom input { flex: 1; min-width: 0; height: 22px; text-align: center; background: transparent; outline: none; padding: 0 4px; }
.cr-nom input:focus { background: rgba(255,255,255,0.08); }
.cr-centre { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 5px 25px; }
.cr-section { display: flex; flex-direction: column; align-items: center; gap: 5px; }
.cr-grille { display: grid; grid-template-columns: repeat(8, 16px); gap: 1px 2px; }
.cr-grille button { width: 16px; height: 16px; padding: 0; margin: 1px; cursor: pointer; border: 0; }
.cr-alea { margin-top: 6px; }
.cr-alea button { background: transparent; border: 0; cursor: pointer; padding: 2px 10px; }
.cr-sexe { display: flex; align-items: center; gap: 15px; padding: 10px 15px 10px 10px; border-top: 1px solid rgba(0,0,0,0.25); }
.cr-sexe-btns { display: flex; align-items: center; gap: 12px; }
.cr-sexe-btns button { border: 0; background-color: transparent; padding: 0; cursor: pointer; opacity: 0.55; }
.cr-sexe-btns button.selected { opacity: 1; }
#coach-apercu { position: absolute; left: 0; top: 0; width: 240px; height: 300px; }
.cr-rot { position: absolute; bottom: 0; border: 0; background-color: transparent; padding: 0; cursor: pointer; }
.cr-rot-g { left: 3px; } .cr-rot-d { left: 194px; }
.cr-valider { position: absolute; left: 307px; top: 507px; width: 150px; height: 30px; background-color: transparent; cursor: pointer; }
.cr-quitter { position: absolute; right: 0; top: 0; width: 70px; height: 30px; border: 0; background: transparent; cursor: pointer; text-align: right; }
/* Le texte saisi est noir dans le vrai client (NamedColor text 0,0,0 de <texteditor>), pas clair comme le libellé */
.ui-texteditor { color: #000; caret-color: #000; }
.ui-texteditor::selection { background: rgba(51, 51, 51, 0.6); }
.ui-texteditor::placeholder { color: rgba(0, 0, 0, 0.4); }
h1, h2 { font-family: 'Copperplate DA', Georgia, serif; }
.compte input, .login-creer input, .coach-form input[type=text], .coach-form input:not([type]) { font-family: inherit; font-size: 14px; padding: 5px 8px; border: 2px solid #2b2418; border-radius: 6px; background: #efe2bd; color: #2a1f10; width: 150px; }
.coach-form { color: #f3e9c8; display: flex; flex-direction: column; gap: 10px; align-items: center; }
.coach-form input:not([type]) { font-size: 16px; }
#coach-apercu { display: block; margin: 0 auto 8px; background: rgba(0,0,0,0.25); border-radius: 10px; }

/* ---------- Île : contenu des panneaux et de la bulle (généré par meta_ui.js) ---------- */
#hub-main { position: relative; }
#hub-bulle { position: absolute; z-index: 5; max-width: 300px; font-size: 13px; }
#hub-bulle p { margin: 4px 0 8px; }
#hub-bulle .btn { display: block; width: 100%; text-align: left; margin: 3px 0; }
#hub-bulle .btn.ferme { position: absolute; top: 4px; right: 4px; width: auto; }
#hub-panneau-corps { padding: 12px 16px; overflow: auto; }
.cartes { display: flex; flex-wrap: wrap; gap: 10px; }
.carte { width: 215px; display: flex; gap: 8px; padding: 8px; border: 3px solid #5b4f35; border-radius: 8px; background: rgba(255,255,255,0.1); cursor: pointer; font-size: 12px; }
.carte:hover { background: rgba(255,255,255,0.2); }
.carte.sel { border-color: var(--or); box-shadow: 0 0 8px var(--or); }
.carte.ko { opacity: 0.55; }
.carte .fig, .fiche-haut .fig { position: relative; flex: 0 0 70px; height: 128px; }
.fig img { position: absolute; left: 0; top: 0; width: 70px; height: 128px; }
.fig img.classe { left: 5px; top: 10px; width: 60px; height: 108px; }
.recrue { margin-top: 16px; padding-top: 10px; border-top: 2px solid #5b4f35; }
.recrue h4, .section h4 { margin: 4px 0 8px; color: #2a1f10; }
.recrue input { font-family: inherit; padding: 4px 8px; margin-bottom: 8px; }
.classes-grid.petite { grid-template-columns: repeat(14, 56px); }
.classes-grid.petite button { width: 56px; height: 56px; }
.fiche-haut { display: flex; gap: 14px; align-items: flex-start; font-size: 13px; }
.fiche-stats { flex: 1; display: flex; flex-direction: column; gap: 4px; }
.xpbar { position: relative; height: 16px; background: #3b3220; border-radius: 8px; overflow: hidden; width: 320px; }
.xpbar i { display: block; height: 100%; background: linear-gradient(#f9dc7a, #c9962a); }
.xpbar span { position: absolute; left: 0; right: 0; top: 0; text-align: center; font-size: 11px; color: #fff; text-shadow: 0 1px 2px #000; line-height: 16px; }
.fiche-actions { display: flex; flex-direction: column; gap: 4px; }
.section { margin-top: 14px; padding-top: 8px; border-top: 2px solid #5b4f35; }
.liste-sorts { display: grid; grid-template-columns: repeat(auto-fill, 290px); gap: 6px; }
.equips { display: flex; gap: 12px; flex-wrap: wrap; }
.equip-col { display: flex; flex-direction: column; align-items: center; gap: 4px; font-size: 12px; }
.equip-cat { width: 44px; height: 44px; border: 2px solid #2b2418; border-radius: 6px; background: #d9c79a center / 36px no-repeat; }
.equip-col select { font-family: inherit; font-size: 12px; max-width: 170px; }
.ameliorations { display: flex; flex-wrap: wrap; gap: 4px; }
.boutique { display: grid; grid-template-columns: repeat(auto-fill, 440px); gap: 8px; }
.article { display: flex; align-items: center; gap: 10px; padding: 6px; border: 2px solid #5b4f35; border-radius: 8px; background: rgba(255,255,255,0.1); font-size: 13px; }
.article img { width: 56px; height: 56px; }
.article .ai { flex: 1; }
.tombe { padding: 6px 0; border-bottom: 1px dotted #5b4f35; font-size: 13px; }
table.res { width: 100%; border-collapse: collapse; margin: 10px 0; font-size: 13px; }
table.res th, table.res td { text-align: left; padding: 4px 8px; border-bottom: 1px solid rgba(255,255,255,0.15); }
table.res tr.mort td { color: #ff9a9a; }

.coach-ligne { display: flex; gap: 18px; align-items: flex-start; }
.coach-apercu-box { width: 150px; height: 260px; display: flex; align-items: flex-end; justify-content: center; background: rgba(0,0,0,0.25); border-radius: 10px; }
.coach-apercu-box img { max-height: 240px; max-width: 140px; }
.coach-opts { display: flex; gap: 10px; align-items: center; margin: 8px 0; font-size: 13px; }
.coach-opts .sep { width: 14px; }
#coach-classes { margin-top: 6px; grid-template-columns: repeat(7, 56px); }
.fig img.da2 { position: absolute; left: 0; bottom: 0; width: 70px; height: 128px; object-fit: contain; object-position: bottom; }
.tslot .fig img.da2 { width: 70px; height: 128px; }
