/* Global layout */

.site-banner {
    align-items: center;
    background: #000;
    color: #fff;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    position: relative;
}

.banner-start,
.banner-admin-links,
.banner-identity,
.banner-end {
    align-items: center;
    display: flex;
    gap: 1rem;
}

.banner-identity {
    flex: 1;
    justify-content: space-between;
}

.site-title {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-decoration: none;
}

.banner-username {
    font-size: 0.95rem;
    white-space: nowrap;
}

.banner-auth-button {
    min-width: 2.25rem;
}

.banner-auth-icon {
    height: 1rem;
    width: 1rem;
}

.menu-toggle {
    display: inline-flex;
    flex-direction: column;
    gap: 4px;
    height: 36px;
    justify-content: center;
    margin: 0;
    min-height: auto;
    min-width: 36px;
    padding: 8px;
    width: 36px;
}

.menu-toggle span {
    background: #fff;
    border-radius: 999px;
    display: block;
    height: 2px;
    width: 20px;
}

.site-menu {
    background: #1a1a1a;
    border: 1px solid #3a3a3a;
    border-radius: 1rem;
    box-shadow: 0 16px 36px rgba(0, 0, 0, 0.22);
    display: none;
    left: 1rem;
    min-width: 14rem;
    padding: 0.75rem;
    position: absolute;
    top: 4.6rem;
    z-index: 20;
}

.site-menu.is-open {
    display: block;
}

.site-menu[hidden] {
    display: none !important;
}

.site-menu-label {
    color: #9f9f9f;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    margin: 0 0 0.55rem;
    padding: 0 0.6rem;
    text-transform: uppercase;
}

.site-menu-link,
.site-menu-submenu-summary {
    border-radius: 0.75rem;
    color: #fff;
    display: block;
    padding: 0.4rem 0.75rem;
    text-decoration: none;
    transition: background-color 120ms ease, transform 120ms ease;
}

.site-menu-submenu {
    margin-top: 0.075rem;
}

.site-menu-submenu-summary {
    cursor: pointer;
    list-style: none;
}

.site-menu-submenu-summary::-webkit-details-marker {
    display: none;
}

.site-menu-submenu-summary::after {
    color: #bdbdbd;
    content: "▾";
    float: right;
}

.site-menu-submenu[open] .site-menu-submenu-summary::after {
    content: "▴";
}

.site-menu-submenu-items {
    border-left: 1px solid #4a4a4a;
    margin: 0.15rem 0 0.15rem 0.75rem;
    padding-left: 0.35rem;
}

.site-menu-submenu-items .site-menu-link {
    color: #e6e6e6;
    font-size: 0.95rem;
    padding-left: 0.65rem;
}

.site-menu-link + form,
.site-menu-link + .site-menu-link,
.site-menu form + .site-menu-link,
.site-menu-submenu + .site-menu-link,
.site-menu-submenu + form,
.site-menu-link + .site-menu-submenu {
    margin-top: 0.075rem;
}

.site-menu-link:hover,
.site-menu-link:focus,
.site-menu-submenu-summary:hover,
.site-menu-submenu-summary:focus,
.site-banner .button:hover,
.site-banner .button:focus {
    background: #2a2a2a;
}

.site-menu-link:hover,
.site-menu-link:focus,
.site-menu-submenu-summary:hover,
.site-menu-submenu-summary:focus {
    transform: translateX(2px);
}

.site-main {
    padding-top: 2rem;
}

.site-footer {
    color: #8a8a8a;
    font-size: 0.78rem;
    padding: 0 1.5rem 1.25rem;
    text-align: center;
}

/* Shared page components */

.content-card {
    background: #fff;
    border-radius: 0.75rem;
    box-shadow: 0 1rem 2rem rgba(0, 0, 0, 0.06);
}

.content-card + .content-card {
    margin-top: 1.5rem;
}

.page-header {
    margin-bottom: 1rem;
    text-align: left;
}

.page-header .subtitle {
    margin-bottom: 0;
}

.page-title-header {
    align-items: flex-start;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
}

.page-title-header .subtitle {
    margin-bottom: 0;
}

.page-title-actions {
    flex-shrink: 0;
}

/* Accueil summaries */

.summary-card,
.jsmag-card {
    border: 1px solid #ececec;
    border-radius: 0.75rem;
}

.summary-card {
    height: 100%;
    padding: 1rem 1.1rem;
}

.summary-card-image {
    align-items: center;
    display: flex;
    justify-content: center;
}

.summary-list-row {
    align-items: baseline;
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    margin-bottom: 0.25rem;
}

.summary-list-row:last-child {
    margin-bottom: 0;
}

.home-message {
    margin-top: 0.75rem;
}

.home-message p {
    margin-bottom: 0;
}

.home-message ul,
.home-message ol {
    margin: 0.35rem 0 0 1.2rem;
}

.home-message ul {
    list-style: disc;
}

.home-message ol {
    list-style: decimal;
}

/* ARTICLES index */

.articles-index-list {
    display: grid;
    gap: 1rem;
}

.articles-index-card {
    border: 1px solid #ececec;
    border-radius: 0.75rem;
    color: inherit;
    display: block;
    padding: 1.1rem 1.2rem;
    text-decoration: none;
    transition: border-color 120ms ease, box-shadow 120ms ease, transform 120ms ease;
}

.articles-index-card:hover,
.articles-index-card:focus {
    border-color: #d6d6d6;
    box-shadow: 0 0.7rem 1.6rem rgba(0, 0, 0, 0.05);
    transform: translateY(-1px);
}

.articles-index-card .title {
    margin-bottom: 0.45rem;
}

/* HISTOIRE */

.history-timeline {
    display: block;
    height: auto;
    margin: 1.5rem 0 0;
    max-width: 100%;
    overflow: visible;
    width: 100%;
}

.history-timeline-line,
.history-timeline-arrow,
.history-timeline-tick {
    stroke: #2f2f2f;
}

.history-timeline-line {
    stroke-linecap: round;
    stroke-width: 3;
}

.history-timeline-tick {
    stroke-width: 3;
}

.history-timeline-arrow {
    fill: #2f2f2f;
}

.history-timeline-date {
    fill: #777;
    font-size: 0.8rem;
}

.history-timeline-label {
    fill: #222;
    font-size: 0.95rem;
}

.history-timeline-event--below .history-timeline-date,
.history-timeline-event--below .history-timeline-label {
    dominant-baseline: hanging;
}

.history-date-toggle {
    color: #666;
    font-size: 0.9rem;
    margin-top: 0.75rem;
}

/* Interactive visual domains */

.battlefield-frame,
.dungeon-frame,
.fractal-frame,
.travels-frame,
.worlds-frame {
    background:
        radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.38), transparent 32%),
        linear-gradient(135deg, #e8d7ad, #c8a96d);
    border: 1px solid #b99a5e;
    border-radius: 1rem;
    box-shadow: inset 0 0 0 0.45rem rgba(255, 255, 255, 0.15);
    padding: 1rem;
}

.battlefield-map {
    display: block;
    height: auto;
    margin: 0 auto;
    max-width: 100%;
    width: 100%;
}

.battlefield-background {
    fill: rgba(245, 232, 196, 0.72);
}

.battlefield-hex polygon {
    fill: #bfd3a8;
    stroke: rgba(74, 56, 30, 0.55);
    stroke-width: 1.6;
}

.battlefield-coordinate {
    fill: rgba(68, 50, 30, 0.58);
    font-size: 0.78rem;
    font-weight: 700;
    pointer-events: none;
    text-anchor: middle;
    transform: translateY(0.25rem);
}

.battlefield-unit,
.travels-avatar {
    fill: #f7f0cf;
    stroke: #2c271b;
    stroke-width: 2;
    vector-effect: non-scaling-stroke;
}

/* BATAILLES */

.battlefield-frame {
    display: flex;
    justify-content: center;
}

/* DONJONS */

.dungeon-frame,
.worlds-frame {
    margin: 0 auto;
    width: 100%;
}

.dungeon-view,
.worlds-view {
    aspect-ratio: 3 / 2;
    background: #9fb7c8;
    border: 1px solid rgba(82, 82, 82, 0.58);
    display: block;
    height: auto;
    width: 100%;
}

.dungeon-background {
    fill: #9fb7c8;
}

.dungeon-ceiling {
    fill: #9fb7c8;
}

.dungeon-floor {
    fill: #bfd3a8;
}

.dungeon-floor-line {
    fill: none;
    stroke: rgba(92, 92, 92, 0.42);
    stroke-linecap: round;
    stroke-width: 1.1;
    vector-effect: non-scaling-stroke;
}

.dungeon-wall {
    fill: #e8d7ad;
    stroke: rgba(68, 50, 30, 0.62);
    stroke-width: 2;
    vector-effect: non-scaling-stroke;
}

.dungeon-wall-front {
    fill: #d6be87;
}

.dungeon-wall-side {
    fill: #e2cfa0;
}

.dungeon-loading,
.dungeon-status {
    fill: rgba(55, 42, 25, 0.7);
    font-size: 0.85rem;
    font-weight: 700;
    pointer-events: none;
    text-anchor: middle;
}

/* VOYAGES */

.travels-frame {
    display: flex;
    justify-content: center;
    overflow-x: auto;
}

.travels-map {
    border: 4px solid rgba(45, 39, 28, 0.72);
    display: block;
    height: auto;
    image-rendering: pixelated;
    max-width: 100%;
}

.travels-tile rect {
    stroke: rgba(35, 30, 22, 0.22);
    stroke-width: 1;
}

.travels-tile-water rect {
    fill: #547aa5;
}

.travels-tile-grass rect {
    fill: #bfd3a8;
}

.travels-tile-forest rect {
    fill: #3f7038;
}

.travels-tile-mountain rect {
    fill: #8a8175;
}

.travels-tile-town rect {
    fill: #b79a58;
}

/* FRACTALES */

.fractal-frame {
    display: flex;
    justify-content: center;
}

.fractal-canvas {
    aspect-ratio: 35 / 24;
    display: block;
    height: auto;
    max-width: 100%;
    width: 100%;
}

/* ADMIN */

.weight-chart-frame {
    overflow-x: auto;
}

.weight-chart {
    display: block;
    height: auto;
    min-width: 42rem;
    width: 100%;
}

.weight-chart-plot {
    fill: #fbfbfb;
    stroke: #e5e5e5;
}

.weight-chart-axis {
    stroke: #555;
    stroke-width: 1.2;
}

.weight-chart-axis-tick {
    stroke: #555;
    stroke-width: 1;
}

.weight-chart-axis-label {
    fill: #555;
    font-size: 0.72rem;
}

.weight-chart-date-label {
    text-anchor: middle;
}

.weight-chart-unit-label {
    text-anchor: middle;
}

.weight-chart-weight-label {
    text-anchor: end;
}

.weight-chart-guide {
    stroke-dasharray: 5 5;
    stroke-width: 1.4;
}

.weight-chart-guide-label {
    font-size: 0.74rem;
}

.weight-chart-objective {
    fill: #6f9f7a;
    stroke: #6f9f7a;
}

.weight-chart-intermediate-objective {
    fill: #888;
    stroke: #888;
}

.weight-chart-limit {
    fill: #c97878;
    stroke: #c97878;
}

.weight-chart-line {
    fill: none;
    stroke: #2f6fb7;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2.4;
}

.weight-chart-point {
    fill: #2f6fb7;
}

/* CARTES */

.maps-map-frame {
    display: block;
    line-height: 0;
    margin: 0 auto;
    max-width: 100%;
    position: relative;
    width: fit-content;
}

.maps-map-image {
    display: block;
    height: auto;
    max-width: 100%;
}

.maps-marker-layer {
    height: 100%;
    inset: 0;
    position: absolute;
    width: 100%;
}

.maps-credit {
    color: #7a7a7a;
    font-size: 0.78rem;
    margin-top: 0.6rem;
}

/* LIVRES */

.books-subtitle {
    margin-top: 0.75rem;
}

.books-rank-structure {
    margin-top: 1.5rem;
}

.books-rank-structure-text {
    background: #fafafa;
    border: 1px solid #eeeeee;
    border-radius: 0.75rem;
    color: #333;
    font-size: 0.9rem;
    padding: 1rem;
    white-space: pre-wrap;
}

/* BUREAU */

.office-note-card,
.office-event-card {
    border-radius: 0.75rem;
    margin-bottom: 0.5rem !important;
    padding: 0.75rem 0.9rem;
}

.office-note-card.is-special,
.office-event-card.is-current {
    background: #fff1f1;
}

.office-note-card.is-standard,
.office-event-card.is-future {
    background: #f0f7ff;
}

.office-event-card.is-past {
    background: #f4f4f4;
}

.office-note-line,
.office-event-line {
    align-items: baseline;
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
}

.office-note-title,
.office-note-date,
.office-event-title,
.office-event-date {
    margin-bottom: 0;
}

.office-note-title,
.office-note-title a,
.office-event-title,
.office-event-title a {
    font-weight: 400 !important;
}

.office-delete-control {
    margin-left: auto;
}

.office-date-input {
    max-width: 11rem;
}

.office-note-body-input {
    font-family: ui-monospace, "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;
}

/* JSMAG */

.jsmag-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    justify-content: center;
}

.jsmag-card {
    overflow: hidden;
    width: fit-content;
}

.jsmag-card a,
.summary-card-image a {
    display: inline-block;
}

.home-jsmag-issue-image,
.jsmag-card-image,
.jsmag-issue-image,
.walk-card-map img {
    display: block;
    max-width: 100%;
    width: auto;
}

.jsmag-card-meta {
    line-height: 1.35;
    margin: 0;
    padding: 0.75rem 0.9rem 0.9rem;
}

.jsmag-card-title {
    color: #1f1f1f;
    font-size: 0.95rem;
    font-weight: 600;
}

.jsmag-card-separator,
.jsmag-card-date {
    color: #6a6a6a;
    font-size: 0.82rem;
}

.jsmag-issue-content > :first-child {
    margin-top: 0;
}

.jsmag-issue-content > :last-child {
    margin-bottom: 0;
}

/* JEUX */

.games-filter {
    margin-bottom: 1.25rem;
}

.games-year-field {
    align-items: center;
    display: flex;
    gap: 0.75rem;
}

.games-year-field .label {
    margin-bottom: 0;
}

.game-bar-list {
    display: grid;
    gap: 0.12rem;
}

.game-bar-row {
    align-items: center;
    display: grid;
    gap: 0.75rem;
    grid-template-columns: minmax(9rem, 34%) minmax(7rem, 1fr) 2.5rem;
}

.game-bar-name {
    overflow-wrap: anywhere;
}

.game-bar-chart {
    appearance: none;
    background: #f2f2f2;
    border: 1px solid #e1e1e1;
    border-radius: 999px;
    display: block;
    height: 0.85rem;
    overflow: hidden;
    width: 100%;
}

.game-bar-chart::-webkit-progress-bar {
    background: #f2f2f2;
}

.game-bar-chart::-webkit-progress-value {
    background: #6f6f6f;
    border-radius: 999px;
}

.game-bar-chart::-moz-progress-bar {
    background: #6f6f6f;
    border-radius: 999px;
}

.game-bar-count {
    color: #6a6a6a;
    font-size: 0.9rem;
    text-align: right;
}

/* MARCHES */

.level.summary-header {
    align-items: flex-start;
    margin-bottom: 0.5rem;
}

.walks-reference-list {
    column-gap: 2rem;
    columns: 2;
}

.walks-stats {
    color: #6b6b6b;
    font-size: 0.82rem;
    margin: 0.75rem 0 1rem;
    max-width: 34rem;
}

.walks-stats .table {
    background: transparent;
}

.walks-stats table th:not([align]),
.walks-stats table td:not([align]) {
    border-color: #eeeeee;
    padding: 0.25rem 0.45rem;
    text-align: center;
    white-space: nowrap;
}

.search-form {
    margin: 1rem 0;
    max-width: 38rem;
}

.search-form .input,
.search-form .button {
    box-shadow: none;
    height: 2.5em;
}

.search-submit {
    background: #f2f2f2;
    border-color: #d8d8d8;
    color: #1f1f1f;
}

.search-submit:hover,
.search-submit:focus {
    background: #e6e6e6;
    border-color: #c9c9c9;
    color: #000;
}

.search-clear {
    background: #fafafa;
    border-color: #dedede;
    color: #6a6a6a;
    padding-left: 0.7rem;
    padding-right: 0.7rem;
}

.search-clear:hover,
.search-clear:focus {
    background: #eeeeee;
    border-color: #cfcfcf;
    color: #2f2f2f;
}

.search-clear-icon {
    height: 1.1rem;
    stroke: currentColor;
    width: 1.1rem;
}

.walk-card-list {
    margin: 1rem 0;
}

.walk-card {
    border-bottom: 1px solid #e6e6e6;
    display: grid;
    gap: 1.5rem;
    grid-template-columns: minmax(0, 1fr) auto;
    padding: 1.25rem 0;
}

.walk-card:first-child {
    padding-top: 0.5rem;
}

.walk-card-text {
    min-width: 0;
}

.walk-card-header {
    margin-bottom: 0.75rem;
}

.walk-card-header .title,
.walk-card-header .subtitle {
    margin-bottom: 0.25rem;
}

.walk-card-comment {
    color: #5f5f5f;
    font-style: italic;
}

.walk-card-spaced-line {
    margin-top: 0.45rem;
}

.walk-score {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
}

.walk-score-icons {
    align-items: center;
    display: inline-flex;
    gap: 0.18rem;
}

.walks-page-icon,
.walk-score-icon,
.search-clear-icon {
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 2;
}

.walk-score-icon {
    height: 1rem;
    stroke: #9a9a9a;
    width: 1rem;
}

.walk-score-icon.is-active {
    stroke: #5f5f5f;
}

.walk-card-map {
    align-items: center;
    align-self: start;
    background: #f5f5f5;
    border: 1px solid #e4e4e4;
    border-radius: 0.75rem;
    display: flex;
    justify-content: center;
    overflow: visible;
    text-align: center;
    width: fit-content;
}

.walks-pagination {
    margin: 1rem 0;
}

.walks-pagination-group {
    align-items: center;
    display: flex;
    gap: 0.5rem;
    justify-content: center;
}

.walks-pagination-form {
    align-items: center;
    display: flex;
    gap: 0.5rem;
}

.walks-page-arrow {
    min-width: 2.5rem;
}

.walks-page-icon {
    height: 1.25rem;
    stroke: currentColor;
    width: 1.25rem;
}

.walks-page-input {
    font-size: 1rem;
    text-align: center;
    width: 4rem;
}

.walks-page-total {
    align-items: center;
    display: inline-flex;
    font-size: 1rem;
    min-height: 2rem;
}

/* Forms */

.login-form {
    max-width: 24rem;
}

.login-layout {
    align-items: center;
    display: flex;
    justify-content: center;
    min-height: calc(100vh - 9.5rem);
}

.login-card {
    margin: 0 auto;
    max-width: 30rem;
    width: 100%;
}

.form-submit {
    min-width: 8rem;
}

.form-message {
    margin: 1rem 0 0.25rem;
}

.site-banner .button.is-ghost {
    color: #fff;
}

.site-banner .button.is-ghost:hover,
.site-banner .button.is-ghost:focus {
    background: #111;
    color: #fff;
}

/* Responsive adjustments */

@media (max-width: 640px) {
    .page-title-header {
        display: block;
    }

    .page-title-actions {
        margin-top: 1rem;
    }

    .site-banner {
        align-items: flex-start;
        flex-direction: column;
        gap: 0.75rem;
        padding: 0.9rem 1rem;
    }

    .banner-start,
    .banner-identity {
        width: 100%;
    }

    .banner-identity {
        justify-content: space-between;
    }

    .banner-start,
    .banner-admin-links,
    .banner-identity,
    .banner-end {
        flex-wrap: nowrap;
    }

    .site-menu {
        left: 1rem;
        right: 1rem;
        top: 5.6rem;
        width: auto;
    }

    .site-main {
        padding: 1.5rem 1rem;
    }

    .battlefield-frame,
    .dungeon-frame,
    .fractal-frame,
    .travels-frame,
    .worlds-frame {
        border-radius: 0.75rem;
        box-shadow: inset 0 0 0 0.225rem rgba(255, 255, 255, 0.15);
        padding: 0.5rem;
    }

    .walks-reference-list {
        columns: 1;
    }

    .search-form .field.has-addons {
        display: flex;
        flex-wrap: wrap;
    }

    .search-form .control.is-expanded {
        flex-basis: 100%;
        width: 100%;
    }

    .search-form .control:not(.is-expanded) {
        margin-top: 0.5rem;
    }

    .search-submit {
        width: 100%;
    }

    .search-clear {
        width: auto;
    }

    .walk-card {
        grid-template-columns: 1fr;
    }

    .game-bar-row {
        gap: 0.35rem;
        grid-template-columns: 1fr 2.5rem;
    }

    .game-bar-chart {
        display: none;
    }

    .jsmag-issue-image {
        margin: 0 auto;
    }
}

@media (max-width: 480px) {
    .site-banner {
        gap: 0.75rem;
    }

    .banner-identity,
    .banner-end {
        gap: 0.75rem;
    }

    .site-title {
        font-size: 1.5rem;
    }

    .site-menu {
        left: 0.75rem;
        min-width: 0;
        right: 0.75rem;
        top: 5.9rem;
    }

    .site-main {
        padding: 1.25rem 0.75rem;
    }

    .login-layout {
        align-items: flex-start;
        min-height: auto;
    }

    .login-card {
        border-radius: 0.5rem;
    }

    .form-submit {
        width: 100%;
    }
}
