:root {
  color-scheme: dark;
  --bg: #05090f;
  --surface: rgba(11, 19, 29, 0.88);
  --surface-strong: #0d1722;
  --surface-soft: rgba(17, 29, 42, 0.76);
  --line: rgba(151, 190, 214, 0.16);
  --line-strong: rgba(123, 242, 200, 0.3);
  --text: #edf7f6;
  --muted: #93a9b5;
  --green: #7bf2c8;
  --green-strong: #40d9a5;
  --violet: #a88cff;
  --danger: #ff7185;
  --warning: #ffc86a;
  --shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 14px;
  --sidebar-width: 280px;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--bg); }
body { min-height: 100vh; margin: 0; color: var(--text); background: var(--bg); }
button, input, select, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button { color: inherit; }
a { color: inherit; text-decoration: none; }
[hidden] { display: none !important; }

.page-backdrop {
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    linear-gradient(115deg, rgba(3, 8, 14, 0.94), rgba(4, 10, 17, 0.72)),
    url("/assets/insect-wars-alien-background.webp?v=24-9-2-cout-ouvrieres-recherches") center center / cover fixed;
}
.page-backdrop::before,
.page-backdrop::after {
  content: "";
  position: absolute;
  border-radius: 999px;
  filter: blur(80px);
  opacity: 0.24;
}
.page-backdrop::before { width: 360px; height: 360px; left: 4vw; top: 7vh; background: var(--green); }
.page-backdrop::after { width: 430px; height: 430px; right: 2vw; bottom: -12vh; background: var(--violet); }

.public-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(380px, 1.12fr) minmax(420px, 0.88fr);
  gap: clamp(24px, 5vw, 84px);
  align-items: center;
  padding: clamp(24px, 5vw, 76px);
}
.brand-panel { max-width: 760px; padding: 28px; }
.brand-mark { position: relative; width: 82px; height: 82px; margin-bottom: 28px; }
.brand-mark::before,
.brand-mark::after,
.brand-mark span {
  content: "";
  position: absolute;
  inset: 8px 24px;
  border: 2px solid var(--green);
  border-radius: 50% 50% 42% 42%;
  transform: rotate(0deg);
  box-shadow: 0 0 32px rgba(123, 242, 200, 0.26);
}
.brand-mark::before { transform: rotate(60deg); border-color: var(--violet); }
.brand-mark::after { transform: rotate(-60deg); }
.brand-mark span:nth-child(1) { inset: 28px 8px; border-radius: 999px; }
.brand-mark span:nth-child(2) { inset: 36px 18px; border: 0; border-top: 2px solid var(--green); border-radius: 0; }
.brand-mark span:nth-child(3) { inset: 12px 39px; border: 0; border-left: 2px solid var(--violet); border-radius: 0; }

.eyebrow {
  margin: 0 0 8px;
  color: var(--green);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}
.brand-panel h1 { margin: 0; font-size: clamp(3.2rem, 7vw, 6.8rem); line-height: 0.92; letter-spacing: -0.06em; }
.brand-panel h1 strong { color: var(--green); font-weight: 800; }
.brand-copy { max-width: 680px; margin: 28px 0; color: #b7c9d0; font-size: clamp(1rem, 1.6vw, 1.2rem); line-height: 1.8; }
.foundation-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; max-width: 630px; }
.foundation-grid article { display: flex; align-items: center; gap: 14px; padding: 15px 18px; border: 1px solid var(--line); border-radius: var(--radius-md); background: rgba(8, 16, 24, 0.58); backdrop-filter: blur(14px); }
.foundation-grid b { color: var(--violet); font-variant-numeric: tabular-nums; }
.foundation-grid span { color: #c9d7db; font-size: 0.9rem; }
.version-pill { display: inline-flex; margin: 24px 0 0; padding: 8px 12px; border: 1px solid var(--line-strong); border-radius: 999px; color: #bdebdc; background: rgba(27, 73, 64, 0.22); font-size: 0.82rem; }

.auth-panel { width: min(100%, 610px); justify-self: end; }
.auth-card,
.maintenance-card {
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: linear-gradient(145deg, rgba(13, 23, 34, 0.96), rgba(7, 13, 21, 0.9));
  box-shadow: var(--shadow);
  backdrop-filter: blur(24px);
}
.auth-card { overflow: hidden; }
.blocked-session { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-top: 16px; padding-top: 14px; border-top: 1px solid rgba(255, 200, 106, 0.2); color: #d7e0e3; font-size: 0.86rem; }
.maintenance-card { margin-bottom: 16px; padding: 22px 24px; border-color: rgba(255, 200, 106, 0.34); }
.maintenance-card h2 { margin: 0 0 8px; }
.maintenance-card p { margin: 6px 0; }
.auth-tabs { display: grid; grid-template-columns: 1fr 1fr; padding: 8px; border-bottom: 1px solid var(--line); background: rgba(4, 9, 15, 0.72); }
.auth-tab { border: 0; border-radius: 12px; padding: 13px; background: transparent; color: var(--muted); cursor: pointer; font-weight: 700; }
.auth-tab.is-active { color: var(--text); background: rgba(123, 242, 200, 0.1); box-shadow: inset 0 0 0 1px rgba(123, 242, 200, 0.18); }
.auth-form { display: grid; gap: 18px; padding: clamp(24px, 5vw, 44px); }
.form-heading h2 { margin: 0; font-size: 2rem; }
.auth-form label,
.settings-form label { display: grid; gap: 8px; color: #c4d2d7; font-size: 0.88rem; font-weight: 700; }
input, select, textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(4, 10, 16, 0.86);
  color: var(--text);
  padding: 13px 14px;
  outline: none;
  transition: border-color 160ms ease, box-shadow 160ms ease, background 160ms ease;
}
input:focus, select:focus, textarea:focus { border-color: var(--green); box-shadow: 0 0 0 3px rgba(123, 242, 200, 0.12); background: rgba(8, 17, 25, 0.96); }
textarea { resize: vertical; }
.two-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.check-row { display: flex !important; align-items: center; gap: 10px !important; font-weight: 500 !important; }
.check-row input { width: 18px; height: 18px; accent-color: var(--green-strong); }
.primary-button,
.secondary-button,
.icon-button,
.mobile-menu-button {
  border: 0;
  cursor: pointer;
  transition: transform 140ms ease, filter 140ms ease, background 140ms ease;
}
.primary-button { min-height: 48px; border-radius: 13px; background: linear-gradient(120deg, var(--green-strong), #69e2c2 54%, #8b80ef); color: #04110d; font-weight: 900; box-shadow: 0 16px 34px rgba(64, 217, 165, 0.18); }
.primary-button:hover, .secondary-button:hover, .icon-button:hover { transform: translateY(-1px); filter: brightness(1.06); }
.primary-button:disabled { cursor: wait; opacity: 0.6; transform: none; }
.secondary-button { border: 1px solid var(--line); border-radius: 10px; background: rgba(123, 242, 200, 0.08); padding: 9px 12px; color: var(--green); font-weight: 700; }
.form-feedback { min-height: 1.25em; margin: -4px 0 0; color: var(--danger); font-size: 0.88rem; }
.form-feedback.is-success { color: var(--green); }
.founder-notice { padding: 12px 14px; border: 1px solid rgba(168, 140, 255, 0.28); border-radius: 12px; color: #d8cdff; background: rgba(101, 77, 176, 0.12); font-size: 0.88rem; line-height: 1.5; }
.muted { color: var(--muted); }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: var(--sidebar-width) minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; padding: 24px 18px; border-right: 1px solid var(--line); background: rgba(5, 10, 16, 0.88); backdrop-filter: blur(24px); z-index: 20; }
.sidebar-brand { display: flex; align-items: center; gap: 13px; padding: 5px 8px 24px; border-bottom: 1px solid var(--line); }
.sidebar-brand strong, .sidebar-brand span { display: block; }
.sidebar-brand strong { letter-spacing: -0.02em; }
.sidebar-brand span { margin-top: 3px; color: var(--muted); font-size: 0.74rem; }
.mini-mark { width: 36px; height: 36px; border: 2px solid var(--green); border-radius: 50% 48% 46% 52%; box-shadow: 0 0 20px rgba(123, 242, 200, 0.2); transform: rotate(45deg); }
.main-nav { display: grid; gap: 6px; margin-top: 22px; }
.main-nav a { display: flex; align-items: center; gap: 12px; padding: 12px 13px; border: 1px solid transparent; border-radius: 12px; color: #9fb0b8; font-weight: 700; }
.main-nav a span { width: 22px; color: var(--violet); text-align: center; }
.main-nav a:hover { color: var(--text); background: rgba(255, 255, 255, 0.03); }
.main-nav a.is-active { color: var(--text); border-color: rgba(123, 242, 200, 0.18); background: linear-gradient(90deg, rgba(123, 242, 200, 0.12), rgba(168, 140, 255, 0.07)); }
.sidebar-spacer { flex: 1; }
.realtime-card { display: flex; align-items: center; gap: 10px; margin: 12px 4px; padding: 11px 12px; border: 1px solid var(--line); border-radius: 12px; background: rgba(10, 18, 26, 0.72); }
.realtime-card strong, .realtime-card small { display: block; }
.realtime-card strong { font-size: 0.82rem; }
.realtime-card small { margin-top: 2px; color: var(--muted); font-size: 0.7rem; }
.status-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--warning); box-shadow: 0 0 12px currentColor; }
.status-dot.is-online { color: var(--green); background: var(--green); }
.status-dot.is-offline { color: var(--danger); background: var(--danger); }
.identity-card { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 10px; padding: 14px 8px 0; border-top: 1px solid var(--line); }
.avatar, .large-avatar { display: grid; place-items: center; border: 1px solid rgba(123, 242, 200, 0.3); border-radius: 50%; background: linear-gradient(145deg, rgba(123, 242, 200, 0.16), rgba(168, 140, 255, 0.18)); color: var(--green); font-weight: 900; }
.avatar { width: 42px; height: 42px; }
.identity-copy { min-width: 0; }
.identity-copy strong, .identity-copy span { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.identity-copy strong { font-size: 0.88rem; }
.identity-copy span { margin-top: 3px; color: var(--muted); font-size: 0.72rem; text-transform: capitalize; }
.icon-button { width: 36px; height: 36px; border-radius: 10px; background: rgba(255, 113, 133, 0.08); color: var(--danger); }

.workspace { min-width: 0; padding: 0 clamp(20px, 4vw, 58px) 56px; }
.topbar { min-height: 104px; display: flex; align-items: center; gap: 16px; position: sticky; top: 0; z-index: 10; border-bottom: 1px solid var(--line); background: linear-gradient(180deg, rgba(5, 10, 16, 0.96), rgba(5, 10, 16, 0.76)); backdrop-filter: blur(20px); }
.topbar h1 { margin: 0; font-size: clamp(1.6rem, 3vw, 2.35rem); letter-spacing: -0.04em; }
.topbar .eyebrow { margin-bottom: 3px; }
.site-status-chip { margin-left: auto; padding: 8px 12px; border: 1px solid rgba(123, 242, 200, 0.26); border-radius: 999px; background: rgba(123, 242, 200, 0.08); color: var(--green); font-size: 0.78rem; font-weight: 800; }
.site-status-chip.is-warning { border-color: rgba(255, 200, 106, 0.34); color: var(--warning); background: rgba(255, 200, 106, 0.08); }
.site-status-chip.is-danger { border-color: rgba(255, 113, 133, 0.34); color: var(--danger); background: rgba(255, 113, 133, 0.08); }
.mobile-menu-button { display: none; width: 42px; height: 42px; border-radius: 10px; background: var(--surface-soft); }
.app-maintenance-banner { display: flex; gap: 12px; align-items: center; margin-top: 18px; padding: 13px 16px; border: 1px solid rgba(255, 200, 106, 0.3); border-radius: 13px; background: rgba(255, 200, 106, 0.08); color: #ffe0a7; }
.view-root { padding-top: 30px; }
.view-section { animation: view-in 180ms ease; }
@keyframes view-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.hero-card { min-height: 290px; display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(230px, 0.7fr); align-items: center; gap: 28px; padding: clamp(28px, 5vw, 52px); border: 1px solid var(--line); border-radius: var(--radius-xl); overflow: hidden; background: radial-gradient(circle at 80% 30%, rgba(168, 140, 255, 0.14), transparent 35%), linear-gradient(135deg, rgba(15, 28, 39, 0.94), rgba(7, 14, 22, 0.94)); box-shadow: var(--shadow); }
.hero-card h2 { max-width: 700px; margin: 0 0 16px; font-size: clamp(2rem, 4vw, 3.8rem); line-height: 1.05; letter-spacing: -0.055em; }
.hero-card p:not(.eyebrow) { max-width: 720px; margin: 0; color: #aebfc6; line-height: 1.75; }
.hero-orbit { position: relative; width: min(28vw, 260px); aspect-ratio: 1; justify-self: center; border: 1px solid rgba(123, 242, 200, 0.22); border-radius: 50%; box-shadow: inset 0 0 70px rgba(123, 242, 200, 0.08), 0 0 80px rgba(168, 140, 255, 0.12); }
.hero-orbit::before, .hero-orbit::after { content: ""; position: absolute; inset: 22%; border: 1px solid rgba(168, 140, 255, 0.38); border-radius: 50%; transform: rotate(58deg) scaleY(0.42); }
.hero-orbit::after { transform: rotate(-58deg) scaleY(0.42); }
.hero-orbit span { position: absolute; inset: 39%; border-radius: 50%; background: radial-gradient(circle at 35% 30%, #dffff3, var(--green-strong) 35%, #145341 70%); box-shadow: 0 0 45px rgba(123, 242, 200, 0.62); }
.hero-orbit i, .hero-orbit b { position: absolute; width: 10px; height: 10px; border-radius: 50%; background: var(--violet); box-shadow: 0 0 18px var(--violet); }
.hero-orbit i { left: 9%; top: 48%; }
.hero-orbit b { right: 12%; top: 23%; background: var(--green); box-shadow: 0 0 18px var(--green); }
.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-top: 18px; }
.metric-card, .panel-card, .account-card, .loading-card { border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); box-shadow: 0 14px 40px rgba(0, 0, 0, 0.16); }
.metric-card { display: grid; gap: 7px; min-height: 140px; align-content: center; padding: 22px; }
.metric-card span { color: var(--muted); font-size: 0.76rem; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase; }
.metric-card strong { font-size: 1.7rem; letter-spacing: -0.04em; }
.metric-card small { color: #8ca1aa; line-height: 1.4; }
.content-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 18px; }
.panel-card { padding: 24px; }
.panel-heading { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-bottom: 20px; }
.panel-heading h3 { margin: 0; font-size: 1.25rem; }
.check-list { display: grid; gap: 12px; padding: 0; margin: 0; list-style: none; }
.check-list li { position: relative; padding-left: 28px; color: #bdcbd0; }
.check-list li::before { content: "✓"; position: absolute; left: 0; color: var(--green); font-weight: 900; }
.roadmap-list { display: grid; gap: 8px; padding: 0; margin: 0; list-style: none; }
.roadmap-list li { display: flex; align-items: center; gap: 14px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 12px; color: var(--muted); }
.roadmap-list b { color: var(--violet); }
.roadmap-list .is-current { border-color: rgba(123, 242, 200, 0.3); background: rgba(123, 242, 200, 0.07); color: var(--text); }
.section-intro { margin-bottom: 24px; }
.section-intro h2 { margin: 0 0 8px; font-size: clamp(2rem, 4vw, 3rem); letter-spacing: -0.05em; }
.section-intro p:not(.eyebrow) { margin: 0; color: var(--muted); }
.account-card { display: grid; grid-template-columns: auto minmax(200px, 0.55fr) minmax(420px, 1fr); align-items: center; gap: 24px; padding: clamp(24px, 5vw, 42px); }
.large-avatar { width: 92px; height: 92px; font-size: 1.55rem; }
.account-main h3 { margin: 0 0 6px; font-size: 1.6rem; }
.account-main p { margin: 0 0 12px; color: var(--muted); word-break: break-all; }
.role-badge { display: inline-flex; padding: 6px 10px; border: 1px solid rgba(168, 140, 255, 0.3); border-radius: 999px; color: #cbbcff; background: rgba(168, 140, 255, 0.09); font-size: 0.75rem; font-weight: 800; text-transform: capitalize; }
.account-details { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin: 0; }
.account-details div { padding: 13px 15px; border: 1px solid var(--line); border-radius: 12px; background: rgba(4, 10, 16, 0.42); }
.account-details dt { color: var(--muted); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.08em; }
.account-details dd { margin: 6px 0 0; word-break: break-all; font-size: 0.9rem; }
.compact-note { margin-top: 18px; }
.compact-note p { margin: 8px 0 0; color: var(--muted); line-height: 1.65; }

.admin-grid { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(280px, 0.7fr); gap: 18px; }
.settings-form { display: grid; gap: 16px; }
.admin-summary { align-self: stretch; }
.admin-stat { display: flex; justify-content: space-between; gap: 16px; padding: 15px 0; border-bottom: 1px solid var(--line); }
.admin-stat:last-child { border-bottom: 0; }
.admin-stat span { color: var(--muted); }
.admin-stat strong { text-align: right; }
.table-card { margin-top: 18px; padding-bottom: 12px; }
.table-scroll { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 760px; }
th, td { padding: 13px 12px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
th { color: var(--muted); font-size: 0.72rem; letter-spacing: 0.08em; text-transform: uppercase; }
td { color: #c8d5d9; font-size: 0.86rem; }
td strong, td small { display: block; }
td small { margin-top: 3px; color: var(--muted); }
.role-select { min-width: 130px; padding: 8px 10px; }
.loading-card { padding: 34px; color: var(--muted); text-align: center; }
.empty-row { text-align: center; color: var(--muted); padding: 28px; }

.toast-region { position: fixed; top: 18px; right: 18px; z-index: 100; display: grid; gap: 10px; width: min(380px, calc(100vw - 36px)); }
.toast { padding: 13px 15px; border: 1px solid var(--line); border-radius: 13px; background: rgba(10, 18, 27, 0.96); box-shadow: var(--shadow); animation: toast-in 180ms ease; }
.toast.is-success { border-color: rgba(123, 242, 200, 0.3); }
.toast.is-error { border-color: rgba(255, 113, 133, 0.36); color: #ffd0d6; }
@keyframes toast-in { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }

@media (max-width: 1100px) {
  .public-shell { grid-template-columns: 1fr; align-content: center; }
  .brand-panel { padding-bottom: 0; }
  .auth-panel { justify-self: stretch; width: 100%; }
  .metric-grid { grid-template-columns: 1fr 1fr; }
  .account-card { grid-template-columns: auto 1fr; }
  .account-details { grid-column: 1 / -1; }
}

@media (max-width: 820px) {
  :root { --sidebar-width: 265px; }
  .app-shell { display: block; }
  .sidebar { position: fixed; left: 0; transform: translateX(-102%); transition: transform 180ms ease; box-shadow: var(--shadow); }
  body.menu-open .sidebar { transform: translateX(0); }
  body.menu-open::after { content: ""; position: fixed; inset: 0; z-index: 15; background: rgba(0,0,0,.55); }
  .workspace { padding-inline: 18px; }
  .mobile-menu-button { display: grid; place-items: center; }
  .hero-card { grid-template-columns: 1fr; }
  .hero-orbit { width: 210px; }
  .content-grid, .admin-grid { grid-template-columns: 1fr; }
}

@media (max-width: 620px) {
  .public-shell { padding: 16px; }
  .brand-panel { padding: 14px 8px; }
  .brand-panel h1 { font-size: 3.5rem; }
  .foundation-grid, .two-columns, .metric-grid, .account-details { grid-template-columns: 1fr; }
  .auth-form { padding: 24px 20px; }
  .topbar { min-height: 88px; }
  .site-status-chip { max-width: 120px; text-align: center; }
  .hero-card { padding: 26px 22px; }
  .hero-card h2 { font-size: 2.25rem; }
  .account-card { grid-template-columns: 1fr; text-align: center; }
  .large-avatar { margin-inline: auto; }
  .app-maintenance-banner { align-items: flex-start; flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}

#public-shell *{
  box-sizing: border-box;
}

#public-shell{
  color-scheme: dark;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: #eef4ff;
  background: #020812;
  position: relative;
  isolation: isolate;

  --font-display: Orbitron, Inter, ui-sans-serif, system-ui, sans-serif;

  --blue: #2f7bff;
  --blue-bright: #52a8ff;
  --cyan: #45d8ff;
  --violet: #8a6bff;
  --green: #35e39a;
  --red: #ff5d6c;
  --orange: #ffb03b;

  --panel: rgba(6, 14, 30, 0.72);
  --panel-strong: rgba(8, 17, 34, 0.92);
  --panel-soft: rgba(11, 22, 44, 0.55);
  --border: rgba(82, 148, 255, 0.22);
  --border-strong: rgba(96, 168, 255, 0.45);
  --muted: #93a6c4;
  --muted-strong: #b9c8e2;

  --radius-lg: 18px;
  --radius-md: 12px;
  --radius-sm: 9px;
}

#public-shell, #public-shell{
  min-height: 100%;
  margin: 0;
}

#public-shell{
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

#public-shell button, #public-shell input{
  font: inherit;
  color: inherit;
}

#public-shell svg{
  display: block;
}

/* ===== Fond spatial ===== */

#public-shell .space-background, #public-shell .space-vignette{
  position: fixed;
  inset: 0;
  pointer-events: none;
}

#public-shell > :not(.space-background):not(.space-vignette){
  position: relative;
  z-index: 2;
}

#public-shell .space-background{
  z-index: 0;
  background: url("/assets/insect-wars-alien-background.webp?v=24-9-2-cout-ouvrieres-recherches") center center / cover no-repeat;
  transform: scale(1.03);
}

#public-shell .space-vignette{
  z-index: 1;
  background:
    radial-gradient(ellipse at 50% 34%, rgba(2, 8, 20, 0) 0 30%, rgba(1, 5, 14, 0.55) 78%),
    linear-gradient(180deg, rgba(1, 5, 14, 0.62) 0%, rgba(1, 5, 14, 0.18) 22%, rgba(1, 5, 14, 0.2) 70%, rgba(1, 5, 14, 0.72) 100%);
}

/* ===== Barre de navigation ===== */

#public-shell .navbar{
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 16px;
  padding: 14px 28px;
  background: linear-gradient(180deg, rgba(3, 9, 20, 0.92), rgba(3, 9, 20, 0.74));
  border-bottom: 1px solid rgba(82, 148, 255, 0.16);
  backdrop-filter: blur(10px);
  position: sticky;
  top: 0;
  z-index: 10;
}

#public-shell .navbar-brand{
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

#public-shell .brand-logo{
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  color: var(--blue-bright);
  background:
    radial-gradient(circle at 32% 28%, rgba(82, 168, 255, 0.35), rgba(10, 24, 52, 0.9) 68%);
  border: 1px solid var(--border-strong);
  box-shadow:
    0 0 14px rgba(64, 144, 255, 0.35),
    inset 0 0 10px rgba(64, 144, 255, 0.25);
}

#public-shell .brand-logo svg{
  width: 24px;
  height: 24px;
}

#public-shell .brand-text{
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

#public-shell .brand-text strong{
  font-family: var(--font-display);
  font-size: 1.02rem;
  letter-spacing: 0.14em;
}

#public-shell .brand-text small{
  font-size: 0.62rem;
  letter-spacing: 0.34em;
  color: var(--muted);
  text-transform: uppercase;
}

#public-shell .navbar-center{
  display: flex;
  justify-content: center;
}

#public-shell .environment-pill{
  display: inline-flex;
  align-items: stretch;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  overflow: hidden;
  background: rgba(8, 18, 38, 0.85);
  box-shadow: 0 0 16px rgba(64, 144, 255, 0.18);
  font-family: var(--font-display);
  font-size: 0.74rem;
  letter-spacing: 0.16em;
  white-space: nowrap;
}

#public-shell .environment-label{
  padding: 8px 16px;
  color: var(--blue-bright);
  background: rgba(47, 123, 255, 0.16);
}

#public-shell .environment-tag{
  padding: 8px 14px;
  color: var(--muted-strong);
  border-left: 1px solid rgba(82, 148, 255, 0.25);
}

#public-shell .navbar-actions{
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 14px;
}

#public-shell .navbar-button{
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 10px 18px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: rgba(10, 22, 44, 0.75);
  color: var(--muted-strong);
  font-weight: 600;
  font-size: 0.86rem;
  cursor: pointer;
  transition: border-color 0.2s, color 0.2s, box-shadow 0.2s;
}

#public-shell .navbar-button svg{
  width: 17px;
  height: 17px;
}

#public-shell .navbar-button:hover{
  border-color: var(--border-strong);
  color: #ffffff;
  box-shadow: 0 0 14px rgba(64, 144, 255, 0.25);
}

/* ===== Structure de page ===== */

#public-shell .page-shell{
  flex: 1;
  width: min(1460px, 100% - 40px);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
}

/* ===== Héros ===== */

#public-shell .hero{
  text-align: center;
  padding: 52px 12px 30px;
}

#public-shell .hero-title{
  margin: 0;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(2rem, 5.4vw, 4rem);
  letter-spacing: 0.06em;
  text-transform: uppercase;
  background: linear-gradient(180deg, #ffffff 12%, #cfe4ff 42%, #6d9dd8 58%, #eaf4ff 78%, #8fb4e0 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 3px 14px rgba(20, 60, 130, 0.65));
}

#public-shell .hero-tagline{
  margin: 14px 0 0;
  font-size: clamp(1rem, 2vw, 1.28rem);
  color: #dbe7fa;
  text-shadow: 0 2px 10px rgba(1, 6, 16, 0.8);
}

#public-shell .hero-divider{
  margin: 26px auto 0;
  width: min(560px, 82%);
  display: flex;
  align-items: center;
  gap: 10px;
}

#public-shell .divider-line{
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(90, 170, 255, 0.85));
}

#public-shell .divider-line:last-child{
  background: linear-gradient(90deg, rgba(90, 170, 255, 0.85), transparent);
}

#public-shell .divider-core{
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 1px solid var(--blue-bright);
  background: radial-gradient(circle, rgba(82, 168, 255, 0.9), rgba(82, 168, 255, 0.1) 70%);
  box-shadow: 0 0 12px rgba(82, 168, 255, 0.8);
}

/* ===== Panneau principal ===== */

#public-shell .holo-frame{
  position: relative;
  border: 1px solid rgba(82, 148, 255, 0.28);
  border-radius: var(--radius-lg);
  background: linear-gradient(180deg, rgba(5, 12, 26, 0.66), rgba(5, 12, 26, 0.52));
  backdrop-filter: blur(7px);
  box-shadow:
    0 0 34px rgba(24, 78, 170, 0.28),
    inset 0 0 40px rgba(20, 60, 140, 0.1);
  padding: 26px;
}

#public-shell .frame-corner{
  position: absolute;
  width: 26px;
  height: 26px;
  border: 2px solid rgba(110, 190, 255, 0.9);
  filter: drop-shadow(0 0 6px rgba(90, 170, 255, 0.8));
}

#public-shell .frame-corner.tl{ top: -2px; left: -2px; border-right: 0; border-bottom: 0; border-top-left-radius: var(--radius-lg); }
#public-shell .frame-corner.tr{ top: -2px; right: -2px; border-left: 0; border-bottom: 0; border-top-right-radius: var(--radius-lg); }
#public-shell .frame-corner.bl{ bottom: -2px; left: -2px; border-right: 0; border-top: 0; border-bottom-left-radius: var(--radius-lg); }
#public-shell .frame-corner.br{ bottom: -2px; right: -2px; border-left: 0; border-top: 0; border-bottom-right-radius: var(--radius-lg); }

#public-shell .portal-grid{
  display: grid;
  grid-template-columns: 1fr 1.35fr 1fr;
  gap: 22px;
  align-items: start;
}

/* ----- Colonne gauche : features ----- */

#public-shell .feature-column{
  display: flex;
  flex-direction: column;
  gap: 16px;
}

#public-shell .feature-card{
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 18px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--panel-soft);
  transition: border-color 0.2s, transform 0.2s;
}

#public-shell .feature-card:hover{
  border-color: var(--border-strong);
  transform: translateY(-2px);
}

#public-shell .feature-card h3{
  margin: 0 0 6px;
  font-size: 0.98rem;
}

#public-shell .feature-card p{
  margin: 0;
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--muted);
}

#public-shell .feature-icon{
  flex: none;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: rgba(10, 24, 50, 0.8);
}

#public-shell .feature-icon svg{
  width: 22px;
  height: 22px;
}

#public-shell .icon-blue{ color: var(--blue-bright); box-shadow: 0 0 12px rgba(64, 144, 255, 0.3); }
#public-shell .icon-violet{ color: var(--violet); box-shadow: 0 0 12px rgba(138, 107, 255, 0.3); }
#public-shell .icon-green{ color: var(--green); box-shadow: 0 0 12px rgba(53, 227, 154, 0.3); }

/* ----- Colonne centrale : authentification ----- */

#public-shell .auth-card{
  padding: 22px;
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: var(--panel-strong);
  box-shadow: 0 18px 44px rgba(0, 4, 12, 0.55);
}

#public-shell .app-loading{
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  background: rgba(1, 5, 14, 0.55);
  color: var(--muted-strong);
  font-size: 0.9rem;
  backdrop-filter: blur(4px);
}

#public-shell .app-loading[hidden]{
  display: none;
}

#public-shell #view-portal{
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

#public-shell #view-portal[hidden], #public-shell #view-dashboard[hidden]{
  display: none;
}

#public-shell .loading-spinner{
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 3px solid rgba(82, 148, 255, 0.2);
  border-top-color: var(--blue-bright);
  animation: auth-spin 0.9s linear infinite;
}

@keyframes auth-spin {
  to {
    transform: rotate(360deg);
  }
}

#public-shell .auth-tabs[hidden]{
  display: none;
}

#public-shell .auth-tabs{
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 5px;
  border-radius: var(--radius-md);
  background: rgba(4, 10, 22, 0.85);
  border: 1px solid rgba(82, 148, 255, 0.14);
  margin-bottom: 20px;
}

#public-shell .auth-tab{
  padding: 11px 8px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--muted);
  font-weight: 600;
  cursor: pointer;
  transition: color 0.2s, background 0.2s, border-color 0.2s;
}

#public-shell .auth-tab.active{
  color: #ffffff;
  background: linear-gradient(180deg, rgba(47, 123, 255, 0.32), rgba(47, 123, 255, 0.14));
  border-color: rgba(96, 168, 255, 0.55);
  box-shadow: 0 0 14px rgba(47, 123, 255, 0.28);
}

#public-shell .auth-form{
  display: flex;
  flex-direction: column;
}

#public-shell .auth-form[hidden]{
  display: none;
}

#public-shell .auth-form label{
  font-size: 0.84rem;
  font-weight: 600;
  color: var(--muted-strong);
  margin: 0 0 8px;
}

#public-shell .input-field{
  position: relative;
  display: flex;
  align-items: center;
  margin-bottom: 16px;
}

#public-shell .input-icon{
  position: absolute;
  left: 13px;
  color: var(--muted);
  pointer-events: none;
}

#public-shell .input-icon svg{
  width: 17px;
  height: 17px;
}

#public-shell .input-field input{
  width: 100%;
  padding: 13px 44px 13px 42px;
  border-radius: var(--radius-md);
  border: 1px solid rgba(82, 148, 255, 0.2);
  background: rgba(4, 10, 22, 0.85);
  color: #eef4ff;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

#public-shell .input-field input::placeholder{
  color: #6f83a3;
}

#public-shell .input-field input:focus{
  border-color: var(--border-strong);
  box-shadow: 0 0 0 3px rgba(47, 123, 255, 0.18);
}

#public-shell .password-toggle{
  position: absolute;
  right: 8px;
  padding: 7px;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

#public-shell .password-toggle:hover{
  color: #ffffff;
}

#public-shell .password-toggle svg{
  width: 18px;
  height: 18px;
}

#public-shell .form-row{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 18px;
}

#public-shell .checkbox-label{
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.84rem;
  color: var(--muted);
  cursor: pointer;
}

#public-shell .checkbox-label input{
  width: 16px;
  height: 16px;
  accent-color: var(--blue);
}

#public-shell .checkbox-label.terms{
  margin-bottom: 18px;
}

#public-shell .text-button{
  border: 0;
  background: transparent;
  color: var(--blue-bright);
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
}

#public-shell .text-button:hover{
  text-decoration: underline;
}

#public-shell .primary-button{
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 14px;
  border: 1px solid rgba(120, 190, 255, 0.5);
  border-radius: var(--radius-md);
  background: linear-gradient(90deg, #1e4fd8, #2f7bff 55%, #3f8dff);
  color: #ffffff;
  font-weight: 700;
  font-size: 0.98rem;
  cursor: pointer;
  box-shadow: 0 8px 22px rgba(30, 79, 216, 0.4), 0 0 16px rgba(47, 123, 255, 0.3);
  transition: transform 0.15s, box-shadow 0.2s, filter 0.2s;
}

#public-shell .primary-button svg{
  width: 18px;
  height: 18px;
}

#public-shell .primary-button:hover{
  filter: brightness(1.08);
  transform: translateY(-1px);
  box-shadow: 0 10px 26px rgba(30, 79, 216, 0.5), 0 0 20px rgba(47, 123, 255, 0.4);
}

#public-shell .primary-button:active{
  transform: translateY(0);
}

#public-shell .auth-message{
  margin: 14px 0 0;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid rgba(69, 216, 255, 0.35);
  background: rgba(69, 216, 255, 0.08);
  color: #bfeaff;
  font-size: 0.85rem;
  line-height: 1.45;
}

#public-shell .auth-message.error{
  border-color: rgba(255, 93, 108, 0.4);
  background: rgba(255, 93, 108, 0.09);
  color: #ffc4cb;
}

/* ----- Panneau compte connecté ----- */

#public-shell .account-panel{
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  padding: 8px 4px 2px;
}

#public-shell .account-panel[hidden]{
  display: none;
}

#public-shell .account-avatar{
  width: 64px;
  height: 64px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  background: radial-gradient(circle at 32% 28%, rgba(82, 168, 255, 0.3), rgba(10, 24, 52, 0.9) 70%);
  color: var(--blue-bright);
  box-shadow: 0 0 18px rgba(64, 144, 255, 0.3);
  margin-bottom: 14px;
}

#public-shell .account-avatar svg{
  width: 30px;
  height: 30px;
}

#public-shell .account-panel h3{
  margin: 0 0 4px;
  font-family: var(--font-display);
  font-size: 1.15rem;
  letter-spacing: 0.06em;
}

#public-shell .account-role{
  margin: 0 0 18px;
  font-size: 0.82rem;
  color: var(--cyan);
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

#public-shell .account-details{
  width: 100%;
  margin: 0 0 20px;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: rgba(4, 10, 22, 0.6);
  padding: 4px 16px;
}

#public-shell .account-details > div{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 11px 0;
  border-bottom: 1px solid rgba(82, 148, 255, 0.12);
}

#public-shell .account-details > div:last-child{
  border-bottom: 0;
}

#public-shell .account-details dt{
  font-size: 0.8rem;
  color: var(--muted);
}

#public-shell .account-details dd{
  margin: 0;
  font-size: 0.84rem;
  font-weight: 600;
  text-align: right;
}

#public-shell .auth-separator{
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 20px 0 14px;
}

#public-shell .auth-separator span{
  flex: 1;
  height: 1px;
  background: rgba(82, 148, 255, 0.2);
}

#public-shell .auth-separator small{
  color: var(--muted);
  font-size: 0.78rem;
  white-space: nowrap;
}

#public-shell .social-row{
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 10px;
}

#public-shell .social-button{
  display: grid;
  place-items: center;
  padding: 11px 0;
  border-radius: var(--radius-md);
  border: 1px solid rgba(82, 148, 255, 0.2);
  background: rgba(6, 14, 30, 0.85);
  color: #dfe9fa;
  cursor: pointer;
  transition: border-color 0.2s, transform 0.15s, box-shadow 0.2s;
}

#public-shell .social-button svg{
  width: 20px;
  height: 20px;
}

#public-shell .social-button:hover{
  border-color: var(--border-strong);
  transform: translateY(-1px);
  box-shadow: 0 0 12px rgba(64, 144, 255, 0.25);
}

/* ----- Colonne droite : statut ----- */

#public-shell .status-column{
  display: flex;
  flex-direction: column;
  gap: 16px;
}

#public-shell .status-card{
  padding: 20px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--panel-soft);
  text-align: left;
}

#public-shell .status-icon{
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-strong);
  background: rgba(10, 24, 50, 0.85);
  color: var(--cyan);
  box-shadow: 0 0 14px rgba(69, 216, 255, 0.3);
  margin-bottom: 14px;
}

#public-shell .status-icon svg{
  width: 25px;
  height: 25px;
}

#public-shell .status-card h3{
  margin: 0 0 8px;
  font-family: var(--font-display);
  font-size: 0.9rem;
  letter-spacing: 0.08em;
  color: var(--cyan);
}

#public-shell .status-card.open .status-icon{
  color: var(--green);
  box-shadow: 0 0 14px rgba(53, 227, 154, 0.35);
}

#public-shell .status-card.open h3{
  color: var(--green);
}

#public-shell .status-card.maintenance .status-icon{
  color: var(--orange);
  box-shadow: 0 0 14px rgba(255, 176, 59, 0.35);
}

#public-shell .status-card.maintenance h3{
  color: var(--orange);
}

#public-shell .status-card.closed .status-icon{
  color: var(--red);
  box-shadow: 0 0 14px rgba(255, 93, 108, 0.35);
}

#public-shell .status-card.closed h3{
  color: var(--red);
}

#public-shell .status-card.unknown .status-icon{
  color: var(--muted);
  box-shadow: none;
}

#public-shell .status-card.unknown h3{
  color: var(--muted-strong);
}

#public-shell .status-card p{
  margin: 0 0 14px;
  font-size: 0.85rem;
  line-height: 1.5;
  color: var(--muted);
}

#public-shell .ghost-button{
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-strong);
  background: rgba(47, 123, 255, 0.1);
  color: var(--blue-bright);
  font-weight: 600;
  font-size: 0.86rem;
  text-decoration: none;
  transition: background 0.2s, box-shadow 0.2s;
}

#public-shell .ghost-button svg{
  width: 15px;
  height: 15px;
}

#public-shell .ghost-button:hover{
  background: rgba(47, 123, 255, 0.2);
  box-shadow: 0 0 12px rgba(47, 123, 255, 0.3);
}

#public-shell .info-card{
  border-radius: var(--radius-md);
  border: 1px solid var(--border);
  background: var(--panel-soft);
  padding: 6px 18px;
}

#public-shell .info-row{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 0;
  border-bottom: 1px solid rgba(82, 148, 255, 0.12);
}

#public-shell .info-row:last-child{
  border-bottom: 0;
}

#public-shell .info-row small{
  display: block;
  font-size: 0.74rem;
  color: var(--muted);
  margin-bottom: 3px;
}

#public-shell .info-row span[id]{
  font-weight: 600;
  font-size: 0.92rem;
  word-break: break-all;
}

#public-shell .info-icon{
  flex: none;
  color: var(--blue-bright);
  opacity: 0.85;
}

#public-shell .info-icon svg{
  width: 20px;
  height: 20px;
}

/* ===== Bandeau de garanties ===== */

#public-shell .trust-strip{
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 14px;
  margin: 34px 0 26px;
  padding: 18px 22px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(82, 148, 255, 0.16);
  background: linear-gradient(180deg, rgba(4, 10, 22, 0.82), rgba(4, 10, 22, 0.66));
  backdrop-filter: blur(6px);
}

#public-shell .trust-item{
  display: flex;
  align-items: center;
  gap: 12px;
  justify-content: center;
}

#public-shell .trust-icon{
  flex: none;
  width: 40px;
  height: 40px;
  display: grid;
  place-items: center;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: rgba(10, 24, 50, 0.8);
  color: var(--blue-bright);
}

#public-shell .trust-icon svg{
  width: 20px;
  height: 20px;
}

#public-shell .trust-item strong{
  display: block;
  font-size: 0.82rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

#public-shell .trust-item small{
  color: var(--muted);
  font-size: 0.78rem;
}

/* ===== Pied de page ===== */

#public-shell .page-footer{
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px 28px;
  border-top: 1px solid rgba(82, 148, 255, 0.14);
  background: rgba(2, 7, 16, 0.85);
  color: var(--muted);
  font-size: 0.84rem;
}

#public-shell .footer-links{
  display: flex;
  align-items: center;
  gap: 12px;
}

#public-shell .footer-links .text-button{
  color: var(--muted);
  font-weight: 500;
}

#public-shell .footer-links .text-button:hover{
  color: #ffffff;
}

/* ===== Dashboard ===== */


/* ===== v24.0.6 — Portail HTML exact de la v23 ===== */
#public-shell { display: block; min-height: 100vh; padding: 0; background: #020812; }
#public-shell[hidden] { display: none !important; }
#public-shell #view-portal { min-height: 100vh; }
#public-shell .portal-tab-button.is-active { color: #fff; border-color: rgba(82,168,255,.52); background: rgba(47,123,255,.16); }
#public-shell .portal-maintenance { width: min(1180px, calc(100% - 40px)); margin: 16px auto 0; padding: 13px 18px; border: 1px solid rgba(255,176,59,.38); border-radius: 12px; background: rgba(52,31,7,.82); display: flex; justify-content: space-between; align-items: center; gap: 18px; }
#public-shell .portal-maintenance strong, #public-shell .portal-maintenance span, #public-shell .portal-maintenance small { display: block; }
#public-shell .portal-maintenance small { color: #c6b28c; margin-top: 4px; }
#public-shell .auth-tabs { display: grid !important; }
#public-shell .auth-tab.is-active { color: #fff; background: rgba(47,123,255,.18); border-color: rgba(82,168,255,.5); }
#public-shell .auth-form { padding: 0; }
#public-shell .auth-form[hidden] { display: none !important; }
#public-shell .auth-form .input-field { margin-bottom: 13px; }
#public-shell .auth-form label { display: block; }
#public-shell .checkbox-label { display: flex !important; align-items: center; gap: 9px; }
#public-shell .checkbox-label input { width: 17px; height: 17px; }
#public-shell .field-help { display: block; margin: -7px 0 13px; color: var(--muted); font-size: .74rem; line-height: 1.45; }
#public-shell .founder-notice { margin-bottom: 14px; padding: 11px 13px; border: 1px solid rgba(138,107,255,.38); border-radius: 9px; background: rgba(83,56,151,.16); color: #d8ceff; font-size: .8rem; }
#public-shell .form-feedback { min-height: 1.2em; margin: 10px 0 0; color: var(--red); font-size: .8rem; }
#public-shell .password-toggle { color: var(--muted); font-size: .9rem; }
#public-shell .password-toggle.is-visible { color: var(--cyan); }
#public-shell .ghost-button { cursor: default; text-decoration: none; }
#public-shell .status-card.open { border-color: rgba(53,227,154,.35); }
#public-shell .status-card.maintenance { border-color: rgba(255,176,59,.42); }
#public-shell .status-card.maintenance .status-icon { color: var(--orange); }
#public-shell .info-icon { font-family: var(--font-display); font-size: .9rem; }
#public-shell .auth-message { display: block; }
#public-shell .secondary-button { border: 1px solid rgba(255,176,59,.4); border-radius: 8px; background: rgba(255,176,59,.1); padding: 8px 11px; cursor: pointer; }
.app-loading { position: fixed; inset: 0; z-index: 10000; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; background: rgba(1,5,14,.78); backdrop-filter: blur(5px); color: #b9c8e2; }
.app-loading[hidden] { display: none !important; }
.loading-spinner { width: 36px; height: 36px; border-radius: 50%; border: 3px solid rgba(82,168,255,.2); border-top-color: #52a8ff; animation: auth-spin .8s linear infinite; }
@keyframes auth-spin { to { transform: rotate(360deg); } }

@media (max-width: 1180px) {
  #public-shell .portal-grid { grid-template-columns: 1fr 1fr; }
  #public-shell .auth-card { order: -1; grid-column: 1 / -1; max-width: 560px; justify-self: center; width: 100%; }
  #public-shell .trust-strip { grid-template-columns: repeat(3, 1fr); row-gap: 20px; }
}
@media (max-width: 860px) {
  #public-shell .navbar { grid-template-columns: 1fr; }
  #public-shell .navbar-center { order: 2; }
  #public-shell .navbar-actions { justify-content: center; }
  #public-shell .portal-grid { grid-template-columns: 1fr; }
  #public-shell .trust-strip { grid-template-columns: repeat(2, 1fr); }
  #public-shell .trust-item { justify-content: flex-start; }
  #public-shell .portal-maintenance { align-items: flex-start; flex-direction: column; }
}
@media (max-width: 560px) {
  #public-shell .page-shell { width: calc(100% - 24px); }
  #public-shell .holo-frame { padding: 16px; }
  #public-shell .navbar { padding: 12px 16px; }
  #public-shell .navbar-actions { display: grid; grid-template-columns: 1fr 1fr; width: 100%; }
  #public-shell .navbar-button { display: inline-flex; justify-content: center; }
  #public-shell .trust-strip { grid-template-columns: 1fr; }
  #public-shell .page-footer { flex-direction: column; text-align: center; }
}

/* ===== v24.0.6 — compatibilité du portail v23 exact ===== */
#public-shell[hidden] { display: none !important; }
#public-shell .auth-tabs[hidden] { display: none !important; }
#public-shell #founder-notice[hidden] { display: none !important; }
#public-shell .auth-tab:disabled { opacity: .45; cursor: not-allowed; }
#public-shell .auth-feedback-message.error { color: var(--red); }

#public-shell .blocked-session { margin-top: 14px; padding: 12px; border: 1px solid rgba(255,176,59,.35); border-radius: var(--radius-sm); background: rgba(255,176,59,.08); }
#public-shell .blocked-session[hidden] { display: none !important; }
#public-shell .blocked-session span { display: block; margin-bottom: 10px; color: var(--muted-strong); font-size: .82rem; }


/* ===== v24.0.6 — accueil plein écran non scrollable sur PC ===== */
@media (min-width: 1024px) {
  html.public-portal-active,
  body.public-portal-active {
    width: 100%;
    height: 100%;
    overflow: hidden;
    overscroll-behavior: none;
  }

  body.public-portal-active #public-shell {
    width: 100%;
    height: 100dvh;
    min-height: 100dvh;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    overflow: hidden;
  }

  body.public-portal-active #public-shell #view-portal {
    height: 100dvh;
    min-height: 0;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    overflow: hidden;
  }

  body.public-portal-active #public-shell .navbar {
    position: relative;
    top: auto;
    flex: none;
  }

  body.public-portal-active #public-shell .page-shell {
    width: min(1460px, calc(100% - 32px));
    height: 100%;
    min-height: 0;
    margin: 0 auto;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    align-content: stretch;
    overflow: hidden;
  }

  body.public-portal-active #public-shell .hero {
    padding: clamp(12px, 2.4vh, 30px) 12px clamp(10px, 1.7vh, 20px);
  }

  body.public-portal-active #public-shell .hero-title {
    font-size: clamp(2rem, min(4vw, 6.4vh), 3.65rem);
    line-height: 1;
  }

  body.public-portal-active #public-shell .hero-tagline {
    margin-top: clamp(6px, 1vh, 12px);
    font-size: clamp(.9rem, min(1.25vw, 2vh), 1.15rem);
  }

  body.public-portal-active #public-shell .hero-divider {
    margin-top: clamp(10px, 1.5vh, 20px);
  }

  body.public-portal-active #public-shell .holo-frame {
    min-height: 0;
    align-self: center;
    padding: clamp(13px, 1.55vh, 22px);
    overflow: hidden;
  }

  body.public-portal-active #public-shell .portal-grid {
    height: 100%;
    min-height: 0;
    grid-template-columns: 1fr 1.35fr 1fr;
    gap: clamp(10px, 1.2vw, 19px);
    align-items: stretch;
  }

  body.public-portal-active #public-shell .auth-card {
    order: initial;
    grid-column: auto;
    width: auto;
    max-width: none;
    justify-self: stretch;
  }

  body.public-portal-active #public-shell .trust-strip {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  body.public-portal-active #public-shell .feature-column,
  body.public-portal-active #public-shell .status-column {
    min-height: 0;
    gap: clamp(8px, 1.15vh, 14px);
    justify-content: center;
  }

  body.public-portal-active #public-shell .feature-card {
    padding: clamp(11px, 1.35vh, 17px);
    gap: clamp(9px, 1vw, 14px);
  }

  body.public-portal-active #public-shell .feature-icon {
    width: clamp(36px, 4.8vh, 44px);
    height: clamp(36px, 4.8vh, 44px);
  }

  body.public-portal-active #public-shell .feature-card h3 {
    margin-bottom: 4px;
    font-size: clamp(.84rem, 1.35vh, .98rem);
  }

  body.public-portal-active #public-shell .feature-card p {
    font-size: clamp(.72rem, 1.18vh, .84rem);
    line-height: 1.38;
  }

  body.public-portal-active #public-shell .auth-card {
    align-self: center;
    max-height: 100%;
    padding: clamp(13px, 1.5vh, 21px);
  }

  body.public-portal-active #public-shell .auth-tabs {
    margin-bottom: clamp(9px, 1.3vh, 17px);
  }

  body.public-portal-active #public-shell .auth-tab {
    padding: clamp(8px, 1.05vh, 11px) 8px;
  }

  body.public-portal-active #public-shell .founder-notice {
    margin-bottom: clamp(7px, .9vh, 12px);
    padding: clamp(7px, .9vh, 10px) 11px;
    font-size: clamp(.68rem, 1.05vh, .78rem);
  }

  body.public-portal-active #public-shell .auth-form .input-field {
    margin-bottom: clamp(7px, .95vh, 12px);
  }

  body.public-portal-active #public-shell .auth-form label {
    margin-bottom: clamp(4px, .55vh, 7px);
    font-size: clamp(.72rem, 1.05vh, .82rem);
  }

  body.public-portal-active #public-shell .input-field input {
    min-height: 0;
    padding: clamp(9px, 1.15vh, 12px) 42px;
    font-size: clamp(.8rem, 1.25vh, .94rem);
  }

  body.public-portal-active #public-shell .field-help {
    margin: -4px 0 clamp(6px, .8vh, 10px);
    font-size: clamp(.64rem, .9vh, .72rem);
    line-height: 1.3;
  }

  body.public-portal-active #public-shell .form-row,
  body.public-portal-active #public-shell .checkbox-label.terms {
    margin-bottom: clamp(8px, 1.1vh, 15px);
  }

  body.public-portal-active #public-shell .checkbox-label,
  body.public-portal-active #public-shell .text-button {
    font-size: clamp(.7rem, 1vh, .82rem);
  }

  body.public-portal-active #public-shell .primary-button {
    padding: clamp(9px, 1.2vh, 13px);
    font-size: clamp(.82rem, 1.25vh, .96rem);
  }

  body.public-portal-active #public-shell .auth-message {
    margin-top: clamp(7px, .9vh, 12px);
    padding: 8px 11px;
    font-size: clamp(.7rem, 1vh, .82rem);
  }

  body.public-portal-active #public-shell .status-card {
    padding: clamp(12px, 1.45vh, 18px);
  }

  body.public-portal-active #public-shell .status-icon {
    width: clamp(36px, 4.8vh, 46px);
    height: clamp(36px, 4.8vh, 46px);
    margin-bottom: clamp(7px, .9vh, 12px);
  }

  body.public-portal-active #public-shell .status-card h3 {
    margin-bottom: 5px;
    font-size: clamp(.76rem, 1.18vh, .9rem);
  }

  body.public-portal-active #public-shell .status-card p {
    margin-bottom: clamp(8px, 1vh, 12px);
    font-size: clamp(.7rem, 1.05vh, .82rem);
    line-height: 1.35;
  }

  body.public-portal-active #public-shell .ghost-button {
    padding: clamp(7px, .9vh, 9px) 13px;
    font-size: clamp(.72rem, 1.05vh, .84rem);
  }

  body.public-portal-active #public-shell .info-card {
    padding: 4px 15px;
  }

  body.public-portal-active #public-shell .info-row {
    padding: clamp(7px, .85vh, 11px) 0;
  }

  body.public-portal-active #public-shell .info-row small {
    font-size: clamp(.62rem, .85vh, .72rem);
  }

  body.public-portal-active #public-shell .info-row span[id] {
    font-size: clamp(.72rem, 1.05vh, .88rem);
  }

  body.public-portal-active #public-shell .trust-strip {
    margin: clamp(8px, 1.25vh, 18px) 0 clamp(7px, 1.05vh, 14px);
    padding: clamp(8px, 1.1vh, 14px) 18px;
    gap: clamp(8px, .9vw, 13px);
  }

  body.public-portal-active #public-shell .trust-item {
    gap: clamp(7px, .7vw, 11px);
  }

  body.public-portal-active #public-shell .trust-icon {
    width: clamp(31px, 4vh, 38px);
    height: clamp(31px, 4vh, 38px);
  }

  body.public-portal-active #public-shell .trust-item strong {
    font-size: clamp(.66rem, .95vh, .78rem);
  }

  body.public-portal-active #public-shell .trust-item small {
    font-size: clamp(.62rem, .85vh, .74rem);
  }

  body.public-portal-active #public-shell .page-footer {
    flex: none;
    padding: clamp(8px, 1.05vh, 13px) 28px;
    font-size: clamp(.7rem, 1vh, .82rem);
  }
}

/* Écrans PC peu hauts : densité supplémentaire sans masquer de contenu. */
@media (min-width: 1024px) and (max-height: 760px) {
  body.public-portal-active #public-shell .navbar {
    padding-top: 9px;
    padding-bottom: 9px;
  }

  body.public-portal-active #public-shell .navbar-button {
    padding-top: 7px;
    padding-bottom: 7px;
  }

  body.public-portal-active #public-shell .hero {
    padding-top: 7px;
    padding-bottom: 7px;
  }

  body.public-portal-active #public-shell .hero-title {
    font-size: clamp(1.8rem, 5.2vh, 2.7rem);
  }

  body.public-portal-active #public-shell .hero-tagline {
    margin-top: 4px;
  }

  body.public-portal-active #public-shell .hero-divider {
    margin-top: 7px;
  }

  body.public-portal-active #public-shell .holo-frame {
    padding: 10px;
  }

  body.public-portal-active #public-shell .feature-column,
  body.public-portal-active #public-shell .status-column {
    gap: 6px;
  }

  body.public-portal-active #public-shell .feature-card,
  body.public-portal-active #public-shell .status-card {
    padding: 9px;
  }

  body.public-portal-active #public-shell .feature-card p,
  body.public-portal-active #public-shell .status-card p {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
  }

  body.public-portal-active #public-shell .auth-card {
    padding: 10px;
  }

  body.public-portal-active #public-shell .auth-tabs {
    margin-bottom: 6px;
  }

  body.public-portal-active #public-shell .auth-tab,
  body.public-portal-active #public-shell .primary-button {
    padding-top: 7px;
    padding-bottom: 7px;
  }

  body.public-portal-active #public-shell .founder-notice {
    margin-bottom: 5px;
    padding: 6px 9px;
  }

  body.public-portal-active #public-shell .auth-form .input-field {
    margin-bottom: 5px;
  }

  body.public-portal-active #public-shell .input-field input {
    padding-top: 7px;
    padding-bottom: 7px;
  }

  body.public-portal-active #public-shell .field-help {
    margin-bottom: 5px;
  }

  body.public-portal-active #public-shell .trust-strip {
    margin-top: 5px;
    margin-bottom: 5px;
    padding-top: 6px;
    padding-bottom: 6px;
  }

  body.public-portal-active #public-shell .page-footer {
    padding-top: 6px;
    padding-bottom: 6px;
  }
}


/* ===== v24.0.6 — Footer juridique et documents internes ===== */
#public-shell .footer-links .text-button {
  text-decoration: none;
  text-underline-offset: 3px;
}

#public-shell .footer-links .text-button:focus-visible {
  color: #fff;
  outline: 2px solid rgba(80, 170, 255, .75);
  outline-offset: 3px;
  border-radius: 3px;
}

.legal-dialog {
  width: min(760px, calc(100vw - 32px));
  max-width: 760px;
  max-height: min(86dvh, 820px);
  padding: 0;
  border: 1px solid rgba(85, 170, 255, .42);
  border-radius: 16px;
  color: #eaf4ff;
  background: rgba(3, 10, 24, .98);
  box-shadow: 0 24px 90px rgba(0, 0, 0, .68), 0 0 40px rgba(35, 125, 255, .14);
  overflow: hidden;
}

.legal-dialog::backdrop {
  background: rgba(0, 3, 10, .78);
  backdrop-filter: blur(6px);
}

.legal-dialog-frame {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  max-height: min(86dvh, 820px);
}

.legal-dialog-header,
.legal-dialog-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 20px;
  background: rgba(7, 20, 43, .96);
}

.legal-dialog-header {
  border-bottom: 1px solid rgba(82, 148, 255, .2);
}

.legal-dialog-header h2 {
  margin: 2px 0 0;
  font-family: "Orbitron", sans-serif;
  font-size: clamp(1.05rem, 2.6vw, 1.35rem);
}

.legal-dialog-close {
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(85, 170, 255, .35);
  border-radius: 10px;
  color: #dcecff;
  background: rgba(25, 70, 125, .22);
  font-size: 1.5rem;
  line-height: 1;
  cursor: pointer;
}

.legal-dialog-close:hover,
.legal-dialog-close:focus-visible {
  color: #fff;
  border-color: rgba(85, 170, 255, .75);
  background: rgba(35, 105, 190, .36);
}

.legal-dialog-content {
  min-height: 0;
  padding: 18px 22px 26px;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  color: #c8d8eb;
  line-height: 1.62;
}

.legal-dialog-content:focus {
  outline: none;
}

.legal-dialog-content .legal-intro {
  margin: 0 0 18px;
  padding: 12px 14px;
  border-left: 3px solid #4da8ff;
  border-radius: 0 8px 8px 0;
  background: rgba(35, 105, 190, .14);
  color: #e5f2ff;
}

.legal-dialog-content section + section {
  margin-top: 18px;
}

.legal-dialog-content h3 {
  margin: 0 0 7px;
  color: #f2f8ff;
  font-size: .98rem;
}

.legal-dialog-content p {
  margin: 0;
}

.legal-dialog-footer {
  border-top: 1px solid rgba(82, 148, 255, .2);
  color: #8fa6c2;
}

.legal-dialog-footer small {
  max-width: 480px;
}

@media (max-width: 640px) {
  .legal-dialog {
    width: calc(100vw - 18px);
    max-height: 92dvh;
    border-radius: 12px;
  }

  .legal-dialog-frame {
    max-height: 92dvh;
  }

  .legal-dialog-header,
  .legal-dialog-footer {
    padding: 13px 14px;
  }

  .legal-dialog-content {
    padding: 15px 16px 22px;
  }

  .legal-dialog-footer {
    align-items: flex-start;
    flex-direction: column;
  }
}


/* ===== v24.0.7 — footer toujours visible sur le portail PC ===== */
@media (min-width: 1024px) {
  body.public-portal-active #public-shell > .navbar,
  body.public-portal-active #public-shell > .page-shell,
  body.public-portal-active #public-shell > .page-footer {
    min-width: 0;
  }

  body.public-portal-active #public-shell > .page-shell {
    height: auto;
    min-height: 0;
  }

  body.public-portal-active #public-shell > .page-footer {
    position: relative;
    z-index: 8;
    width: 100%;
    min-height: 30px;
    visibility: visible;
    opacity: 1;
  }
}

/* ===== v24.0.8 — inscription compacte et statut simplifié ===== */
#public-shell .register-field {
  min-width: 0;
}

#public-shell .register-field > .input-field {
  margin-bottom: 0;
}

@media (min-width: 1024px) {
  body.public-portal-active #public-shell #register-form:not([hidden]) {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: clamp(10px, 1vw, 14px);
    row-gap: clamp(7px, .9vh, 11px);
  }

  body.public-portal-active #public-shell #register-form .register-full-row {
    grid-column: 1 / -1;
  }

  body.public-portal-active #public-shell #register-form .register-field > label {
    margin-bottom: clamp(4px, .5vh, 6px);
  }

  body.public-portal-active #public-shell #register-form .checkbox-label.terms {
    margin: 1px 0 0;
  }

  body.public-portal-active #public-shell #register-form .primary-button {
    margin-top: 0;
  }

  body.public-portal-active #public-shell .status-card p {
    margin-bottom: 0;
  }
}

@media (max-width: 1023px) {
  #public-shell #register-form .register-field > .input-field {
    margin-bottom: 16px;
  }
}


/* ===== v24.0.9 — authentification sans jeton et cadre stable ===== */
@media (min-width: 1024px) {
  body.public-portal-active #public-shell .auth-card {
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    height: clamp(310px, 41vh, 342px);
    min-height: clamp(310px, 41vh, 342px);
    max-height: clamp(310px, 41vh, 342px);
    overflow: hidden;
  }

  body.public-portal-active #public-shell .auth-tabs,
  body.public-portal-active #public-shell #referral-notice,
  body.public-portal-active #public-shell #founder-notice,
  body.public-portal-active #public-shell #blocked-session {
    flex: 0 0 auto;
  }

  body.public-portal-active #public-shell #login-form:not([hidden]),
  body.public-portal-active #public-shell #register-form:not([hidden]) {
    flex: 1 1 auto;
    min-height: 0;
    align-content: start;
  }
}

@media (min-width: 1024px) and (max-height: 760px) {
  body.public-portal-active #public-shell .auth-card {
    height: 300px;
    min-height: 300px;
    max-height: 300px;
  }
}


/* ===== v24.0.12 — bouton Connexion ancré et jamais rogné ===== */
@media (min-width: 1024px) {
  body.public-portal-active #public-shell .auth-card {
    height: clamp(360px, 46vh, 390px);
    min-height: clamp(360px, 46vh, 390px);
    max-height: clamp(360px, 46vh, 390px);
    overflow: visible;
  }

  body.public-portal-active #public-shell #login-form:not([hidden]) {
    display: flex;
    flex: 1 1 auto;
    flex-direction: column;
    min-height: 0;
    overflow: visible;
  }

  body.public-portal-active #public-shell #login-form .form-row {
    flex: 0 0 auto;
    margin-bottom: 8px;
  }

  body.public-portal-active #public-shell #login-form .primary-button {
    position: relative;
    z-index: 2;
    display: flex;
    flex: 0 0 auto;
    visibility: visible;
    opacity: 1;
    min-height: 42px;
    margin-top: auto;
  }
}

@media (min-width: 1024px) and (max-height: 760px) {
  body.public-portal-active #public-shell .auth-card {
    height: 350px;
    min-height: 350px;
    max-height: 350px;
  }
}


/* ===== v24.0.12 — boutons Connexion / Inscription parfaitement alignés ===== */
@media (min-width: 1024px) {
  body.public-portal-active #public-shell #login-form:not([hidden]),
  body.public-portal-active #public-shell #register-form:not([hidden]) {
    position: relative;
    box-sizing: border-box;
    height: 100%;
    padding-bottom: 54px;
  }

  body.public-portal-active #public-shell .auth-submit-slot {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    display: flex;
    width: 100%;
    height: 44px;
    margin: 0;
  }

  body.public-portal-active #public-shell .auth-submit-slot .primary-button {
    position: static;
    display: inline-flex;
    width: 100%;
    min-height: 44px;
    height: 44px;
    margin: 0;
    align-items: center;
    justify-content: center;
  }

  body.public-portal-active #public-shell #login-form .primary-button,
  body.public-portal-active #public-shell #register-form .primary-button {
    margin-top: 0;
  }
}

@media (max-width: 1023px) {
  #public-shell .auth-submit-slot {
    width: 100%;
  }

  #public-shell .auth-submit-slot .primary-button {
    width: 100%;
  }
}


/* ===== v24.0.13 — inscription équilibrée sans déplacer les boutons ===== */
#public-shell .register-fields-grid {
  min-width: 0;
}

@media (min-width: 1024px) {
  body.public-portal-active #public-shell #register-form:not([hidden]) {
    display: flex;
    flex-direction: column;
    gap: 0;
  }

  body.public-portal-active #public-shell #register-form .register-fields-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    column-gap: clamp(10px, 1vw, 14px);
    row-gap: clamp(8px, 1vh, 12px);
    width: 100%;
    margin-top: auto;
  }

  body.public-portal-active #public-shell #register-form .checkbox-label.terms {
    flex: 0 0 auto;
    min-height: 24px;
    margin: 8px 0;
  }
}

@media (max-width: 1023px) {
  #public-shell #register-form .register-fields-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 0;
  }
}


/* ===== v24.0.14 — messages d’authentification stables et temporisés ===== */
#public-shell .auth-feedback-message {
  box-sizing: border-box;
  display: flex;
  align-items: center;
  width: 100%;
  height: 46px;
  min-height: 46px;
  margin: 0;
  padding: 7px 10px;
  overflow-y: auto;
  border-radius: var(--radius-sm);
  font-size: .78rem;
  line-height: 1.25;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transform: translateY(2px);
  transition: opacity .16s ease, transform .16s ease, visibility 0s linear .16s;
  scrollbar-width: thin;
}

#public-shell .auth-feedback-message.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  transition-delay: 0s;
}

#public-shell .auth-feedback-message.success {
  border-color: rgba(82, 229, 155, .42);
  background: rgba(82, 229, 155, .09);
  color: #c8ffe1;
}

#public-shell .auth-action-stack {
  box-sizing: border-box;
  display: grid;
  grid-template-rows: 46px 44px;
  gap: 8px;
  width: 100%;
  height: 98px;
}

#public-shell .auth-action-stack .auth-submit-slot {
  width: 100%;
  height: 44px;
  margin: 0;
}

#public-shell .auth-action-stack .auth-submit-slot .primary-button {
  width: 100%;
  height: 44px;
  min-height: 44px;
  margin: 0;
}

@media (min-width: 1024px) {
  body.public-portal-active #public-shell .auth-card {
    height: clamp(396px, 51vh, 416px);
    min-height: clamp(396px, 51vh, 416px);
    max-height: clamp(396px, 51vh, 416px);
  }

  body.public-portal-active #public-shell #login-form:not([hidden]),
  body.public-portal-active #public-shell #register-form:not([hidden]) {
    position: relative;
    padding-bottom: 106px;
  }

  body.public-portal-active #public-shell .auth-action-stack {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    margin: 0;
  }

  body.public-portal-active #public-shell .auth-action-stack > .auth-submit-slot {
    position: static !important;
    inset: auto !important;
    width: 100% !important;
    height: 44px !important;
    margin: 0 !important;
  }

  body.public-portal-active #public-shell #login-form > label {
    margin-bottom: 4px;
  }

  body.public-portal-active #public-shell #login-form > .input-field {
    margin-bottom: 4px;
  }

  body.public-portal-active #public-shell #login-form .form-row {
    margin-bottom: 0;
  }

  body.public-portal-active #public-shell #register-form .checkbox-label.terms {
    margin-bottom: 0;
  }
}

@media (min-width: 1024px) and (max-height: 760px) {
  body.public-portal-active #public-shell .auth-card {
    height: 380px;
    min-height: 380px;
    max-height: 380px;
  }
}

@media (max-width: 1023px) {
  #public-shell .auth-action-stack {
    position: static;
    margin-top: 8px;
  }
}

#public-shell .auth-action-stack > .auth-feedback-message {
  margin: 0 !important;
}


/* ===== v24.0.16 — calques de background réellement visibles ===== */
#public-shell .space-background {
  background-image: url("/assets/insect-wars-alien-background.webp?v=24-9-2-cout-ouvrieres-recherches");
  background-position: center center;
  background-size: cover;
  background-repeat: no-repeat;
}

@media (min-width: 1024px) {
  body.public-portal-active #public-shell .space-background {
    background-position: center center;
    transform: scale(1.015);
  }
}


/* ===== v24.0.17 — bannière publique d’état du site ===== */
#public-shell .site-status-banner {
  --status-accent: var(--muted-strong);
  --status-glow: rgba(139, 155, 184, 0.18);
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 14px;
  min-height: 96px;
  padding: 15px 17px;
  border: 1px solid color-mix(in srgb, var(--status-accent) 42%, transparent);
  border-left: 4px solid var(--status-accent);
  border-radius: var(--radius-md);
  background:
    linear-gradient(100deg, color-mix(in srgb, var(--status-accent) 10%, transparent), transparent 58%),
    rgba(5, 13, 29, 0.86);
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.24), 0 0 22px var(--status-glow);
  text-align: left;
  overflow: hidden;
}

#public-shell .site-status-signal {
  display: grid;
  place-items: center;
  width: 42px;
  height: 42px;
  border: 1px solid color-mix(in srgb, var(--status-accent) 48%, transparent);
  border-radius: 50%;
  background: color-mix(in srgb, var(--status-accent) 10%, rgba(4, 12, 27, 0.92));
  box-shadow: inset 0 0 14px var(--status-glow), 0 0 14px var(--status-glow);
}

#public-shell .site-status-dot {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: var(--status-accent);
  box-shadow: 0 0 0 5px color-mix(in srgb, var(--status-accent) 13%, transparent), 0 0 18px var(--status-accent);
}

#public-shell .site-status-content {
  min-width: 0;
}

#public-shell .site-status-kicker {
  display: block;
  margin-bottom: 3px;
  color: var(--muted);
  font-family: var(--font-display);
  font-size: 0.66rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

#public-shell .site-status-banner #site-card-title {
  display: block;
  margin: 0;
  color: var(--status-accent);
  font-family: var(--font-display);
  font-size: 1.12rem;
  line-height: 1.1;
  letter-spacing: 0.035em;
}

#public-shell .site-status-banner #site-card-text {
  margin: 7px 0 0;
  color: #c8d5e9;
  font-size: 0.78rem;
  line-height: 1.42;
}

#public-shell .site-status-banner #site-card-text[hidden] {
  display: none !important;
}

#public-shell .site-status-banner.open {
  --status-accent: var(--green);
  --status-glow: rgba(53, 227, 154, 0.24);
}

#public-shell .site-status-banner.registration-closed {
  --status-accent: var(--orange);
  --status-glow: rgba(255, 176, 59, 0.23);
}

#public-shell .site-status-banner.registration-closed #site-card-title {
  color: var(--green);
}

#public-shell .site-status-banner.registration-closed #site-card-text {
  color: #f3d59a;
}

#public-shell .site-status-banner.maintenance {
  --status-accent: var(--orange);
  --status-glow: rgba(255, 176, 59, 0.24);
}

#public-shell .site-status-banner.closed {
  --status-accent: var(--red);
  --status-glow: rgba(255, 93, 108, 0.23);
}

@media (max-width: 560px) {
  #public-shell .site-status-banner {
    min-height: 84px;
    padding: 13px 14px;
  }

  #public-shell .site-status-signal {
    width: 36px;
    height: 36px;
  }
}

/* ===== v24.0.19 — ergonomie avancée de l’authentification ===== */
#public-shell .input-field:has(.password-toggle) input {
  padding-right: 104px;
}

#public-shell .caps-lock-warning {
  position: absolute;
  right: 43px;
  top: 50%;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 48px;
  min-height: 23px;
  padding: 2px 6px;
  transform: translateY(-50%);
  border: 1px solid rgba(255, 184, 77, .42);
  border-radius: 999px;
  background: rgba(65, 39, 5, .86);
  color: #ffd78a;
  font-family: var(--font-display);
  font-size: .57rem;
  font-weight: 800;
  letter-spacing: .04em;
  pointer-events: none;
  box-shadow: 0 0 12px rgba(255, 174, 47, .14);
}

#public-shell .caps-lock-warning[hidden] {
  display: none !important;
}

#public-shell .input-field.caps-lock-active input {
  border-color: rgba(255, 184, 77, .5);
}

#public-shell .password-toggle {
  z-index: 3;
}

#public-shell .password-toggle.is-visible::after {
  content: "";
  position: absolute;
  width: 20px;
  height: 1.5px;
  top: 50%;
  left: 50%;
  background: currentColor;
  transform: translate(-50%, -50%) rotate(-38deg);
  border-radius: 999px;
}

#public-shell .input-field.has-error input {
  border-color: rgba(255, 92, 118, .86) !important;
  box-shadow: 0 0 0 3px rgba(255, 76, 107, .14), 0 0 18px rgba(255, 76, 107, .11) !important;
}

#public-shell .input-field.has-error .input-icon,
#public-shell .input-field.has-error .password-toggle {
  color: #ff8ca0;
}

#public-shell .password-strength-feedback {
  position: relative;
  display: block;
  padding: 6px 9px 10px;
  overflow: hidden;
  border-color: color-mix(in srgb, var(--strength-color, #7690b8) 45%, transparent);
  background: color-mix(in srgb, var(--strength-color, #7690b8) 8%, rgba(4, 10, 22, .86));
  color: #dce8fb;
  font-size: .67rem;
  line-height: 1.22;
  text-align: left;
}

#public-shell .password-strength-feedback::after {
  content: "";
  position: absolute;
  left: 0;
  right: auto;
  bottom: 0;
  width: var(--strength-progress, 8%);
  height: 3px;
  border-radius: 0 999px 999px 0;
  background: var(--strength-color, #7690b8);
  box-shadow: 0 0 10px color-mix(in srgb, var(--strength-color, #7690b8) 55%, transparent);
  transition: width .22s ease, background-color .22s ease;
}

#public-shell .password-strength-feedback.strength-0,
#public-shell .password-strength-feedback.strength-1 { --strength-color: #ff5f78; }
#public-shell .password-strength-feedback.strength-2 { --strength-color: #ff9d4f; }
#public-shell .password-strength-feedback.strength-3 { --strength-color: #ffd25f; }
#public-shell .password-strength-feedback.strength-4 { --strength-color: #69d5ff; }
#public-shell .password-strength-feedback.strength-5 { --strength-color: #52e59b; }

#public-shell .auth-submit-button {
  position: relative;
  isolation: isolate;
  gap: 9px;
}

#public-shell .auth-submit-button.is-loading {
  cursor: wait;
  filter: saturate(.82);
}

#public-shell .auth-button-spinner {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  border: 2px solid rgba(255, 255, 255, .28);
  border-top-color: #fff;
  border-radius: 50%;
  animation: auth-button-spin .7s linear infinite;
}

#public-shell .auth-button-spinner[hidden],
#public-shell .auth-button-icon[hidden] {
  display: none !important;
}

@keyframes auth-button-spin {
  to { transform: rotate(360deg); }
}

#public-shell .footer-identity {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}

#public-shell .footer-version {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 3px 8px;
  border: 1px solid rgba(89, 164, 255, .28);
  border-radius: 999px;
  background: rgba(31, 91, 170, .12);
  color: #9fc8ff;
  font-family: var(--font-display);
  font-size: .6rem;
  font-weight: 700;
  letter-spacing: .04em;
  white-space: nowrap;
}

@media (max-width: 1023px) {
  #public-shell .input-field:has(.password-toggle) input {
    padding-right: 96px;
  }

  #public-shell .caps-lock-warning {
    min-width: 42px;
    right: 41px;
    padding-inline: 4px;
    font-size: .52rem;
  }

  #public-shell .footer-identity {
    justify-content: center;
  }
}

@media (prefers-reduced-motion: reduce) {
  #public-shell .auth-button-spinner {
    animation-duration: 1.4s;
  }

  #public-shell .password-strength-feedback::after {
    transition: none;
  }
}

/* ===== v24.1.0 — socle de l’interface de jeu avec navbar RBAC ===== */
.game-interface {
  --sidebar-width: 292px;
  min-height: 100vh;
  background:
    radial-gradient(circle at 72% 8%, rgba(87, 63, 164, .13), transparent 30%),
    linear-gradient(135deg, rgba(4, 9, 15, .88), rgba(5, 11, 18, .96));
}

.game-sidebar {
  width: var(--sidebar-width);
  padding: 18px 16px 16px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(123, 242, 200, .24) transparent;
  background:
    linear-gradient(180deg, rgba(5, 11, 19, .96), rgba(6, 12, 20, .91)),
    url("/assets/insect-wars-alien-background.webp?v=24-9-2-cout-ouvrieres-recherches") 22% center / auto 100% fixed;
}

.game-sidebar-brand {
  padding: 3px 6px 17px;
}

.sidebar-commander {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 11px;
  margin: 14px 2px;
  padding: 13px;
  border: 1px solid rgba(123, 242, 200, .17);
  border-radius: 15px;
  background: linear-gradient(135deg, rgba(123, 242, 200, .085), rgba(168, 140, 255, .06));
}

.sidebar-commander-copy {
  min-width: 0;
}

.sidebar-commander-copy small,
.sidebar-commander-copy strong,
.sidebar-commander-copy span {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-commander-copy small {
  margin-bottom: 3px;
  color: var(--muted);
  font-size: .62rem;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.sidebar-commander-copy strong {
  font-size: .92rem;
}

.sidebar-commander-copy span {
  margin-top: 3px;
  color: #c2b5f4;
  font-size: .72rem;
}

.sidebar-game-panel {
  margin: 0 2px 11px;
  padding: 13px;
  border: 1px solid rgba(151, 190, 214, .13);
  border-radius: 15px;
  background: rgba(8, 16, 25, .7);
  box-shadow: inset 0 1px rgba(255, 255, 255, .015);
}

.sidebar-section-heading {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  margin-bottom: 11px;
}

.sidebar-section-heading > span {
  display: grid;
  place-items: center;
  width: 25px;
  height: 25px;
  border-radius: 8px;
  background: rgba(168, 140, 255, .1);
  color: var(--violet);
}

.sidebar-section-heading strong {
  font-size: .75rem;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.sidebar-section-heading em {
  padding: 3px 6px;
  border: 1px solid rgba(255, 200, 106, .22);
  border-radius: 999px;
  color: var(--warning);
  font-size: .55rem;
  font-style: normal;
  font-weight: 800;
  white-space: nowrap;
}

.sidebar-section-heading em.is-active {
  border-color: rgba(123, 242, 200, .24);
  color: var(--green);
}

.sidebar-info-list {
  display: grid;
  gap: 8px;
  margin: 0;
}

.sidebar-info-list > div {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 10px;
}

.sidebar-info-list dt {
  color: var(--muted);
  font-size: .68rem;
}

.sidebar-info-list dd {
  min-width: 0;
  margin: 0;
  overflow: hidden;
  color: #dce8ec;
  font-size: .7rem;
  font-weight: 750;
  text-align: right;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-resource-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  min-height: 30px;
  padding: 6px 8px;
  border-radius: 9px;
  font-size: .7rem;
}

.sidebar-resource-row + .sidebar-resource-row {
  margin-top: 4px;
}

.sidebar-resource-row span {
  color: #aebcc2;
}

.sidebar-resource-row strong {
  font-size: .76rem;
}

.sidebar-resource-row.biomass { background: rgba(75, 204, 145, .075); }
.sidebar-resource-row.biomass strong { color: #78e5ae; }
.sidebar-resource-row.chitin { background: rgba(160, 126, 84, .09); }
.sidebar-resource-row.chitin strong { color: #d5b787; }
.sidebar-resource-row.ore { background: rgba(98, 154, 190, .08); }
.sidebar-resource-row.ore strong { color: #93cae8; }

.territory-summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: .68rem;
}

.territory-summary strong {
  color: #d8e6ea;
  font-size: .72rem;
}

.territory-progress {
  height: 5px;
  margin-top: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, .06);
}

.territory-progress span {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--green-strong), var(--violet));
  box-shadow: 0 0 14px rgba(123, 242, 200, .4);
  transition: width .25s ease;
}

.game-sidebar .realtime-card {
  margin-inline: 2px;
}

.sidebar-logout-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  width: calc(100% - 4px);
  min-height: 40px;
  margin: 0 2px;
  border: 1px solid rgba(255, 113, 133, .18);
  border-radius: 12px;
  background: rgba(255, 113, 133, .065);
  color: #ff9bab;
  cursor: pointer;
  font-size: .72rem;
  font-weight: 800;
}

.sidebar-logout-button:hover {
  border-color: rgba(255, 113, 133, .34);
  background: rgba(255, 113, 133, .11);
}

.game-workspace {
  padding: 0 clamp(18px, 3vw, 44px) 52px;
}

.game-topbar {
  min-height: 0;
  display: grid;
  align-items: stretch;
  gap: 0;
  padding-top: 15px;
}

.topbar-heading-row {
  min-height: 67px;
  display: flex;
  align-items: center;
  gap: 14px;
}

.topbar-title-block {
  min-width: 0;
}

.topbar-title-block h1 {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.game-navbar {
  display: flex;
  align-items: center;
  gap: 5px;
  min-width: 0;
  padding: 7px 0 12px;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  scrollbar-width: thin;
  scrollbar-color: rgba(123, 242, 200, .22) transparent;
}

.game-navbar a {
  position: relative;
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 7px;
  min-height: 38px;
  padding: 8px 11px;
  border: 1px solid transparent;
  border-radius: 11px;
  color: #8fa5ae;
  font-size: .7rem;
  font-weight: 750;
  white-space: nowrap;
}

.game-navbar a > span {
  color: #a88cff;
  font-size: .88rem;
}

.game-navbar a > b {
  font-weight: 780;
}

.game-navbar a:hover {
  color: #e8f3f4;
  background: rgba(255, 255, 255, .035);
}

.game-navbar a.is-active {
  border-color: rgba(123, 242, 200, .22);
  background: linear-gradient(135deg, rgba(123, 242, 200, .11), rgba(168, 140, 255, .075));
  color: var(--text);
}

.game-navbar a.is-active::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: -7px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--green), var(--violet));
  box-shadow: 0 0 12px rgba(123, 242, 200, .35);
}

.game-navbar .admin-navbar-link {
  margin-left: auto;
  border-color: rgba(255, 200, 106, .16);
  color: #e7c784;
  background: rgba(255, 200, 106, .045);
}

.game-navbar .admin-navbar-link > span {
  color: var(--warning);
}

.game-navbar .admin-navbar-link em {
  padding: 2px 5px;
  border-radius: 999px;
  background: rgba(255, 200, 106, .12);
  color: var(--warning);
  font-size: .48rem;
  font-style: normal;
  letter-spacing: .05em;
}

.game-view-root {
  padding-top: 22px;
}

.game-command-hero {
  min-height: 280px;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(230px, .65fr);
  align-items: center;
  gap: 30px;
  padding: clamp(28px, 4vw, 46px);
  overflow: hidden;
  border: 1px solid rgba(123, 242, 200, .16);
  border-radius: var(--radius-xl);
  background:
    radial-gradient(circle at 80% 32%, rgba(123, 242, 200, .13), transparent 31%),
    radial-gradient(circle at 15% 120%, rgba(168, 140, 255, .12), transparent 42%),
    linear-gradient(135deg, rgba(10, 21, 31, .94), rgba(6, 13, 21, .94));
  box-shadow: var(--shadow);
}

.game-command-copy h2 {
  margin: 0 0 13px;
  font-size: clamp(2.2rem, 4.5vw, 4.2rem);
  line-height: 1;
  letter-spacing: -.055em;
}

.game-command-copy > p:not(.eyebrow) {
  max-width: 720px;
  margin: 0;
  color: #aebfc6;
  line-height: 1.7;
}

.command-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 23px;
}

.command-actions a {
  min-height: 43px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding-inline: 16px;
}

.command-primary-action {
  border: 0;
}

.command-radar {
  position: relative;
  width: min(25vw, 240px);
  aspect-ratio: 1;
  justify-self: center;
  border: 1px solid rgba(123, 242, 200, .22);
  border-radius: 50%;
  background:
    linear-gradient(90deg, transparent 49.5%, rgba(123, 242, 200, .16) 50%, transparent 50.5%),
    linear-gradient(transparent 49.5%, rgba(123, 242, 200, .16) 50%, transparent 50.5%),
    repeating-radial-gradient(circle, rgba(123, 242, 200, .13) 0 1px, transparent 1px 26%);
  box-shadow: inset 0 0 60px rgba(123, 242, 200, .055), 0 0 50px rgba(168, 140, 255, .08);
}

.command-radar::before {
  content: "";
  position: absolute;
  inset: 50% 0 0 50%;
  transform-origin: 0 0;
  background: conic-gradient(from -35deg, rgba(123, 242, 200, .23), transparent 50deg);
  animation: radar-sweep 6s linear infinite;
}

.command-radar span,
.command-radar i,
.command-radar b,
.command-radar em {
  position: absolute;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 14px currentColor;
}

.command-radar span { left: 31%; top: 37%; }
.command-radar i { right: 24%; top: 28%; color: var(--violet); background: var(--violet); }
.command-radar b { right: 34%; bottom: 22%; }
.command-radar em { left: 23%; bottom: 31%; color: var(--warning); background: var(--warning); }

@keyframes radar-sweep {
  to { transform: rotate(360deg); }
}

.game-overview-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 13px;
  margin-top: 16px;
}

.game-overview-card {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 13px;
  min-height: 130px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 17px;
  background: rgba(10, 18, 28, .82);
}

.game-overview-icon {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(168, 140, 255, .2);
  border-radius: 12px;
  background: rgba(168, 140, 255, .075);
  color: var(--violet);
}

.game-overview-card small,
.game-overview-card strong,
.game-overview-card p {
  display: block;
}

.game-overview-card small {
  color: var(--muted);
  font-size: .62rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
}

.game-overview-card strong {
  margin-top: 5px;
  font-size: 1.08rem;
}

.game-overview-card p {
  margin: 7px 0 0;
  color: #8499a2;
  font-size: .7rem;
  line-height: 1.45;
}

.game-dashboard-grid {
  display: grid;
  grid-template-columns: 1.1fr .9fr;
  gap: 16px;
  margin-top: 16px;
}

.game-objectives-list {
  display: grid;
  gap: 9px;
  padding: 0;
  margin: 0;
  list-style: none;
}

.game-objectives-list li {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  opacity: .68;
}

.game-objectives-list li > span {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 10px;
  background: rgba(168, 140, 255, .09);
  color: var(--violet);
  font-weight: 900;
}

.game-objectives-list li strong,
.game-objectives-list li small {
  display: block;
}

.game-objectives-list li small {
  margin-top: 3px;
  color: var(--muted);
}

.game-objectives-list li.is-current {
  opacity: 1;
  border-color: rgba(123, 242, 200, .24);
  background: rgba(123, 242, 200, .055);
}

.game-objectives-list li.is-current > span {
  background: rgba(123, 242, 200, .12);
  color: var(--green);
}

.empty-game-state {
  display: grid;
  place-items: center;
  text-align: center;
}

.empty-game-state > span {
  display: grid;
  place-items: center;
  width: 58px;
  height: 58px;
  border: 1px solid rgba(168, 140, 255, .22);
  border-radius: 19px;
  background: rgba(168, 140, 255, .07);
  color: var(--violet);
  font-size: 1.45rem;
}

.empty-game-state strong,
.empty-game-state h3 {
  margin: 14px 0 0;
}

.empty-game-state p {
  max-width: 570px;
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.6;
}

.empty-game-state small {
  margin-top: 12px;
  color: #71858e;
}

.empty-game-state.compact {
  min-height: 205px;
}

.module-state {
  min-height: 430px;
  padding: 40px;
  border: 1px dashed rgba(151, 190, 214, .2);
  border-radius: var(--radius-xl);
  background:
    radial-gradient(circle at center, rgba(168, 140, 255, .06), transparent 42%),
    rgba(9, 17, 26, .65);
}

.module-state h3 {
  font-size: clamp(1.5rem, 3vw, 2.25rem);
}

@media (max-width: 1300px) {
  .game-overview-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .game-navbar a {
    padding-inline: 9px;
  }
}

@media (max-width: 980px) {
  .game-dashboard-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  .game-interface {
    --sidebar-width: min(292px, 88vw);
  }

  .game-sidebar {
    width: var(--sidebar-width);
  }

  .game-workspace {
    padding-inline: 14px;
  }

  .game-topbar {
    padding-top: 8px;
  }

  .topbar-heading-row {
    min-height: 58px;
  }

  .game-command-hero {
    grid-template-columns: 1fr;
  }

  .command-radar {
    display: none;
  }

  .game-navbar .admin-navbar-link {
    margin-left: 0;
  }
}

@media (max-width: 620px) {
  .game-overview-grid {
    grid-template-columns: 1fr;
  }

  .game-command-hero {
    min-height: auto;
    padding: 25px 20px;
  }

  .game-command-copy h2 {
    font-size: 2.5rem;
  }

  .command-actions {
    display: grid;
  }

  .game-navbar a > b {
    display: none;
  }

  .game-navbar a {
    min-width: 42px;
    justify-content: center;
    padding-inline: 10px;
  }

  .game-navbar a > span {
    font-size: 1rem;
  }

  .game-navbar .admin-navbar-link em {
    display: none;
  }

  .module-state {
    min-height: 340px;
    padding: 28px 20px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .command-radar::before {
    animation: none;
  }
}

/* ===== v24.1.2 — attente maintenance avec session conservée ===== */
#public-shell .restricted-session-panel {
  box-sizing: border-box;
  display: flex;
  flex: 1 1 auto;
  min-height: 0;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: clamp(24px, 4vw, 42px);
  text-align: center;
}

#public-shell .restricted-session-panel[hidden] {
  display: none !important;
}

#public-shell .auth-card.is-session-restricted {
  overflow: hidden;
}

#public-shell .restricted-session-orbit {
  position: relative;
  width: 72px;
  height: 72px;
  margin-bottom: 14px;
  border: 1px solid rgba(255, 176, 59, 0.46);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 176, 59, 0.18), rgba(255, 176, 59, 0.03) 62%, transparent 64%);
  box-shadow: 0 0 34px rgba(255, 176, 59, 0.18), inset 0 0 22px rgba(255, 176, 59, 0.1);
}

#public-shell .restricted-session-orbit::before,
#public-shell .restricted-session-orbit::after {
  content: "";
  position: absolute;
  inset: 9px;
  border: 1px dashed rgba(255, 190, 84, 0.46);
  border-radius: 50%;
  animation: restricted-session-spin 8s linear infinite;
}

#public-shell .restricted-session-orbit::after {
  inset: 21px;
  border-style: solid;
  border-color: rgba(255, 190, 84, 0.72);
  animation-direction: reverse;
  animation-duration: 5s;
}

#public-shell .restricted-session-orbit span {
  position: absolute;
  inset: 50% auto auto 50%;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #ffb03b;
  box-shadow: 0 0 18px rgba(255, 176, 59, 0.9);
  transform: translate(-50%, -50%);
}

#public-shell .restricted-session-eyebrow {
  margin: 0 0 6px;
  color: #ffbf59;
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

#public-shell .restricted-session-panel h2 {
  margin: 0;
  color: #f8fbff;
  font-size: clamp(1.35rem, 2.5vw, 1.8rem);
}

#public-shell .restricted-session-message {
  max-width: 440px;
  margin: 10px 0 0;
  color: #d4dee9;
  font-size: 0.92rem;
  line-height: 1.55;
}

#public-shell .restricted-session-resume {
  max-width: 470px;
  margin: 8px 0 0;
  color: #93a5b8;
  font-size: 0.8rem;
  line-height: 1.5;
}

#public-shell .restricted-session-sync {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 15px;
  padding: 7px 11px;
  border: 1px solid rgba(69, 174, 255, 0.2);
  border-radius: 999px;
  color: #9dcfff;
  background: rgba(38, 118, 201, 0.09);
  font-size: 0.7rem;
  font-weight: 700;
}

#public-shell .restricted-session-sync-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #4bb4ff;
  box-shadow: 0 0 10px rgba(75, 180, 255, 0.85);
  animation: restricted-session-pulse 1.8s ease-in-out infinite;
}

#public-shell .restricted-session-account {
  display: flex;
  width: min(100%, 470px);
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-top: 18px;
  padding-top: 15px;
  border-top: 1px solid rgba(255, 255, 255, 0.09);
  color: #aab9c8;
  font-size: 0.8rem;
}

#public-shell .restricted-session-account strong {
  color: #f1f6fb;
}

@keyframes restricted-session-spin {
  to { transform: rotate(360deg); }
}

@keyframes restricted-session-pulse {
  0%, 100% { opacity: 0.5; transform: scale(0.82); }
  50% { opacity: 1; transform: scale(1); }
}

@media (max-width: 600px) {
  #public-shell .restricted-session-panel {
    padding: 24px 18px;
  }

  #public-shell .restricted-session-account {
    flex-direction: column;
  }
}

@media (prefers-reduced-motion: reduce) {
  #public-shell .restricted-session-orbit::before,
  #public-shell .restricted-session-orbit::after,
  #public-shell .restricted-session-sync-dot {
    animation: none;
  }
}

/* ===== v24.1.3 — navbar fixe en haut des vues jeu et admin ===== */
.game-workspace {
  --workspace-gutter: clamp(18px, 3vw, 44px);
  padding: 0 var(--workspace-gutter) 52px;
}

.game-navbar-sticky {
  position: sticky;
  top: 0;
  z-index: 60;
  margin-inline: calc(var(--workspace-gutter) * -1);
  padding: 10px var(--workspace-gutter) 12px;
  border-bottom: 1px solid rgba(151, 190, 214, .16);
  background:
    linear-gradient(180deg, rgba(5, 10, 17, .985), rgba(6, 12, 20, .94));
  box-shadow: 0 12px 30px rgba(0, 0, 0, .22);
  backdrop-filter: blur(22px) saturate(1.12);
  -webkit-backdrop-filter: blur(22px) saturate(1.12);
}

.game-topbar {
  position: relative;
  top: auto;
  z-index: 1;
  padding-top: 8px;
  border-bottom: 0;
  background: transparent;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.game-sidebar {
  z-index: 70;
}

@media (max-width: 820px) {
  .game-workspace {
    --workspace-gutter: 14px;
  }

  .game-navbar-sticky {
    padding-top: max(8px, env(safe-area-inset-top));
  }

  .game-topbar {
    padding-top: 4px;
  }
}


/* ===== v24.1.4 — utilisateur en tête de sidebar et sous-menu Admin ===== */
.game-sidebar > .sidebar-commander-primary {
  position: relative;
  margin: 0 2px 14px;
  padding: 15px 13px;
  overflow: hidden;
  border-color: rgba(123, 242, 200, .25);
  background:
    radial-gradient(circle at 0 0, rgba(123, 242, 200, .13), transparent 52%),
    linear-gradient(135deg, rgba(123, 242, 200, .09), rgba(168, 140, 255, .075));
  box-shadow: 0 10px 28px rgba(0, 0, 0, .2), inset 0 1px rgba(255, 255, 255, .035);
}

.game-sidebar > .sidebar-commander-primary::after {
  content: "";
  position: absolute;
  inset: auto 14px 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(123, 242, 200, .7), transparent);
}

.admin-subnav {
  display: flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  margin-inline: calc(var(--workspace-gutter) * -1);
  padding: 9px var(--workspace-gutter) 10px;
  overflow-x: auto;
  overscroll-behavior-inline: contain;
  border-bottom: 1px solid rgba(151, 190, 214, .13);
  background: rgba(8, 15, 24, .965);
  box-shadow: 0 10px 24px rgba(0, 0, 0, .16);
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 200, 106, .24) transparent;
}

.admin-subnav[hidden] {
  display: none !important;
}

.admin-subnav-sticky {
  position: sticky;
  top: var(--game-navbar-height, 62px);
  z-index: 59;
  backdrop-filter: blur(20px) saturate(1.08);
  -webkit-backdrop-filter: blur(20px) saturate(1.08);
}

.admin-subnav button {
  position: relative;
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 7px 12px;
  border: 1px solid transparent;
  border-radius: 10px;
  color: #91a5af;
  background: transparent;
  font: inherit;
  font-size: .7rem;
  font-weight: 780;
  white-space: nowrap;
  cursor: pointer;
}

.admin-subnav button > span {
  color: var(--warning);
  font-size: .9rem;
}

.admin-subnav button:hover {
  color: #f1f6f7;
  background: rgba(255, 200, 106, .055);
}

.admin-subnav button.is-active {
  border-color: rgba(255, 200, 106, .25);
  color: #fff1cf;
  background: linear-gradient(135deg, rgba(255, 200, 106, .12), rgba(168, 140, 255, .065));
}

.admin-subnav button.is-active::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: -6px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--warning), var(--violet));
  box-shadow: 0 0 10px rgba(255, 200, 106, .28);
}

.admin-section-intro {
  margin-bottom: 18px;
}

.admin-panel-section[hidden] {
  display: none !important;
}

.admin-overview-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 18px;
}

.admin-live-summary {
  align-self: stretch;
}

.admin-status-list {
  display: grid;
  gap: 0;
  margin: 0;
}

.admin-status-list > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 15px 0;
  border-bottom: 1px solid var(--line);
}

.admin-status-list > div:last-child {
  border-bottom: 0;
}

.admin-status-list dt {
  color: var(--muted);
}

.admin-status-list dd {
  margin: 0;
  color: #e9f2f3;
  font-weight: 800;
  text-align: right;
  text-transform: capitalize;
}

.admin-settings-card {
  width: min(100%, 780px);
}

.admin-table-card {
  margin-top: 0;
}

@media (max-width: 820px) {
  .admin-subnav {
    padding-inline: var(--workspace-gutter);
  }

  .admin-overview-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .admin-subnav button > b {
    display: none;
  }

  .admin-subnav button {
    min-width: 42px;
    justify-content: center;
    padding-inline: 10px;
  }
}


/* ===== v24.1.5 — URL stable et Admin immédiatement après Compte ===== */
.game-navbar .admin-navbar-link {
  margin-left: 0;
}

/* ===== v24.2.0 — carte galactique et fondation de la première colonie ===== */
.galaxy-section-intro {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
}

.galaxy-map-summary {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 9px;
  padding: 9px 12px;
  border: 1px solid rgba(123, 242, 200, .18);
  border-radius: 999px;
  color: #bcd5d8;
  background: rgba(8, 18, 26, .68);
  font-size: .72rem;
}

.galaxy-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(340px, .72fr);
  gap: 18px;
  align-items: start;
}

.galaxy-map-card,
.galaxy-planet-panel {
  border: 1px solid rgba(123, 175, 210, .18);
  border-radius: 22px;
  background: linear-gradient(145deg, rgba(8, 16, 27, .94), rgba(5, 11, 20, .92));
  box-shadow: 0 28px 70px rgba(0, 0, 0, .3);
}

.galaxy-map-card {
  min-width: 0;
  overflow: hidden;
}

.galaxy-map-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  min-height: 66px;
  padding: 12px 18px;
  border-bottom: 1px solid rgba(123, 175, 210, .14);
  background: rgba(5, 12, 21, .76);
}

.galaxy-map-toolbar small,
.galaxy-map-toolbar strong {
  display: block;
}

.galaxy-map-toolbar small {
  color: #7f96a4;
  font-size: .68rem;
  letter-spacing: .1em;
  text-transform: uppercase;
}

.galaxy-map-toolbar strong {
  margin-top: 3px;
  color: #eaf6f7;
  font-size: .95rem;
}

.galaxy-map-toolbar > span {
  color: #75c9ff;
  font-size: .7rem;
  font-weight: 750;
}

.galaxy-map {
  position: relative;
  min-height: clamp(520px, 63vh, 720px);
  isolation: isolate;
  overflow: hidden;
  background:
    radial-gradient(circle at 52% 48%, rgba(98, 120, 255, .13), transparent 23%),
    radial-gradient(circle at 20% 24%, rgba(84, 192, 255, .09), transparent 26%),
    radial-gradient(circle at 82% 78%, rgba(168, 140, 255, .12), transparent 25%),
    linear-gradient(145deg, #030713, #07101d 52%, #040812);
}

.galaxy-map::before,
.galaxy-map::after {
  content: "";
  position: absolute;
  z-index: -1;
  inset: -20%;
  pointer-events: none;
}

.galaxy-map::before {
  opacity: .58;
  background-image:
    radial-gradient(circle, rgba(255, 255, 255, .78) 0 1px, transparent 1.5px),
    radial-gradient(circle, rgba(120, 201, 255, .72) 0 1px, transparent 1.4px),
    radial-gradient(circle, rgba(194, 170, 255, .55) 0 1px, transparent 1.4px);
  background-size: 83px 83px, 127px 127px, 191px 191px;
  background-position: 12px 27px, 54px 8px, 19px 73px;
  transform: rotate(-6deg);
}

.galaxy-map::after {
  opacity: .22;
  background: repeating-radial-gradient(circle at 50% 50%, transparent 0 72px, rgba(102, 153, 207, .18) 73px, transparent 74px 144px);
}

.galaxy-nebula {
  position: absolute;
  z-index: 0;
  width: 52%;
  aspect-ratio: 1;
  border-radius: 50%;
  filter: blur(42px);
  opacity: .22;
  pointer-events: none;
}

.galaxy-nebula-a {
  left: -16%;
  top: -14%;
  background: conic-gradient(from 80deg, #523fa6, transparent, #156889, transparent, #523fa6);
  transform: rotate(18deg) scaleX(1.4);
}

.galaxy-nebula-b {
  right: -19%;
  bottom: -22%;
  background: conic-gradient(from 210deg, #7945a3, transparent, #1a578f, transparent, #7945a3);
  transform: rotate(-23deg) scaleX(1.35);
}

.galaxy-grid {
  position: absolute;
  z-index: 1;
  inset: 0;
  opacity: .28;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(99, 153, 195, .11) 1px, transparent 1px),
    linear-gradient(90deg, rgba(99, 153, 195, .11) 1px, transparent 1px);
  background-size: 68px 68px;
  mask-image: radial-gradient(circle at 50% 50%, #000 0 40%, transparent 82%);
}

.galaxy-core {
  position: absolute;
  z-index: 2;
  left: 18%;
  top: 21%;
  width: 76px;
  aspect-ratio: 1;
  border: 1px solid rgba(104, 192, 255, .22);
  border-radius: 50%;
  opacity: .7;
  pointer-events: none;
}

.galaxy-core::before,
.galaxy-core::after {
  content: "";
  position: absolute;
  inset: 18%;
  border: 1px solid rgba(168, 140, 255, .32);
  border-radius: 50%;
  transform: rotate(54deg) scaleY(.34);
}

.galaxy-core::after {
  transform: rotate(-54deg) scaleY(.34);
}

.galaxy-core span {
  position: absolute;
  inset: 40%;
  border-radius: 50%;
  background: #e6fbff;
  box-shadow: 0 0 22px #80d9ff, 0 0 50px rgba(112, 170, 255, .48);
}

.galaxy-planets-layer {
  position: absolute;
  z-index: 4;
  inset: 0;
}

.galaxy-planet {
  --planet-size: clamp(84px, 9vw, 118px);
  position: absolute;
  left: var(--planet-x);
  top: var(--planet-y);
  width: var(--planet-size);
  aspect-ratio: 1;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: #e9f6f8;
  background: transparent;
  transform: translate(-50%, -50%);
  cursor: pointer;
  transition: transform 180ms ease, filter 180ms ease;
}

.galaxy-planet:hover,
.galaxy-planet.is-selected {
  transform: translate(-50%, -50%) scale(1.06);
  filter: brightness(1.08);
}

.galaxy-planet:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 8px;
}

.galaxy-planet-orbit {
  position: absolute;
  inset: -26%;
  border: 1px solid rgba(135, 171, 255, .28);
  border-radius: 50%;
  transform: rotate(-18deg) scaleY(.36);
  transition: border-color 180ms ease, box-shadow 180ms ease;
}

.galaxy-planet.is-selected .galaxy-planet-orbit {
  border-color: rgba(123, 242, 200, .68);
  box-shadow: 0 0 24px rgba(123, 242, 200, .16);
}

.galaxy-planet-globe {
  position: absolute;
  inset: 5%;
  border: 1px solid rgba(216, 232, 255, .22);
  border-radius: 50%;
  overflow: hidden;
  background:
    radial-gradient(circle at 31% 24%, rgba(255, 255, 255, .8), transparent 8%),
    radial-gradient(ellipse at 26% 48%, rgba(44, 178, 164, .74) 0 12%, transparent 13%),
    radial-gradient(ellipse at 64% 62%, rgba(90, 53, 160, .86) 0 19%, transparent 20%),
    radial-gradient(circle at 70% 32%, #345da0, #15264d 44%, #090d1b 78%);
  box-shadow:
    inset -20px -16px 28px rgba(0, 0, 0, .72),
    inset 10px 9px 18px rgba(104, 219, 255, .14),
    0 0 34px rgba(100, 121, 255, .24);
}

.galaxy-planet-globe::before,
.galaxy-planet-globe::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  opacity: .55;
}

.galaxy-planet-globe::before {
  width: 72%;
  height: 20%;
  left: -7%;
  top: 28%;
  border-top: 5px solid rgba(116, 246, 213, .34);
  transform: rotate(18deg);
}

.galaxy-planet-globe::after {
  width: 58%;
  height: 13%;
  right: -5%;
  bottom: 24%;
  border-top: 4px solid rgba(171, 128, 255, .34);
  transform: rotate(-16deg);
}

.galaxy-planet-marker {
  position: absolute;
  left: 50%;
  bottom: calc(100% + 18px);
  transform: translateX(-50%);
  padding: 5px 8px;
  border: 1px solid rgba(115, 193, 255, .24);
  border-radius: 999px;
  color: #a7d9ff;
  background: rgba(5, 12, 22, .9);
  font-size: .62rem;
  font-weight: 800;
  white-space: nowrap;
}

.galaxy-planet.has-colony .galaxy-planet-marker {
  border-color: rgba(123, 242, 200, .38);
  color: #bff9e6;
}

.galaxy-planet-label {
  position: absolute;
  left: 50%;
  top: calc(100% + 14px);
  min-width: 180px;
  transform: translateX(-50%);
  text-align: center;
  pointer-events: none;
}

.galaxy-planet-label strong,
.galaxy-planet-label small {
  display: block;
}

.galaxy-planet-label strong {
  color: #eef8fa;
  font-size: .9rem;
}

.galaxy-planet-label small {
  margin-top: 3px;
  color: #78909f;
  font-size: .66rem;
}

.galaxy-map-scale {
  position: absolute;
  z-index: 5;
  left: 18px;
  bottom: 16px;
  display: flex;
  align-items: center;
  gap: 9px;
  color: #6f8999;
  font-size: .62rem;
}

.galaxy-map-scale span {
  width: 72px;
  height: 6px;
  border-inline: 1px solid #6f8999;
  border-bottom: 1px solid #6f8999;
}

.galaxy-map-empty {
  position: absolute;
  z-index: 7;
  inset: 0;
  display: grid;
  place-content: center;
  text-align: center;
}

.galaxy-map-empty strong,
.galaxy-map-empty span {
  display: block;
}

.galaxy-map-empty span {
  margin-top: 6px;
  color: var(--muted);
}

.galaxy-planet-panel {
  position: sticky;
  top: calc(var(--game-navbar-height, 62px) + 18px);
  padding: 20px;
}

.planet-panel-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.planet-panel-header h3 {
  margin: 0;
  font-size: 1.5rem;
  letter-spacing: -.035em;
}

.planet-status-badge {
  display: inline-flex;
  align-items: center;
  min-height: 27px;
  padding: 5px 8px;
  border: 1px solid rgba(123, 242, 200, .28);
  border-radius: 999px;
  color: #baf8e3;
  background: rgba(123, 242, 200, .08);
  font-size: .64rem;
  font-weight: 850;
}

.planet-status-badge.is-locked {
  border-color: rgba(255, 113, 133, .28);
  color: #ffacb8;
  background: rgba(255, 113, 133, .08);
}

.planet-description {
  margin: 16px 0;
  color: #a8bac4;
  font-size: .82rem;
  line-height: 1.65;
}

.planet-data-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin: 0;
  border-block: 1px solid rgba(151, 190, 214, .13);
}

.planet-data-grid > div {
  padding: 11px 0;
  border-bottom: 1px solid rgba(151, 190, 214, .08);
}

.planet-data-grid > div:nth-child(odd) {
  padding-right: 12px;
}

.planet-data-grid > div:nth-child(even) {
  padding-left: 12px;
  border-left: 1px solid rgba(151, 190, 214, .08);
}

.planet-data-grid dt {
  color: #718896;
  font-size: .62rem;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.planet-data-grid dd {
  margin: 4px 0 0;
  color: #e1edef;
  font-size: .76rem;
  font-weight: 760;
}

.planet-habitability {
  height: 4px;
  margin: 12px 0 19px;
  overflow: hidden;
  border-radius: 99px;
  background: rgba(255, 255, 255, .06);
}

.planet-habitability span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #49a6ff, #7bf2c8);
  box-shadow: 0 0 14px rgba(123, 242, 200, .35);
}

.panel-heading.compact {
  margin-bottom: 13px;
}

.panel-heading.compact h4 {
  margin: 0;
  font-size: 1rem;
}

.colony-founding-panel {
  padding-top: 2px;
}

#colony-founding-form {
  display: grid;
  gap: 14px;
}

.species-fieldset {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.species-fieldset legend,
.colony-name-field > span {
  margin-bottom: 8px;
  color: #c7d6da;
  font-size: .74rem;
  font-weight: 800;
}

.species-choice-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.species-choice {
  position: relative;
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  min-width: 0;
  min-height: 68px;
  padding: 9px;
  border: 1px solid rgba(151, 190, 214, .14);
  border-radius: 12px;
  background: rgba(8, 16, 25, .66);
  cursor: pointer;
  transition: border-color 150ms ease, background 150ms ease, transform 150ms ease;
}

.species-choice:hover {
  transform: translateY(-1px);
  border-color: color-mix(in srgb, var(--species-accent) 45%, transparent);
}

.species-choice:has(input:checked) {
  border-color: color-mix(in srgb, var(--species-accent) 62%, transparent);
  background: color-mix(in srgb, var(--species-accent) 10%, rgba(8, 16, 25, .8));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--species-accent) 16%, transparent);
}

.species-choice input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.species-choice-visual {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border: 1px solid color-mix(in srgb, var(--species-accent) 42%, transparent);
  border-radius: 9px;
  color: var(--species-accent);
  background: color-mix(in srgb, var(--species-accent) 10%, transparent);
  font-size: .9rem;
}

.species-choice-copy {
  min-width: 0;
}

.species-choice-copy strong,
.species-choice-copy small {
  display: block;
}

.species-choice-copy strong {
  color: #ebf4f5;
  font-size: .74rem;
}

.species-choice-copy small {
  display: -webkit-box;
  margin-top: 3px;
  overflow: hidden;
  color: #7f96a3;
  font-size: .58rem;
  line-height: 1.35;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
}

.colony-name-field {
  display: grid;
  gap: 0;
}

.colony-name-field input {
  min-height: 42px;
  padding: 10px 12px;
}

.colony-name-field small {
  margin-top: 6px;
  color: #718693;
  font-size: .62rem;
  line-height: 1.4;
}

.colony-feedback {
  margin: 0;
  padding: 8px 10px;
  border: 1px solid rgba(151, 190, 214, .14);
  border-radius: 10px;
  color: #b7c7cc;
  background: rgba(8, 16, 25, .72);
  font-size: .7rem;
}

.colony-feedback.error {
  border-color: rgba(255, 113, 133, .3);
  color: #ffacb8;
  background: rgba(255, 113, 133, .07);
}

.colony-feedback.success {
  border-color: rgba(123, 242, 200, .3);
  color: #baf8e3;
  background: rgba(123, 242, 200, .07);
}

.colony-submit-button {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  width: 100%;
  min-height: 44px;
}

.button-spinner {
  display: none;
  width: 16px;
  height: 16px;
  border: 2px solid rgba(3, 17, 13, .28);
  border-top-color: #03110d;
  border-radius: 50%;
  animation: colony-spinner .7s linear infinite;
}

.colony-submit-button.is-loading .button-spinner {
  display: inline-block;
}

@keyframes colony-spinner {
  to { transform: rotate(360deg); }
}

.colony-established-panel {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 13px;
  padding: 15px;
  border: 1px solid rgba(123, 242, 200, .2);
  border-radius: 16px;
  background: linear-gradient(145deg, rgba(123, 242, 200, .08), rgba(168, 140, 255, .05));
}

.colony-established-icon {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  border: 1px solid rgba(123, 242, 200, .32);
  border-radius: 14px;
  color: var(--green);
  background: rgba(123, 242, 200, .08);
  font-size: 1.2rem;
}

.colony-established-panel h4 {
  margin: 0;
  font-size: 1.2rem;
}

.colony-established-panel p:not(.eyebrow) {
  margin: 5px 0 0;
  color: #8fa3ad;
  font-size: .72rem;
  line-height: 1.5;
}

.colony-established-data {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  margin: 2px 0 0;
  border-top: 1px solid rgba(123, 242, 200, .13);
}

.colony-established-data > div {
  padding: 10px 0;
  border-bottom: 1px solid rgba(151, 190, 214, .08);
}

.colony-established-data > div:nth-child(even) {
  padding-left: 12px;
}

.colony-established-data dt {
  color: #718896;
  font-size: .6rem;
  text-transform: uppercase;
}

.colony-established-data dd {
  margin: 4px 0 0;
  color: #e4eef0;
  font-size: .72rem;
  font-weight: 760;
}

.game-objectives-list li.is-complete {
  border-color: rgba(123, 242, 200, .18);
  background: rgba(123, 242, 200, .055);
}

.game-objectives-list li.is-complete > span {
  color: #06120e;
  background: var(--green);
  box-shadow: 0 0 16px rgba(123, 242, 200, .24);
}

.game-objectives-list li.is-complete > span::after {
  content: "✓";
}

.game-objectives-list li.is-complete > span {
  font-size: 0;
}

.game-objectives-list li.is-complete > span::after {
  font-size: .76rem;
}

@media (max-width: 1180px) {
  .galaxy-layout {
    grid-template-columns: 1fr;
  }

  .galaxy-planet-panel {
    position: relative;
    top: auto;
  }

  .galaxy-map {
    min-height: 560px;
  }
}

@media (max-width: 720px) {
  .galaxy-section-intro {
    align-items: flex-start;
    flex-direction: column;
  }

  .galaxy-map-summary {
    align-self: stretch;
    border-radius: 12px;
  }

  .galaxy-map-toolbar {
    align-items: flex-start;
    flex-direction: column;
    gap: 7px;
  }

  .galaxy-map {
    min-height: 500px;
  }

  .galaxy-planet {
    --planet-size: 88px;
  }

  .galaxy-core {
    left: 10%;
    top: 15%;
  }
}

@media (max-width: 520px) {
  .galaxy-map {
    min-height: 440px;
  }

  .galaxy-planet-label {
    min-width: 140px;
  }

  .planet-data-grid,
  .species-choice-grid,
  .colony-established-data {
    grid-template-columns: 1fr;
  }

  .planet-data-grid > div:nth-child(even) {
    padding-left: 0;
    border-left: 0;
  }

  .colony-established-data > div:nth-child(even) {
    padding-left: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  .galaxy-planet,
  .species-choice,
  .button-spinner {
    transition: none;
    animation: none;
  }
}

/* ===== v24.2.1 — choix de civilisation à la connexion ===== */
body.civilization-onboarding-open {
  overflow: hidden;
}

.civilization-onboarding {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: grid;
  place-items: center;
  padding: 24px;
  overflow: auto;
}

.civilization-onboarding[hidden] {
  display: none !important;
}

.civilization-onboarding-backdrop {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at 50% 42%, rgba(80, 42, 136, .3), transparent 42%),
    rgba(1, 5, 12, .88);
  backdrop-filter: blur(12px);
}

.civilization-onboarding-dialog {
  position: relative;
  width: min(980px, 100%);
  border: 1px solid rgba(149, 115, 224, .35);
  border-radius: 22px;
  padding: clamp(20px, 3vw, 34px);
  background:
    linear-gradient(145deg, rgba(12, 19, 35, .98), rgba(5, 10, 20, .98)),
    radial-gradient(circle at top right, rgba(116, 75, 184, .2), transparent 38%);
  box-shadow: 0 30px 90px rgba(0, 0, 0, .62), inset 0 0 0 1px rgba(255, 255, 255, .025);
}

.civilization-onboarding-header {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: flex-start;
  margin-bottom: 24px;
}

.civilization-onboarding-header h2 {
  margin: 4px 0 8px;
  font-family: "Orbitron", sans-serif;
  font-size: clamp(1.45rem, 3vw, 2.15rem);
}

.civilization-onboarding-header p:last-child {
  margin: 0;
  color: var(--text-muted);
}

.civilization-onboarding-step {
  flex: 0 0 auto;
  border: 1px solid rgba(123, 242, 200, .26);
  border-radius: 999px;
  padding: 7px 12px;
  color: #8ff5d0;
  background: rgba(24, 125, 97, .12);
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
}

.civilization-onboarding-form fieldset,
#civilization-onboarding-form fieldset {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

#civilization-onboarding-form legend {
  margin-bottom: 12px;
  color: var(--text-muted);
  font-size: .76rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .09em;
}

.civilization-onboarding-options {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.civilization-onboarding-choice {
  position: relative;
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr) 24px;
  gap: 11px;
  align-items: center;
  min-height: 112px;
  padding: 14px;
  border: 1px solid rgba(130, 153, 185, .18);
  border-radius: 15px;
  background: rgba(7, 14, 26, .78);
  cursor: pointer;
  transition: transform .18s ease, border-color .18s ease, background .18s ease;
}

.civilization-onboarding-choice:hover {
  transform: translateY(-2px);
  border-color: color-mix(in srgb, var(--species-accent) 48%, transparent);
}

.civilization-onboarding-choice:has(input:checked) {
  border-color: color-mix(in srgb, var(--species-accent) 72%, transparent);
  background: color-mix(in srgb, var(--species-accent) 11%, rgba(7, 14, 26, .9));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--species-accent) 18%, transparent), 0 0 24px color-mix(in srgb, var(--species-accent) 8%, transparent);
}

.civilization-onboarding-choice input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.civilization-onboarding-icon {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--species-accent) 45%, transparent);
  border-radius: 13px;
  color: var(--species-accent);
  background: color-mix(in srgb, var(--species-accent) 10%, transparent);
  font-size: 1.25rem;
}

.civilization-onboarding-copy {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.civilization-onboarding-copy strong {
  color: #f7fbff;
}

.civilization-onboarding-copy small {
  color: var(--text-muted);
  line-height: 1.42;
}

.civilization-onboarding-check {
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border: 1px solid rgba(130, 153, 185, .22);
  border-radius: 50%;
  color: transparent;
}

.civilization-onboarding-choice:has(input:checked) .civilization-onboarding-check {
  border-color: var(--species-accent);
  color: #06100d;
  background: var(--species-accent);
}

.civilization-auto-allocation {
  display: grid;
  grid-template-columns: 54px minmax(0, 1fr);
  gap: 16px;
  margin-top: 18px;
  padding: 16px;
  border: 1px solid rgba(93, 180, 255, .2);
  border-radius: 15px;
  background: rgba(14, 33, 54, .5);
}

.civilization-auto-allocation-icon {
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  border-radius: 15px;
  color: #72c6ff;
  background: rgba(52, 139, 202, .13);
  font-size: 1.35rem;
}

.civilization-auto-allocation dl {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 8px 0 0;
}

.civilization-auto-allocation dl div {
  min-width: 0;
}

.civilization-auto-allocation dt {
  color: var(--text-muted);
  font-size: .7rem;
  text-transform: uppercase;
  letter-spacing: .06em;
}

.civilization-auto-allocation dd {
  overflow: hidden;
  margin: 4px 0 0;
  color: #f6fbff;
  font-weight: 700;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.civilization-onboarding-feedback {
  min-height: 42px;
  margin: 14px 0 0;
  padding: 10px 12px;
  border-radius: 10px;
}

.civilization-onboarding-feedback.error {
  border: 1px solid rgba(255, 102, 118, .3);
  color: #ffb5be;
  background: rgba(145, 29, 45, .18);
}

.civilization-onboarding-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 16px;
}

.civilization-onboarding-confirm {
  min-width: 220px;
}

.civilization-onboarding-confirm.is-loading .button-spinner {
  display: inline-block;
}

.colony-automatic-panel {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 16px;
  align-items: start;
  margin-top: 20px;
  padding: 18px;
  border: 1px solid rgba(255, 200, 106, .2);
  border-radius: 15px;
  background: rgba(91, 61, 18, .14);
}

.colony-automatic-panel h4 {
  margin: 3px 0 7px;
}

.colony-automatic-panel p:not(.eyebrow) {
  margin: 0 0 14px;
  color: var(--text-muted);
  line-height: 1.55;
}

@media (max-width: 900px) {
  .civilization-onboarding-options {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .civilization-auto-allocation dl {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 560px) {
  .civilization-onboarding {
    align-items: start;
    padding: 12px;
  }

  .civilization-onboarding-dialog {
    margin: 8px 0;
    padding: 18px;
  }

  .civilization-onboarding-header {
    display: grid;
    gap: 10px;
  }

  .civilization-onboarding-step {
    justify-self: start;
  }

  .civilization-onboarding-options,
  .civilization-auto-allocation dl {
    grid-template-columns: 1fr;
  }

  .civilization-onboarding-choice {
    min-height: 88px;
  }

  .civilization-auto-allocation {
    grid-template-columns: 1fr;
  }

  .civilization-onboarding-actions {
    display: grid;
  }

  .civilization-onboarding-actions button {
    width: 100%;
  }
}


/* ===== v24.2.2 — Reset du compte de jeu depuis l'administration ===== */
.admin-users-table { min-width: 980px; }
.admin-game-state { display: grid; gap: 4px; min-width: 160px; }
.admin-game-state strong { color: #dce9eb; }
.admin-game-state small { margin: 0; color: var(--muted); }
.admin-game-state.is-empty strong { color: var(--muted); }
.admin-user-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.admin-current-account { color: var(--muted); font-size: .76rem; font-weight: 800; }
.admin-reset-button,
.admin-danger-button {
  border: 1px solid rgba(255, 113, 133, .42);
  border-radius: 10px;
  background: rgba(255, 113, 133, .1);
  color: #ffb8c2;
  font-weight: 850;
  cursor: pointer;
}
.admin-reset-button { min-height: 36px; padding: 8px 11px; white-space: nowrap; }
.admin-reset-button:hover:not(:disabled),
.admin-danger-button:hover:not(:disabled) { background: rgba(255, 113, 133, .18); transform: translateY(-1px); }
.admin-reset-button:disabled,
.admin-danger-button:disabled { cursor: not-allowed; opacity: .42; transform: none; }

.admin-reset-dialog {
  width: min(620px, calc(100vw - 32px));
  max-height: min(760px, calc(100dvh - 32px));
  padding: 0;
  border: 1px solid rgba(255, 113, 133, .34);
  border-radius: 18px;
  color: var(--text);
  background: rgba(7, 15, 23, .98);
  box-shadow: 0 28px 90px rgba(0, 0, 0, .62);
  overflow: auto;
}
.admin-reset-dialog::backdrop { background: rgba(0, 4, 9, .78); backdrop-filter: blur(5px); }
.admin-reset-form { display: grid; gap: 18px; padding: clamp(22px, 4vw, 34px); }
.admin-reset-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; }
.admin-reset-header h2 { margin: 5px 0 0; font-size: clamp(1.4rem, 3vw, 2rem); }
.admin-reset-close {
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: rgba(255,255,255,.035);
  color: var(--muted);
  font-size: 1.5rem;
  cursor: pointer;
}
.admin-reset-warning {
  padding: 16px 18px;
  border: 1px solid rgba(255, 113, 133, .28);
  border-radius: 13px;
  background: rgba(255, 113, 133, .075);
}
.admin-reset-warning strong { color: #ffd4da; }
.admin-reset-warning p { margin: 8px 0 0; color: #c9b8bd; line-height: 1.6; }
.admin-reset-target { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 0; }
.admin-reset-target div { min-width: 0; padding: 13px; border: 1px solid var(--line); border-radius: 11px; background: rgba(255,255,255,.025); }
.admin-reset-target dt { color: var(--muted); font-size: .7rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.admin-reset-target dd { margin: 6px 0 0; overflow-wrap: anywhere; color: #e2ecee; font-weight: 800; }
.admin-reset-confirmation { display: grid; gap: 8px; }
.admin-reset-confirmation span { color: #d7e2e5; font-weight: 750; }
.admin-reset-confirmation input { width: 100%; }
.admin-reset-actions { display: flex; justify-content: flex-end; gap: 10px; }
.admin-danger-button { min-height: 44px; padding: 10px 15px; }

@media (max-width: 620px) {
  .admin-reset-target { grid-template-columns: 1fr; }
  .admin-reset-actions { flex-direction: column-reverse; }
  .admin-reset-actions > button { width: 100%; }
}


/* ===== v24.2.3 — Reset global de tous les comptes de jeu ===== */
.admin-global-reset-panel {
  margin-top: 18px;
  border-color: rgba(255, 91, 119, .36);
  background: linear-gradient(145deg, rgba(255, 91, 119, .075), rgba(8, 17, 25, .96));
}
.admin-global-reset-panel > p { max-width: 920px; color: var(--muted); line-height: 1.65; }
.admin-global-reset-badge {
  padding: 7px 10px;
  border: 1px solid rgba(255, 113, 133, .32);
  border-radius: 999px;
  color: #ffc0c9;
  background: rgba(255, 113, 133, .09);
  font-size: .72rem;
  font-weight: 850;
  white-space: nowrap;
}
.admin-global-reset-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin: 18px 0;
}
.admin-global-reset-summary > div {
  display: grid;
  gap: 6px;
  padding: 13px 15px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(255,255,255,.025);
}
.admin-global-reset-summary span { color: var(--muted); font-size: .76rem; font-weight: 750; }
.admin-global-reset-summary strong { color: #edf5f6; font-size: 1rem; }
.admin-global-reset-dialog { border-color: rgba(255, 72, 105, .5); }

@media (max-width: 700px) {
  .admin-global-reset-summary { grid-template-columns: 1fr; }
  .admin-global-reset-panel .panel-heading { align-items: flex-start; }
}

/* ===== v24.2.4 — Oracle et ambassadeurs ===== */
.oracle-onboarding {
  --oracle-gold: #ffd786;
  --oracle-violet: #aa8cff;
  --oracle-cyan: #8cecff;
}

.oracle-sanctuary-backdrop {
  overflow: hidden;
  background:
    radial-gradient(circle at 50% 38%, rgba(132, 86, 218, .34), transparent 32%),
    radial-gradient(circle at 15% 82%, rgba(46, 166, 183, .18), transparent 28%),
    radial-gradient(circle at 88% 75%, rgba(255, 190, 102, .12), transparent 24%),
    rgba(1, 4, 11, .93);
}

.oracle-sanctuary-backdrop::before,
.oracle-sanctuary-backdrop::after {
  content: "";
  position: absolute;
  inset: -25%;
  background-image:
    radial-gradient(circle, rgba(255, 255, 255, .78) 0 1px, transparent 1.4px),
    radial-gradient(circle, rgba(140, 236, 255, .55) 0 1px, transparent 1.5px);
  background-position: 0 0, 47px 61px;
  background-size: 93px 93px, 137px 137px;
  opacity: .18;
  animation: oracle-stars-drift 55s linear infinite;
}

.oracle-sanctuary-backdrop::after {
  transform: scale(1.35) rotate(12deg);
  opacity: .1;
  animation-duration: 80s;
  animation-direction: reverse;
}

.oracle-orbit {
  position: absolute;
  left: 50%;
  top: 44%;
  border: 1px solid rgba(170, 140, 255, .14);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  box-shadow: inset 0 0 45px rgba(140, 236, 255, .03);
}

.oracle-orbit-one { width: min(76vw, 1100px); aspect-ratio: 1.9; transform: translate(-50%, -50%) rotate(-8deg); }
.oracle-orbit-two { width: min(62vw, 880px); aspect-ratio: 1.45; transform: translate(-50%, -50%) rotate(16deg); }

.oracle-star {
  position: absolute;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #dffaff;
  box-shadow: 0 0 18px #8cecff;
  animation: oracle-star-pulse 3.5s ease-in-out infinite;
}

.oracle-star-one { left: 12%; top: 24%; }
.oracle-star-two { right: 15%; top: 19%; animation-delay: -1.2s; }
.oracle-star-three { right: 10%; bottom: 18%; animation-delay: -2.1s; }

.oracle-council-dialog {
  width: min(1180px, 100%);
  border-color: rgba(170, 140, 255, .4);
  background:
    linear-gradient(145deg, rgba(12, 17, 32, .985), rgba(4, 8, 18, .99)),
    radial-gradient(circle at 50% 0%, rgba(141, 92, 218, .23), transparent 38%);
  box-shadow:
    0 36px 120px rgba(0, 0, 0, .7),
    0 0 80px rgba(117, 76, 188, .09),
    inset 0 0 0 1px rgba(255, 255, 255, .025);
}

.oracle-council-header {
  display: grid;
  grid-template-columns: 110px minmax(0, 1fr) auto;
  gap: 22px;
  align-items: center;
  margin-bottom: 24px;
  padding-bottom: 22px;
  border-bottom: 1px solid rgba(159, 129, 221, .16);
}

.oracle-presence {
  position: relative;
  display: grid;
  width: 94px;
  height: 94px;
  place-items: center;
  justify-self: center;
}

.oracle-presence-ring,
.oracle-presence-ring::before,
.oracle-presence-ring::after {
  position: absolute;
  inset: 4px;
  border: 1px solid rgba(170, 140, 255, .5);
  border-radius: 50%;
  content: "";
  animation: oracle-ring-spin 18s linear infinite;
}

.oracle-presence-ring::before { inset: 10px -6px; border-color: rgba(140, 236, 255, .26); animation-duration: 12s; animation-direction: reverse; }
.oracle-presence-ring::after { inset: -8px 15px; border-color: rgba(255, 215, 134, .28); animation-duration: 24s; }

.oracle-presence-core {
  position: relative;
  z-index: 2;
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  border: 1px solid rgba(255, 215, 134, .52);
  border-radius: 50%;
  color: var(--oracle-gold);
  background: radial-gradient(circle, rgba(170, 140, 255, .24), rgba(6, 11, 24, .92) 65%);
  box-shadow: 0 0 30px rgba(170, 140, 255, .28), inset 0 0 18px rgba(140, 236, 255, .1);
  font-size: 1.75rem;
}

.oracle-presence-crown {
  position: absolute;
  z-index: 3;
  top: -1px;
  color: var(--oracle-cyan);
  text-shadow: 0 0 12px currentColor;
}

.oracle-council-copy h2 {
  margin: 4px 0 7px;
  font-family: "Orbitron", sans-serif;
  font-size: clamp(1.45rem, 2.8vw, 2.35rem);
  letter-spacing: -.025em;
}

.oracle-council-copy > p:not(.eyebrow) {
  margin: 0;
  color: #aabac8;
  line-height: 1.55;
}

#oracle-dialogue {
  position: relative;
  margin: 13px 0 0;
  padding: 12px 16px 12px 18px;
  border-left: 2px solid rgba(255, 215, 134, .62);
  color: #d9d2eb;
  background: linear-gradient(90deg, rgba(255, 215, 134, .055), transparent);
  font-size: .9rem;
  font-style: italic;
  line-height: 1.55;
}

.oracle-ambassador-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: stretch;
}

.oracle-ambassador-card {
  position: relative;
  display: grid;
  grid-template-rows: 112px auto minmax(48px, auto) auto;
  gap: 12px;
  min-width: 0;
  min-height: 350px;
  padding: 14px;
  overflow: hidden;
  border: 1px solid rgba(130, 153, 185, .18);
  border-radius: 18px;
  background:
    radial-gradient(circle at 50% 19%, color-mix(in srgb, var(--species-accent) 13%, transparent), transparent 38%),
    linear-gradient(165deg, rgba(11, 20, 35, .94), rgba(4, 9, 18, .96));
  cursor: pointer;
  transition: transform .2s ease, border-color .2s ease, box-shadow .2s ease;
}

.oracle-ambassador-card::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(130deg, transparent 30%, color-mix(in srgb, var(--species-accent) 7%, transparent), transparent 72%);
  transform: translateX(-100%);
  transition: transform .45s ease;
}

.oracle-ambassador-card:hover {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--species-accent) 52%, transparent);
}

.oracle-ambassador-card:hover::before { transform: translateX(100%); }

.oracle-ambassador-card:has(input:checked) {
  transform: translateY(-4px);
  border-color: color-mix(in srgb, var(--species-accent) 82%, transparent);
  box-shadow:
    0 15px 36px rgba(0, 0, 0, .28),
    0 0 30px color-mix(in srgb, var(--species-accent) 12%, transparent),
    inset 0 0 0 1px color-mix(in srgb, var(--species-accent) 24%, transparent);
}

.oracle-ambassador-card input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.oracle-ambassador-portrait {
  position: relative;
  display: grid;
  width: 104px;
  height: 104px;
  place-items: center;
  justify-self: center;
}

.oracle-ambassador-halo {
  position: absolute;
  inset: 3px;
  border: 1px solid color-mix(in srgb, var(--species-accent) 40%, transparent);
  border-radius: 50%;
  background:
    repeating-conic-gradient(from 10deg, color-mix(in srgb, var(--species-accent) 22%, transparent) 0 2deg, transparent 2deg 28deg),
    radial-gradient(circle, color-mix(in srgb, var(--species-accent) 13%, transparent), transparent 64%);
  animation: oracle-ring-spin 22s linear infinite;
}

.oracle-ambassador-head {
  position: relative;
  z-index: 2;
  display: grid;
  width: 68px;
  height: 76px;
  place-items: center;
  clip-path: polygon(50% 0, 84% 18%, 100% 57%, 76% 100%, 24% 100%, 0 57%, 16% 18%);
  color: var(--species-accent);
  background:
    linear-gradient(155deg, color-mix(in srgb, var(--species-accent) 25%, #111a29), #060b14 68%);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--species-accent) 55%, transparent);
  font-size: 1.9rem;
  text-shadow: 0 0 18px currentColor;
}

.oracle-ambassador-head::before,
.oracle-ambassador-head::after {
  content: "";
  position: absolute;
  top: 25px;
  width: 7px;
  height: 4px;
  border-radius: 50%;
  background: var(--species-accent);
  box-shadow: 0 0 9px currentColor;
}

.oracle-ambassador-head::before { left: 19px; }
.oracle-ambassador-head::after { right: 19px; }

.oracle-ambassador-crest {
  position: absolute;
  z-index: 3;
  right: 0;
  bottom: 5px;
  display: grid;
  width: 28px;
  height: 28px;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--species-accent) 62%, transparent);
  border-radius: 50%;
  color: #06100f;
  background: var(--species-accent);
  font-size: .72rem;
  font-weight: 950;
}

.oracle-ambassador-identity {
  display: grid;
  gap: 3px;
  text-align: center;
}

.oracle-ambassador-identity small {
  color: var(--species-accent);
  font-size: .67rem;
  font-weight: 850;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.oracle-ambassador-identity strong {
  color: #f8fbff;
  font-family: "Orbitron", sans-serif;
  font-size: 1.22rem;
}

.oracle-ambassador-title {
  color: #aab7c5;
  font-size: .78rem;
}

.oracle-ambassador-quote {
  display: block;
  margin: 0;
  color: #cbd5df;
  font-size: .78rem;
  font-style: italic;
  line-height: 1.5;
  text-align: center;
}

.oracle-civilization-badge {
  justify-self: center;
  padding: 5px 10px;
  border: 1px solid color-mix(in srgb, var(--species-accent) 30%, transparent);
  border-radius: 999px;
  color: var(--species-accent);
  background: color-mix(in srgb, var(--species-accent) 8%, transparent);
  font-size: .7rem;
  font-weight: 850;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.oracle-ambassador-check {
  position: absolute;
  right: 12px;
  top: 12px;
  display: grid;
  width: 25px;
  height: 25px;
  place-items: center;
  border: 1px solid rgba(145, 160, 181, .25);
  border-radius: 50%;
  color: transparent;
  background: rgba(4, 9, 18, .7);
}

.oracle-ambassador-card:has(input:checked) .oracle-ambassador-check {
  border-color: var(--species-accent);
  color: #06100d;
  background: var(--species-accent);
  box-shadow: 0 0 14px color-mix(in srgb, var(--species-accent) 45%, transparent);
}

.oracle-alliance-summary {
  grid-template-columns: 170px minmax(0, 1fr);
  border-color: rgba(170, 140, 255, .24);
  background: linear-gradient(135deg, rgba(78, 48, 128, .16), rgba(15, 36, 55, .28));
}

.oracle-alliance-seal {
  width: 100%;
  min-height: 68px;
  padding: 10px;
  border: 1px solid color-mix(in srgb, var(--oracle-accent) 42%, transparent);
  color: var(--oracle-accent);
  background: color-mix(in srgb, var(--oracle-accent) 8%, rgba(4, 10, 20, .68));
  font-size: .8rem;
  font-weight: 900;
  text-align: center;
}

.oracle-alliance-summary dl {
  grid-template-columns: repeat(5, minmax(0, 1fr));
}

.oracle-permanence-note {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 13px 0 0;
  color: #b9a9da;
  font-size: .78rem;
}

.oracle-permanence-note span {
  color: var(--oracle-gold);
  text-shadow: 0 0 10px currentColor;
}

.oracle-alliance-button {
  border-color: rgba(255, 215, 134, .28);
  background: linear-gradient(135deg, #7655c6, #3c99a7);
  box-shadow: 0 8px 25px rgba(100, 72, 183, .2);
}

@keyframes oracle-ring-spin { to { transform: rotate(360deg); } }
@keyframes oracle-stars-drift { to { transform: translate3d(93px, 93px, 0); } }
@keyframes oracle-star-pulse { 50% { opacity: .35; transform: scale(.7); } }

@media (max-width: 980px) {
  .oracle-council-header { grid-template-columns: 88px minmax(0, 1fr); }
  .oracle-council-header .civilization-onboarding-step { grid-column: 2; justify-self: start; }
  .oracle-ambassador-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .oracle-alliance-summary dl { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 620px) {
  .oracle-council-header { grid-template-columns: 1fr; text-align: center; }
  .oracle-council-header .civilization-onboarding-step { grid-column: 1; justify-self: center; }
  .oracle-presence { width: 78px; height: 78px; }
  #oracle-dialogue { text-align: left; }
  .oracle-ambassador-grid { grid-template-columns: 1fr; }
  .oracle-ambassador-card {
    grid-template-columns: 92px minmax(0, 1fr);
    grid-template-rows: auto auto auto;
    min-height: 0;
  }
  .oracle-ambassador-portrait { grid-row: 1 / span 3; width: 86px; height: 86px; }
  .oracle-ambassador-head { width: 58px; height: 66px; }
  .oracle-ambassador-identity { align-self: end; text-align: left; }
  .oracle-ambassador-quote { text-align: left; }
  .oracle-civilization-badge { justify-self: start; }
  .oracle-alliance-summary { grid-template-columns: 1fr; }
  .oracle-alliance-summary dl { grid-template-columns: 1fr 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  .oracle-sanctuary-backdrop::before,
  .oracle-sanctuary-backdrop::after,
  .oracle-presence-ring,
  .oracle-presence-ring::before,
  .oracle-presence-ring::after,
  .oracle-ambassador-halo,
  .oracle-star {
    animation: none !important;
  }
}

.oracle-alliance-summary dd {
  white-space: normal;
  line-height: 1.35;
}

@media (max-width: 620px) {
  .oracle-ambassador-identity {
    padding-right: 28px;
  }
}


/* ===== v24.2.5 — Administration synchronisée avec l’état du jeu ===== */

/* ===== v24.2.6 — Synchronisation Admin sans rafraîchissement total ===== */
#admin-content[aria-busy="true"] #users-table-body {
  cursor: progress;
}

#refresh-admin-button:disabled {
  cursor: progress;
}

/* ===== v24.3.0 — Production de ressources hors ligne ===== */
.resource-section-intro {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 22px;
}

.resource-offline-badge {
  display: flex;
  align-items: center;
  gap: 11px;
  min-width: 230px;
  padding: 12px 15px;
  border: 1px solid rgba(123, 242, 200, .24);
  border-radius: 14px;
  background: linear-gradient(135deg, rgba(123, 242, 200, .09), rgba(168, 140, 255, .07));
}

.resource-offline-badge > span {
  display: grid;
  width: 34px;
  height: 34px;
  place-items: center;
  border-radius: 50%;
  color: var(--green);
  background: rgba(123, 242, 200, .1);
  box-shadow: 0 0 18px rgba(123, 242, 200, .16);
}

.resource-offline-badge strong,
.resource-offline-badge small { display: block; }
.resource-offline-badge strong { font-size: .82rem; }
.resource-offline-badge small { margin-top: 3px; color: var(--muted); font-size: .7rem; }

.resources-manager { display: grid; gap: 18px; }
.resource-stock-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
}

.resource-stock-card {
  position: relative;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 16px;
  min-height: 150px;
  padding: 22px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: linear-gradient(145deg, rgba(13, 24, 36, .95), rgba(6, 12, 20, .93));
  box-shadow: 0 14px 40px rgba(0, 0, 0, .18);
}

.resource-stock-card::after {
  content: "";
  position: absolute;
  width: 130px;
  height: 130px;
  right: -58px;
  top: -55px;
  border-radius: 50%;
  background: currentColor;
  filter: blur(45px);
  opacity: .12;
}

.resource-stock-card.biomass { color: #7bf2c8; }
.resource-stock-card.chitin { color: #ffc86a; }
.resource-stock-card.ore { color: #8fb9ff; }

.resource-stock-icon {
  display: grid;
  width: 54px;
  height: 54px;
  place-items: center;
  border: 1px solid currentColor;
  border-radius: 16px;
  background: color-mix(in srgb, currentColor 10%, transparent);
  box-shadow: 0 0 24px color-mix(in srgb, currentColor 15%, transparent);
  font-size: 1.35rem;
}

.resource-stock-card small,
.resource-stock-card strong,
.resource-stock-card p,
.resource-stock-card em { display: block; }
.resource-stock-card small { color: #a8bac3; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.resource-stock-card strong { margin-top: 6px; color: var(--text); font-size: clamp(1.7rem, 3vw, 2.45rem); letter-spacing: -.05em; }
.resource-stock-card p { margin: 7px 0 0; color: currentColor; font-size: .82rem; font-weight: 850; }
.resource-stock-card em { margin-top: 3px; color: #8398a3; font-size: .72rem; font-style: normal; }

.resource-management-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(280px, .55fr);
  gap: 18px;
  align-items: start;
}

.resource-workers-panel,
.resource-production-panel { min-width: 0; }
.resource-worker-capacity {
  padding: 7px 10px;
  border: 1px solid rgba(123, 242, 200, .2);
  border-radius: 999px;
  color: #c8eee2;
  background: rgba(123, 242, 200, .07);
  font-size: .73rem;
  white-space: nowrap;
}

.resource-panel-description {
  margin: -7px 0 18px;
  color: #9fb2bb;
  line-height: 1.6;
}

.resource-worker-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}

.resource-worker-summary > div {
  padding: 11px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(5, 11, 18, .52);
}
.resource-worker-summary span,
.resource-worker-summary strong { display: block; }
.resource-worker-summary span { color: var(--muted); font-size: .68rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase; }
.resource-worker-summary strong { margin-top: 5px; color: #eaf7f4; font-size: .9rem; }

.resource-territory-summary {
  margin: 0 0 16px;
  padding: 10px 12px;
  border-left: 2px solid rgba(168, 140, 255, .55);
  color: #b9b0d3;
  background: linear-gradient(90deg, rgba(168, 140, 255, .07), transparent);
  font-size: .76rem;
  line-height: 1.5;
}

.resource-worker-list { display: grid; gap: 10px; }
.resource-worker-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 15px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(5, 12, 19, .58);
}
.resource-worker-row.biomass { --worker-accent: #7bf2c8; }
.resource-worker-row.chitin { --worker-accent: #ffc86a; }
.resource-worker-row.ore { --worker-accent: #8fb9ff; }

.resource-worker-identity {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}
.resource-worker-identity > i {
  display: grid;
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--worker-accent) 55%, transparent);
  border-radius: 11px;
  color: var(--worker-accent);
  background: color-mix(in srgb, var(--worker-accent) 8%, transparent);
  font-style: normal;
}
.resource-worker-identity strong,
.resource-worker-identity small { display: block; }
.resource-worker-identity strong { color: #edf7f6; }
.resource-worker-identity small { margin-top: 3px; color: #8196a1; font-size: .71rem; }

.resource-worker-stepper {
  display: grid;
  grid-template-columns: 36px 70px 36px;
  flex: 0 0 auto;
  overflow: hidden;
  border: 1px solid color-mix(in srgb, var(--worker-accent) 28%, var(--line));
  border-radius: 11px;
  background: rgba(2, 8, 14, .72);
}
.resource-worker-stepper button {
  border: 0;
  color: var(--worker-accent);
  background: color-mix(in srgb, var(--worker-accent) 8%, transparent);
  cursor: pointer;
  font-size: 1.12rem;
  font-weight: 900;
}
.resource-worker-stepper button:hover { background: color-mix(in srgb, var(--worker-accent) 16%, transparent); }
.resource-worker-stepper input {
  min-width: 0;
  border: 0;
  border-right: 1px solid var(--line);
  border-left: 1px solid var(--line);
  border-radius: 0;
  padding: 9px 4px;
  background: transparent;
  text-align: center;
  font-weight: 900;
  -moz-appearance: textfield;
}
.resource-worker-stepper input::-webkit-inner-spin-button,
.resource-worker-stepper input::-webkit-outer-spin-button { margin: 0; -webkit-appearance: none; }

.resource-workers-overflow,
.resource-workers-feedback {
  margin: 13px 0 0;
  font-size: .78rem;
  line-height: 1.5;
}
.resource-workers-overflow,
.resource-workers-feedback.is-error { color: var(--danger); }
.resource-workers-feedback.is-success { color: var(--green); }
.resource-workers-submit { width: 100%; margin-top: 15px; }

.resource-production-panel { position: sticky; top: calc(var(--game-navbar-height, 58px) + 20px); }
.resource-production-pulse {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  color: var(--green);
  background: currentColor;
  box-shadow: 0 0 0 0 rgba(123, 242, 200, .42);
  animation: resource-production-pulse 2.2s ease-out infinite;
}
.resource-next-collection {
  margin: 6px 0 8px;
  color: var(--green);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: clamp(2.4rem, 6vw, 4.4rem);
  font-weight: 900;
  letter-spacing: -.08em;
  text-shadow: 0 0 24px rgba(123, 242, 200, .22);
}
.resource-production-panel > p { color: #93a7b1; font-size: .8rem; line-height: 1.65; }
.resource-production-rules { display: grid; gap: 0; margin: 18px 0 0; }
.resource-production-rules > div {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}
.resource-production-rules dt { color: #859aa5; font-size: .73rem; }
.resource-production-rules dd { margin: 0; color: #d6e4e4; font-size: .73rem; font-weight: 800; text-align: right; }
.resource-offline-explanation {
  display: flex;
  gap: 10px;
  margin-top: 16px;
  padding: 12px;
  border: 1px solid rgba(123, 242, 200, .18);
  border-radius: 12px;
  color: #afd8cc;
  background: rgba(123, 242, 200, .055);
}
.resource-offline-explanation span { color: var(--green); font-weight: 900; }
.resource-offline-explanation p { margin: 0; font-size: .73rem; line-height: 1.5; }

@keyframes resource-production-pulse {
  70% { box-shadow: 0 0 0 10px rgba(123, 242, 200, 0); }
  100% { box-shadow: 0 0 0 0 rgba(123, 242, 200, 0); }
}

@media (max-width: 1050px) {
  .resource-management-grid { grid-template-columns: 1fr; }
  .resource-production-panel { position: static; }
}

@media (max-width: 760px) {
  .resource-section-intro { align-items: stretch; flex-direction: column; }
  .resource-offline-badge { min-width: 0; }
  .resource-stock-grid { grid-template-columns: 1fr; }
  .resource-stock-card { min-height: 118px; }
  .resource-worker-summary { grid-template-columns: 1fr 1fr; }
  .resource-worker-row { align-items: stretch; flex-direction: column; }
  .resource-worker-stepper { width: 100%; grid-template-columns: 44px minmax(0, 1fr) 44px; }
}

@media (prefers-reduced-motion: reduce) {
  .resource-production-pulse { animation: none; }
}


/* ===== v24.3.3 — session glissante 24 h ===== */
#public-shell .session-policy-row {
  align-items: center;
}
#public-shell .session-policy-note {
  max-width: 280px;
  color: var(--muted-strong);
  font-size: .76rem;
  line-height: 1.35;
}
@media (max-width: 540px) {
  #public-shell .session-policy-row {
    align-items: flex-start;
    gap: 10px;
  }
  #public-shell .session-policy-note {
    max-width: 210px;
  }
}

/* ===== v24.4.2 — entrepôts de ressources ===== */
.sidebar-resource-row { flex-wrap: wrap; }
.sidebar-resource-row > span { flex: 1 1 auto; }
.sidebar-resource-row > strong { flex: 0 0 auto; }
.sidebar-resource-row > small {
  flex: 0 0 100%;
  color: #728892;
  font-size: .58rem;
  text-align: right;
}
.sidebar-resource-progress {
  flex: 0 0 100%;
  height: 4px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, .055);
}
.sidebar-resource-progress i {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: currentColor;
  box-shadow: 0 0 10px currentColor;
  transition: width .3s ease;
}
.sidebar-resource-row.biomass .sidebar-resource-progress { color: #78e5ae; }
.sidebar-resource-row.chitin .sidebar-resource-progress { color: #d5b787; }
.sidebar-resource-row.ore .sidebar-resource-progress { color: #93cae8; }
.resource-storage-label {
  display: block;
  margin-top: 10px;
  color: #94a7b0;
  font-size: .68rem;
  font-weight: 750;
}
.resource-storage-progress {
  height: 6px;
  margin-top: 5px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(255, 255, 255, .06);
}
.resource-storage-progress i {
  display: block;
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: currentColor;
  box-shadow: 0 0 14px currentColor;
  transition: width .3s ease;
}
.building-section-intro {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}
.building-rule-badge {
  flex: 0 0 auto;
  padding: 11px 14px;
  border: 1px solid rgba(168, 140, 255, .25);
  border-radius: 14px;
  background: rgba(168, 140, 255, .07);
}
.building-rule-badge strong,
.building-rule-badge small { display: block; }
.building-rule-badge strong { color: #d7cafa; font-size: .78rem; }
.building-rule-badge small { margin-top: 3px; color: #8d83a9; font-size: .66rem; }
.buildings-manager {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(300px, .55fr);
  gap: 18px;
  align-items: start;
}
.building-catalog { display: grid; gap: 14px; }
.building-card {
  --building-accent: #a88cff;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: linear-gradient(145deg, rgba(13, 24, 36, .95), rgba(6, 12, 20, .93));
  box-shadow: 0 14px 40px rgba(0,0,0,.16);
}
.building-card.building-biomass { --building-accent: #7bf2c8; }
.building-card.building-chitin { --building-accent: #ffc86a; }
.building-card.building-ore { --building-accent: #8fb9ff; }
.building-card-header {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 14px;
  align-items: start;
}
.building-icon {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--building-accent) 55%, transparent);
  border-radius: 14px;
  color: var(--building-accent);
  background: color-mix(in srgb, var(--building-accent) 9%, transparent);
  font-size: 1.2rem;
}
.building-card-header small { color: var(--building-accent); font-size: .66rem; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.building-card-header h3 { margin: 4px 0 0; color: #eef7f7; }
.building-card-header p { margin: 6px 0 0; color: #879aa4; font-size: .75rem; line-height: 1.5; }
.building-card-header em {
  padding: 6px 9px;
  border: 1px solid color-mix(in srgb, var(--building-accent) 25%, var(--line));
  border-radius: 999px;
  color: var(--building-accent);
  background: color-mix(in srgb, var(--building-accent) 7%, transparent);
  font-size: .7rem;
  font-style: normal;
  font-weight: 850;
}
.building-capacity-block {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 4px 14px;
  margin-top: 17px;
  padding: 13px 14px;
  border: 1px solid color-mix(in srgb, var(--building-accent) 18%, var(--line));
  border-radius: 13px;
  background: color-mix(in srgb, var(--building-accent) 5%, transparent);
}
.building-capacity-block span { color: #8da1aa; font-size: .7rem; }
.building-capacity-block strong { color: var(--building-accent); font-size: 1rem; }
.building-capacity-block small { grid-column: 1 / -1; color: #71858e; font-size: .66rem; }
.building-upgrade-details {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  margin-top: 13px;
}
.building-cost-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.building-cost-grid span,
.building-duration {
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(4, 10, 17, .52);
}
.building-cost-grid small,
.building-cost-grid strong,
.building-duration span,
.building-duration strong { display: block; }
.building-cost-grid small,
.building-duration span { color: #71868f; font-size: .6rem; }
.building-cost-grid strong,
.building-duration strong { margin-top: 3px; color: #dbe8e8; font-size: .75rem; }
.building-planned-level {
  display: block;
  margin-top: 7px;
  color: var(--green) !important;
  font-size: .62rem !important;
  line-height: 1.35;
}
.building-upgrade-button { width: 100%; margin-top: 14px; }
.building-queue-panel { position: sticky; top: calc(var(--game-navbar-height, 58px) + 20px); }
.building-queue-count {
  padding: 6px 9px;
  border: 1px solid rgba(123, 242, 200, .2);
  border-radius: 999px;
  color: var(--green);
  background: rgba(123, 242, 200, .07);
  font-size: .7rem;
  font-weight: 850;
}
.building-queue-description { color: #8da0aa; font-size: .73rem; line-height: 1.55; }
.building-queue-list { display: grid; gap: 9px; margin-top: 14px; }
.building-queue-item {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr) auto auto;
  gap: 10px;
  align-items: center;
  padding: 11px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(5, 11, 18, .55);
}
.building-queue-item.is-active { border-color: rgba(123, 242, 200, .24); }
.building-queue-position,
.building-queue-icon {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 9px;
  color: #b9d5d0;
  background: rgba(255,255,255,.05);
  font-size: .72rem;
}
.building-queue-item strong,
.building-queue-item small,
.building-queue-item em { display: block; }
.building-queue-item strong { color: #e6f0f0; font-size: .75rem; }
.building-queue-item small { margin-top: 2px; color: #7f929b; font-size: .64rem; }
.building-queue-item em { margin-top: 3px; color: var(--green); font-size: .59rem; font-style: normal; }
.building-queue-item.is-pending em { color: #9e91c5; }
.building-queue-item time { color: #dcebea; font-family: ui-monospace, monospace; font-size: .72rem; font-weight: 850; }
.building-cancel-button {
  min-height: 30px;
  padding: 6px 9px;
  border: 1px solid rgba(255, 117, 117, .28);
  border-radius: 9px;
  color: #ffc1c1;
  background: rgba(255, 92, 92, .07);
  font: inherit;
  font-size: .62rem;
  font-weight: 800;
  cursor: pointer;
}
.building-cancel-button:hover { background: rgba(255, 92, 92, .13); }
.building-cancel-button:disabled { opacity: .58; cursor: wait; }
.building-queue-empty { padding: 20px 12px; text-align: center; }
.building-queue-empty span,
.building-queue-empty strong,
.building-queue-empty small { display: block; }
.building-queue-empty span { color: var(--green); font-size: 1.2rem; }
.building-queue-empty strong { margin-top: 8px; color: #dbe8e6; font-size: .78rem; }
.building-queue-empty small { margin-top: 4px; color: #788c95; font-size: .66rem; }
.building-feedback { margin: 13px 0 0; font-size: .75rem; line-height: 1.45; }
.building-feedback.is-error { color: var(--danger); }
.building-feedback.is-success { color: var(--green); }
@media (max-width: 1050px) {
  .buildings-manager { grid-template-columns: 1fr; }
  .building-queue-panel { position: static; }
}
@media (max-width: 700px) {
  .building-section-intro { align-items: stretch; flex-direction: column; }
  .building-rule-badge { width: 100%; }
  .building-card-header { grid-template-columns: auto minmax(0,1fr); }
  .building-card-header em { grid-column: 1 / -1; justify-self: start; }
  .building-upgrade-details { grid-template-columns: 1fr; }
  .building-cost-grid { grid-template-columns: 1fr 1fr 1fr; }
  .building-queue-item { grid-template-columns: auto auto minmax(0, 1fr) auto; }
  .building-cancel-button { grid-column: 1 / -1; width: 100%; }
}

/* ===== v24.5.0 — Fiches utilisateurs et colonies dans l’administration ===== */
.admin-panel-hint {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: .78rem;
  line-height: 1.45;
}

.admin-user-row,
.admin-colony-row {
  cursor: pointer;
  transition: background .16s ease, box-shadow .16s ease;
}

.admin-user-row:hover,
.admin-user-row:focus-visible,
.admin-colony-row:hover,
.admin-colony-row:focus-visible {
  outline: none;
  background: rgba(123, 242, 200, .055);
  box-shadow: inset 3px 0 0 rgba(123, 242, 200, .58);
}

.admin-user-row td:first-child strong,
.admin-colony-row td:first-child strong {
  color: #effbff;
}

.admin-user-detail-view,
#admin-user-detail-content,
.admin-user-tab-content,
.admin-colony-detail {
  display: grid;
  gap: 16px;
  min-width: 0;
}

#admin-user-detail-content[aria-busy="true"] {
  cursor: progress;
  opacity: .78;
}

.admin-user-detail-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.admin-user-detail-hero {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 16px;
  align-items: center;
  padding: 20px;
}

.admin-user-detail-avatar {
  display: grid;
  width: 58px;
  height: 58px;
  place-items: center;
  border: 1px solid rgba(123, 242, 200, .3);
  border-radius: 16px;
  color: #dffff5;
  background: linear-gradient(145deg, rgba(123, 242, 200, .15), rgba(85, 183, 255, .1));
  font-size: 1.08rem;
  font-weight: 900;
  letter-spacing: .08em;
}

.admin-user-detail-hero h3,
.admin-colony-hero h4,
.admin-detail-card h4,
.admin-table-card h4 {
  margin: 4px 0 0;
}

.admin-user-detail-hero p:not(.eyebrow),
.admin-colony-hero p:not(.eyebrow) {
  margin: 6px 0 0;
  color: var(--muted);
  overflow-wrap: anywhere;
}

.admin-user-detail-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.admin-user-detail-badges > span:not(.role-badge),
.admin-colony-status,
.admin-detail-count {
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: #cbd9dc;
  background: rgba(255, 255, 255, .035);
  font-size: .72rem;
  font-weight: 850;
}

.admin-user-tabs {
  display: flex;
  gap: 8px;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(5, 13, 20, .76);
}

.admin-user-tabs button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 9px 16px;
  border: 1px solid transparent;
  border-radius: 10px;
  color: var(--muted);
  background: transparent;
  font-weight: 850;
  cursor: pointer;
}

.admin-user-tabs button span {
  min-width: 24px;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .06);
  font-size: .7rem;
}

.admin-user-tabs button:hover,
.admin-user-tabs button.is-active {
  border-color: rgba(123, 242, 200, .24);
  color: #eafff8;
  background: rgba(123, 242, 200, .08);
}

.admin-user-general-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.admin-detail-card {
  min-width: 0;
}

.admin-detail-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 0;
}

.admin-detail-list div {
  min-width: 0;
  padding: 13px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(255, 255, 255, .022);
}

.admin-detail-list dt {
  color: var(--muted);
  font-size: .68rem;
  font-weight: 850;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.admin-detail-list dd {
  margin: 6px 0 0;
  color: #e3edef;
  font-weight: 780;
  overflow-wrap: anywhere;
}

.admin-detail-note,
.admin-empty-detail p {
  margin: 14px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.admin-empty-detail {
  padding: 24px;
}

.admin-colonies-table,
.admin-colony-data-table {
  min-width: 920px;
}

.admin-colony-row td strong,
.admin-colony-row td small,
.admin-colony-data-table td small {
  display: block;
}

.admin-colony-row td small,
.admin-colony-data-table td small {
  margin-top: 4px;
  color: var(--muted);
}

.admin-detail-back {
  justify-self: start;
}

.admin-colony-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  padding: 20px;
}

.admin-colony-metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.admin-colony-metrics article {
  display: grid;
  gap: 6px;
  padding: 16px;
}

.admin-colony-metrics span {
  color: var(--muted);
  font-size: .7rem;
  font-weight: 850;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.admin-colony-metrics strong {
  color: #ecfbff;
  font-size: 1rem;
}

.admin-colony-metrics small {
  color: var(--muted);
}

.admin-queue-state {
  display: inline-flex;
  padding: 5px 8px;
  border-radius: 999px;
  font-size: .7rem;
  font-weight: 850;
  white-space: nowrap;
}

.admin-queue-state.is-active {
  border: 1px solid rgba(123, 242, 200, .3);
  color: #bfffe9;
  background: rgba(123, 242, 200, .09);
}

.admin-queue-state.is-waiting {
  border: 1px solid rgba(85, 183, 255, .28);
  color: #bce5ff;
  background: rgba(85, 183, 255, .08);
}

@media (max-width: 980px) {
  .admin-user-general-grid,
  .admin-colony-metrics {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 660px) {
  .admin-user-detail-toolbar,
  .admin-colony-hero {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-user-detail-toolbar {
    display: grid;
  }

  .admin-user-detail-toolbar button,
  .admin-detail-back {
    width: 100%;
  }

  .admin-user-detail-hero {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .admin-user-detail-badges {
    grid-column: 1 / -1;
    justify-content: flex-start;
  }

  .admin-user-tabs {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .admin-user-general-grid,
  .admin-detail-list,
  .admin-colony-metrics {
    grid-template-columns: 1fr;
  }
}

/* ===== v24.5.1 — Édition admin des niveaux de bâtiment ===== */

.admin-building-edit-cell {
  display: flex;
  gap: 0.4rem;
  align-items: center;
}

.admin-building-level-input {
  width: 4.5rem;
}

.admin-building-level-apply {
  white-space: nowrap;
  padding-inline: 0.7rem;
}

/* ===== v24.5.8 — Édition admin des stocks de colonie ===== */

.admin-resource-edit-cell {
  display: flex;
  gap: 0.4rem;
  align-items: center;
  min-width: 15rem;
}

.admin-resource-stock-input {
  width: 8.5rem;
}

.admin-resource-stock-apply {
  white-space: nowrap;
  padding-inline: 0.7rem;
}


/* ===== v24.5.8 — Mode premium de test dans l’administration ===== */
.admin-users-table { min-width: 1120px; }
.admin-premium-test-toggle {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  align-items: center;
  gap: 2px 8px;
  min-width: 128px;
  cursor: pointer;
}
.admin-premium-test-toggle input {
  grid-row: 1 / span 2;
  width: 19px;
  height: 19px;
  margin: 0;
  accent-color: var(--violet);
  cursor: pointer;
}
.admin-premium-test-toggle input:disabled { cursor: not-allowed; opacity: .5; }
.admin-premium-test-toggle span { color: #c7d7dc; font-size: .76rem; font-weight: 850; }
.admin-premium-test-toggle small { margin: 0; color: var(--muted); font-size: .66rem; }
.admin-premium-test-toggle.is-enabled span { color: #cdbbff; }
.admin-premium-detail {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 4px 8px;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 999px;
  color: var(--muted);
  background: rgba(255, 255, 255, .035);
  font-size: .68rem;
  font-weight: 850;
}
.admin-premium-detail.is-enabled {
  border-color: rgba(168, 140, 255, .36);
  color: #d4c5ff;
  background: rgba(168, 140, 255, .12);
}

/* ===== v24.7.0 — Page Premium et Stripe Checkout ===== */
.premium-navbar-link {
  color: #eadfff !important;
}

.premium-navbar-link span {
  color: var(--warning);
}

.premium-section-intro {
  align-items: center;
}

.premium-hero-badge {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 1px 10px;
  align-items: center;
  min-width: 190px;
  padding: 13px 16px;
  border: 1px solid rgba(168, 140, 255, .32);
  border-radius: 16px;
  background: linear-gradient(135deg, rgba(168, 140, 255, .14), rgba(64, 217, 165, .08));
}

.premium-hero-badge > span {
  grid-row: 1 / span 2;
  color: var(--warning);
  font-size: 1.7rem;
}

.premium-hero-badge strong,
.premium-hero-badge small {
  display: block;
}

.premium-hero-badge small {
  color: var(--muted);
}

.premium-page-grid {
  display: grid;
  gap: 20px;
}

.premium-status-card {
  position: relative;
  display: grid;
  grid-template-columns: 160px minmax(0, 1fr);
  gap: 26px;
  overflow: hidden;
  padding: clamp(22px, 4vw, 36px);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background:
    radial-gradient(circle at 8% 50%, rgba(168, 140, 255, .13), transparent 32%),
    linear-gradient(145deg, rgba(13, 23, 34, .96), rgba(7, 13, 21, .9));
  box-shadow: var(--shadow);
}

.premium-status-card.is-active {
  border-color: rgba(168, 140, 255, .36);
  box-shadow: 0 24px 80px rgba(93, 68, 170, .18);
}

.premium-status-orbit {
  position: relative;
  width: 138px;
  height: 138px;
  place-self: center;
  border: 1px solid rgba(168, 140, 255, .28);
  border-radius: 50%;
  box-shadow: inset 0 0 34px rgba(168, 140, 255, .12), 0 0 44px rgba(64, 217, 165, .08);
}

.premium-status-orbit::before,
.premium-status-orbit::after,
.premium-status-orbit span,
.premium-status-orbit i {
  content: "";
  position: absolute;
  inset: 13px;
  border: 1px solid rgba(123, 242, 200, .24);
  border-radius: 50%;
  transform: rotate(34deg) scaleY(.44);
}

.premium-status-orbit::after {
  transform: rotate(-34deg) scaleY(.44);
  border-color: rgba(255, 200, 106, .26);
}

.premium-status-orbit span {
  inset: 30px;
  transform: none;
  border-color: rgba(168, 140, 255, .24);
}

.premium-status-orbit i {
  inset: 58px;
  transform: none;
  background: var(--green);
  border: 0;
  box-shadow: 0 0 22px var(--green);
}

.premium-status-orbit b {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--warning);
  font-size: 2.15rem;
  text-shadow: 0 0 20px rgba(255, 200, 106, .44);
}

.premium-status-copy h3 {
  margin: 0;
  font-size: clamp(1.7rem, 3vw, 2.5rem);
}

.premium-status-copy > p:not(.eyebrow) {
  max-width: 780px;
  color: #b6c7ce;
  line-height: 1.7;
}

.premium-status-details {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin: 22px 0 0;
}

.premium-status-details div {
  padding: 13px 14px;
  border: 1px solid rgba(255, 255, 255, .075);
  border-radius: 13px;
  background: rgba(255, 255, 255, .035);
}

.premium-status-details dt {
  color: var(--muted);
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.premium-status-details dd {
  margin: 6px 0 0;
  color: #e7f4f2;
  font-size: .86rem;
  font-weight: 800;
}

.premium-purchase-section {
  padding: clamp(20px, 4vw, 32px);
  border: 1px solid var(--line);
  border-radius: var(--radius-xl);
  background: rgba(8, 15, 23, .82);
}

.premium-section-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 22px;
}

.premium-section-heading h2 {
  margin: 0;
}

.premium-section-heading p:not(.eyebrow) {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.65;
}

.premium-mode-badge {
  flex: 0 0 auto;
  padding: 8px 11px;
  border: 1px solid rgba(123, 242, 200, .3);
  border-radius: 999px;
  color: #bdf2df;
  background: rgba(64, 217, 165, .1);
  font-size: .72rem;
  font-weight: 900;
}

.premium-mode-badge.is-live {
  border-color: rgba(255, 200, 106, .34);
  color: #ffdda0;
  background: rgba(255, 200, 106, .1);
}

.premium-configuration-warning {
  margin-bottom: 18px;
  padding: 15px 17px;
  border: 1px solid rgba(255, 200, 106, .3);
  border-radius: 14px;
  background: rgba(255, 200, 106, .08);
}

.premium-configuration-warning p {
  margin: 6px 0 0;
  color: #d7c8a9;
}

.premium-configuration-warning code {
  color: #fff0c8;
}

.premium-offers-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.premium-offer-card {
  position: relative;
  display: grid;
  gap: 18px;
  padding: 24px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: linear-gradient(145deg, rgba(14, 25, 36, .96), rgba(7, 13, 20, .9));
}

.premium-offer-card.is-featured {
  border-color: rgba(168, 140, 255, .4);
  box-shadow: inset 0 0 0 1px rgba(168, 140, 255, .08), 0 18px 50px rgba(69, 47, 127, .14);
}

.premium-offer-recommended {
  position: absolute;
  top: 0;
  right: 18px;
  transform: translateY(-50%);
  padding: 6px 10px;
  border: 1px solid rgba(168, 140, 255, .34);
  border-radius: 999px;
  color: #e2d9ff;
  background: #171026;
  font-size: .68rem;
  font-weight: 900;
}

.premium-offer-heading {
  display: flex;
  align-items: center;
  gap: 13px;
}

.premium-offer-heading h3 {
  margin: 0;
  font-size: 1.3rem;
}

.premium-offer-icon {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  border: 1px solid rgba(168, 140, 255, .25);
  border-radius: 14px;
  color: var(--warning);
  background: rgba(168, 140, 255, .1);
  font-size: 1.35rem;
}

.premium-offer-price {
  display: flex;
  align-items: baseline;
  gap: 10px;
}

.premium-offer-price strong {
  font-size: clamp(2rem, 4vw, 3.2rem);
  letter-spacing: -.05em;
}

.premium-offer-price span {
  color: var(--muted);
  font-weight: 700;
}

.premium-benefits-list {
  display: grid;
  gap: 9px;
  margin: 0;
  padding: 0;
  list-style: none;
  color: #c4d2d7;
}

.premium-benefits-list li {
  position: relative;
  padding-left: 22px;
}

.premium-benefits-list li::before {
  content: "✓";
  position: absolute;
  left: 0;
  color: var(--green);
  font-weight: 900;
}

.premium-buy-button {
  width: 100%;
  margin-top: auto;
}

.premium-buy-button:disabled {
  cursor: not-allowed;
  filter: grayscale(.55);
  opacity: .55;
}

.premium-consent-row {
  display: flex;
  gap: 11px;
  align-items: flex-start;
  margin-top: 18px;
  padding: 15px 17px;
  border: 1px solid rgba(255, 255, 255, .08);
  border-radius: 14px;
  background: rgba(255, 255, 255, .025);
  color: #c4d2d7;
  line-height: 1.55;
  cursor: pointer;
}

.premium-consent-row input {
  width: 19px;
  height: 19px;
  margin-top: 2px;
  accent-color: var(--green-strong);
}

.premium-secure-note {
  display: flex;
  gap: 13px;
  align-items: flex-start;
  margin-top: 14px;
  color: #b5c6cc;
}

.premium-secure-note > span {
  color: var(--green);
  font-size: 1.3rem;
}

.premium-secure-note p {
  margin: 5px 0 0;
  color: var(--muted);
  line-height: 1.55;
}

.premium-history-card {
  overflow: hidden;
}

.premium-orders-list {
  display: grid;
  gap: 9px;
}

.premium-orders-list article {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 14px;
  align-items: center;
  padding: 13px 14px;
  border: 1px solid rgba(255, 255, 255, .07);
  border-radius: 13px;
  background: rgba(255, 255, 255, .025);
}

.premium-orders-list strong,
.premium-orders-list small {
  display: block;
}

.premium-orders-list small {
  margin-top: 3px;
  color: var(--muted);
  font-size: .64rem;
}

.premium-order-status {
  padding: 5px 8px;
  border: 1px solid rgba(255, 255, 255, .1);
  border-radius: 999px;
  color: var(--muted);
  font-size: .68rem;
  font-weight: 900;
}

.premium-order-status.is-credited {
  border-color: rgba(123, 242, 200, .3);
  color: #bdf2df;
  background: rgba(64, 217, 165, .08);
}

.premium-order-status.is-failed,
.premium-order-status.is-expired {
  border-color: rgba(255, 113, 133, .28);
  color: #ffc1ca;
  background: rgba(255, 113, 133, .07);
}

.premium-order-meta {
  display: grid;
  justify-items: end;
  gap: 3px;
  color: #d7e3e5;
  font-size: .75rem;
}

.premium-order-meta span:last-child {
  color: var(--muted);
  font-size: .68rem;
}

@media (max-width: 980px) {
  .premium-status-card {
    grid-template-columns: 120px minmax(0, 1fr);
  }
  .premium-status-orbit {
    width: 110px;
    height: 110px;
  }
  .premium-status-details {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .premium-section-intro,
  .premium-section-heading {
    align-items: stretch;
    flex-direction: column;
  }
  .premium-hero-badge,
  .premium-mode-badge {
    align-self: flex-start;
  }
  .premium-status-card {
    grid-template-columns: 1fr;
  }
  .premium-offers-grid {
    grid-template-columns: 1fr;
  }
  .premium-orders-list article {
    grid-template-columns: 1fr auto;
  }
  .premium-order-meta {
    grid-column: 1 / -1;
    grid-auto-flow: column;
    justify-content: space-between;
  }
}

@media (max-width: 520px) {
  .premium-status-details {
    grid-template-columns: 1fr;
  }
  .premium-status-orbit {
    width: 96px;
    height: 96px;
  }
}

/* ===== v24.7.0 — Correctif Stripe Managed Payments, sans changement visuel ===== */

/* ===== Administration des paiements Stripe ===== */
.admin-payments-root,
.admin-payments-layout {
  display: grid;
  gap: 1rem;
}

.admin-stripe-settings-form,
.admin-payment-offers-panel,
.admin-payment-new-offer {
  display: grid;
  gap: 1rem;
}

.admin-payment-secret-summary {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .8rem;
}

.admin-payment-secret-card {
  display: grid;
  gap: .7rem;
  padding: .95rem;
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 16px;
  background: rgba(6, 16, 28, .65);
}

.admin-payment-secret-card.is-configured {
  border-color: rgba(74, 222, 128, .28);
  box-shadow: inset 0 0 22px rgba(74, 222, 128, .04);
}

.admin-payment-secret-card h4 {
  margin: .2rem 0 0;
}

.admin-payment-secret-card dl {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .5rem;
  margin: 0;
}

.admin-payment-secret-card dl div {
  padding: .55rem .65rem;
  border-radius: 10px;
  background: rgba(255,255,255,.035);
}

.admin-payment-secret-card dt,
.admin-payment-secret-card dd {
  margin: 0;
}

.admin-payment-secret-card dt {
  color: var(--muted-text, #91a0b5);
  font-size: .72rem;
}

.admin-payment-secret-card dd {
  margin-top: .15rem;
  font-weight: 700;
}

.admin-stripe-settings-grid,
.admin-payment-offer-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .75rem;
}

.admin-stripe-settings-grid label,
.admin-payment-offer-grid label {
  display: grid;
  gap: .35rem;
}

.admin-stripe-settings-grid label > span,
.admin-payment-offer-grid label > span {
  font-size: .82rem;
  color: var(--muted-text, #a4b0c0);
}

.admin-stripe-settings-grid .wide,
.admin-payment-offer-grid .wide {
  grid-column: 1 / -1;
}

.admin-stripe-settings-grid .check-row,
.admin-payment-offer-grid .check-row {
  display: flex;
  align-items: center;
  gap: .55rem;
  min-height: 44px;
  padding: .65rem .75rem;
  border-radius: 12px;
  background: rgba(255,255,255,.035);
}

.admin-stripe-settings-grid .check-row.danger {
  border: 1px solid rgba(248, 113, 113, .14);
}

.admin-stripe-settings-grid input,
.admin-stripe-settings-grid select,
.admin-payment-offer-grid input,
.admin-payment-offer-grid textarea {
  width: 100%;
}

.admin-payment-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .65rem;
}

.admin-payment-offers-list {
  display: grid;
  gap: .85rem;
}

.admin-payment-offer-form {
  display: grid;
  gap: .85rem;
  padding: .95rem;
  border: 1px solid rgba(255,255,255,.09);
  border-radius: 16px;
  background: rgba(5, 14, 26, .66);
}

.admin-payment-offer-form > header,
.admin-payment-offer-form > footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: .7rem;
}

.admin-payment-offer-form h4 {
  margin: .15rem 0;
}

.admin-payment-offer-form footer .form-feedback {
  flex: 1 1 100%;
  margin: 0;
}

.admin-offer-state {
  padding: .35rem .6rem;
  border-radius: 999px;
  background: rgba(148, 163, 184, .12);
  color: #b7c1cf;
  font-size: .75rem;
  font-weight: 800;
}

.admin-offer-state.is-enabled {
  background: rgba(74, 222, 128, .12);
  color: #86efac;
}

.admin-danger-button.compact {
  min-height: 38px;
  padding: .5rem .75rem;
}

@media (max-width: 820px) {
  .admin-payment-secret-summary,
  .admin-stripe-settings-grid,
  .admin-payment-offer-grid {
    grid-template-columns: 1fr;
  }

  .admin-stripe-settings-grid .wide,
  .admin-payment-offer-grid .wide {
    grid-column: auto;
  }
}

/* ===== v24.8.2 — Prérequis scientifiques alignés sur le Laboratoire ===== */
.building-card.building-science { --building-accent: #cf9cff; }
.building-effect-block strong { font-size: .86rem; }
.building-duration small {
  display: block;
  margin-top: 3px;
  color: #71868f;
  font-size: .57rem;
  white-space: nowrap;
}
.research-section-intro {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}
.research-rule-badge {
  flex: 0 0 auto;
  padding: 11px 14px;
  border: 1px solid rgba(130, 202, 255, .25);
  border-radius: 14px;
  background: rgba(130, 202, 255, .07);
}
.research-rule-badge strong,
.research-rule-badge small { display: block; }
.research-rule-badge strong { color: #c9e9ff; font-size: .78rem; }
.research-rule-badge small { margin-top: 3px; color: #8298aa; font-size: .66rem; }
.research-manager {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(300px, .55fr);
  gap: 18px;
  align-items: start;
}
.research-lock-panel {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  border-color: rgba(255, 196, 100, .23);
  background: linear-gradient(135deg, rgba(255, 196, 100, .08), rgba(8, 15, 24, .88));
}
.research-lock-panel > span {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 13px;
  color: #ffc66a;
  background: rgba(255, 198, 106, .1);
  font-size: 1.15rem;
}
.research-lock-panel strong { color: #f5e5c9; }
.research-lock-panel p { margin: 5px 0 0; color: #9b8e7c; font-size: .72rem; line-height: 1.45; }
.research-catalog { display: grid; gap: 14px; }
.research-card {
  --research-accent: #82caff;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  background: linear-gradient(145deg, rgba(11, 23, 37, .96), rgba(5, 12, 21, .94));
  box-shadow: 0 14px 40px rgba(0,0,0,.16);
}
.research-card.is-locked { border-color: rgba(130, 202, 255, .12); }
.research-card-header {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 14px;
  align-items: start;
}
.research-icon {
  display: grid;
  width: 48px;
  height: 48px;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--research-accent) 55%, transparent);
  border-radius: 14px;
  color: var(--research-accent);
  background: color-mix(in srgb, var(--research-accent) 9%, transparent);
  font-size: 1.2rem;
}
.research-card-header small { color: var(--research-accent); font-size: .66rem; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.research-card-header h3 { margin: 4px 0 0; color: #eef7f7; }
.research-card-header p { margin: 6px 0 0; color: #879aa4; font-size: .75rem; line-height: 1.5; }
.research-card-header em {
  padding: 6px 9px;
  border: 1px solid rgba(130, 202, 255, .25);
  border-radius: 999px;
  color: var(--research-accent);
  background: rgba(130, 202, 255, .07);
  font-size: .7rem;
  font-style: normal;
  font-weight: 850;
}
.research-prerequisite {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 9px;
  align-items: center;
  margin-top: 15px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(4, 10, 17, .5);
}
.research-prerequisite > span {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 8px;
  font-size: .7rem;
  font-weight: 900;
}
.research-prerequisite.is-met > span { color: var(--green); background: rgba(123, 242, 200, .09); }
.research-prerequisite.is-missing > span { color: #ffc66a; background: rgba(255, 198, 106, .09); }
.research-prerequisite strong { color: #d9e7e8; font-size: .7rem; }
.research-prerequisite small { color: #758a94; font-size: .62rem; }
.research-effect-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 12px;
}
.research-effect-grid > div {
  padding: 11px 12px;
  border: 1px solid rgba(130, 202, 255, .15);
  border-radius: 12px;
  background: rgba(130, 202, 255, .045);
}
.research-effect-grid span,
.research-effect-grid strong { display: block; }
.research-effect-grid span { color: #748a96; font-size: .62rem; }
.research-effect-grid strong { margin-top: 4px; color: #c9e9ff; font-size: .8rem; }
.research-upgrade-details {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  margin-top: 13px;
}
.research-cost-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.research-cost-grid span,
.research-duration {
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgba(4, 10, 17, .52);
}
.research-cost-grid small,
.research-cost-grid strong,
.research-duration span,
.research-duration strong,
.research-duration small { display: block; }
.research-cost-grid small,
.research-duration span,
.research-duration small { color: #71868f; font-size: .6rem; }
.research-cost-grid strong,
.research-duration strong { margin-top: 3px; color: #dbe8e8; font-size: .75rem; }
.research-duration small { margin-top: 3px; white-space: nowrap; font-size: .57rem; }
.research-launch-button { width: 100%; margin-top: 14px; }
.research-queue-panel { position: sticky; top: calc(var(--game-navbar-height, 58px) + 20px); }
.research-queue-count {
  padding: 6px 9px;
  border: 1px solid rgba(130, 202, 255, .2);
  border-radius: 999px;
  color: #a9dcff;
  background: rgba(130, 202, 255, .07);
  font-size: .7rem;
  font-weight: 850;
}
.research-queue-panel > p { color: #8da0aa; font-size: .73rem; line-height: 1.55; }
.research-queue-list { display: grid; gap: 9px; margin-top: 14px; }
.research-queue-item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  gap: 10px;
  align-items: center;
  padding: 11px;
  border: 1px solid rgba(130, 202, 255, .22);
  border-radius: 12px;
  background: rgba(5, 11, 18, .55);
}
.research-queue-icon {
  display: grid;
  width: 30px;
  height: 30px;
  place-items: center;
  border-radius: 9px;
  color: #a9dcff;
  background: rgba(130, 202, 255, .08);
}
.research-queue-item strong,
.research-queue-item small,
.research-queue-item em { display: block; }
.research-queue-item strong { color: #e6f0f0; font-size: .75rem; }
.research-queue-item small { margin-top: 2px; color: #7f929b; font-size: .64rem; }
.research-queue-item em { margin-top: 3px; color: #82caff; font-size: .59rem; font-style: normal; }
.research-queue-item time { color: #dcebea; font-family: ui-monospace, monospace; font-size: .72rem; font-weight: 850; }
.research-cancel-button {
  min-height: 30px;
  padding: 6px 9px;
  border: 1px solid rgba(255, 117, 117, .28);
  border-radius: 9px;
  color: #ffc1c1;
  background: rgba(255, 92, 92, .07);
  font: inherit;
  font-size: .62rem;
  font-weight: 800;
  cursor: pointer;
}
.research-cancel-button:hover { background: rgba(255, 92, 92, .13); }
.research-cancel-button:disabled { opacity: .58; cursor: wait; }
.research-queue-empty { padding: 20px 12px; text-align: center; }
.research-queue-empty span,
.research-queue-empty strong,
.research-queue-empty small { display: block; }
.research-queue-empty span { color: var(--green); font-size: 1.2rem; }
.research-queue-empty strong { margin-top: 8px; color: #dbe8e6; font-size: .78rem; }
.research-queue-empty small { margin-top: 4px; color: #788c95; font-size: .66rem; }
.research-feedback { margin: 13px 0 0; font-size: .75rem; line-height: 1.45; }
.research-feedback.is-error { color: var(--danger); }
.research-feedback.is-success { color: var(--green); }
@media (max-width: 1050px) {
  .research-manager { grid-template-columns: 1fr; }
  .research-queue-panel { position: static; }
}
@media (max-width: 700px) {
  .research-section-intro { align-items: stretch; flex-direction: column; }
  .research-rule-badge { width: 100%; }
  .research-lock-panel { grid-template-columns: auto minmax(0, 1fr); }
  .research-lock-panel .secondary-button { grid-column: 1 / -1; width: 100%; }
  .research-card-header { grid-template-columns: auto minmax(0, 1fr); }
  .research-card-header em { grid-column: 1 / -1; justify-self: start; }
  .research-upgrade-details { grid-template-columns: 1fr; }
  .research-cost-grid { grid-template-columns: 1fr 1fr; }
  .research-queue-item { grid-template-columns: auto minmax(0, 1fr) auto; }
  .research-cancel-button { grid-column: 1 / -1; width: 100%; }
}

/* Verrou scientifique : seul le panneau d’accès reste visible au Laboratoire niveau 0. */
.research-manager.is-access-locked { grid-template-columns: minmax(0, 1fr); }
.research-manager.is-access-locked .research-lock-panel { min-height: 190px; }
.building-prerequisite {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 9px;
  align-items: center;
  margin-top: 13px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(4, 10, 17, .5);
}
.building-prerequisite > span {
  display: grid;
  width: 24px;
  height: 24px;
  place-items: center;
  border-radius: 8px;
  font-size: .7rem;
  font-weight: 900;
}
.building-prerequisite.is-met > span { color: var(--green); background: rgba(123, 242, 200, .09); }
.building-prerequisite.is-missing > span { color: #ffc66a; background: rgba(255, 198, 106, .09); }
.building-prerequisite strong { color: #d9e7e8; font-size: .7rem; }
.building-prerequisite small { color: #758a94; font-size: .62rem; }

/* ===== v24.8.2 — Deux recherches pour les comptes Premium ===== */
.research-queue-item.is-waiting {
  border-color: rgba(207, 156, 255, .24);
  background: linear-gradient(135deg, rgba(207, 156, 255, .07), rgba(5, 11, 18, .55));
}
.research-queue-item.is-waiting .research-queue-icon {
  color: #d8b8ff;
  background: rgba(207, 156, 255, .1);
}
.research-queue-item.is-waiting em { color: #d8b8ff; }
.research-queue-item time { text-align: right; }
.research-queue-item time small,
.research-queue-item time strong { display: block; }
.research-queue-item time small {
  margin: 0 0 2px;
  color: #71868f;
  font-family: inherit;
  font-size: .55rem;
  font-weight: 700;
}
.research-queue-item time strong {
  color: #dcebea;
  font-family: ui-monospace, monospace;
  font-size: .72rem;
  font-weight: 850;
}

/* v24.9.0 — Caserne, formation progressive et tableau d’armée */
.building-card.building-military { --building-accent: #ff9f68; }

.barracks-section-intro,
.army-section-intro {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 22px;
}

.barracks-rule-badge,
.army-count-badge {
  min-width: 220px;
  display: grid;
  gap: 5px;
  padding: 14px 17px;
  border: 1px solid rgba(255, 159, 104, .22);
  border-radius: 16px;
  background: linear-gradient(145deg, rgba(255, 159, 104, .09), rgba(8, 17, 27, .8));
  box-shadow: inset 0 0 22px rgba(255, 159, 104, .04);
}
.barracks-rule-badge strong,
.army-count-badge strong { color: #fff0e7; }
.barracks-rule-badge small,
.army-count-badge small { color: #91a1aa; }

.barracks-manager { display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, .55fr); gap: 20px; align-items: start; }
.unit-catalog { display: grid; grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); gap: 16px; }
.unit-card {
  --unit-accent: #ffad73;
  display: grid;
  gap: 15px;
  padding: 18px;
  border: 1px solid rgba(255, 173, 115, .18);
  border-radius: 18px;
  background: linear-gradient(150deg, rgba(255, 173, 115, .075), rgba(8, 17, 27, .91) 42%);
  box-shadow: inset 0 0 28px rgba(255, 173, 115, .025), 0 16px 34px rgba(0, 0, 0, .18);
}
.unit-card.is-locked { border-color: rgba(126, 151, 165, .13); filter: saturate(.82); }
.unit-card-header { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 13px; align-items: start; }
.unit-icon {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border: 1px solid color-mix(in srgb, var(--unit-accent) 38%, transparent);
  border-radius: 14px;
  color: var(--unit-accent);
  background: color-mix(in srgb, var(--unit-accent) 9%, transparent);
  font-size: 1.35rem;
}
.unit-card-header small { color: var(--unit-accent); font-size: .66rem; font-weight: 850; letter-spacing: .08em; text-transform: uppercase; }
.unit-card-header h3 { margin: 4px 0 0; color: #eff8f8; }
.unit-card-header p { margin: 6px 0 0; color: #879aa4; font-size: .76rem; line-height: 1.5; }
.unit-card-header em { color: #fff; font-style: normal; font-size: 1.1rem; font-weight: 900; }
.unit-worker-note { display: block; margin-top: 7px; color: #8fd9c4 !important; text-transform: none !important; letter-spacing: 0 !important; line-height: 1.4; }
.unit-prerequisite { display: grid; grid-template-columns: auto 1fr; gap: 2px 9px; align-items: center; padding: 10px 12px; border-radius: 13px; background: rgba(0, 0, 0, .17); }
.unit-prerequisite span { grid-row: 1 / 3; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 50%; font-weight: 900; }
.unit-prerequisite.is-met span { color: #71efc5; background: rgba(113, 239, 197, .11); }
.unit-prerequisite.is-missing span { color: #ff9a89; background: rgba(255, 98, 88, .11); }
.unit-prerequisite strong { color: #dce8e9; font-size: .78rem; }
.unit-prerequisite small { color: #82949d; }
.unit-stat-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.unit-stat-grid div,
.unit-order-summary > div { padding: 10px; border: 1px solid rgba(255,255,255,.055); border-radius: 12px; background: rgba(0,0,0,.12); }
.unit-stat-grid span,
.unit-order-summary span,
.unit-cost-per-item > span { display: block; color: #7f929c; font-size: .66rem; text-transform: uppercase; letter-spacing: .06em; }
.unit-stat-grid strong,
.unit-order-summary strong { display: block; margin-top: 4px; color: #edf7f7; font-size: .82rem; }
.unit-cost-per-item { display: grid; gap: 8px; }
.unit-cost-per-item > div { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.unit-cost-per-item > div span { padding: 9px; border-radius: 11px; background: rgba(0,0,0,.14); }
.unit-cost-per-item small { display: block; color: #7f929c; }
.unit-cost-per-item strong { color: #e9f3f4; }
.unit-training-form { display: grid; grid-template-columns: 1fr auto; gap: 9px; align-items: end; }
.unit-training-form label { display: grid; gap: 6px; }
.unit-training-form label span { color: #879aa4; font-size: .72rem; font-weight: 750; }
.unit-training-form input { width: 100%; min-height: 42px; padding: 0 12px; border: 1px solid rgba(255,255,255,.1); border-radius: 11px; color: #f3fbfb; background: rgba(3,10,16,.72); }
.unit-max-button { min-height: 42px; padding-inline: 14px; }
.unit-order-summary { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.unit-train-button { width: 100%; }

.training-queue-panel { position: sticky; top: calc(var(--game-navbar-height, 58px) + 18px); }
.training-queue-count { color: #ffc49d; font-weight: 850; }
.training-queue-list { display: grid; gap: 10px; margin-top: 14px; }
.training-queue-item { display: grid; grid-template-columns: auto auto minmax(0, 1fr) auto auto; gap: 10px; align-items: center; padding: 12px; border: 1px solid rgba(255,255,255,.07); border-radius: 14px; background: rgba(4,12,19,.58); }
.training-queue-item.is-active { border-color: rgba(113,239,197,.22); box-shadow: inset 3px 0 0 rgba(113,239,197,.7); }
.training-queue-item.is-waiting { box-shadow: inset 3px 0 0 rgba(255,173,115,.48); }
.training-queue-position { width: 25px; height: 25px; display: grid; place-items: center; border-radius: 50%; color: #dff5ee; background: rgba(255,255,255,.075); font-size: .72rem; font-weight: 900; }
.training-queue-icon { color: #ffad73; font-size: 1.2rem; }
.training-queue-main { min-width: 0; }
.training-queue-main strong { display: block; color: #ecf7f7; }
.training-queue-main small { display: block; margin-top: 3px; color: #91a2aa; }
.training-queue-main em { display: block; margin-top: 3px; color: #74d9bc; font-size: .68rem; font-style: normal; }
.training-queue-item.is-waiting .training-queue-main em { color: #dfad8b; }
.training-queue-item time { display: grid; justify-items: end; min-width: 86px; }
.training-queue-item time small { color: #768b95; }
.training-queue-item time strong { color: #eff9f9; }
.training-cancel-button { border: 0; color: #ff9a89; background: transparent; cursor: pointer; font-weight: 750; }
.training-cancel-button:disabled { opacity: .5; cursor: wait; }
.training-queue-empty { display: grid; justify-items: center; gap: 5px; padding: 26px 12px; color: #8da0a9; text-align: center; }
.training-queue-empty span { color: #71efc5; font-size: 1.35rem; }
.training-queue-empty strong { color: #dce9e9; }
.training-feedback { margin-top: 13px; color: #71efc5; }
.training-feedback.is-error { color: #ff9a89; }

.army-manager { display: grid; gap: 16px; }
.army-table-wrap { overflow-x: auto; padding: 0; }
.army-table { width: 100%; border-collapse: collapse; min-width: 850px; }
.army-table th,
.army-table td { padding: 13px 14px; border-bottom: 1px solid rgba(255,255,255,.06); color: #dce7e8; text-align: right; }
.army-table thead th { color: #8397a0; font-size: .66rem; letter-spacing: .05em; text-transform: uppercase; background: rgba(0,0,0,.16); }
.army-table thead th:first-child,
.army-table tbody th { text-align: left; }
.army-table tbody tr:last-child th,
.army-table tbody tr:last-child td { border-bottom: 0; }
.army-unit-name { display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; align-items: center; }
.army-unit-name i { grid-row: 1 / 3; width: 34px; height: 34px; display: grid; place-items: center; border-radius: 10px; color: #ffad73; background: rgba(255,173,115,.1); font-style: normal; }
.army-unit-name b { color: #eff8f8; }
.army-unit-name small { color: #7f949d; font-weight: 500; }
.army-table-empty { padding: 28px !important; text-align: center !important; color: #8397a0 !important; }
.army-summary-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.army-summary-grid article { padding: 15px 17px; border: 1px solid rgba(255,255,255,.07); border-radius: 15px; background: linear-gradient(145deg, rgba(255,255,255,.035), rgba(0,0,0,.12)); }
.army-summary-grid span { display: block; color: #82969f; font-size: .69rem; text-transform: uppercase; letter-spacing: .06em; }
.army-summary-grid strong { display: block; margin-top: 6px; color: #eef8f8; font-size: 1.25rem; }

@media (max-width: 1100px) {
  .barracks-manager { grid-template-columns: 1fr; }
  .training-queue-panel { position: static; }
}
@media (max-width: 760px) {
  .barracks-section-intro,
  .army-section-intro { display: grid; }
  .barracks-rule-badge,
  .army-count-badge { min-width: 0; width: 100%; }
  .unit-catalog { grid-template-columns: 1fr; }
  .unit-stat-grid { grid-template-columns: repeat(2, 1fr); }
  .training-queue-item { grid-template-columns: auto auto minmax(0,1fr); }
  .training-queue-item time { grid-column: 2 / 4; justify-items: start; }
  .training-cancel-button { grid-column: 1 / 4; justify-self: end; }
  .army-summary-grid { grid-template-columns: repeat(2, 1fr); }
}
