:root {
  /* Charte BRG 2026 */
  --noir: #13100f;
  --creme: #fff6e5;
  --bleu-celadon: #7cddca;
  --jaune: #fad75a;
  --vert: #2c845c;
  --rouge: #fa6455;

  --bg: var(--creme);
  --panel: #fffaf0;
  --border: rgba(19, 16, 15, 0.12);
  --text: var(--noir);
  --muted: rgba(19, 16, 15, 0.62);
  --accent: var(--bleu-celadon);
  --accent-strong: #5bc9b4;
  --font-title: "Montserrat", system-ui, sans-serif;
  --font-body: "Rubik", system-ui, sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  height: 100%;
  height: 100dvh;
  overflow: hidden; /* un seul scroll : celui de l'iframe */
  font-family: var(--font-body);
  font-weight: 400;
  background: var(--bg);
  color: var(--text);
}

.shell {
  display: flex;
  flex-direction: column;
  height: 100%;
  overflow: hidden;
}

.topbar {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: 3.25rem;
  padding: 0 1rem;
  background: var(--noir);
  border-bottom: 1px solid rgba(255, 246, 229, 0.08);
  color: var(--creme);
}

.brand {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}

.brand-logo {
  display: block;
  height: 2.25rem;
  width: auto;
  max-width: 9rem;
  object-fit: contain;
  flex-shrink: 0;
}

.brand-mark {
  font-family: var(--font-title);
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--creme);
}

.brand-name {
  font-size: 0.875rem;
  color: rgba(255, 246, 229, 0.65);
}

.tabs {
  display: flex;
  flex: 1;
  gap: 0.25rem;
  overflow-x: auto;
  min-width: 0;
}

.tab {
  appearance: none;
  border: 0;
  background: transparent;
  color: rgba(255, 246, 229, 0.65);
  padding: 0.55rem 0.9rem;
  border-radius: 0.5rem;
  cursor: pointer;
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 500;
  white-space: nowrap;
}

.tab:hover {
  color: var(--creme);
  background: rgba(255, 246, 229, 0.08);
}

.tab.active {
  color: var(--noir);
  background: var(--bleu-celadon);
  font-weight: 600;
}

.tab i {
  margin-right: 0.35rem;
}

.user-area {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-shrink: 0;
}

.user-label {
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--creme);
  white-space: nowrap;
}

.btn {
  appearance: none;
  border: 1px solid transparent;
  border-radius: 0.5rem;
  padding: 0.45rem 0.85rem;
  font-family: var(--font-body);
  font-size: 0.875rem;
  cursor: pointer;
}

.btn.primary {
  background: var(--noir);
  color: var(--creme);
  font-weight: 600;
}

.btn.primary:hover {
  background: #2a2422;
}

.btn.ghost {
  background: transparent;
  border-color: rgba(255, 246, 229, 0.25);
  color: var(--creme);
}

.btn.ghost:hover {
  background: rgba(255, 246, 229, 0.1);
}

.stage {
  position: relative;
  flex: 1 1 auto;
  min-height: 0;
  overflow: hidden;
  background: var(--creme);
}

.app-frame {
  display: block; /* évite l'espace inline sous l'iframe qui fait déborder le shell */
  width: 100%;
  height: 100%;
  border: 0;
  background: #fff;
}

.gate {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.75rem;
  padding: 2rem;
  text-align: center;
  background: var(--creme);
  z-index: 2;
}

.gate h1 {
  margin: 0;
  font-family: var(--font-title);
  font-weight: 800;
  font-size: 1.75rem;
  color: var(--noir);
  letter-spacing: -0.02em;
}

.gate p {
  margin: 0;
  color: var(--muted);
  max-width: 28rem;
  font-family: var(--font-body);
}

.hidden {
  display: none !important;
}
