/* Habillage du viewer GeoModels : la page autour du viewer, aux couleurs de GeoModels. */
:root {
    --hb-font: "Space Grotesk", system-ui, sans-serif;
    --hb-accent: #3f4d5f; /* dark bluish grey (was orange #e0821f) */
    --hb-accent-soft: #e8ecf1;
    --hb-ink: #12232b;
    --hb-text: #33454d;
    --hb-muted: #8b98a2;
    --hb-line: #e8edef;
    --hb-soft: #f4f6f7;
    --hb-bg: #eef1f2;
    --hb-night: #10141b;
    --hb-radius: 16px;
    --hb-shadow: 0 12px 32px rgba(15, 30, 40, 0.14);
    --hb-top: 64px;
    --hb-foot: 28px;
    --hb-side: 340px;
}

* {
    box-sizing: border-box;
}
html,
body {
    height: 100%;
    margin: 0;
}
body {
    display: grid;
    grid-template-rows: var(--hb-top) 1fr var(--hb-foot);
    background: var(--hb-bg);
    color: var(--hb-text);
    font: 14px/1.45 var(--hb-font);
}
button {
    font: inherit;
    cursor: pointer;
}

/* ── le bandeau du haut ── */
.hb-top {
    display: flex;
    align-items: center;
    gap: 28px;
    padding: 0 20px;
    background: var(--hb-night);
    color: #fff;
}
.hb-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 19px;
    letter-spacing: 0.01em;
}
.hb-brand-name b {
    color: var(--hb-accent);
    font-weight: 700;
}
.hb-logo {
    display: grid;
    grid-template-columns: repeat(3, 6px);
    align-items: end;
    gap: 3px;
    height: 22px;
}
.hb-logo span {
    display: block;
    border-radius: 2px;
    background: var(--hb-accent);
}
.hb-logo span:nth-child(1) {
    height: 10px;
    opacity: 0.55;
}
.hb-logo span:nth-child(2) {
    height: 22px;
}
.hb-logo span:nth-child(3) {
    height: 15px;
    opacity: 0.8;
}
.hb-project {
    display: flex;
    flex-direction: column;
    padding-left: 24px;
    border-left: 1px solid rgba(255, 255, 255, 0.15);
}
.hb-project-kicker {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--hb-muted);
}
.hb-project h1 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
}
.hb-modes {
    display: flex;
    margin-left: auto;
    padding: 4px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
}
.hb-modes button {
    padding: 7px 16px;
    border: 0;
    border-radius: 999px;
    background: transparent;
    color: #cfd8dc;
}
.hb-modes button[aria-pressed="true"] {
    background: var(--hb-accent);
    color: #fff;
    font-weight: 600;
}
.hb-internal {
    padding: 4px 10px;
    border: 1px solid var(--hb-accent);
    border-radius: 999px;
    color: var(--hb-accent);
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
}

/* ── le corps : le panneau du projet et la scène ── */
.hb-main {
    display: grid;
    grid-template-columns: var(--hb-side) 1fr;
    min-height: 0;
}
body[data-mode="presentation"] .hb-main {
    grid-template-columns: 0 1fr;
}
body[data-mode="presentation"] .hb-side {
    visibility: hidden;
}
.hb-side {
    display: flex;
    flex-direction: column;
    gap: 12px;
    min-height: 0;
    padding: 12px;
    overflow: auto;
}
.hb-card {
    padding: 16px 18px;
    border-radius: var(--hb-radius);
    background: #fff;
    box-shadow: var(--hb-shadow);
}
.hb-card h2 {
    margin: 0 0 10px;
    color: var(--hb-ink);
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
}
.hb-grow {
    flex: 1;
    min-height: 200px;
}
.hb-muted {
    color: var(--hb-muted);
}
.hb-intro p {
    margin: 0 0 12px;
}
.hb-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin: 0;
}
.hb-stats div {
    padding: 8px 10px;
    border-radius: 12px;
    background: var(--hb-soft);
}
.hb-stats dt {
    color: var(--hb-muted);
    font-size: 11px;
}
.hb-stats dd {
    margin: 0;
    color: var(--hb-ink);
    font-size: 20px;
    font-weight: 600;
}
.hb-views {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.hb-views button {
    padding: 6px 12px;
    border: 1px solid var(--hb-line);
    border-radius: 999px;
    background: #fff;
    color: var(--hb-ink);
}
.hb-views button:hover,
.hb-views button.is-current {
    border-color: var(--hb-accent);
    background: var(--hb-accent-soft);
}

/* l'arbre du contenu */
.hb-tree,
.hb-tree ul {
    margin: 0;
    padding: 0;
    list-style: none;
}
.hb-tree ul {
    margin-left: 14px;
    padding-left: 8px;
    border-left: 1px solid var(--hb-line);
}
.hb-tree > .hb-group + .hb-group {
    margin-top: 10px;
}
.hb-tree > .hb-group > ul {
    margin-left: 0;
    padding-left: 0;
    border-left: 0;
}
.hb-group-title {
    margin: 0 0 4px 4px;
    color: var(--hb-accent);
    font-size: 12px;
    font-weight: 600;
}
.hb-group-title span {
    color: var(--hb-muted);
    font-weight: 400;
}
.hb-row {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 3px 4px;
    border-radius: 8px;
}
.hb-row:hover {
    background: var(--hb-soft);
}
.hb-row .hb-name {
    flex: 1;
    min-width: 0;
    overflow: hidden;
    padding: 0;
    border: 0;
    background: none;
    color: var(--hb-ink);
    text-align: left;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.hb-row .hb-type {
    color: var(--hb-muted);
    font-size: 11px;
}
.hb-eye {
    width: 26px;
    height: 22px;
    padding: 0;
    border: 0;
    border-radius: 6px;
    background: none;
    color: var(--hb-accent);
}
.hb-eye[aria-pressed="false"] {
    color: var(--hb-muted);
    opacity: 0.6;
}
.hb-twist {
    width: 16px;
    padding: 0;
    border: 0;
    background: none;
    color: var(--hb-muted);
}

/* ── la scène ── */
.hb-stage {
    position: relative;
    min-height: 0;
    margin: 12px 12px 12px 0;
    overflow: hidden;
    border-radius: var(--hb-radius);
    box-shadow: var(--hb-shadow);
}
body[data-mode="presentation"] .hb-stage {
    margin-left: 12px;
}
#viewer {
    display: block;
    width: 100%;
    height: 100%;
    /* le thème du viewer, aux couleurs de la page */
    --gm-font: var(--hb-font);
    --gm-accent: var(--hb-accent);
    --gm-ink: var(--hb-ink);
    --gm-text: var(--hb-text);
    --gm-radius: var(--hb-radius);
}

/* ── la diapositive ── */
.hb-slide {
    position: absolute;
    left: 24px;
    bottom: 24px;
    z-index: 10;
    width: min(440px, calc(100% - 48px));
    padding: 20px 22px 18px;
    border-left: 5px solid var(--hb-accent);
    border-radius: var(--hb-radius);
    background: rgba(255, 255, 255, 0.96);
    box-shadow: var(--hb-shadow);
}
.hb-slide-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
}
.hb-slide-count {
    color: var(--hb-accent);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}
.hb-slide-dots {
    display: flex;
    gap: 6px;
}
.hb-slide-dots button {
    width: 9px;
    height: 9px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: var(--hb-line);
}
.hb-slide-dots button.is-current {
    background: var(--hb-accent);
}
.hb-slide h2 {
    margin: 0 0 8px;
    color: var(--hb-ink);
    font-size: 22px;
    line-height: 1.2;
}
.hb-slide-body p {
    margin: 0 0 8px;
}
.hb-slide-body ul {
    margin: 0 0 8px;
    padding-left: 18px;
}
.hb-big {
    display: flex;
    gap: 18px;
    margin: 4px 0 10px;
}
.hb-big div {
    display: flex;
    flex-direction: column;
}
.hb-big b {
    color: var(--hb-ink);
    font-size: 26px;
    line-height: 1.1;
}
.hb-big span {
    color: var(--hb-muted);
    font-size: 12px;
}
.hb-slide-nav {
    display: flex;
    justify-content: space-between;
    margin-top: 12px;
}
.hb-slide-nav button {
    padding: 8px 14px;
    border: 1px solid var(--hb-line);
    border-radius: 999px;
    background: #fff;
    color: var(--hb-ink);
}
.hb-slide-nav button:disabled {
    opacity: 0.4;
    cursor: default;
}
.hb-slide-nav .hb-primary {
    border-color: var(--hb-accent);
    background: var(--hb-accent);
    color: #fff;
    font-weight: 600;
}

/* ── les crédits ── */
.hb-credits {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 0 20px;
    overflow: hidden;
    color: var(--hb-muted);
    font-size: 11px;
    white-space: nowrap;
}
.hb-credits-right {
    margin-left: auto;
}
