/* ================================================================ SUCCES & PROFILS */
/* --- medaille : ruban + disque frappe (or / argent / bronze) */
.medal { --m1: #fff3b8; --m2: #e9b93a; --m3: #9c6a0a; --mr: #6e4a06; --r1: #b8242c; --r2: #7c1218;
  position: relative; width: 74px; height: 92px; flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; }
.medal.argent { --m1: #ffffff; --m2: #c9d3dc; --m3: #77838f; --mr: #4e5862; --r1: #2c5aa8; --r2: #16306a; }
.medal.bronze { --m1: #ffd6ac; --m2: #c77a3a; --m3: #7a3f14; --mr: #522808; --r1: #2e7a46; --r2: #15442a; }
.medal .m-ribbon { position: relative; width: 44px; height: 30px; display: flex; justify-content: center; gap: 2px; margin-bottom: -8px; z-index: 0; }
.medal .m-ribbon i { display: block; width: 20px; height: 34px; background: linear-gradient(90deg, var(--r2), var(--r1) 40%, var(--r1) 60%, var(--r2)); clip-path: polygon(0 0, 100% 0, 100% 100%, 50% 82%, 0 100%); }
.medal .m-ribbon i:first-child { transform: skewX(14deg); }
.medal .m-ribbon i:last-child { transform: skewX(-14deg); }
.medal .m-disc { position: relative; z-index: 1; width: 64px; height: 64px; border-radius: 50%;
  background: radial-gradient(circle at 34% 28%, var(--m1) 0%, var(--m2) 42%, var(--m3) 100%);
  box-shadow: 0 0 0 2px var(--mr), 0 0 0 4px var(--m2), 0 0 0 5px var(--mr), 0 6px 14px rgba(0, 0, 0, 0.55), inset 0 -4px 8px rgba(0, 0, 0, 0.25);
  display: flex; align-items: center; justify-content: center; overflow: hidden; }
.medal .m-ring { position: absolute; inset: 6px; border-radius: 50%; border: 1.5px dashed rgba(0, 0, 0, 0.28); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.35); }
.medal .m-icon { position: relative; font-size: 28px; line-height: 1; filter: drop-shadow(0 2px 1px rgba(0, 0, 0, 0.45)); }
.medal .m-shine { position: absolute; inset: 0; border-radius: 50%; background: linear-gradient(125deg, rgba(255, 255, 255, 0) 35%, rgba(255, 255, 255, 0.55) 48%, rgba(255, 255, 255, 0) 60%); background-size: 260% 260%; background-position: 100% 100%; }
.ach-card.got:hover .medal .m-shine, .trophy .medal .m-shine { animation: medalShine 1.4s ease-out; }
@keyframes medalShine { from { background-position: 100% 100%; } to { background-position: 0% 0%; } }
.medal.locked .m-disc { background: radial-gradient(circle at 34% 28%, #6a645a 0%, #3e3a34 55%, #24211d 100%); box-shadow: 0 0 0 2px #1a1814, 0 0 0 4px #4a453d, 0 0 0 5px #1a1814, 0 6px 14px rgba(0, 0, 0, 0.5); }
.medal.locked .m-ribbon i { background: linear-gradient(90deg, #2a2722, #4a463e 50%, #2a2722); }
.medal.locked .m-icon { opacity: 0.55; font-size: 22px; filter: grayscale(1); }
.medal.sm { transform: scale(0.72); margin: -12px -10px; }
.medal.xs { transform: scale(0.34); margin: -30px -24px; }

/* --- blason (ecu) du profil : SVG dessine (ui/blason.js) */
.shield { width: 64px; height: 77px; flex: 0 0 auto; filter: drop-shadow(0 4px 7px rgba(0, 0, 0, 0.6)); }
.shield svg.blason { width: 100%; height: 100%; display: block; overflow: visible; }
.shield.sm { width: 42px; height: 50px; }
.shield.md { width: 72px; height: 86px; }
.shield.lg { width: 96px; height: 115px; }
.shield.xl { width: 140px; height: 168px; }

/* --- bandeau du profil dans le menu principal */
.menu-profile { position: absolute; top: 22px; right: 26px; display: flex; align-items: center; gap: 14px; padding: 10px 18px 10px 12px; cursor: pointer;
  background: linear-gradient(180deg, rgba(50, 36, 18, 0.88), rgba(24, 17, 9, 0.92)); border: 1px solid var(--line); border-radius: 10px; color: var(--ink); font: inherit; text-align: left;
  box-shadow: 0 8px 26px rgba(0, 0, 0, 0.5); transition: border-color 0.15s, transform 0.15s; }
.menu-profile:hover { border-color: var(--gold); transform: translateY(-1px); }
.mp-name { font-family: var(--title); color: var(--gold2); font-size: 18px; letter-spacing: 1px; }
.mp-rank { font-size: 13px; color: var(--muted); }
.mp-tiers { display: flex; gap: 8px; margin-top: 4px; }
.mp-chg { font-size: 12px; color: var(--gold); margin-left: 6px; opacity: 0.85; }
.tc { display: flex; align-items: center; gap: 2px; font-size: 13px; }
.tc b { color: var(--ink); }
.tc small { color: var(--muted); font-size: 11px; }

/* --- ecran des succes */
.ach-screen { align-items: center; }
.panel.ach { width: min(1180px, 96vw); max-height: 92vh; display: flex; flex-direction: column; padding: 22px 26px; }
.ach-head { display: grid; grid-template-columns: 1.25fr 1.6fr auto; gap: 22px; align-items: center; padding: 6px 4px 18px; border-bottom: 1px solid var(--line); }
.ach-prof { display: flex; align-items: center; gap: 16px; min-width: 0; }
.ach-pinfo { min-width: 0; flex: 1; }
.ach-pname { font-family: var(--deco); color: var(--gold); font-size: 26px; line-height: 1.1; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ach-rank { font-family: var(--title); color: var(--gold2); font-size: 17px; margin-top: 2px; }
.ach-rank span { font-family: var(--ui); color: var(--muted); font-size: 14px; }
.rankbar { height: 8px; border-radius: 4px; background: rgba(0, 0, 0, 0.5); border: 1px solid rgba(232, 192, 96, 0.25); margin: 8px 0 5px; overflow: hidden; }
.rankbar i { display: block; height: 100%; background: linear-gradient(90deg, #8a5a10, #e8c060, #fff0b0); border-radius: 4px; box-shadow: 0 0 10px rgba(232, 192, 96, 0.5); }
.ach-next { font-size: 13px; color: var(--muted); }
.ach-next b { color: var(--gold2); }
.ach-tiers { display: flex; justify-content: space-around; gap: 6px; }
.ach-tier { display: flex; align-items: center; gap: 4px; }
.ach-tier b { display: block; font-family: var(--title); font-size: 26px; color: var(--ink); line-height: 1; }
.ach-tier b small { font-size: 15px; color: var(--muted); }
.ach-tier span { font-size: 12px; text-transform: uppercase; letter-spacing: 1px; }
.ach-tier.or span { color: #f0c850; }
.ach-tier.argent span { color: #c9d3dc; }
.ach-tier.bronze span { color: #d98a4a; }
.ach-ring { --p: 0; width: 108px; height: 108px; border-radius: 50%; display: flex; align-items: center; justify-content: center;
  background: conic-gradient(#e8c060 calc(var(--p) * 1%), rgba(255, 255, 255, 0.08) 0); box-shadow: 0 0 0 1px var(--line), 0 6px 18px rgba(0, 0, 0, 0.5); }
.ach-ring > div { width: 86px; height: 86px; border-radius: 50%; background: radial-gradient(circle at 40% 30%, #3a2a14, #160f07); display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.05; }
.ach-ring b { font-family: var(--title); font-size: 28px; color: var(--gold2); }
.ach-ring small { color: var(--muted); font-size: 13px; }
.ach-ring span { font-size: 12px; color: var(--gold); margin-top: 2px; }
.ach-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 16px 0 10px; }
.ach-tabs button { font: inherit; font-size: 15px; color: var(--ink); cursor: pointer; padding: 7px 14px; border-radius: 18px; border: 1px solid rgba(232, 192, 96, 0.22); background: rgba(0, 0, 0, 0.3); transition: background 0.12s, border-color 0.12s; }
.ach-tabs button small { color: var(--muted); margin-left: 4px; font-size: 12px; }
.ach-tabs button:hover { border-color: var(--gold); }
.ach-tabs button.on { background: linear-gradient(180deg, #a8782e, #6a4616); border-color: var(--gold); color: #fff6dd; }
.ach-tabs button.on small { color: #f5e2b0; }
.ach-filters { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; flex-wrap: wrap; }
.ach-legend { font-size: 13px; color: var(--muted); }
.ach-grid { flex: 1; min-height: 0; overflow-y: auto; display: grid; grid-template-columns: repeat(auto-fill, minmax(330px, 1fr)); gap: 12px; padding: 2px 6px 6px 2px; align-content: start; }
.ach-none { color: var(--muted); padding: 30px; text-align: center; grid-column: 1 / -1; }
.ach-card { --tc: #8a6a3a; --tg: rgba(138, 106, 58, 0.14); --tb: rgba(138, 106, 58, 0.5);
  position: relative; display: flex; gap: 12px; align-items: center; padding: 12px 14px 12px 8px; border-radius: 10px; min-height: 112px;
  background: linear-gradient(180deg, rgba(36, 27, 16, 0.92), rgba(18, 13, 8, 0.95)); border: 1px solid rgba(255, 255, 255, 0.07); transition: transform 0.12s, border-color 0.12s; }
.ach-card.or { --tc: #e8b93a; --tg: rgba(232, 185, 58, 0.14); --tb: rgba(232, 185, 58, 0.55); }
.ach-card.argent { --tc: #b8c4cf; --tg: rgba(184, 196, 207, 0.12); --tb: rgba(184, 196, 207, 0.5); }
.ach-card.bronze { --tc: #c87a3a; --tg: rgba(200, 122, 58, 0.14); --tb: rgba(200, 122, 58, 0.55); }
.ach-card.got { border-color: var(--tb); background: linear-gradient(180deg, var(--tg), rgba(0, 0, 0, 0) 70%), linear-gradient(180deg, rgba(36, 27, 16, 0.95), rgba(18, 13, 8, 0.96)); box-shadow: inset 0 0 22px var(--tg); }
.ach-card.got::before { content: ""; position: absolute; left: 0; top: 10px; bottom: 10px; width: 3px; border-radius: 2px; background: var(--tc); box-shadow: 0 0 8px var(--tc); }
.ach-card:hover { transform: translateY(-1px); border-color: var(--tb); }
.ach-card:not(.got) .ach-name { color: #cfc4ad; }
.ach-card.secret .ach-desc { font-style: italic; }
.ach-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.ach-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.ach-name { font-family: var(--title); font-size: 17px; color: var(--gold2); letter-spacing: 0.5px; line-height: 1.2; }
.tierchip { flex: 0 0 auto; font-size: 11px; text-transform: uppercase; letter-spacing: 1px; padding: 2px 8px; border-radius: 10px; border: 1px solid; white-space: nowrap; }
.tierchip.or { color: #f5d06a; border-color: rgba(232, 185, 58, 0.6); background: rgba(232, 185, 58, 0.12); }
.tierchip.argent { color: #dbe3ea; border-color: rgba(184, 196, 207, 0.55); background: rgba(184, 196, 207, 0.1); }
.tierchip.bronze { color: #e29a5c; border-color: rgba(200, 122, 58, 0.6); background: rgba(200, 122, 58, 0.12); }
.ach-desc { font-size: 14px; color: var(--muted); line-height: 1.35; }
.ach-card.got .ach-desc { color: #ddd2bb; }
.ach-prog { display: flex; align-items: center; gap: 8px; margin-top: 2px; }
.ach-prog .pbar { flex: 1; height: 7px; border-radius: 4px; background: rgba(0, 0, 0, 0.55); border: 1px solid rgba(255, 255, 255, 0.08); overflow: hidden; }
.ach-prog .pbar i { display: block; height: 100%; border-radius: 4px; background: var(--tc); opacity: 0.85; }
.ach-prog span { font-size: 12px; color: var(--muted); white-space: nowrap; }
.ach-foot { font-size: 12px; }
.ach-date { color: #a8e090; }
.ach-cat { color: rgba(185, 171, 142, 0.7); }

/* --- ecran des profils */
.panel.profiles { width: min(1060px, 96vw); }
.pf-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.pf-card { position: relative; display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 22px 16px 16px; border-radius: 12px; text-align: center;
  background: linear-gradient(180deg, rgba(44, 32, 18, 0.92), rgba(18, 13, 8, 0.96)); border: 1px solid rgba(232, 192, 96, 0.2); }
.pf-card.active { border-color: var(--gold); box-shadow: 0 0 0 1px var(--gold), 0 0 26px rgba(232, 192, 96, 0.2); }
.pf-card.empty { justify-content: center; border-style: dashed; opacity: 0.9; }
/* (08/11, retour testeur : « arret d'image au clic sur Profil du joueur ») l'ombre portee en filtre des grands blasons coutait 100 ms
   au premier affichage : ombre peinte dessous a la place (degrade), meme effet a l'oeil */
.pf-card .shield { filter: none; background: radial-gradient(ellipse 46% 14% at 50% 96%, rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0) 100%); }
.pf-flag { position: absolute; top: -11px; left: 50%; transform: translateX(-50%); background: var(--gold); color: #1a1208; font-size: 12px; font-weight: 700; padding: 3px 12px; border-radius: 10px; letter-spacing: 1px; text-transform: uppercase; }
.pf-name { font-family: var(--deco); color: var(--gold); font-size: 22px; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pf-sub, .pf-last { font-size: 13px; color: var(--muted); }
.pf-rank { font-family: var(--title); color: var(--gold2); font-size: 15px; }
.pf-tiers { display: flex; gap: 12px; justify-content: center; }
.pf-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; width: 100%; margin: 4px 0; }
.pf-stats div { background: rgba(0, 0, 0, 0.3); border-radius: 6px; padding: 6px 4px; display: flex; flex-direction: column; }
.pf-stats span { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.5px; }
.pf-stats b { font-size: 15px; color: var(--ink); }
.pf-acts { display: flex; flex-direction: column; gap: 6px; width: 100%; margin-top: 4px; }
.pf-acts > .mbtn { text-align: center; }
.pf-small { display: flex; gap: 6px; }
.pf-small .mbtn { flex: 1; margin-top: 0; text-align: center; }
.pf-card.empty .mbtn { margin-top: 10px; text-align: center; }
.panel.pf-form { width: min(720px, 94vw); }
.pff { display: flex; gap: 26px; align-items: flex-start; }
.pff-prev { display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 10px 6px; min-width: 160px; }
.pff-pname { font-family: var(--deco); color: var(--gold); font-size: 20px; text-align: center; max-width: 170px; overflow: hidden; text-overflow: ellipsis; }
.pff-opts { flex: 1; display: flex; flex-direction: column; gap: 8px; }
.pff-opts label { color: var(--gold2); font-size: 15px; margin-top: 6px; }
.pff-opts input { font: inherit; font-size: 17px; color: var(--ink); background: rgba(0, 0, 0, 0.4); border: 1px solid var(--line); border-radius: 6px; padding: 9px 12px; outline: none; user-select: text; }
.pff-opts input:focus { border-color: var(--gold); box-shadow: 0 0 0 2px rgba(232, 192, 96, 0.2); }
.pff-opts input.bad { border-color: var(--danger); box-shadow: 0 0 0 2px rgba(255, 90, 74, 0.25); }
.pf-emb { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; }
.pf-part { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; }
.pf-emb button, .pf-part button { padding: 6px 4px 4px; border-radius: 8px; cursor: pointer; background: rgba(0, 0, 0, 0.35); border: 1px solid rgba(232, 192, 96, 0.15); display: flex; flex-direction: column; align-items: center; gap: 2px; }
.pf-emb button svg, .pf-part button svg { width: 38px; height: 46px; }
.pf-part button span { font-size: 11px; color: var(--muted); }
.pf-emb button:hover, .pf-part button:hover { border-color: var(--gold); }
.pf-emb button.on, .pf-part button.on { border-color: var(--gold); background: rgba(232, 192, 96, 0.2); box-shadow: 0 0 0 1px var(--gold); }
.pf-part button.on span { color: var(--gold2); }
.pff-desc { font-size: 13px; color: var(--muted); font-style: italic; text-align: center; }
.pf-col { display: flex; gap: 10px; }
.pf-col button { width: 40px; height: 40px; border-radius: 50%; cursor: pointer; border: 2px solid rgba(0, 0, 0, 0.5); background: linear-gradient(180deg, var(--sc), var(--sd)); }
.pf-col button.on { box-shadow: 0 0 0 2px #1a1208, 0 0 0 4px var(--gold); }

/* --- notification de succes en jeu */
.trophy { min-width: 300px; max-width: 380px; padding: 10px 16px 10px 6px; }
.trophy.or { border-color: #e8b93a; box-shadow: 0 6px 24px rgba(0, 0, 0, 0.6), 0 0 22px rgba(232, 185, 58, 0.35); }
.trophy.argent { border-color: #b8c4cf; background: linear-gradient(180deg, #3c4048, #1c1e22); }
.trophy.bronze { border-color: #c87a3a; background: linear-gradient(180deg, #4a2c14, #24150a); }
.trophy .at-body { display: flex; flex-direction: column; gap: 1px; }
.trophy .at-name { font-family: var(--title); font-size: 17px; color: #fff3d6; }
.trophy .at-desc { font-size: 13px; color: #d8ccb2; }
.trophy.argent .tt { color: #dbe3ea; }
.trophy.bronze .tt { color: #e29a5c; }

@media (max-width: 900px) {
  .ach-head { grid-template-columns: 1fr; }
  .pf-list { grid-template-columns: 1fr; }
  .pff { flex-direction: column; align-items: center; }
  .menu-profile { position: static; margin: 12px; }
}

/* --- icones dessinees des menus */
.mi { width: 1.15em; height: 1.15em; vertical-align: -0.2em; margin-right: 0.45em; color: var(--gold2); flex: 0 0 auto; }
.mbtn.primary .mi { color: #fff6dd; }
.panel h2 .mi { width: 1em; height: 1em; vertical-align: -0.12em; color: var(--gold); }

/* --- options : titres de section */
.opt-sec { font-family: var(--title); color: var(--gold); font-size: 15px; letter-spacing: 2px; text-transform: uppercase; margin: 18px 0 2px; padding-bottom: 4px; border-bottom: 1px solid var(--line); }
.opt-sec:first-child { margin-top: 4px; }

/* --- mode administrateur : onglets et pinceau d unites */
#devages .dsep { width: 1px; height: 18px; background: rgba(255, 176, 64, 0.4); margin: 0 4px; }
#devages button[disabled] { opacity: 0.4; cursor: not-allowed; }
#devunits { position: absolute; right: 12px; top: 96px; z-index: 20; width: 460px; max-height: 66vh; overflow-y: auto; overflow-x: hidden; padding: 10px 12px; border-radius: 10px;
  background: rgba(20, 14, 6, 0.94); border: 1px solid #ffb040; box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6); }
#devunits .du-h { color: #ffb040; font-weight: 700; font-size: 13px; margin: 2px 0 6px; }
/* bac a sable : onglets Unites / Batiments (21/10) */
#devunits .du-tabs { display: flex; gap: 6px; margin: 0 0 8px; }
#devunits .du-tabs button { flex: 1; padding: 6px 4px; border-radius: 8px; cursor: pointer; font-weight: 700; font-size: 13px; color: #f0e0c0; background: rgba(255, 176, 64, 0.08); border: 1px solid rgba(255, 176, 64, 0.35); }
#devunits .du-tabs button.on { background: #ffb040; color: #1a1208; }
#devunits .du-pane.hidden { display: none; }
#devunits .du-h small { display: block; font-weight: 400; color: #c8b890; font-size: 11px; margin-top: 2px; }
#devunits .du-h.z { color: #ff7a6a; margin-top: 10px; }
#devunits .du-g { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 5px; }
#devunits .du-g button { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 5px 2px; border-radius: 7px; cursor: pointer;
  background: rgba(255, 176, 64, 0.07); border: 1px solid rgba(255, 176, 64, 0.3); color: #f0e0c0; font-size: 11px; line-height: 1.1; }
#devunits .du-g button.z { background: rgba(255, 90, 70, 0.07); border-color: rgba(255, 90, 70, 0.35); }
#devunits .du-g button:hover { background: rgba(255, 176, 64, 0.22); }
#devunits .du-g button.on { background: #ffb040; color: #1a1208; }
#devunits .du-i { font-size: 20px; height: 30px; display: flex; align-items: center; justify-content: center; }   /* (21/10) retour a la taille d'avant le 18/10 (demande de l'utilisateur) */
#devunits .du-i img { width: 30px; height: 30px; }
#devunits .du-n { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* --- ecran de victoire : blason dans une couronne de laurier */
.vic-emblem { position: relative; width: 180px; height: 180px; margin: -6px auto 4px; display: flex; align-items: center; justify-content: center; animation: vicGlow 3s ease-in-out infinite; }
.vic-emblem .vic-laurel { position: absolute; inset: 0; width: 100%; height: 100%; filter: drop-shadow(0 4px 10px rgba(0, 0, 0, 0.6)); }
.vic-emblem .shield { position: relative; margin-top: -8px; }
@keyframes vicGlow { 0%, 100% { transform: translateY(0); filter: drop-shadow(0 0 0 rgba(232, 192, 96, 0)); } 50% { transform: translateY(-4px); filter: drop-shadow(0 0 18px rgba(232, 192, 96, 0.55)); } }

/* --- fete finale : legende doree */
.launch-cap.joy { font-style: normal; font-family: var(--title); font-size: 30px; color: #ffe08a; letter-spacing: 1px; text-shadow: 0 0 18px rgba(255, 200, 80, 0.7), 0 2px 6px #000; animation: joyPulse 1.6s ease-in-out infinite; }
@keyframes joyPulse { 0%, 100% { transform: translateX(-50%) scale(1); } 50% { transform: translateX(-50%) scale(1.05); } }

/* bac à sable : grosse bulle « Amusez-vous ! » au lancement */
.fun-banner { position: fixed; left: 50%; top: 16%; z-index: 9999; white-space: nowrap; pointer-events: none; transform: translate(-50%, -50%) scale(0.3) rotate(-8deg); opacity: 0;
  transition: transform 0.55s cubic-bezier(.2, 1.6, .4, 1), opacity 0.35s; }
.fun-banner.on { transform: translate(-50%, -50%) scale(1) rotate(-3deg); opacity: 1; }
.fun-banner.off { transform: translate(-50%, -80%) scale(1.15) rotate(-3deg); opacity: 0; transition: transform 0.9s ease-in, opacity 0.9s ease-in; }
.fun-banner span { display: block; padding: 0.35em 0.9em; border-radius: 1.2em; font: 900 clamp(48px, 8vw, 120px)/1 "Cinzel", Georgia, serif; letter-spacing: 0.02em;
  background: linear-gradient(90deg, #ff3b3b, #ffb21e, #ffe83a, #3fdc5a, #2fb6ff, #a659ff, #ff3b9c); background-size: 200% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-stroke: 3px rgba(40, 18, 4, 0.85);
  filter: drop-shadow(0 6px 0 rgba(0, 0, 0, 0.55)) drop-shadow(0 0 24px rgba(255, 220, 120, 0.55)); animation: funShift 1.6s linear infinite; }
@keyframes funShift { to { background-position: 200% 0; } }
.mbtn.rainbow.revealed { animation: revealPop 0.9s cubic-bezier(.2, 1.6, .4, 1); }
@keyframes revealPop { 0% { transform: scale(0.4); opacity: 0; } 100% { transform: scale(1); opacity: 1; } }
/* bac a sable : taille du pinceau de terrain (22/10) */
#devunits .du-taille { display: flex; align-items: center; gap: 8px; margin: 6px 2px 2px; font-size: 12px; color: #f0e0c0; }
#devunits .du-taille input { flex: 1; accent-color: #ffb040; }
#devunits .du-taille b { min-width: 38px; text-align: right; color: #ffb040; }
/* (24/11) bac a sable : categories, outils, palette ; tableau de choix de la carte */
#devunits.sandbox { width: 470px; max-height: 78vh; scrollbar-width: thin; scrollbar-color: rgba(255, 176, 64, 0.5) transparent; }
#devunits .du-chips { display: flex; flex-wrap: wrap; gap: 5px; margin: 2px 0 9px; }
#devunits .du-chips button { padding: 5px 9px; border-radius: 14px; font-size: 12.5px; font-weight: 600; cursor: pointer; color: #f0e0c0; background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 176, 64, 0.3); }
#devunits .du-chips button:hover { background: rgba(255, 176, 64, 0.2); }
#devunits .du-chips button.on { background: rgba(255, 176, 64, 0.9); color: #1a1208; border-color: #ffd080; }
#devunits .du-g.hidden { display: none; }
#devunits .du-emo { font-size: 22px; }
#devunits .du-outils { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; margin: 9px 0 4px; }
#devunits .du-outils.trois { grid-template-columns: 1fr 1fr 1fr; }
#devunits .du-outils button { padding: 7px 6px; border-radius: 8px; cursor: pointer; font-size: 12.5px; color: #f0e0c0; background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 176, 64, 0.3); }
#devunits .du-outils button:hover { background: rgba(255, 176, 64, 0.2); }
#devunits .du-outils button.on { background: #ffb040; color: #1a1208; }
#devunits .du-outils button[data-sup], #devunits .du-outils button[data-vide] { border-color: rgba(255, 90, 70, 0.5); }
#devunits .du-outils button.arme { background: #b0281c; color: #fff; }
#devunits .du-pal { display: grid; grid-template-columns: repeat(9, 1fr); gap: 5px; margin: 4px 0 8px; }
#devunits .du-pal button, #devunits .du-perso { height: 34px; border-radius: 8px; cursor: pointer; border: 2px solid rgba(0, 0, 0, 0.45); box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.35); }
#devunits .du-pal button:hover, #devunits .du-perso:hover { transform: scale(1.1); }
#devunits .du-pal .on { border-color: #fff; box-shadow: 0 0 0 2px #ffb040; }
#devunits .du-perso { display: flex; align-items: center; justify-content: center; position: relative; font-size: 18px; font-weight: 700; color: #fff; background: conic-gradient(#f33, #fc3, #3c3, #3cf, #33f, #c3f, #f33); overflow: hidden; }
#devunits .du-perso input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
#devunits .du-tailles { display: grid; grid-template-columns: repeat(6, 1fr); gap: 5px; }
#devunits .du-tailles button { display: flex; flex-direction: column; align-items: center; justify-content: space-between; height: 50px; padding: 5px 0 4px; border-radius: 8px; font-size: 11.5px; cursor: pointer; color: #f0e0c0; background: rgba(255, 255, 255, 0.05); border: 1px solid rgba(255, 176, 64, 0.3); }
#devunits .du-tailles button.on { background: rgba(255, 176, 64, 0.9); color: #1a1208; }
#devunits .du-tailles i { display: block; border-radius: 50%; background: currentColor; }
.screen.bac-choix { display: flex; align-items: center; justify-content: center; }
.bc-panel { width: min(1180px, 94vw); padding: 20px 26px 16px; }
.bc-panel h2 { margin: 0 0 4px; text-align: center; }
.bc-intro { text-align: center; margin: 0 0 14px; opacity: 0.85; }
.bc-cartes { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.bc-carte { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; background: rgba(0, 0, 0, 0.28); }
.bc-carte:hover { border-color: var(--gold); }
.bc-img { position: relative; height: 170px; overflow: hidden; }
.bc-img img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 12%; display: block; }
.bc-titre { position: absolute; left: 0; right: 0; bottom: 0; padding: 26px 16px 8px; font-family: var(--title); font-size: 25px; font-weight: 700; color: #fff; text-shadow: 0 2px 6px #000; background: linear-gradient(transparent, rgba(0, 0, 0, 0.75)); }
.bc-carte > p { margin: 9px 16px 6px; font-size: 14.5px; min-height: 42px; }
.bc-regl { padding: 0 16px; flex: 1; }
.bc-lig { display: grid; grid-template-columns: 92px 1fr; align-items: center; gap: 8px; margin: 5px 0; }
.bc-lig > span { font-weight: 700; color: var(--gold2); font-size: 14px; }
.bc-seg { display: flex; gap: 4px; }
.bc-seg button { flex: 1; padding: 5px 4px; border-radius: 7px; font-size: 13px; cursor: pointer; color: var(--ink); background: rgba(255, 255, 255, 0.05); border: 1px solid var(--line); white-space: nowrap; }
.bc-seg button:hover { border-color: var(--gold); }
.bc-seg button.on { background: linear-gradient(180deg, #a8782e, #6a4616); color: #fff6dd; border-color: var(--gold); }
.bc-jouer { margin: 12px 16px 16px; text-align: center; justify-content: center; }
.bc-jouer:hover { transform: none; }
.bc-retour { margin: 12px auto 0; display: block; }
@media (max-width: 820px) { .bc-cartes { grid-template-columns: 1fr; } .bc-img { height: 110px; } }
#devunits .du-ci { width: 19px; height: 19px; vertical-align: -5px; }
