@import url("omega-cinematic.css");
:root {
    --bg-dark: rgba(8, 12, 21, 0.86);
    --bg-card: rgba(10, 18, 34, 0.88);
    --bg-soft: rgba(255,255,255,0.04);
    --border: rgba(255,255,255,0.08);
    --border-strong: rgba(255,255,255,0.14);
    --text: #f3f7ff;
    --text-soft: #b9c6da;
    --accent: #4577ff;
    --accent-2: #6fa9ff;
    --success: #5fba78;
    --danger: #d96c6c;
    --shadow: 0 18px 40px rgba(0,0,0,0.35);
    --radius-xl: 24px;
    --radius-lg: 18px;
    --radius-md: 14px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
    font-family: Arial, sans-serif;
    margin: 0;
    min-height: 100vh;
    color: var(--text);
    background: url('../images/background.jpeg') center/cover fixed no-repeat;
}

.page-overlay {
    position: fixed;
    inset: 0;
    background:
        linear-gradient(180deg, rgba(4, 8, 14, 0.62), rgba(6, 10, 18, 0.9)),
        radial-gradient(circle at top right, rgba(69, 119, 255, 0.12), transparent 34%);
    pointer-events: none;
    z-index: 0;
}

.main-header,
#main-content {
    position: relative;
    z-index: 1;
}

.main-header {
    padding: 18px 24px 10px;
}

.banner-wrap {
    display: flex;
    justify-content: center;
    margin-bottom: 14px;
}

.banner-image {
    width: 100%;
    max-width: 1080px;
    border-radius: 18px;
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
}

.top-bar {
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
}

button {
    border: 0;
    cursor: pointer;
    transition: transform .15s ease, opacity .15s ease, background .2s ease;
}

button:hover { transform: translateY(-1px); }
button:disabled {
    opacity: .5;
    cursor: not-allowed;
    transform: none;
}

.top-bar button,
.btn-primary,
.btn-secondary,
.btn-danger,
.mode-tab {
    border-radius: 14px;
    padding: 12px 18px;
    font-weight: 700;
    color: var(--text);
    background: linear-gradient(180deg, rgba(31, 43, 74, 0.98), rgba(17, 25, 44, 0.98));
    border: 1px solid var(--border-strong);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.05);
}

.btn-primary,
.mode-tab.active {
    background: linear-gradient(180deg, rgba(69, 119, 255, 0.98), rgba(42, 79, 192, 0.98));
}

.btn-secondary {
    background: linear-gradient(180deg, rgba(62, 92, 162, 0.95), rgba(34, 51, 93, 0.98));
}

.btn-danger {
    background: linear-gradient(180deg, rgba(192, 74, 74, 0.98), rgba(135, 39, 39, 0.98));
}

.village-layout {
    display: grid;
    grid-template-columns: 250px minmax(0, 1fr) 330px;
    grid-template-areas:
        "summary summary summary"
        "nav main side";
    gap: 18px;
    padding: 0 16px 24px;
    align-items: start;
}

.panel {
    background: linear-gradient(180deg, rgba(4, 10, 22, 0.92), rgba(4, 10, 22, 0.82));
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow);
    backdrop-filter: blur(8px);
}

.village-summary-panel {
    grid-area: summary;
    display: grid;
    grid-template-columns: 280px minmax(0, 1fr) auto;
    gap: 18px;
    padding: 22px;
    align-items: center;
}

.summary-left h1 {
    margin: 4px 0 8px;
    font-size: clamp(2rem, 3vw, 3rem);
}

.village-subtitle {
    color: var(--text-soft);
    font-size: .98rem;
}

.panel-kicker {
    margin: 0;
    color: #7ec4ff;
    text-transform: uppercase;
    letter-spacing: .12em;
    font-size: .82rem;
}

.resource-strip {
    display: grid;
    grid-template-columns: repeat(6, minmax(110px, 1fr));
    gap: 12px;
}

.resource-chip,
.hero-stat-card,
.combat-card,
.stat-card,
.unit-pill,
.report-item,
.construction-box {
    background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.02));
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
}

.resource-chip {
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-height: 74px;
    justify-content: center;
}

.resource-chip span,
.hero-stat-label,
.combat-card-label,
.report-date,
.modal-label,
.subtle-note,
.movement-meta {
    color: var(--text-soft);
}

.resource-chip strong,
.hero-stat-card strong,
.combat-card-value {
    font-size: 1.25rem;
}

.village-nav-panel { grid-area: nav; padding: 22px; position: sticky; top: 16px; }
.village-main-column { grid-area: main; display: grid; gap: 18px; }
.village-right-column { grid-area: side; display: grid; gap: 18px; position: sticky; top: 16px; }

.panel-header,
.village-head,
.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 16px;
}

.panel-header h2,
.village-head h1,
.modal-header h2 {
    margin: 4px 0 0;
}

.village-mode-bar {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.village-mode-bar.vertical {
    flex-direction: column;
    align-items: stretch;
}

.mode-tab { width: 100%; text-align: left; }
.side-links {
    margin-top: 16px;
    display: grid;
    gap: 10px;
}

.quick-link {
    color: var(--text);
    text-decoration: none;
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid var(--border);
    background: rgba(255,255,255,0.03);
}

.quick-link:hover { border-color: var(--accent-2); }

.village-hero-panel { padding: 22px; }
.village-hero-content {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    align-items: center;
    margin-bottom: 18px;
}
.hero-description {
    margin: 10px 0 0;
    color: var(--text-soft);
    max-width: 680px;
    line-height: 1.5;
}
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.hero-stats-grid,
.combat-summary-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 12px;
}
.hero-stat-card,
.combat-card { padding: 16px; }
.combat-card-sub { color: var(--text-soft); margin-top: 8px; line-height: 1.45; }

.info-panel,
#buildings-panel { padding: 22px; }

.stats-grid {
    display: grid;
    gap: 12px;
}

.stat-card,
.unit-pill {
    padding: 14px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.stat-card-left {
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 0;
}

.stat-card-icon {
    width: 34px;
    height: 34px;
    border-radius: 10px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.06);
    flex-shrink: 0;
}

.stat-card-icon img,
.resource-icon {
    width: 18px;
    height: 18px;
    object-fit: contain;
}

.stat-card-label {
    color: var(--text-soft);
    font-size: .95rem;
}

.stat-card-value {
    font-weight: 700;
    text-align: right;
}

.stat-card-sub {
    color: var(--text-soft);
    font-size: .84rem;
    margin-top: 4px;
}

.units-grid { gap: 10px; }
.unit-pill { justify-content: flex-start; }
.unit-label { color: var(--text-soft); }
.unit-value { font-size: 1.05rem; }

.table-wrap {
    overflow-x: auto;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
}

table {
    width: 100%;
    border-collapse: collapse;
}

thead th {
    background: rgba(255,255,255,0.05);
    color: var(--text-soft);
    text-align: left;
    font-weight: 700;
    padding: 14px 16px;
}

tbody td {
    padding: 14px 16px;
    border-top: 1px solid rgba(255,255,255,0.06);
    vertical-align: top;
}

.button-container { min-width: 210px; }
.action-buttons-wrap { display: flex; flex-wrap: wrap; gap: 10px; }
.btn-action-ressources {
    border-radius: 12px;
    padding: 10px 14px;
    color: var(--text);
    background: linear-gradient(180deg, rgba(69, 119, 255, 0.98), rgba(42, 79, 192, 0.98));
    border: 1px solid var(--border-strong);
}

.resource {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-right: 10px;
    white-space: nowrap;
}

.report-item {
    padding: 16px;
    line-height: 1.5;
}
.report-item + .report-item { margin-top: 12px; }
.clickable { cursor: pointer; }
.report-title-row,
.movement-head-row {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: flex-start;
    margin-bottom: 8px;
}
.report-title { font-weight: 700; }
.report-badge {
    background: rgba(69, 119, 255, 0.16);
    color: #cfe0ff;
    border: 1px solid rgba(69, 119, 255, 0.3);
    padding: 5px 10px;
    border-radius: 999px;
    font-size: .82rem;
}

.nav-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    padding: 2px 8px;
    border-radius: 999px;
    margin-left: 8px;
    font-size: .78rem;
    font-weight: 700;
    color: #fff0f0;
    background: linear-gradient(180deg, rgba(210, 71, 71, 0.98), rgba(155, 34, 34, 0.98));
    border: 1px solid rgba(255, 160, 160, 0.35);
}

.nav-pill.nav-pill-green {
    color: #eaffef;
    background: linear-gradient(180deg, rgba(46, 180, 96, 0.98), rgba(22, 117, 55, 0.98));
    border: 1px solid rgba(154, 255, 190, 0.35);
}

.nav-pill.nav-pill-blue {
    color: #e4f4ff;
    background: linear-gradient(180deg, rgba(45, 156, 255, 0.98), rgba(20, 88, 196, 0.98));
    border: 1px solid rgba(150, 215, 255, 0.42);
    box-shadow: 0 0 14px rgba(45, 156, 255, 0.24);
}

.report-item.report-unread {
    border: 1px solid rgba(210, 71, 71, 0.24);
    background: linear-gradient(180deg, rgba(40, 15, 18, 0.92), rgba(18, 12, 18, 0.9));
}
.report-item.report-unread .report-title {
    color: #ffe0e0;
}
.report-status-line {
    margin-top: 8px;
    font-size: .82rem;
    color: rgba(255,255,255,0.72);
}
.report-status-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 3px 10px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.12);
    background: rgba(255,255,255,0.05);
}
.report-status-chip.unread {
    color: #ffd1d1;
    border-color: rgba(210, 71, 71, 0.34);
    background: rgba(160, 35, 35, 0.18);
}

.movement-progress {
    height: 10px;
    background: rgba(255,255,255,0.06);
    border-radius: 999px;
    overflow: hidden;
    margin: 12px 0;
}
.movement-progress span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, rgba(69,119,255,0.95), rgba(111,169,255,0.95));
}
.movement-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}
.status-alert { border-color: rgba(217,108,108,0.3); }

.subtle-note { margin-top: 12px; }
.hidden { display: none !important; }

.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(3,7,15,0.78);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    z-index: 20;
}
.modal-card {
    width: min(520px, 100%);
    background: linear-gradient(180deg, rgba(8, 16, 30, 0.98), rgba(8, 16, 30, 0.95));
    border: 1px solid var(--border);
    border-radius: 22px;
    box-shadow: var(--shadow);
    padding: 22px;
}
.modal-card-large { width: min(900px, 100%); }
.modal-close {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    color: var(--text);
    background: rgba(255,255,255,0.06);
}
.modal-input {
    width: 100%;
    padding: 14px 16px;
    border-radius: 14px;
    border: 1px solid var(--border-strong);
    background: rgba(255,255,255,0.04);
    color: var(--text);
    margin-top: 8px;
}
.modal-error { color: #ffb2b2; margin-top: 10px; }
.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 18px;
}
.report-details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    margin-top: 16px;
}
.report-detail-card {
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 14px;
}

.construction-box { padding: 12px; margin-bottom: 10px; }
.construction-title { font-weight: 700; }
.construction-timer { margin-top: 8px; font-weight: 700; }
.construction-bar {
    margin-top: 10px;
    height: 10px;
    border-radius: 999px;
    background: rgba(255,255,255,0.07);
    overflow: hidden;
}
.construction-progress {
    height: 100%;
    background: linear-gradient(90deg, rgba(95,186,120,0.95), rgba(130,214,151,0.95));
}

@media (max-width: 1240px) {
    .village-layout {
        grid-template-columns: 1fr;
        grid-template-areas:
            "summary"
            "nav"
            "main"
            "side";
    }

    .village-summary-panel,
    .village-hero-content {
        grid-template-columns: 1fr;
        flex-direction: column;
        align-items: flex-start;
    }

    .village-nav-panel,
    .village-right-column {
        position: static;
    }

    .resource-strip,
    .hero-stats-grid,
    .combat-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .village-mode-bar.vertical {
        flex-direction: row;
        flex-wrap: wrap;
    }

    .mode-tab { width: auto; }
}

@media (max-width: 720px) {
    .main-header { padding: 14px 12px 8px; }
    .village-layout { padding: 0 10px 18px; gap: 14px; }
    .panel,
    .modal-card { border-radius: 18px; }
    .village-summary-panel,
    .village-nav-panel,
    .village-hero-panel,
    .info-panel,
    #buildings-panel { padding: 16px; }
    .resource-strip,
    .hero-stats-grid,
    .combat-summary-grid,
    .report-details-grid { grid-template-columns: 1fr; }
    .report-title-row,
    .movement-head-row,
    .modal-actions { flex-direction: column; align-items: stretch; }
    .summary-right { width: 100%; }
    .summary-right button,
    .hero-actions button,
    .movement-actions button,
    .modal-actions button { width: 100%; }
    .top-bar { gap: 8px; }
    .top-bar button { flex: 1 1 calc(33.333% - 8px); min-width: 92px; }
}

.report-detail-wide{grid-column:span 2;}
.btn-small{padding:6px 10px;font-size:12px;min-height:auto;margin-top:8px;}


.nav-helper-card {
    margin-top: 16px;
    padding: 14px;
    border-radius: 16px;
    border: 1px solid var(--border);
    background: rgba(255,255,255,0.03);
}

.nav-helper-title {
    font-weight: 700;
    margin-bottom: 8px;
}

.nav-helper-text {
    color: var(--text-soft);
    line-height: 1.45;
    font-size: .92rem;
}

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

.overview-card {
    padding: 16px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    background: linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.02));
}

.overview-card-label {
    color: var(--text-soft);
    font-size: .9rem;
}

.overview-card-value {
    margin-top: 8px;
    font-size: 1.5rem;
    font-weight: 700;
}

.overview-card-sub {
    margin-top: 8px;
    color: var(--text-soft);
    line-height: 1.45;
    font-size: .88rem;
}

.overview-sections {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 14px;
    margin-top: 16px;
}

.overview-section-card {
    padding: 16px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.02));
}

.overview-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.overview-section-head h3 {
    margin: 0;
    font-size: 1rem;
}

.overview-section-note {
    color: var(--text-soft);
    font-size: .82rem;
}

.mini-stats-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.mini-stat {
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid var(--border);
    background: rgba(255,255,255,0.03);
}

.mini-stat-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.mini-stat-label,
.building-level-name {
    color: var(--text-soft);
    font-size: .9rem;
}

.mini-stat-value,
.building-level-value {
    font-weight: 700;
}

.mini-stat-sub {
    margin-top: 6px;
    font-size: .82rem;
    color: var(--text-soft);
}



.active-bonuses-panel {
    margin-top: 16px;
}

.active-bonuses-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    margin-bottom: 12px;
}

.active-bonuses-head h3,
.active-bonuses-head p {
    margin: 0;
}

.active-bonuses-head span {
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,.12);
    background: rgba(255,255,255,.05);
    color: var(--text-soft);
    font-size: .82rem;
    white-space: nowrap;
}

.active-bonus-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.active-bonus-pill {
    display: inline-flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    min-width: 150px;
    padding: 9px 11px;
    border-radius: 999px;
    border: 1px solid rgba(102,183,255,.20);
    background: linear-gradient(180deg, rgba(42,135,255,.13), rgba(42,135,255,.04));
}

.active-bonus-pill span {
    color: var(--text-soft);
    font-size: .82rem;
}

.active-bonus-pill strong {
    color: var(--text-main);
}

.active-ruins-list {
    display: grid;
    gap: 8px;
    margin-top: 12px;
}

.active-ruin-card {
    padding: 11px 12px;
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,.10);
    background: rgba(255,255,255,.035);
}

.active-ruin-card strong {
    display: block;
    margin-bottom: 4px;
}

.active-ruin-card span,
.active-ruin-card p,
.active-bonus-empty {
    color: var(--text-soft);
    font-size: .84rem;
    line-height: 1.35;
}

.active-ruin-card p {
    margin: 8px 0 0;
}

.building-levels-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.building-level-pill {
    padding: 12px 14px;
    border-radius: 14px;
    border: 1px solid var(--border);
    background: rgba(255,255,255,0.03);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.mode-tab {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

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

@media (max-width: 720px) {
    .overview-grid,
    .overview-sections,
    .mini-stats-grid,
    .building-levels-grid {
        grid-template-columns: 1fr;
    }
}


.hero-command-grid {
    display: grid;
    grid-template-columns: 1.3fr repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin-bottom: 12px;
}

.hero-command-card {
    padding: 16px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    background: linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.025));
}

.hero-command-card-main {
    background: linear-gradient(180deg, rgba(69,119,255,0.18), rgba(255,255,255,0.03));
    border-color: rgba(111,169,255,0.34);
}

.hero-command-label {
    display: block;
    color: var(--text-soft);
    font-size: .88rem;
}

.hero-command-card strong {
    display: block;
    margin-top: 8px;
    font-size: 1.5rem;
}

.hero-command-sub {
    margin: 8px 0 0;
    color: var(--text-soft);
    line-height: 1.4;
    font-size: .88rem;
}

.nav-status-list {
    display: grid;
    gap: 10px;
}

.nav-status-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 12px;
    border-radius: 12px;
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.05);
}

.nav-status-row span {
    color: var(--text-soft);
    font-size: .92rem;
}

.nav-status-row strong {
    font-size: 1rem;
}

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

.overview-priority-card {
    padding: 16px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.02));
}

@media (max-width: 1240px) {
    .hero-command-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 720px) {
    .hero-command-grid,
    .overview-priority-grid {
        grid-template-columns: 1fr;
    }
}


.resource-strip-detailed {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 12px;
}
.top-resource-card,
.top-meta-card {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 16px;
    padding: 12px 14px;
    min-height: 92px;
}
.top-resource-head,
.top-meta-label {
    display: block;
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    opacity: 0.72;
    margin-bottom: 6px;
}
.top-resource-main,
.top-meta-card strong {
    display: block;
    font-size: 1.15rem;
    font-weight: 700;
    margin-bottom: 6px;
}
.top-resource-sub,
.top-meta-card small {
    display: block;
    font-size: 0.84rem;
    opacity: 0.82;
    line-height: 1.35;
}
.resource-rich-card {
    display: grid;
    grid-template-columns: auto 1fr;
    gap: 12px;
    align-items: center;
}
.resource-rich-icon img {
    width: 38px;
    height: 38px;
    object-fit: contain;
}
.resource-rich-title { font-size: 0.95rem; font-weight: 700; margin-bottom: 4px; }
.resource-rich-value { font-size: 1.15rem; font-weight: 800; margin-bottom: 4px; }
.resource-rich-lines { display: flex; flex-direction: column; gap: 2px; font-size: 0.83rem; opacity: 0.86; }
.live-dot { display:inline-block; width:8px; height:8px; border-radius:999px; background:#67d56b; margin-right:6px; vertical-align:middle; }
@media (max-width: 1200px) { .resource-strip-detailed { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 720px) { .resource-strip-detailed { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* Tutoriel */
.tutorial-summary-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 14px;
    padding: 18px;
    border: 1px solid rgba(92, 130, 255, 0.22);
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(19, 31, 67, 0.82), rgba(10, 18, 40, 0.86));
}

.tutorial-head {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: center;
}

.tutorial-sub,
.tutorial-reward-line,
.tutorial-quest-desc,
.tutorial-quest-reward {
    color: rgba(228, 236, 255, 0.82);
    font-size: 0.94rem;
}

.tutorial-reward-line,
.tutorial-quest-reward {
    margin-top: 6px;
    font-weight: 600;
}

.tutorial-progress-pill,
.tutorial-status-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 74px;
    padding: 6px 12px;
    border-radius: 999px;
    border: 1px solid rgba(120, 149, 255, 0.28);
    background: rgba(35, 55, 116, 0.55);
    color: #eef3ff;
    font-weight: 700;
    font-size: 0.82rem;
}

.tutorial-claim-wrap {
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: flex-end;
}

.tutorial-quests-list {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
}

.tutorial-quest-card {
    padding: 14px;
    border-radius: 16px;
    border: 1px solid rgba(120, 149, 255, 0.14);
    background: rgba(9, 17, 38, 0.72);
}

.tutorial-quest-top {
    display: flex;
    justify-content: space-between;
    gap: 12px;
    align-items: center;
    margin-bottom: 10px;
}

.tutorial-status-claimed,
.tutorial-status-done {
    border-color: rgba(76, 199, 119, 0.28);
}

.tutorial-status-completed,
.tutorial-status-active {
    border-color: rgba(92, 130, 255, 0.3);
}

.tutorial-status-locked {
    opacity: 0.72;
}


.tutorial-head-finished {
    align-items: flex-start;
}

.tutorial-dismiss-btn {
    white-space: nowrap;
}

#tutorial-panel.hidden {
    display: none !important;
}

@media (max-width: 900px) {
    .tutorial-head,
    .tutorial-quest-top {
        flex-direction: column;
        align-items: flex-start;
    }

    .tutorial-claim-wrap {
        width: 100%;
        align-items: stretch;
    }
}


.reports-toolbar,
.reports-pagination {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 14px;
}

.reports-pagination {
    margin-top: 14px;
    margin-bottom: 0;
    padding-top: 4px;
}

.reports-toolbar-actions,
.reports-pagination-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.reports-pagination-info {
    color: rgba(255,255,255,0.72);
    font-size: .92rem;
}

.btn-danger-soft {
    background: rgba(160, 35, 35, 0.18);
    border: 1px solid rgba(210, 71, 71, 0.34);
    color: #ffd1d1;
}

.btn-secondary[disabled] {
    opacity: 0.45;
    cursor: not-allowed;
}


.building-info-block {
    margin-top: 8px;
    padding: 8px 10px;
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
    font-size: 0.9rem;
    line-height: 1.45;
}

.building-info-line + .building-info-line {
    margin-top: 4px;
}

.building-bonus-hint {
    display: inline-block;
    margin-top: 6px;
    color: #f5d479;
    font-size: 0.9rem;
    line-height: 1.4;
}


.button-container .btn-primary,
.button-container .btn-secondary,
.button-container .btn-action-ressources {
    min-height: 46px;
}

.construction-next-queue {
    margin-top: 8px;
    color: #9dc2ff;
    font-size: 0.92rem;
    font-weight: 600;
}

.building-detail-dialog {
    max-width: 860px;
}

.building-detail-body {
    display: grid;
    gap: 16px;
}

.building-detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
}

.building-detail-card {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 14px;
    padding: 14px;
}

.building-detail-card strong {
    display: block;
    margin-bottom: 6px;
}

.building-detail-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.btn-tertiary {
    border: 1px solid rgba(255,255,255,0.14);
    background: rgba(255,255,255,0.05);
    color: #fff;
    border-radius: 10px;
    padding: 8px 12px;
    cursor: pointer;
}

.population-need-ok {
    color: #8ff0a4;
    font-weight: 700;
}

.population-need-ko {
    color: #ff8f8f;
    font-weight: 800;
    text-shadow: 0 0 10px rgba(255, 80, 80, 0.35);
}

/* Refonte premium des rapports de combat */
.modal-card-large {
    width: min(1180px, calc(100vw - 34px));
}

.report-modal-content {
    display: block;
}

.battle-report {
    position: relative;
    overflow: hidden;
    border-radius: 26px;
    border: 1px solid rgba(255,255,255,0.12);
    background:
        radial-gradient(circle at 18% 8%, rgba(255, 214, 122, 0.18), transparent 28%),
        radial-gradient(circle at 82% 14%, rgba(100, 146, 255, 0.15), transparent 30%),
        linear-gradient(180deg, rgba(12, 18, 34, 0.96), rgba(8, 11, 22, 0.98));
    box-shadow: 0 26px 70px rgba(0, 0, 0, 0.36);
}

.battle-report::before {
    content: none;
}

.battle-report-hero,
.battle-route-grid,
.battle-stats-strip,
.battle-armies-grid,
.battle-loot-section {
    position: relative;
    z-index: 1;
}

.battle-report-hero {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 22px;
    align-items: center;
    min-height: 210px;
    padding: 30px;
    border-bottom: 1px solid rgba(255,255,255,0.10);
    background:
        linear-gradient(90deg, rgba(5, 9, 18, 0.88), rgba(5, 9, 18, 0.52)),
        url('../images/background.jpeg') center / cover no-repeat;
}

.battle-kicker {
    margin: 0 0 8px;
    color: #f6cf75;
    text-transform: uppercase;
    letter-spacing: .14em;
    font-size: .78rem;
    font-weight: 900;
}

.battle-report-hero h3 {
    margin: 0 0 12px;
    font-size: clamp(1.55rem, 3vw, 2.55rem);
    line-height: 1.05;
    color: #fff7d7;
    text-shadow: 0 0 22px rgba(255, 211, 107, 0.22);
}

.battle-report-hero p:not(.battle-kicker) {
    max-width: 760px;
    margin: 0;
    color: rgba(255,255,255,0.82);
    font-size: 1rem;
    line-height: 1.55;
}

.battle-result-medal {
    width: 138px;
    min-height: 138px;
    display: grid;
    place-items: center;
    text-align: center;
    gap: 8px;
    padding: 16px;
    border-radius: 28px;
    border: 1px solid rgba(255,255,255,0.14);
    background: rgba(0,0,0,0.38);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.08), 0 18px 40px rgba(0,0,0,0.28);
}

.battle-result-medal span {
    font-size: 2.6rem;
    line-height: 1;
}

.battle-result-medal strong {
    color: #fff;
    font-size: 1.05rem;
    text-transform: uppercase;
    letter-spacing: .08em;
}

.battle-result-medal.victory {
    border-color: rgba(102, 255, 178, 0.32);
    box-shadow: 0 0 34px rgba(75, 255, 170, 0.14), inset 0 1px 0 rgba(255,255,255,0.08);
}

.battle-result-medal.defeat {
    border-color: rgba(255, 94, 94, 0.32);
    box-shadow: 0 0 34px rgba(255, 75, 75, 0.14), inset 0 1px 0 rgba(255,255,255,0.08);
}

.battle-route-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    padding: 18px 22px 0;
}

.battle-location-card {
    display: grid;
    gap: 8px;
    padding: 16px;
    border-radius: 18px;
    border: 1px solid rgba(255,255,255,0.11);
    background: rgba(255,255,255,0.055);
}

.battle-location-card span,
.battle-location-card small {
    color: rgba(255,255,255,0.64);
}

.battle-location-card > span {
    text-transform: uppercase;
    letter-spacing: .10em;
    font-size: .72rem;
    font-weight: 900;
}

.battle-location-card strong {
    color: #fff7d7;
    font-size: 1.08rem;
}

.battle-location-card button {
    width: fit-content;
    margin-top: 4px;
}

.battle-stats-strip {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 10px;
    padding: 16px 22px 0;
}

.battle-stats-strip > div {
    padding: 13px 14px;
    border-radius: 16px;
    border: 1px solid rgba(255,255,255,0.10);
    background: rgba(0,0,0,0.22);
}

.battle-stats-strip span {
    display: block;
    color: rgba(255,255,255,0.58);
    font-size: .78rem;
    margin-bottom: 4px;
}

.battle-stats-strip strong {
    color: #f6cf75;
    font-size: 1.05rem;
}

.battle-armies-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
    padding: 18px 22px 0;
}

.battle-army-card {
    overflow: hidden;
    border-radius: 20px;
    border: 1px solid rgba(255,255,255,0.12);
    background: rgba(0,0,0,0.28);
}

.battle-army-card.attacker {
    border-color: rgba(246, 207, 117, 0.26);
}

.battle-army-card.defender {
    border-color: rgba(108, 158, 255, 0.26);
}

.battle-army-title {
    padding: 14px 16px;
    color: #fff7d7;
    font-weight: 900;
    border-bottom: 1px solid rgba(255,255,255,0.10);
    background: rgba(255,255,255,0.055);
}

.battle-army-detail-line {
    padding: 10px 16px 0;
    color: rgba(255,255,255,0.62);
    font-size: .82rem;
    line-height: 1.45;
}

.battle-army-rows {
    display: grid;
    gap: 12px;
    padding: 14px 16px 16px;
}

.battle-army-stat-row {
    display: grid;
    gap: 10px;
}

.battle-army-stat-label {
    color: #fff7d7;
    font-weight: 800;
    font-size: .96rem;
}

.battle-army-chip-list {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.battle-army-chip {
    min-width: 96px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 12px;
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,0.10);
    background: rgba(255,255,255,0.04);
}

.battle-army-chip.is-total {
    border-color: rgba(246, 207, 117, 0.22);
    background: rgba(246, 207, 117, 0.10);
}

.battle-army-chip-icon {
    font-size: 1rem;
    line-height: 1;
}

.battle-army-chip-value {
    color: #ffffff;
    font-weight: 900;
    font-size: 1rem;
}

.battle-army-chip-label {
    color: rgba(255,255,255,0.62);
    font-size: .74rem;
    margin-left: auto;
}

.battle-army-chip-list.tone-loss .battle-army-chip {
    border-color: rgba(255, 112, 112, 0.14);
    background: rgba(255, 94, 94, 0.08);
}

.battle-army-chip-list.tone-loss .battle-army-chip-value {
    color: #ffb2b2;
}

.battle-army-chip-list.tone-survivor .battle-army-chip {
    border-color: rgba(90, 255, 160, 0.16);
    background: rgba(75, 255, 170, 0.08);
}

.battle-army-chip-list.tone-survivor .battle-army-chip-value {
    color: #b7ffd7;
}

.battle-unit-table {
    width: 100%;
    border-collapse: collapse;
}

.battle-unit-table th,
.battle-unit-table td {
    padding: 12px 10px;
    text-align: center;
    border-bottom: 1px solid rgba(255,255,255,0.075);
    color: rgba(255,255,255,0.82);
}

.battle-unit-table th:first-child {
    text-align: left;
    color: rgba(255,255,255,0.68);
    font-weight: 800;
}

.battle-unit-table thead th {
    color: #f6cf75;
    background: rgba(0,0,0,0.20);
    font-size: .95rem;
}

.battle-unit-table tr:last-child th,
.battle-unit-table tr:last-child td {
    border-bottom: 0;
}

.battle-unit-table .loss-row td {
    color: #ffb2b2;
}

.battle-unit-table .survivor-row td {
    color: #b7ffd7;
    font-weight: 900;
}

.battle-loot-section {
    margin: 18px 22px 22px;
    padding: 18px;
    border-radius: 22px;
    border: 1px solid rgba(246, 207, 117, 0.18);
    background: rgba(9, 14, 28, 0.92);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
}

.battle-section-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 14px;
}

.battle-section-head strong {
    color: #fff7d7;
    font-size: 1.08rem;
}

.battle-section-head span {
    color: rgba(255,255,255,0.70);
    font-size: .92rem;
}

.battle-loot-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(110px, 1fr));
    gap: 10px;
}

.battle-loot-pill {
    display: grid;
    place-items: center;
    gap: 4px;
    padding: 13px 10px;
    border-radius: 16px;
    border: 1px solid rgba(255,255,255,0.10);
    background: rgba(0,0,0,0.22);
    opacity: .72;
}

.battle-loot-pill.has-loot {
    opacity: 1;
    border-color: rgba(246, 207, 117, 0.28);
    background: rgba(246, 207, 117, 0.10);
}

.battle-loot-pill span {
    font-size: 1.5rem;
}

.battle-loot-pill strong {
    color: #fff;
    font-size: 1.08rem;
}

.battle-loot-pill small {
    color: rgba(255,255,255,0.62);
}

@media (max-width: 860px) {
    .battle-report-hero,
    .battle-route-grid,
    .battle-armies-grid {
        grid-template-columns: 1fr;
    }

    .battle-report-hero {
        padding: 22px;
    }

    .battle-result-medal {
        width: 100%;
        min-height: auto;
        display: flex;
        justify-content: center;
    }

    .battle-route-grid,
    .battle-stats-strip,
    .battle-armies-grid {
        padding-left: 14px;
        padding-right: 14px;
    }

    .battle-loot-section {
        margin-left: 14px;
        margin-right: 14px;
    }

    .battle-army-chip {
        min-width: calc(50% - 8px);
        flex: 1 1 calc(50% - 8px);
    }

    .battle-army-chip-label {
        margin-left: 0;
    }

    .battle-unit-table th,
    .battle-unit-table td {
        padding: 10px 7px;
        font-size: .9rem;
    }
}


/* Rapport stratégique compact V5 - même forme, style visuel du jeu */
.battle-report.classic-report {
    overflow: hidden;
    border-radius: 22px;
    border: 1px solid var(--border-strong);
    background:
        radial-gradient(circle at 18% 8%, rgba(69, 119, 255, 0.13), transparent 26%),
        radial-gradient(circle at 86% 12%, rgba(246, 207, 117, 0.10), transparent 28%),
        linear-gradient(180deg, rgba(10, 18, 34, 0.98), rgba(6, 10, 20, 0.99));
    color: var(--text);
    box-shadow: var(--shadow), 0 0 0 1px rgba(255,255,255,0.03) inset;
}

.battle-report.classic-report::before { content: none; }

.classic-report-topline {
    padding: 10px 14px 7px;
    background: linear-gradient(180deg, rgba(15, 27, 51, 0.96), rgba(8, 14, 28, 0.96));
    color: var(--text-soft);
    font-size: .78rem;
    line-height: 1.35;
    border-bottom: 1px solid var(--border);
}

.classic-report-paper {
    padding: 12px;
    background:
        linear-gradient(180deg, rgba(255,255,255,0.035), rgba(255,255,255,0)),
        rgba(6, 10, 20, 0.38);
}

.classic-title-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 16px 16px 8px 8px;
    background: linear-gradient(180deg, rgba(31, 43, 74, 0.98), rgba(17, 25, 44, 0.98));
    border: 1px solid var(--border-strong);
    color: #fff7d7;
    font-weight: 900;
    font-size: 1rem;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.05);
}

.classic-title-bar > span {
    color: #f6cf75;
    text-transform: uppercase;
    letter-spacing: .10em;
    font-size: .72rem;
}

.classic-visual-block {
    display: grid;
    grid-template-columns: minmax(280px, 1fr) 190px;
    gap: 10px;
    margin: 10px 0;
}

.classic-visual-image {
    min-height: 155px;
    border-radius: 16px;
    border: 1px solid var(--border);
    background:
        linear-gradient(90deg, rgba(5, 9, 18, 0.88), rgba(5, 9, 18, 0.45)),
        url('../images/background.jpeg') center / cover no-repeat;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.06), 0 16px 32px rgba(0,0,0,0.18);
}

.classic-visual-side {
    display: grid;
    grid-template-rows: auto 1fr;
    gap: 10px;
}

.classic-result-badge {
    display: grid;
    place-items: center;
    gap: 4px;
    min-height: 76px;
    border-radius: 16px;
    border: 1px solid var(--border-strong);
    background: rgba(255,255,255,0.045);
    text-align: center;
    color: var(--text);
}

.classic-result-badge.victory {
    border-color: rgba(95, 186, 120, 0.36);
    box-shadow: 0 0 30px rgba(95, 186, 120, 0.10) inset;
}

.classic-result-badge.defeat {
    border-color: rgba(217, 108, 108, 0.36);
    box-shadow: 0 0 30px rgba(217, 108, 108, 0.10) inset;
}

.classic-result-badge span { font-size: 1.9rem; }
.classic-result-badge strong { text-transform: uppercase; letter-spacing: .06em; color: #fff; }

.classic-chance-box {
    padding: 10px;
    border-radius: 16px;
    border: 1px solid var(--border);
    background: rgba(255,255,255,0.04);
    color: var(--text-soft);
    font-size: .82rem;
}

.classic-chance-row {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
}

.classic-chance-track {
    height: 12px;
    overflow: hidden;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,0.12);
    background: rgba(0,0,0,0.25);
}

.classic-chance-track i {
    display: block;
    height: 100%;
    background: linear-gradient(90deg, var(--success), #92e8a8);
    box-shadow: 0 0 16px rgba(95,186,120,0.35);
}

.classic-report-summary {
    margin: 8px 0;
    padding: 10px 12px;
    border-radius: 14px;
    border: 1px solid var(--border);
    background: rgba(255,255,255,0.035);
    color: var(--text);
    line-height: 1.35;
}

.classic-stats-strip {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(122px, 1fr));
    gap: 8px;
    margin: 9px 0;
}

.classic-stat-pill {
    padding: 8px 10px;
    border-radius: 14px;
    border: 1px solid var(--border);
    background: rgba(0,0,0,0.22);
}

.classic-stat-pill span {
    display: block;
    color: var(--text-soft);
    font-size: .74rem;
}

.classic-stat-pill strong {
    display: block;
    margin-top: 2px;
    color: #f6cf75;
    font-weight: 900;
}

.classic-combatant-block {
    margin-top: 10px;
    border-radius: 16px;
    border: 1px solid var(--border);
    background: rgba(255,255,255,0.035);
    overflow: hidden;
}

.classic-combatant-head,
.classic-combatant-sub {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    padding: 8px 10px;
}

.classic-combatant-head {
    background: linear-gradient(180deg, rgba(31, 43, 74, 0.98), rgba(17, 25, 44, 0.98));
    border-bottom: 1px solid var(--border);
}

.classic-combatant-head strong { color: #fff7d7; }
.classic-combatant-sub { color: var(--text-soft); font-size: .82rem; }

.classic-combatant-block .btn-small {
    margin: 0 0 0 6px;
    padding: 5px 9px;
    border-radius: 10px;
    font-size: .72rem;
}

.classic-army-section {
    margin-top: 9px;
    border-radius: 16px;
    border: 1px solid var(--border);
    background: rgba(0,0,0,0.20);
    overflow: hidden;
}

.classic-army-section.secondary { margin-top: 12px; }
.classic-army-section.inline { margin-top: 4px; border: 0; background: transparent; }

.classic-section-title {
    padding: 8px 10px;
    color: #fff7d7;
    font-weight: 900;
    font-style: italic;
    background: linear-gradient(180deg, rgba(31, 43, 74, 0.98), rgba(17, 25, 44, 0.98));
    border-bottom: 1px solid var(--border);
}

.classic-unit-table-wrap { overflow-x: auto; }

.classic-unit-table {
    width: 100%;
    min-width: 520px;
    border-collapse: collapse;
    table-layout: fixed;
}

.classic-unit-table th,
.classic-unit-table td {
    padding: 7px 6px;
    border-right: 1px solid rgba(255,255,255,0.055);
    border-bottom: 1px solid rgba(255,255,255,0.055);
    text-align: center;
    color: var(--text);
}

.classic-unit-table th:first-child {
    width: 104px;
    text-align: left;
    color: var(--text-soft);
    font-weight: 900;
}

.classic-unit-table thead th { background: rgba(255,255,255,0.035); }

.classic-unit-head-icon {
    display: block;
    font-size: 1.05rem;
    line-height: 1.1;
}

.classic-unit-table thead small {
    display: block;
    margin-top: 1px;
    font-size: .62rem;
    color: var(--text-soft);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.classic-unit-cell {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 5px;
    white-space: nowrap;
}

.classic-unit-icon { font-size: .95rem; }
.classic-unit-cell strong { font-weight: 900; color: #fff; }
.classic-unit-table .loss-row .classic-unit-cell strong { color: #ffb2b2; }
.classic-unit-table .survivor-row .classic-unit-cell strong { color: #b7ffd7; }

.classic-empty-line {
    padding: 9px 10px;
    color: var(--text-soft);
    font-size: .84rem;
}

.classic-other-village-row {
    padding: 8px 10px 10px;
    border-top: 1px solid rgba(255,255,255,0.065);
}

.classic-other-village-row:first-of-type { border-top: 0; }
.classic-other-village-name { margin-bottom: 4px; color: #fff7d7; font-weight: 900; }

.classic-loot-section {
    margin-top: 12px;
    border-radius: 16px;
    border: 1px solid rgba(246, 207, 117, 0.18);
    background: rgba(0,0,0,0.20);
    overflow: hidden;
}

.classic-loot-line {
    padding: 8px 10px;
    color: var(--text-soft);
    font-size: .82rem;
}

.classic-report .battle-loot-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(105px, 1fr));
    gap: 8px;
    padding: 8px;
}

.classic-report .battle-loot-pill {
    min-height: auto;
    padding: 8px 7px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: rgba(255,255,255,0.035);
    color: var(--text);
    opacity: 1;
}

.classic-report .battle-loot-pill.has-loot {
    background: rgba(246, 207, 117, 0.095);
    border-color: rgba(246, 207, 117, 0.24);
}

.classic-report .battle-loot-pill span { font-size: 1.1rem; }
.classic-report .battle-loot-pill strong { color: #fff; }
.classic-report .battle-loot-pill small { color: var(--text-soft); }

@media (max-width: 860px) {
    .classic-visual-block { grid-template-columns: 1fr; }
    .classic-visual-image { min-height: 120px; }
    .classic-report-topline,
    .classic-report-paper { font-size: .88rem; }
}



/* Correction taille modal rapport V6 */
#report-modal.modal-overlay {
    align-items: flex-start;
    justify-content: center;
    padding: 18px;
    overflow-y: auto;
}

#report-modal .modal-card-large {
    width: min(1520px, calc(100vw - 36px));
    max-height: calc(100vh - 36px);
    display: flex;
    flex-direction: column;
    padding: 16px;
    overflow: hidden;
}

#report-modal .modal-header {
    flex: 0 0 auto;
    margin-bottom: 10px;
}

#report-modal .modal-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding-right: 6px;
}

#report-modal .modal-body::-webkit-scrollbar {
    width: 9px;
}

#report-modal .modal-body::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: rgba(111, 169, 255, 0.38);
}

#report-modal .modal-actions {
    flex: 0 0 auto;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(255,255,255,0.08);
    background: linear-gradient(180deg, rgba(8, 16, 30, 0), rgba(8, 16, 30, 0.96) 25%, rgba(8, 16, 30, 0.98));
}

#report-modal .classic-visual-block {
    grid-template-columns: minmax(320px, 1fr) 220px;
}

#report-modal .classic-visual-image {
    min-height: 125px;
}

#report-modal .classic-report-paper {
    padding: 10px;
}

@media (min-width: 1500px) {
    #report-modal .modal-card-large {
        width: min(1680px, calc(100vw - 48px));
    }

    #report-modal .classic-unit-table {
        min-width: 640px;
    }
}

@media (max-width: 900px) {
    #report-modal.modal-overlay {
        padding: 10px;
    }

    #report-modal .modal-card-large {
        width: calc(100vw - 20px);
        max-height: calc(100vh - 20px);
        padding: 12px;
    }

    #report-modal .classic-visual-block {
        grid-template-columns: 1fr;
    }
}

#report-modal .report-share-btn {
    border-color: rgba(70, 145, 255, 0.36);
    background: linear-gradient(180deg, rgba(41, 107, 216, 0.28), rgba(18, 39, 86, 0.42));
    color: #eaf3ff;
}

#report-modal .report-share-btn:hover {
    border-color: rgba(95, 170, 255, 0.58);
    box-shadow: 0 0 18px rgba(52, 128, 255, 0.20);
}


#report-modal .modal-actions {
    flex-wrap: wrap;
    gap: 8px;
}

#report-modal .report-share-btn {
    white-space: nowrap;
}

@media (max-width: 720px) {
    #report-modal .modal-actions .report-share-btn,
    #report-modal .modal-actions button {
        width: 100%;
    }
}

/* Soutiens militaires */
.combat-card-wide {
    grid-column: span 2;
}

.support-list {
    display: grid;
    gap: 8px;
    margin-top: 12px;
}

.support-line {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 14px;
    background: rgba(0,0,0,0.18);
}

.support-line strong,
.support-line span {
    display: block;
}

.support-line span,
.support-empty {
    color: var(--text-soft);
    font-size: .88rem;
    margin-top: 3px;
}

@media (max-width: 900px) {
    .combat-card-wide {
        grid-column: span 1;
    }

    .support-line {
        align-items: stretch;
        flex-direction: column;
    }
}

/* Marché : mouvements commerciaux en bleu dans le panel combat */
.movement-commerce {
    border-color: rgba(64, 169, 255, .45) !important;
    background: linear-gradient(135deg, rgba(17, 76, 132, .34), rgba(7, 17, 32, .78)) !important;
    box-shadow: inset 0 0 26px rgba(64, 169, 255, .08), 0 0 22px rgba(64, 169, 255, .08);
}
.movement-commerce .report-title { color: #9ed9ff; }
.movement-commerce .movement-progress span { background: linear-gradient(90deg, #3aa8ff, #8ddcff) !important; }

/* =========================================================
   PATCH HUD UNIFORME - SWITCH VILLAGE INTÉGRÉ AU BANDEAU HAUT
   ========================================================= */
.village-summary-panel {
    grid-template-columns: minmax(320px, 380px) minmax(0, 1fr) auto;
}

.summary-left {
    min-width: 0;
}

.summary-title-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 4px 0 8px;
}

.summary-title-row h1 {
    margin: 0;
    line-height: 1.02;
}

.mv-icon-btn {
    width: 44px;
    height: 44px;
    flex: 0 0 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    border: 1px solid rgba(88, 154, 255, 0.34);
    background: linear-gradient(180deg, rgba(23, 57, 120, 0.96), rgba(12, 26, 59, 0.98));
    color: #eef7ff;
    font-size: 1.9rem;
    line-height: 1;
    cursor: pointer;
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.22), inset 0 1px 0 rgba(255,255,255,0.08);
    transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease;
}

.mv-icon-btn:hover {
    transform: translateY(-1px);
    border-color: rgba(126, 196, 255, 0.62);
    box-shadow: 0 12px 26px rgba(0,0,0,0.28), 0 0 18px rgba(67, 138, 255, 0.18);
}

.mv-icon-btn:active {
    transform: translateY(0);
}

.village-subtitle,
.village-switch-meta {
    color: var(--text-soft);
}

.village-switch-meta {
    margin-top: 6px;
    font-size: .9rem;
}

.summary-right {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    align-self: stretch;
    padding-top: 22px;
}

.summary-action-group {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.summary-action-group .btn-secondary,
.summary-action-group .btn-primary,
.summary-action-group .mv-list-btn {
    min-width: 138px;
}

@media (max-width: 1120px) {
    .village-summary-panel {
        grid-template-columns: 1fr;
    }

    .summary-right {
        justify-content: flex-start;
        padding-top: 8px;
    }
}

@media (max-width: 720px) {
    .summary-title-row {
        gap: 10px;
    }

    .summary-title-row h1 {
        font-size: clamp(1.8rem, 8vw, 2.6rem);
    }

    .mv-icon-btn {
        width: 40px;
        height: 40px;
        flex-basis: 40px;
        font-size: 1.7rem;
    }

    .summary-action-group {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
    }

    .summary-action-group .btn-secondary,
    .summary-action-group .btn-primary,
    .summary-action-group .mv-list-btn {
        width: 100%;
        min-width: 0;
    }
}

@media (min-width: 1121px) {
    .summary-action-group {
        margin-top: 10px;
    }
}

/* =========================================================
   PATCH HUD UNIFORME V2 - ACTIONS VILLAGE DANS NAVIGATION
   ========================================================= */
.summary-right-empty {
    display: none !important;
}

.nav-village-actions-card {
    margin-top: 16px;
}

.nav-village-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}

.nav-village-actions button {
    width: 100%;
    min-height: 42px;
    justify-content: center;
}

.nav-my-villages-btn {
    background: linear-gradient(180deg, rgba(55, 120, 220, 0.98), rgba(24, 72, 150, 0.98));
    border-color: rgba(110, 185, 255, 0.38);
}

.village-summary-panel {
    grid-template-columns: minmax(320px, 380px) minmax(0, 1fr);
}

@media (max-width: 1120px) {
    .village-summary-panel {
        grid-template-columns: 1fr;
    }
}

/* Patch Bibiflox — file de production bâtiment propre */
.construction-queue-window {
    margin: 0 0 18px;
}

.construction-queue-window.hidden {
    display: none !important;
}

.construction-queue-panel {
    margin: 0;
    padding: 18px;
    border: 1px solid rgba(83, 166, 255, 0.24);
    border-radius: 22px;
    background:
        radial-gradient(circle at 12% 0%, rgba(73, 166, 255, 0.16), transparent 34%),
        linear-gradient(180deg, rgba(8, 18, 36, 0.94), rgba(4, 10, 22, 0.96));
    box-shadow: 0 18px 38px rgba(0, 0, 0, 0.28), inset 0 1px 0 rgba(255,255,255,0.04);
}

.construction-queue-empty {
    border-style: dashed;
    background:
        radial-gradient(circle at 12% 0%, rgba(73, 166, 255, 0.10), transparent 34%),
        linear-gradient(180deg, rgba(8, 18, 36, 0.72), rgba(4, 10, 22, 0.86));
}

.construction-queue-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 14px;
}

.construction-queue-head h3 {
    margin: 2px 0 6px;
    font-size: 1.25rem;
    color: #f4f9ff;
}

.construction-queue-note {
    margin: 0;
    color: #9fb7d6;
    line-height: 1.45;
}

.construction-queue-badge {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: center;
    min-height: 34px;
    padding: 0 13px;
    border-radius: 999px;
    border: 1px solid rgba(240, 195, 106, 0.36);
    background: linear-gradient(180deg, rgba(240,195,106,0.16), rgba(240,195,106,0.04));
    color: #ffe5ad;
    font-weight: 800;
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.construction-queue-list {
    display: grid;
    gap: 10px;
}

.construction-queue-item {
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr) auto;
    gap: 13px;
    align-items: center;
    padding: 13px;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(255,255,255,0.045), rgba(255,255,255,0.018));
}

.construction-queue-item.is-active {
    border-color: rgba(95, 186, 120, 0.42);
    box-shadow: 0 0 24px rgba(95, 186, 120, 0.08);
}

.construction-queue-rank {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    border-radius: 15px;
    background: rgba(255,255,255,0.055);
    border: 1px solid rgba(255,255,255,0.08);
    color: #dfeeff;
    font-weight: 900;
}

.construction-queue-row,
.construction-queue-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.construction-queue-row strong {
    display: block;
    color: #fff;
    font-size: 1rem;
}

.construction-queue-row span,
.construction-queue-meta {
    color: #9fb7d6;
    font-size: 0.9rem;
}

.construction-queue-row em {
    flex: 0 0 auto;
    font-style: normal;
    color: #ffe5ad;
    font-weight: 800;
    font-size: 0.82rem;
}

.construction-queue-bar {
    margin-top: 9px;
}

.construction-queue-item.is-waiting .construction-progress {
    width: 0 !important;
    background: linear-gradient(90deg, rgba(126,196,255,0.65), rgba(240,195,106,0.55));
}

.construction-queue-cancel {
    min-height: 40px;
    white-space: nowrap;
}

@media (max-width: 760px) {
    .construction-queue-head,
    .construction-queue-row,
    .construction-queue-meta {
        align-items: flex-start;
        flex-direction: column;
    }

    .construction-queue-item {
        grid-template-columns: 42px minmax(0, 1fr);
    }

    .construction-queue-cancel {
        grid-column: 1 / -1;
        width: 100%;
    }
}

/* =========================================================
   PATCH CLEAN BASE - 20260609
   Objectif : garder la base fonctionnelle, améliorer seulement le rendu.
   ========================================================= */

.main-header,
.village-layout {
    max-width: 1360px;
    margin-left: auto;
    margin-right: auto;
}

.village-layout {
    grid-template-columns: 250px minmax(0, 1fr) 300px;
    gap: 20px;
}

.village-summary-panel {
    grid-template-columns: minmax(260px, 380px) minmax(0, 1fr);
    padding: 24px;
    gap: 24px;
    overflow: hidden;
}

.summary-right-empty {
    display: none;
}

.summary-left h1 {
    letter-spacing: -0.04em;
    line-height: 0.95;
}

.resource-strip-detailed {
    grid-template-columns: repeat(6, minmax(120px, 1fr));
    align-items: stretch;
}

.top-resource-card,
.top-meta-card {
    min-height: 98px;
    padding: 14px;
    background: linear-gradient(180deg, rgba(255,255,255,0.055), rgba(255,255,255,0.025));
    border-color: rgba(126, 196, 255, 0.10);
}

.top-resource-card {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
}

.top-resource-icon {
    width: 38px;
    height: 38px;
    border-radius: 13px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.07);
}

.top-resource-icon img {
    width: 26px;
    height: 26px;
    object-fit: contain;
}

.top-resource-content {
    min-width: 0;
}

.top-resource-head,
.top-meta-label {
    color: rgba(216, 228, 255, 0.74);
    font-weight: 800;
}

.top-resource-main,
.top-meta-card strong {
    font-size: clamp(0.98rem, 1.15vw, 1.18rem);
    white-space: nowrap;
}

.top-resource-sub,
.top-meta-card small {
    font-size: 0.8rem;
}

.village-main-column,
.village-right-column {
    gap: 20px;
}

.village-hero-panel,
.info-panel,
#buildings-panel,
.village-nav-panel,
.village-right-column .panel {
    border-color: rgba(126, 196, 255, 0.12);
}

/* Bâtiments : on garde le JS d'origine, mais on transforme le tableau en cartes propres. */
#buildings-panel .table-wrap {
    overflow: visible;
    border: 0;
    border-radius: 0;
}

#buildings-panel table,
#buildings-panel thead,
#buildings-panel tbody,
#buildings-panel tr,
#buildings-panel th,
#buildings-panel td {
    display: block;
}

#buildings-panel thead {
    display: none;
}

#buildings-panel tbody {
    display: grid;
    gap: 14px;
}

#buildings-panel tbody tr {
    display: grid;
    grid-template-columns: minmax(220px, 1fr) minmax(260px, 1.25fr) minmax(180px, 0.75fr);
    gap: 0;
    border: 1px solid rgba(126, 196, 255, 0.12);
    border-radius: 18px;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(255,255,255,0.052), rgba(255,255,255,0.018));
}

#buildings-panel tbody td {
    border-top: 0;
    padding: 18px;
}

#buildings-panel tbody td + td {
    border-left: 1px solid rgba(255,255,255,0.06);
}

#buildings-panel tbody td:first-child {
    font-size: 1rem;
    font-weight: 800;
}

.building-info-block {
    margin-top: 12px;
    padding: 12px;
    border-radius: 12px;
    background: rgba(255,255,255,0.045);
    border: 1px solid rgba(255,255,255,0.07);
    color: rgba(232, 238, 255, 0.86);
    font-weight: 500;
    line-height: 1.45;
}

.building-info-line + .building-info-line {
    margin-top: 6px;
}

#buildings-panel .resource {
    margin: 0 8px 8px 0;
    padding: 7px 10px;
    border-radius: 999px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.08);
    font-weight: 800;
}

#buildings-panel .resource img {
    width: 20px;
    height: 20px;
    object-fit: contain;
}

.action-buttons-wrap {
    justify-content: flex-end;
}

#buildings-panel .action-buttons-wrap {
    flex-direction: column;
    align-items: stretch;
}

#buildings-panel .action-buttons-wrap button {
    width: 100%;
}

/* Combat / rapports : un peu plus d'air sans changer le fonctionnement. */
.combat-summary-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.combat-card,
.report-item,
.stat-card,
.unit-pill {
    border-color: rgba(126, 196, 255, 0.10);
}

.reports-list {
    display: grid;
    gap: 12px;
}

.report-item + .report-item {
    margin-top: 0;
}

@media (max-width: 1320px) {
    .village-layout {
        grid-template-columns: 230px minmax(0, 1fr) 280px;
    }

    .resource-strip-detailed {
        grid-template-columns: repeat(3, minmax(150px, 1fr));
    }
}

@media (max-width: 1100px) {
    .village-layout {
        grid-template-columns: 1fr;
        grid-template-areas:
            "summary"
            "nav"
            "main"
            "side";
    }

    .village-summary-panel {
        grid-template-columns: 1fr;
    }

    .village-nav-panel,
    .village-right-column {
        position: static;
    }

    #buildings-panel tbody tr {
        grid-template-columns: 1fr;
    }

    #buildings-panel tbody td + td {
        border-left: 0;
        border-top: 1px solid rgba(255,255,255,0.06);
    }
}

@media (max-width: 720px) {
    .resource-strip-detailed,
    .combat-summary-grid {
        grid-template-columns: 1fr;
    }

    .top-resource-card {
        grid-template-columns: 42px minmax(0, 1fr);
    }
}

/* =========================================================
   CONQUEST SUPREM - HUD PREMIUM V1
   Refonte visuelle sans casser la logique JS existante.
   ========================================================= */
:root {
    --hud-bg: rgba(2, 8, 18, 0.92);
    --hud-bg-2: rgba(6, 18, 36, 0.86);
    --hud-panel: rgba(5, 15, 31, 0.86);
    --hud-panel-soft: rgba(12, 31, 58, 0.68);
    --hud-line: rgba(0, 179, 255, 0.34);
    --hud-line-soft: rgba(95, 185, 255, 0.18);
    --hud-glow: rgba(0, 162, 255, 0.28);
    --hud-blue: #1f8dff;
    --hud-cyan: #64ddff;
    --hud-text: #edf7ff;
    --hud-muted: #99b8d7;
    --hud-gold: #ffd574;
}

body.ultra-page {
    font-family: Inter, "Segoe UI", Arial, sans-serif;
    color: var(--hud-text);
    background:
        radial-gradient(circle at 74% 6%, rgba(0, 163, 255, 0.14), transparent 28%),
        radial-gradient(circle at 8% 18%, rgba(21, 105, 255, 0.10), transparent 32%),
        linear-gradient(180deg, rgba(2, 9, 22, 0.86), rgba(1, 5, 11, 0.94)),
        url('../images/background.jpeg') center/cover fixed no-repeat;
}

.page-overlay {
    background:
        linear-gradient(180deg, rgba(0, 5, 14, 0.50), rgba(0, 4, 10, 0.94)),
        repeating-linear-gradient(90deg, rgba(93, 202, 255, 0.018) 0 1px, transparent 1px 96px),
        repeating-linear-gradient(0deg, rgba(93, 202, 255, 0.014) 0 1px, transparent 1px 96px);
}

.main-header,
.village-layout {
    width: min(96vw, 1680px);
    max-width: 1680px;
}

.main-header {
    padding-top: 10px;
}

.banner-image {
    max-width: 1120px;
    height: 76px;
    object-fit: cover;
    border-radius: 14px;
    border: 1px solid rgba(73, 184, 255, 0.28);
    box-shadow: 0 0 0 1px rgba(0, 183, 255, 0.07), 0 24px 60px rgba(0,0,0,0.46), 0 0 34px rgba(0, 145, 255, 0.13);
}

.top-bar {
    position: relative;
    margin: 10px auto 8px;
    padding: 12px 18px;
    width: min(100%, 1500px);
    border: 1px solid rgba(66, 167, 255, 0.20);
    border-radius: 24px;
    background: linear-gradient(180deg, rgba(2, 12, 28, 0.90), rgba(2, 8, 18, 0.78));
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.035), 0 18px 50px rgba(0,0,0,0.30);
}

.top-bar::before,
.top-bar::after,
.panel::before,
.panel::after,
.construction-queue-panel::before,
.construction-queue-panel::after {
    content: "";
    position: absolute;
    width: 42px;
    height: 16px;
    pointer-events: none;
    opacity: .92;
}

.top-bar::before,
.panel::before,
.construction-queue-panel::before {
    top: -1px;
    left: 22px;
    border-top: 1px solid var(--hud-cyan);
    border-left: 1px solid var(--hud-cyan);
    filter: drop-shadow(0 0 8px var(--hud-glow));
}

.top-bar::after,
.panel::after,
.construction-queue-panel::after {
    right: 22px;
    bottom: -1px;
    border-right: 1px solid var(--hud-cyan);
    border-bottom: 1px solid var(--hud-cyan);
    filter: drop-shadow(0 0 8px var(--hud-glow));
}

.top-bar button,
.btn-primary,
.btn-secondary,
.btn-danger,
.mode-tab,
.btn-action-ressources,
.btn-tertiary {
    position: relative;
    overflow: hidden;
    border-radius: 8px;
    border: 1px solid rgba(91, 176, 255, 0.24);
    background: linear-gradient(180deg, rgba(11, 33, 66, 0.92), rgba(5, 15, 33, 0.96));
    color: var(--hud-text);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.055), 0 10px 22px rgba(0,0,0,0.22);
}

.top-bar button::before,
.btn-primary::before,
.btn-secondary::before,
.mode-tab::before,
.btn-action-ressources::before,
.btn-tertiary::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(94, 206, 255, 0.16), transparent);
    transform: translateX(-110%);
    transition: transform .35s ease;
}

.top-bar button:hover::before,
.btn-primary:hover::before,
.btn-secondary:hover::before,
.mode-tab:hover::before,
.btn-action-ressources:hover::before,
.btn-tertiary:hover::before {
    transform: translateX(110%);
}

.top-bar button.active,
.btn-primary,
.mode-tab.active,
.nav-my-villages-btn {
    border-color: rgba(91, 190, 255, 0.58);
    background: linear-gradient(180deg, rgba(29, 135, 255, 0.96), rgba(11, 62, 146, 0.98));
    box-shadow: 0 0 22px rgba(28, 137, 255, 0.26), inset 0 1px 0 rgba(255,255,255,0.11);
}

.village-layout {
    grid-template-columns: 290px minmax(0, 1fr) 350px;
    gap: 22px;
    padding: 0 0 34px;
}

.panel,
.construction-queue-panel,
.modal-card,
.report-modal-dialog {
    position: relative;
    border-radius: 0;
    border: 1px solid var(--hud-line-soft);
    background:
        linear-gradient(135deg, rgba(68, 175, 255, 0.045) 0 1px, transparent 1px 22px),
        radial-gradient(circle at 8% 0%, rgba(0, 174, 255, 0.10), transparent 34%),
        linear-gradient(180deg, rgba(3, 13, 31, 0.94), rgba(3, 9, 20, 0.90));
    box-shadow: 0 22px 58px rgba(0,0,0,0.34), inset 0 1px 0 rgba(255,255,255,0.035), 0 0 0 1px rgba(0, 174, 255, 0.045);
    clip-path: polygon(0 18px, 18px 0, calc(100% - 18px) 0, 100% 18px, 100% calc(100% - 18px), calc(100% - 18px) 100%, 18px 100%, 0 calc(100% - 18px));
}

.panel-kicker {
    color: var(--hud-cyan);
    letter-spacing: .22em;
    font-size: .76rem;
    font-weight: 900;
    text-shadow: 0 0 12px rgba(100, 221, 255, .22);
}

.village-summary-panel {
    padding: 26px 28px;
    grid-template-columns: minmax(350px, 420px) minmax(0, 1fr);
    gap: 28px;
    min-height: 190px;
}

.summary-left h1 {
    font-size: clamp(2.25rem, 3.2vw, 4.1rem);
    line-height: .92;
    text-shadow: 0 0 26px rgba(100, 180, 255, .16);
}

.summary-title-row {
    align-items: center;
}

.mv-icon-btn {
    border-radius: 10px;
    border-color: rgba(89, 185, 255, .42);
    background: linear-gradient(180deg, rgba(21, 87, 175, .94), rgba(7, 38, 92, .98));
    box-shadow: 0 0 22px rgba(35, 145, 255, .16), inset 0 1px 0 rgba(255,255,255,.09);
}

.village-subtitle,
.village-switch-meta,
.hero-description,
.hero-command-sub,
.combat-card-sub,
.stat-card-sub,
.nav-status-row span {
    color: var(--hud-muted);
}

.resource-strip-detailed {
    grid-template-columns: repeat(6, minmax(145px, 1fr));
    gap: 14px;
    align-items: stretch;
}

.top-resource-card,
.top-meta-card,
.hero-command-card,
.hero-stat-card,
.overview-card,
.overview-section-card,
.overview-priority-card,
.combat-card,
.stat-card,
.unit-pill,
.report-item,
.mini-stat,
.building-level-pill,
.nav-helper-card,
.nav-status-row,
.tutorial-summary-card,
.tutorial-quest-card {
    position: relative;
    border-radius: 0;
    border: 1px solid rgba(69, 167, 255, 0.18);
    background:
        linear-gradient(135deg, rgba(82, 184, 255, 0.06), transparent 38%),
        linear-gradient(180deg, rgba(12, 30, 55, 0.74), rgba(5, 14, 30, 0.78));
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.035), 0 10px 24px rgba(0,0,0,0.18);
    clip-path: polygon(0 12px, 12px 0, calc(100% - 12px) 0, 100% 12px, 100% calc(100% - 12px), calc(100% - 12px) 100%, 12px 100%, 0 calc(100% - 12px));
}

.top-resource-card,
.top-meta-card {
    min-height: 106px;
    padding: 14px 14px;
}

.top-resource-card {
    grid-template-columns: 42px minmax(0, 1fr);
}

.top-resource-icon {
    width: 42px;
    height: 42px;
    border-radius: 0;
    border-color: rgba(95, 185, 255, .18);
    background: radial-gradient(circle, rgba(100, 221, 255, 0.10), rgba(255,255,255,0.035));
    clip-path: polygon(14% 0, 100% 0, 100% 86%, 86% 100%, 0 100%, 0 14%);
}

.top-resource-icon img { width: 28px; height: 28px; }

.top-resource-head,
.top-meta-label {
    color: rgba(210, 232, 255, .70);
    letter-spacing: .16em;
    font-size: .72rem;
}

.top-resource-main,
.top-meta-card strong {
    display: block;
    width: 100%;
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: clip !important;
    word-break: keep-all;
    font-size: clamp(.98rem, .96vw, 1.24rem);
    line-height: 1.08;
    letter-spacing: .01em;
}

.top-resource-sub,
.top-meta-card small {
    font-size: .78rem;
    line-height: 1.28;
    color: rgba(216, 232, 255, .78);
}

.live-dot {
    box-shadow: 0 0 12px rgba(84, 255, 124, .55);
}

.village-nav-panel {
    padding: 22px;
    top: 18px;
}

.village-nav-panel .panel-header h2,
.info-panel .panel-header h2,
#buildings-panel .panel-header h2,
.village-hero-panel h2 {
    font-size: 1.45rem;
}

.village-mode-bar.vertical {
    gap: 8px;
}

.mode-tab {
    min-height: 44px;
    padding: 12px 14px;
    justify-content: space-between;
    text-transform: none;
}

.mode-tab::after {
    content: "›";
    opacity: .45;
    margin-left: auto;
}

.mode-tab.active::after { opacity: .95; }

.village-main-column { gap: 18px; }
.village-right-column { gap: 18px; top: 18px; }

.village-hero-panel,
.info-panel,
#buildings-panel { padding: 24px; }

.village-hero-content {
    align-items: flex-start;
    gap: 24px;
}

.hero-actions {
    width: min(100%, 470px);
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.hero-actions button {
    min-height: 52px;
    text-transform: uppercase;
    letter-spacing: .055em;
}

.hero-command-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.hero-command-card,
.hero-stat-card,
.combat-card,
.overview-card {
    min-height: 108px;
    padding: 18px;
}

.hero-command-card strong,
.hero-stat-card strong,
.combat-card-value,
.overview-card-value {
    font-size: clamp(1.35rem, 1.6vw, 2rem);
    color: #f6fbff;
    text-shadow: 0 0 18px rgba(78, 180, 255, .14);
}

.hero-stats-grid,
.combat-summary-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
}

.village-preview-panel {
    padding: 20px;
}

.hud-mini-chip {
    padding: 5px 10px;
    border: 1px solid rgba(100, 221, 255, .28);
    background: rgba(0, 160, 255, .10);
    color: var(--hud-cyan);
    font-size: .72rem;
    font-weight: 900;
    letter-spacing: .12em;
}

.village-preview-visual {
    position: relative;
    min-height: 160px;
    overflow: hidden;
    border: 1px solid rgba(100, 221, 255, .20);
    background:
        linear-gradient(180deg, rgba(2, 8, 18, .18), rgba(2, 8, 18, .82)),
        url('../images/index.png') center/cover no-repeat,
        url('../images/background.jpeg') center/cover no-repeat;
    clip-path: polygon(0 16px, 16px 0, 100% 0, 100% calc(100% - 16px), calc(100% - 16px) 100%, 0 100%);
}

.village-preview-glow {
    position: absolute;
    inset: auto 14% -34px 14%;
    height: 76px;
    background: radial-gradient(ellipse, rgba(0, 174, 255, .44), transparent 68%);
}

.village-preview-label {
    position: absolute;
    left: 14px;
    bottom: 12px;
    padding: 7px 10px;
    background: rgba(0, 8, 18, .66);
    border: 1px solid rgba(100, 221, 255, .20);
    color: rgba(232, 246, 255, .86);
    font-size: .78rem;
    letter-spacing: .10em;
    text-transform: uppercase;
}

.village-preview-meta {
    position: absolute;
    right: 12px;
    bottom: 12px;
    display: grid;
    grid-template-columns: repeat(2, minmax(70px, 1fr));
    gap: 8px;
    max-width: calc(100% - 28px);
}

.village-preview-meta div {
    padding: 7px 9px;
    background: rgba(0, 8, 18, .68);
    border: 1px solid rgba(100, 221, 255, .18);
    clip-path: polygon(0 8px, 8px 0, 100% 0, 100% 100%, 0 100%);
}

.village-preview-meta span {
    display: block;
    font-size: .62rem;
    text-transform: uppercase;
    letter-spacing: .10em;
    color: rgba(181, 211, 232, .72);
}

.village-preview-meta strong {
    display: block;
    margin-top: 2px;
    color: rgba(243, 250, 255, .96);
    font-size: .86rem;
}

#ressources-panel .stats-grid,
#production-panel .stats-grid,
#unites-panel .stats-grid {
    gap: 10px;
}

.stat-card {
    min-height: 74px;
}

.stat-card-value {
    font-size: 1.05rem;
    max-width: 46%;
    word-break: normal;
}

.resource-rich-card {
    grid-template-columns: 42px minmax(0,1fr);
}

.resource-rich-value {
    font-size: 1.25rem;
    white-space: normal;
}

/* Bâtiments en cartes HUD : lisible et sans gros vide. */
#buildings-panel tbody tr {
    grid-template-columns: minmax(260px, 1.05fr) minmax(340px, 1.35fr) minmax(190px, .7fr);
    border-color: rgba(77, 175, 255, .18);
    clip-path: polygon(0 14px, 14px 0, calc(100% - 14px) 0, 100% 14px, 100% calc(100% - 14px), calc(100% - 14px) 100%, 14px 100%, 0 calc(100% - 14px));
}

#buildings-panel tbody td {
    padding: 20px;
}

#buildings-panel tbody td:first-child {
    font-size: 1.05rem;
    line-height: 1.35;
}

#buildings-panel .resource {
    display: inline-flex;
    min-height: 36px;
    align-items: center;
}

.button-container { min-width: 0; }
.action-buttons-wrap { gap: 10px; }
#buildings-panel .action-buttons-wrap button { min-height: 46px; }

.construction-queue-panel {
    padding: 20px;
}

.construction-queue-item {
    border-color: rgba(77, 175, 255, .16);
    border-radius: 0;
    clip-path: polygon(0 12px, 12px 0, calc(100% - 12px) 0, 100% 12px, 100% calc(100% - 12px), calc(100% - 12px) 100%, 12px 100%, 0 calc(100% - 12px));
}

.report-item:hover,
.mode-tab:hover,
.hero-command-card:hover,
.stat-card:hover,
.top-resource-card:hover,
.top-meta-card:hover {
    border-color: rgba(100, 221, 255, .38);
    box-shadow: 0 0 22px rgba(0, 174, 255, .10), inset 0 1px 0 rgba(255,255,255,.05);
}

@media (max-width: 1500px) {
    .village-layout {
        width: min(96vw, 1500px);
        grid-template-columns: 270px minmax(0, 1fr) 310px;
    }

    .village-summary-panel {
        grid-template-columns: minmax(310px, 400px) minmax(0, 1fr);
    }

    .resource-strip-detailed {
        grid-template-columns: repeat(6, minmax(128px, 1fr));
        gap: 10px;
    }

    .top-resource-card,
    .top-meta-card {
        padding: 12px;
    }

    .top-resource-main,
    .top-meta-card strong {
        font-size: .96rem;
    }
}

@media (max-width: 1280px) {
    .village-layout {
        grid-template-columns: 250px minmax(0, 1fr);
        grid-template-areas:
            "summary summary"
            "nav main"
            "side side";
    }

    .village-summary-panel {
        grid-template-columns: 1fr;
    }

    .resource-strip-detailed {
        grid-template-columns: repeat(3, minmax(180px, 1fr));
    }

    .village-right-column {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        display: grid;
    }
}

@media (max-width: 1020px) {
    .village-layout {
        grid-template-columns: 1fr;
        grid-template-areas: "summary" "nav" "main" "side";
    }

    .hero-command-grid,
    .hero-stats-grid,
    .combat-summary-grid,
    .overview-grid,
    .overview-priority-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .village-right-column {
        grid-template-columns: 1fr;
    }

    .hero-actions { width: 100%; }
}

@media (max-width: 720px) {
    .main-header,
    .village-layout { width: calc(100vw - 20px); }
    .banner-image { height: 60px; }
    .top-bar { border-radius: 18px; }
    .village-summary-panel { padding: 18px; }
    .summary-title-row { flex-wrap: wrap; }
    .resource-strip-detailed,
    .hero-command-grid,
    .hero-stats-grid,
    .combat-summary-grid,
    .overview-grid,
    .overview-priority-grid {
        grid-template-columns: 1fr;
    }
    .hero-actions { grid-template-columns: 1fr; }
    #buildings-panel tbody tr { grid-template-columns: 1fr; }
}

/* =========================================================
   CONQUEST SUPREM - HUD PREMIUM V2
   Objectif : vraie lecture HUD + ressources non coupées + colonisation retirée.
   ========================================================= */

:root {
    --v2-cyan: #53d9ff;
    --v2-blue: #147cff;
    --v2-blue-soft: rgba(20, 124, 255, .18);
    --v2-line: rgba(83, 217, 255, .34);
    --v2-line-soft: rgba(83, 217, 255, .16);
    --v2-panel: rgba(3, 13, 29, .92);
    --v2-panel-2: rgba(5, 22, 45, .80);
}

.main-header,
.village-layout {
    width: min(97vw, 1720px);
    max-width: 1720px;
}

/* On garde le style premium, mais on enlève le bloc marketing qui prenait de la place. */
.ultra-hero {
    display: none !important;
}

/* Grand bandeau : une vraie console HUD lisible. */
.village-summary-panel {
    position: relative;
    grid-template-columns: 1fr;
    gap: 20px;
    min-height: auto;
    padding: 28px 30px 30px;
    overflow: hidden;
    background:
        linear-gradient(90deg, rgba(4, 12, 27, .98), rgba(4, 12, 27, .86)),
        radial-gradient(circle at 84% 42%, rgba(0, 163, 255, .18), transparent 26%);
}

.village-summary-panel::before {
    width: 58px;
    height: 22px;
}

.village-summary-panel::after {
    width: 58px;
    height: 22px;
}

.summary-left {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    column-gap: 18px;
    align-items: center;
    max-width: none;
}

.summary-left::before {
    content: "";
    width: 78px;
    height: 78px;
    grid-row: 1 / span 3;
    align-self: center;
    border: 1px solid rgba(83, 217, 255, .28);
    background:
        radial-gradient(circle, rgba(83, 217, 255, .18), transparent 62%),
        linear-gradient(180deg, rgba(16, 78, 145, .30), rgba(4, 15, 33, .72));
    clip-path: polygon(50% 0, 88% 18%, 88% 70%, 50% 100%, 12% 70%, 12% 18%);
    box-shadow: 0 0 28px rgba(20, 124, 255, .20);
}

.summary-left::after {
    content: "✦";
    position: absolute;
    left: 25px;
    top: 42px;
    color: rgba(235, 248, 255, .95);
    font-size: 26px;
    text-shadow: 0 0 18px rgba(83, 217, 255, .55);
}

.summary-left .panel-kicker,
.summary-left h1,
.summary-left .village-subtitle {
    grid-column: 2;
}

.summary-left h1 {
    margin: 3px 0 4px;
    font-size: clamp(2.2rem, 3.3vw, 4.4rem);
    line-height: .94;
    max-width: 720px;
}

.village-subtitle {
    font-size: .98rem;
    color: rgba(220, 235, 255, .82);
}

.summary-center {
    position: relative;
    z-index: 1;
    width: 100%;
}

.resource-strip-detailed {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 14px;
    width: 100%;
}

.top-resource-card,
.top-meta-card {
    min-width: 0;
    min-height: 116px;
    padding: 15px 16px;
    overflow: visible;
    border-color: rgba(83, 217, 255, .19);
    background:
        linear-gradient(135deg, rgba(83, 217, 255, .075), transparent 34%),
        linear-gradient(180deg, rgba(10, 31, 61, .86), rgba(5, 15, 34, .88));
}

.top-resource-card {
    grid-template-columns: 44px minmax(0, 1fr);
    gap: 13px;
}

.top-resource-main,
.top-meta-card strong {
    font-size: clamp(1rem, 1.05vw, 1.35rem);
    line-height: 1.14;
    word-break: normal;
    overflow-wrap: normal;
}

.top-resource-sub,
.top-meta-card small {
    font-size: .82rem;
    line-height: 1.34;
}

.top-resource-head,
.top-meta-label {
    margin-bottom: 8px;
}

/* Architecture principale : plus proche d'un vrai HUD, moins compressé. */
.village-layout {
    grid-template-columns: 292px minmax(720px, 1fr) 360px;
    gap: 24px;
}

.village-nav-panel,
.village-right-column {
    top: 20px;
}

.panel,
.construction-queue-panel,
.modal-card,
.report-modal-dialog {
    border-color: var(--v2-line-soft);
    box-shadow:
        0 22px 70px rgba(0, 0, 0, .42),
        inset 0 1px 0 rgba(255,255,255,.04),
        0 0 0 1px rgba(83, 217, 255, .045);
}

.panel:hover {
    border-color: rgba(83, 217, 255, .25);
}

.village-hero-panel {
    min-height: 420px;
    display: grid;
    align-content: start;
}

.village-hero-content {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(310px, 420px);
    align-items: start;
    gap: 24px;
}

.hero-actions {
    width: 100%;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.hero-actions button {
    min-height: 56px;
    font-size: .82rem;
}

.hero-command-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 14px;
}

.hero-command-card {
    min-height: 138px;
    padding: 18px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.hero-command-card-academy {
    border-color: rgba(255, 213, 116, .22);
    background:
        radial-gradient(circle at 80% 10%, rgba(255, 213, 116, .14), transparent 36%),
        linear-gradient(180deg, rgba(18, 33, 62, .80), rgba(6, 16, 34, .86));
}

.hero-command-card-academy .hero-command-label {
    color: #ffe1a0;
}

.hero-command-card strong {
    white-space: normal;
}

.hero-stats-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

/* Sidebar : on retire le bruit colonisation et on rend l'académie accessible. */
.nav-village-actions {
    display: grid;
    grid-template-columns: 1fr;
    gap: 10px;
}

.nav-village-actions .btn-secondary {
    width: 100%;
    min-height: 44px;
}

.nav-status-list {
    gap: 8px;
}

/* Colonne droite plus utile et moins pavée. */
.village-preview-visual {
    min-height: 190px;
    background:
        linear-gradient(180deg, rgba(2, 8, 18, .08), rgba(2, 8, 18, .82)),
        url('../images/index.png') center 44%/cover no-repeat,
        url('../images/background.jpeg') center/cover no-repeat;
}

#ressources-panel .stat-card,
#production-panel .stat-card,
#unites-panel .stat-card {
    min-height: 86px;
}

.stat-card-value {
    max-width: none;
    white-space: nowrap;
}

.resource-rich-card {
    grid-template-columns: 48px minmax(0, 1fr);
}

.resource-rich-icon img {
    width: 40px;
    height: 40px;
}

.resource-rich-value {
    white-space: nowrap;
}

/* Bâtiments : encore plus net, sans toucher à la logique. */
#buildings-panel tbody tr {
    grid-template-columns: minmax(280px, 1fr) minmax(360px, 1.25fr) minmax(210px, .72fr);
    background:
        linear-gradient(90deg, rgba(83, 217, 255, .055), transparent 34%),
        linear-gradient(180deg, rgba(10, 27, 54, .82), rgba(5, 14, 31, .88));
}

#buildings-panel tbody td:nth-child(2) {
    align-content: center;
}

#buildings-panel .resource {
    margin-bottom: 10px;
    min-width: 88px;
    justify-content: center;
}

.button-container .btn-primary,
.button-container .btn-secondary,
.button-container .btn-action-ressources {
    border-radius: 0;
    clip-path: polygon(0 10px, 10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%);
}

/* Responsive contrôlé. */
@media (max-width: 1580px) {
    .village-layout {
        grid-template-columns: 276px minmax(650px, 1fr) 330px;
    }

    .resource-strip-detailed {
        gap: 12px;
    }

    .top-resource-card,
    .top-meta-card {
        padding: 14px;
    }
}

@media (max-width: 1380px) {
    .village-layout {
        grid-template-columns: 260px minmax(0, 1fr);
        grid-template-areas:
            "summary summary"
            "nav main"
            "side side";
    }

    .village-right-column {
        display: grid;
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

    .resource-strip-detailed {
        grid-template-columns: repeat(3, minmax(220px, 1fr));
    }

    .hero-command-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 1040px) {
    .village-layout {
        grid-template-columns: 1fr;
        grid-template-areas:
            "summary"
            "nav"
            "main"
            "side";
    }

    .summary-left {
        grid-template-columns: 1fr;
    }

    .summary-left::before,
    .summary-left::after {
        display: none;
    }

    .summary-left .panel-kicker,
    .summary-left h1,
    .summary-left .village-subtitle {
        grid-column: auto;
    }

    .village-hero-content {
        grid-template-columns: 1fr;
    }

    .village-right-column {
        grid-template-columns: 1fr;
    }

    .resource-strip-detailed,
    .hero-command-grid,
    .hero-stats-grid,
    .combat-summary-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 680px) {
    .resource-strip-detailed,
    .hero-command-grid,
    .hero-stats-grid,
    .combat-summary-grid,
    .hero-actions {
        grid-template-columns: 1fr;
    }

    .top-resource-main,
    .top-meta-card strong,
    .resource-rich-value,
    .stat-card-value {
        white-space: normal;
    }
}

/* =========================================================
   HUD PREMIUM V3 - Alignement + cartes ressources lisibles
   Objectif : rapprocher la page du mockup attendu sans casser le JS.
   ========================================================= */
:root {
    --hud-cyan: #45d9ff;
    --hud-blue: #147cff;
    --hud-gold: #ffd777;
    --hud-panel: rgba(3, 12, 28, .92);
    --hud-card: rgba(8, 24, 48, .78);
    --hud-border: rgba(69, 217, 255, .28);
    --hud-border-soft: rgba(69, 217, 255, .14);
}

.main-header,
.village-layout {
    width: min(98vw, 1760px) !important;
    max-width: 1760px !important;
}

.main-header {
    padding-top: 10px;
}

.banner-image {
    max-width: 1220px;
    border-radius: 12px;
    border-color: rgba(69, 217, 255, .28);
    box-shadow: 0 0 34px rgba(20, 124, 255, .18), 0 20px 60px rgba(0,0,0,.45);
}

.top-bar {
    position: relative;
    max-width: 1340px;
    margin: 0 auto;
    padding: 15px 24px;
    border: 1px solid rgba(69, 217, 255, .16);
    background: linear-gradient(180deg, rgba(4, 12, 26, .9), rgba(2, 8, 18, .96));
    border-radius: 0;
    clip-path: polygon(22px 0, calc(100% - 22px) 0, 100% 22px, 100% calc(100% - 22px), calc(100% - 22px) 100%, 22px 100%, 0 calc(100% - 22px), 0 22px);
}

.top-bar::before,
.top-bar::after {
    content: "";
    position: absolute;
    width: 84px;
    height: 22px;
    pointer-events: none;
    border-color: rgba(69, 217, 255, .65);
}
.top-bar::before { left: 0; top: 0; border-top: 2px solid; border-left: 2px solid; }
.top-bar::after { right: 0; bottom: 0; border-right: 2px solid; border-bottom: 2px solid; }

.top-bar button {
    border-radius: 0 !important;
    clip-path: polygon(12px 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%, 0 12px);
    min-width: 126px;
    background: linear-gradient(180deg, rgba(18, 38, 70, .88), rgba(5, 14, 32, .92));
    border: 1px solid rgba(111, 169, 255, .2);
}

.top-bar button.active {
    background: linear-gradient(180deg, rgba(32, 125, 255, .72), rgba(6, 27, 61, .95));
    border-color: rgba(82, 190, 255, .62);
    box-shadow: inset 0 0 22px rgba(65, 153, 255, .25), 0 0 20px rgba(32, 125, 255, .18);
}

.panel,
.village-summary-panel,
.village-nav-panel,
.village-hero-panel,
.info-panel,
.village-preview-panel,
.village-side-panel,
#buildings-panel,
#combat-panel,
#reports-panel,
.construction-queue-panel {
    border-radius: 0 !important;
    clip-path: polygon(18px 0, calc(100% - 18px) 0, 100% 18px, 100% calc(100% - 18px), calc(100% - 18px) 100%, 18px 100%, 0 calc(100% - 18px), 0 18px);
    border-color: var(--hud-border-soft) !important;
    background:
        linear-gradient(135deg, rgba(69, 217, 255, .055), transparent 28%),
        linear-gradient(180deg, rgba(5, 16, 34, .93), rgba(2, 8, 20, .95)) !important;
    box-shadow: 0 24px 80px rgba(0,0,0,.45), inset 0 1px 0 rgba(255,255,255,.04), 0 0 0 1px rgba(69,217,255,.045) !important;
}

.village-layout {
    grid-template-columns: 292px minmax(760px, 1fr) 360px !important;
    gap: 24px !important;
}

/* Bandeau village : grandes infos + ressources lisibles */
.village-summary-panel {
    grid-template-columns: 360px minmax(0, 1fr) !important;
    align-items: center !important;
    padding: 26px 28px !important;
    min-height: 190px;
    overflow: visible !important;
}

.summary-right-empty { display: none !important; }

.summary-left {
    display: grid !important;
    grid-template-columns: 72px minmax(0, 1fr) !important;
    align-items: center !important;
    column-gap: 18px !important;
}

.summary-left::before {
    width: 72px !important;
    height: 72px !important;
    grid-row: 1 / span 3;
}

.summary-left::after {
    left: 23px !important;
    top: 39px !important;
}

.summary-left h1 {
    font-size: clamp(2.25rem, 3.1vw, 4rem) !important;
    line-height: .94 !important;
    margin: 2px 0 6px !important;
}

.summary-left .panel-kicker,
.summary-left h1,
.summary-left .village-subtitle { grid-column: 2 !important; }

.summary-center {
    width: 100% !important;
    min-width: 0 !important;
}

.resource-strip-detailed {
    display: grid !important;
    grid-template-columns: repeat(6, minmax(136px, 1fr)) !important;
    gap: 14px !important;
    width: 100% !important;
    align-items: stretch !important;
}

.top-resource-card,
.top-meta-card {
    position: relative;
    min-width: 0 !important;
    min-height: 116px !important;
    padding: 16px 14px !important;
    border-radius: 0 !important;
    clip-path: polygon(12px 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%, 0 12px);
    background: linear-gradient(180deg, rgba(16, 36, 68, .86), rgba(5, 15, 34, .92)) !important;
    border: 1px solid rgba(69, 217, 255, .16) !important;
    box-shadow: inset 0 0 22px rgba(43, 119, 255, .055);
}

.top-resource-card {
    display: grid !important;
    grid-template-columns: 42px minmax(0, 1fr) !important;
    align-items: center !important;
    gap: 12px !important;
}

.top-resource-icon {
    width: 42px !important;
    height: 42px !important;
    border-radius: 0 !important;
    clip-path: polygon(11px 0, 100% 0, 100% calc(100% - 11px), calc(100% - 11px) 100%, 0 100%, 0 11px);
    background: linear-gradient(180deg, rgba(255,255,255,.075), rgba(255,255,255,.025)) !important;
    border: 1px solid rgba(69,217,255,.18) !important;
}
.top-resource-icon img { width: 28px !important; height: 28px !important; }

.top-resource-content { min-width: 0 !important; display: block !important; }
.top-resource-head,
.top-meta-label {
    display: block !important;
    margin-bottom: 4px !important;
    color: rgba(202, 220, 255, .78) !important;
    font-size: .72rem !important;
    letter-spacing: .13em !important;
    line-height: 1.05 !important;
}

.top-resource-main,
.top-meta-card strong {
    display: inline-block !important;
    font-size: clamp(1.22rem, 1.22vw, 1.58rem) !important;
    line-height: 1.08 !important;
    white-space: nowrap !important;
    overflow: visible !important;
    text-overflow: clip !important;
    letter-spacing: -.02em;
}

.top-resource-cap {
    display: block;
    margin-top: 1px;
    font-size: .78rem;
    color: rgba(220, 234, 255, .72);
    white-space: nowrap;
}

.top-resource-sub,
.top-resource-extra,
.top-meta-card small {
    display: block !important;
    margin-top: 3px !important;
    font-size: .74rem !important;
    line-height: 1.18 !important;
    color: rgba(205, 222, 255, .78) !important;
    white-space: normal !important;
}

.top-meta-card {
    display: flex !important;
    flex-direction: column;
    justify-content: center;
}

/* Centre : moins de cartes compressées, meilleure hiérarchie */
.village-hero-content {
    grid-template-columns: minmax(0, 1fr) minmax(340px, 440px) !important;
    gap: 28px !important;
    align-items: start !important;
}

.hero-actions {
    grid-template-columns: repeat(2, minmax(150px, 1fr)) !important;
    gap: 12px !important;
}
.hero-actions button {
    min-height: 52px !important;
    font-size: .82rem !important;
    letter-spacing: .02em;
}

.hero-command-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 14px !important;
}

.hero-command-card,
.hero-stat-card,
.combat-card {
    border-radius: 0 !important;
    clip-path: polygon(12px 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%, 0 12px);
    border-color: rgba(69, 217, 255, .17) !important;
}

.hero-command-card {
    min-height: 132px !important;
    padding: 18px !important;
}

.hero-command-card strong {
    font-size: clamp(1.65rem, 1.65vw, 2.35rem) !important;
    line-height: 1.08 !important;
    white-space: normal !important;
    word-break: normal !important;
}

.hero-command-sub,
.hero-command-label {
    overflow-wrap: normal !important;
    word-break: normal !important;
}

.hero-stats-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
}
.hero-stat-card {
    min-height: 66px !important;
    padding: 14px 16px !important;
    justify-content: center;
}
.hero-stat-card strong {
    font-size: 1.55rem !important;
    white-space: nowrap;
}

.hero-academy-note {
    margin-top: 14px;
    display: grid;
    grid-template-columns: 42px minmax(0, 1fr) auto;
    gap: 12px;
    align-items: center;
    padding: 13px 14px;
    border: 1px solid rgba(255, 215, 119, .20);
    background: linear-gradient(90deg, rgba(255, 215, 119, .08), rgba(69, 217, 255, .035));
    clip-path: polygon(12px 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%, 0 12px);
}
.hero-academy-icon {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,.055);
    border: 1px solid rgba(255,255,255,.08);
}
.hero-academy-note strong { display: block; color: #ffe3a5; }
.hero-academy-note small { display: block; color: rgba(225,235,255,.76); line-height: 1.35; }
.hero-academy-note .btn-secondary { min-height: 40px; padding: 0 16px; }

/* Colonne droite : même langage que les ressources du haut */
.resource-rich-card {
    border-radius: 0 !important;
    clip-path: polygon(12px 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%, 0 12px);
    grid-template-columns: 48px minmax(0, 1fr) !important;
    padding: 16px !important;
}
.resource-rich-value { font-size: 1.32rem !important; }

/* Bâtiments : cartes larges, lisibles, boutons alignés */
#buildings-panel tbody tr {
    grid-template-columns: minmax(280px, 1fr) minmax(340px, 1.05fr) minmax(190px, .62fr) !important;
    gap: 18px !important;
}
#buildings-panel td { min-width: 0 !important; }
.button-container { align-self: center; }

@media (max-width: 1600px) {
    .village-layout { grid-template-columns: 276px minmax(680px, 1fr) 330px !important; }
    .village-summary-panel { grid-template-columns: 320px minmax(0, 1fr) !important; }
    .resource-strip-detailed { grid-template-columns: repeat(6, minmax(122px, 1fr)) !important; gap: 10px !important; }
    .top-resource-card, .top-meta-card { padding: 14px 12px !important; }
    .top-resource-card { grid-template-columns: 34px minmax(0, 1fr) !important; gap: 9px !important; }
    .top-resource-icon { width: 34px !important; height: 34px !important; }
    .top-resource-icon img { width: 24px !important; height: 24px !important; }
    .top-resource-main, .top-meta-card strong { font-size: 1.08rem !important; }
    .top-resource-cap, .top-resource-sub, .top-resource-extra, .top-meta-card small { font-size: .70rem !important; }
}

@media (max-width: 1380px) {
    .village-layout {
        grid-template-columns: 260px minmax(0, 1fr) !important;
        grid-template-areas:
            "summary summary"
            "nav main"
            "side side" !important;
    }
    .village-summary-panel { grid-template-columns: 1fr !important; }
    .resource-strip-detailed { grid-template-columns: repeat(3, minmax(190px, 1fr)) !important; }
    .village-right-column { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
    .hero-command-grid { grid-template-columns: repeat(2, minmax(0, 1fr)) !important; }
}

@media (max-width: 960px) {
    .village-layout {
        grid-template-columns: 1fr !important;
        grid-template-areas: "summary" "nav" "main" "side" !important;
    }
    .resource-strip-detailed,
    .hero-command-grid,
    .hero-stats-grid,
    .village-right-column { grid-template-columns: 1fr !important; }
    .summary-left { grid-template-columns: 1fr !important; }
    .summary-left::before,
    .summary-left::after { display: none !important; }
    .summary-left .panel-kicker,
    .summary-left h1,
    .summary-left .village-subtitle { grid-column: auto !important; }
    .hero-academy-note { grid-template-columns: 1fr; }
}

/* =========================================================
   HUD PREMIUM V4 - Corrections Bibi
   - flèches village restaurées
   - bouton Académie avec villageId
   - colonne Lingots dédiée
   - ressources hautes façon colonne droite, valeurs lisibles
   ========================================================= */
.village-title-row {
    grid-column: 2 !important;
    display: grid !important;
    grid-template-columns: 44px minmax(0, auto) 44px !important;
    align-items: center !important;
    justify-content: start !important;
    gap: 12px !important;
}

.village-title-row h1 {
    grid-column: auto !important;
    margin: 0 !important;
}

.village-switch-btn {
    width: 42px !important;
    height: 42px !important;
    display: inline-grid !important;
    place-items: center !important;
    border: 1px solid rgba(71, 180, 255, .52) !important;
    color: #e9f7ff !important;
    background:
        radial-gradient(circle at 50% 0%, rgba(68, 170, 255, .42), rgba(10, 40, 85, .92) 62%),
        linear-gradient(180deg, rgba(34, 107, 220, .92), rgba(10, 33, 78, .98)) !important;
    box-shadow: inset 0 0 18px rgba(80, 180, 255, .24), 0 0 16px rgba(24, 116, 255, .22) !important;
    border-radius: 9px !important;
    font-size: 1.7rem !important;
    font-weight: 900 !important;
    line-height: 1 !important;
    cursor: pointer !important;
    transition: transform .18s ease, filter .18s ease, opacity .18s ease;
}

.village-switch-btn:hover:not(:disabled) {
    transform: translateY(-1px) !important;
    filter: brightness(1.15) !important;
}

.village-switch-btn:disabled,
.village-switch-btn.is-disabled {
    opacity: .35 !important;
    cursor: not-allowed !important;
    filter: grayscale(.25) !important;
}

/* Le bandeau reste premium mais les ressources passent en vraie lecture HUD. */
.village-summary-panel {
    grid-template-columns: minmax(305px, 360px) minmax(0, 1fr) !important;
    padding: 30px 28px !important;
    gap: 30px !important;
}

.resource-strip-detailed {
    grid-template-columns: repeat(7, minmax(112px, 1fr)) !important;
    gap: 12px !important;
}

.top-resource-card,
.top-meta-card {
    min-height: 112px !important;
    padding: 14px 13px !important;
    overflow: hidden !important;
}

.top-resource-card {
    grid-template-columns: 38px minmax(0, 1fr) !important;
    align-content: center !important;
    align-items: center !important;
    gap: 10px !important;
}

.top-resource-icon {
    width: 38px !important;
    height: 38px !important;
    align-self: center !important;
}

.top-resource-icon img {
    width: 26px !important;
    height: 26px !important;
}

.top-resource-content {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) !important;
    align-content: center !important;
    min-width: 0 !important;
}

.top-resource-head,
.top-meta-label {
    font-size: .66rem !important;
    letter-spacing: .14em !important;
    margin-bottom: 5px !important;
    white-space: normal !important;
    overflow: visible !important;
    text-overflow: clip !important;
}

.top-resource-main,
.top-meta-card strong {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    font-size: clamp(1rem, .86vw, 1.28rem) !important;
    line-height: 1.08 !important;
    white-space: nowrap !important;
    overflow: visible !important;
    text-overflow: clip !important;
}

.top-resource-cap {
    display: block !important;
    margin-top: 1px !important;
    font-size: .72rem !important;
    line-height: 1.08 !important;
    color: rgba(223, 236, 255, .72) !important;
    white-space: nowrap !important;
}

.top-resource-sub,
.top-resource-extra,
.top-meta-card small {
    margin-top: 4px !important;
    font-size: .68rem !important;
    line-height: 1.15 !important;
    white-space: normal !important;
}

.top-meta-card {
    justify-content: center !important;
}

.hero-academy-note .btn-secondary,
.nav-village-actions .btn-secondary {
    cursor: pointer !important;
}

/* À taille moyenne, on évite de tout compresser : retour à deux lignes propres. */
@media (max-width: 1500px) {
    .village-summary-panel {
        grid-template-columns: 1fr !important;
        gap: 20px !important;
    }
    .summary-left {
        max-width: 100% !important;
    }
    .resource-strip-detailed {
        grid-template-columns: repeat(4, minmax(160px, 1fr)) !important;
    }
    .top-resource-main,
    .top-meta-card strong {
        font-size: 1.18rem !important;
    }
}

@media (max-width: 1050px) {
    .resource-strip-detailed {
        grid-template-columns: repeat(2, minmax(170px, 1fr)) !important;
    }
    .village-title-row {
        grid-template-columns: 38px minmax(0, auto) 38px !important;
    }
    .village-switch-btn {
        width: 38px !important;
        height: 38px !important;
    }
}


/* V6 - Combat : détail des unités disponibles */
.combat-units-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.combat-unit-card {
    position: relative;
    padding: 16px;
    background: linear-gradient(135deg, rgba(8, 29, 58, .82), rgba(3, 12, 27, .88));
    border: 1px solid rgba(69, 217, 255, .18);
    clip-path: polygon(12px 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%, 0 12px);
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.025), 0 12px 28px rgba(0,0,0,.18);
}

.combat-unit-head {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.combat-unit-icon {
    width: 42px;
    height: 42px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255,255,255,.055);
    border: 1px solid rgba(69, 217, 255, .14);
    font-size: 1.25rem;
}

.combat-unit-label {
    display: block;
    color: rgba(180, 207, 238, .82);
    text-transform: uppercase;
    letter-spacing: .08em;
    font-size: .72rem;
    font-weight: 800;
}

.combat-unit-head strong {
    display: block;
    color: var(--hud-text, #edf7ff);
    font-size: 1.85rem;
    line-height: 1;
    margin-top: 4px;
}

.combat-unit-lines {
    display: grid;
    gap: 6px;
    color: rgba(216, 229, 250, .78);
    font-size: .88rem;
    line-height: 1.3;
}

.combat-unit-lines b {
    color: #fff;
    font-weight: 900;
}

/* V6 - le tutoriel masqué ne réapparaît plus au changement d’onglet */
#tutorial-panel[data-tutorial-dismissed="1"] {
    display: none !important;
}

/* V6 - texte académie plus joueur */
.hero-academy-note strong {
    color: #ffe28a !important;
    text-transform: uppercase;
    letter-spacing: .04em;
}

@media (max-width: 1200px) {
    .combat-units-grid { grid-template-columns: 1fr; }
}


/* PREMIUM HUD - finition propre sans nouveau fichier JS */
:root {
    --hud-cyan: #45d9ff;
    --hud-cyan-soft: rgba(69, 217, 255, .36);
    --hud-blue: #2f8cff;
    --hud-panel: rgba(5, 16, 34, .94);
    --hud-panel-2: rgba(8, 24, 48, .96);
    --hud-line: rgba(82, 191, 255, .22);
}

/* Fond plus premium, mais léger */
body {
    background:
        radial-gradient(circle at 50% -120px, rgba(36, 135, 255, .18), transparent 34%),
        radial-gradient(circle at 82% 8%, rgba(35, 194, 255, .08), transparent 26%),
        linear-gradient(180deg, #07142b 0%, #030914 48%, #02070f 100%) !important;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(rgba(69,217,255,.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(69,217,255,.025) 1px, transparent 1px);
    background-size: 72px 72px;
    mask-image: radial-gradient(circle at 50% 15%, black 0%, transparent 72%);
    opacity: .45;
}

/* Barre de navigation plus proche HUD */
.top-bar {
    position: relative;
    padding: 18px 38px !important;
    border-radius: 0 !important;
    clip-path: polygon(36px 0, calc(100% - 36px) 0, 100% 28px, 100% calc(100% - 28px), calc(100% - 36px) 100%, 36px 100%, 0 calc(100% - 28px), 0 28px);
    background:
        linear-gradient(90deg, transparent 0%, rgba(35, 94, 168, .13) 18%, rgba(10, 24, 49, .94) 50%, rgba(35, 94, 168, .13) 82%, transparent 100%),
        linear-gradient(180deg, rgba(9, 25, 50, .92), rgba(3, 10, 23, .96)) !important;
    border: 1px solid rgba(82, 191, 255, .20);
    box-shadow: 0 24px 70px rgba(0,0,0,.38), inset 0 1px 0 rgba(255,255,255,.04);
}

.top-bar::before,
.top-bar::after {
    content: "";
    position: absolute;
    height: 2px;
    width: 92px;
    background: linear-gradient(90deg, transparent, rgba(69,217,255,.75));
    top: 0;
}
.top-bar::before { left: 24px; }
.top-bar::after { right: 24px; transform: scaleX(-1); }

.top-bar button {
    min-width: 118px !important;
    border-radius: 0 !important;
    clip-path: polygon(12px 0, calc(100% - 8px) 0, 100% 8px, 100% calc(100% - 12px), calc(100% - 12px) 100%, 8px 100%, 0 calc(100% - 8px), 0 12px);
    background: linear-gradient(180deg, rgba(21, 45, 82, .92), rgba(6, 16, 35, .96)) !important;
    border: 1px solid rgba(105, 173, 255, .17) !important;
    color: rgba(238,246,255,.95) !important;
}
.top-bar button.active,
.top-bar button:hover {
    background: linear-gradient(180deg, rgba(45, 134, 255, .78), rgba(16, 52, 112, .94)) !important;
    border-color: rgba(110, 204, 255, .50) !important;
    box-shadow: 0 0 26px rgba(47,140,255,.18), inset 0 1px 0 rgba(255,255,255,.14);
}

/* Cadres techno plus nets */
.panel,
.village-summary-panel,
.village-nav-panel,
.village-hero-panel,
.village-preview-panel,
.village-side-panel,
#buildings-panel,
#combat-panel,
#reports-panel,
.construction-queue-panel {
    border-radius: 0 !important;
    border: 1px solid rgba(82, 191, 255, .18) !important;
    background:
        linear-gradient(135deg, rgba(69,217,255,.045), transparent 22%),
        linear-gradient(180deg, rgba(6, 18, 38, .96), rgba(3, 10, 22, .97)) !important;
    box-shadow:
        0 28px 80px rgba(0,0,0,.46),
        inset 0 1px 0 rgba(255,255,255,.045),
        inset 0 0 0 1px rgba(69,217,255,.025) !important;
}

.panel::before,
.village-summary-panel::before,
.village-hero-panel::before,
.village-preview-panel::before,
.village-side-panel::before {
    border-color: rgba(69, 217, 255, .52) !important;
}

/* Bandeau village plus équilibré */
.village-summary-panel {
    padding: 28px 34px !important;
    grid-template-columns: minmax(300px, 380px) minmax(0, 1fr) !important;
    gap: 26px !important;
}

.summary-left h1 {
    text-shadow: 0 0 24px rgba(69,217,255,.13);
}

.resource-strip-detailed {
    grid-template-columns: repeat(6, minmax(150px, 1fr)) !important;
    gap: 16px !important;
}

.top-resource-card,
.top-meta-card {
    min-height: 106px !important;
    padding: 14px 16px !important;
    background:
        linear-gradient(135deg, rgba(69,217,255,.065), transparent 38%),
        linear-gradient(180deg, rgba(17, 37, 70, .88), rgba(6, 16, 34, .94)) !important;
}

.top-resource-card {
    grid-template-columns: 44px minmax(0, 1fr) !important;
}

.top-resource-icon {
    width: 44px !important;
    height: 44px !important;
    box-shadow: 0 0 18px rgba(69,217,255,.08);
}

.top-resource-main,
.top-meta-card strong {
    font-size: clamp(1.25rem, 1.05vw, 1.55rem) !important;
    color: #f6fbff !important;
}

.top-resource-cap {
    color: rgba(221,235,255,.78) !important;
}

/* Centre de commandement : plus respirant */
.village-hero-panel {
    padding: 26px 28px !important;
}

.village-hero-content {
    align-items: start !important;
}

.hero-actions .btn-primary {
    background: linear-gradient(180deg, #338fff, #1553b7) !important;
    box-shadow: 0 0 34px rgba(47,140,255,.26), inset 0 1px 0 rgba(255,255,255,.22);
}

.hero-command-card {
    background:
        linear-gradient(135deg, rgba(59, 150, 255, .08), transparent 42%),
        linear-gradient(180deg, rgba(12, 32, 64, .94), rgba(5, 16, 34, .96)) !important;
    border-color: rgba(82, 191, 255, .18) !important;
}

.hero-stat-card {
    background: linear-gradient(180deg, rgba(13, 35, 68, .92), rgba(5, 14, 31, .95)) !important;
}

/* Note académie plus gamer */
.hero-academy-note {
    border-color: rgba(255, 214, 109, .30) !important;
    background:
        linear-gradient(90deg, rgba(255, 205, 71, .13), rgba(12, 28, 56, .70) 42%, rgba(7, 18, 37, .92)) !important;
}

/* Aperçu rapide plus premium */
.village-preview-panel {
    overflow: hidden;
}

.village-preview-panel .preview-image,
.village-preview-panel img,
.preview-image {
    border-radius: 0 !important;
    clip-path: polygon(14px 0, 100% 0, 100% calc(100% - 14px), calc(100% - 14px) 100%, 0 100%, 0 14px);
    border: 1px solid rgba(69,217,255,.20) !important;
    box-shadow: 0 0 28px rgba(47,140,255,.12);
}

.village-preview-panel::after {
    content: "";
    position: absolute;
    inset: auto 18px 18px 18px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(69,217,255,.55), transparent);
    opacity: .8;
}

/* Colonne droite : cartes plus propres */
.resource-rich-card {
    border-color: rgba(82, 191, 255, .15) !important;
    background:
        linear-gradient(135deg, rgba(69,217,255,.055), transparent 36%),
        linear-gradient(180deg, rgba(12, 34, 65, .92), rgba(5, 15, 32, .95)) !important;
}

/* Activité du village : retour proche de l'ancien style, écriture blanche */
.nav-status-card {
    background:
        linear-gradient(180deg, rgba(11, 31, 61, .90), rgba(5, 16, 35, .94)) !important;
}

.nav-status-row {
    border-radius: 0 !important;
    clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px) !important;
    background: rgba(255, 255, 255, .045) !important;
    border: 1px solid rgba(99, 169, 255, .09) !important;
}

.nav-status-row span,
.nav-status-row strong {
    color: #f4f8ff !important;
}

.nav-status-row strong {
    min-width: 22px;
    text-align: right;
    font-weight: 800;
}

.nav-status-action:hover {
    background: rgba(69, 137, 255, .12) !important;
    border-color: rgba(82, 191, 255, .20) !important;
}

/* Bâtiments : meilleur effet premium sans bouger le JS */
.building-card,
.building-list-card {
    background:
        linear-gradient(135deg, rgba(69,217,255,.045), transparent 30%),
        linear-gradient(180deg, rgba(12, 31, 58, .94), rgba(5, 15, 31, .96)) !important;
    border-color: rgba(82, 191, 255, .14) !important;
}

/* Responsive : éviter les valeurs coupées */
@media (max-width: 1500px) {
    .resource-strip-detailed {
        grid-template-columns: repeat(3, minmax(180px, 1fr)) !important;
    }

    .village-summary-panel {
        grid-template-columns: 1fr !important;
    }
}

@media (max-width: 1150px) {
    .resource-strip-detailed {
        grid-template-columns: repeat(2, minmax(180px, 1fr)) !important;
    }
}


/* HUD Premium V10 - finition, raccourcis et vue globale */
.nav-village-actions {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 10px !important;
}

.nav-village-actions .btn-secondary {
    min-height: 44px;
    justify-content: center;
}

.nav-status-row span,
.nav-status-row strong {
    color: #f4f8ff !important;
}

.nav-status-row strong {
    font-weight: 900;
}

.village-global-panel {
    padding: 24px 26px;
}

.global-villages-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 16px;
    margin-top: 18px;
}

.global-village-card {
    position: relative;
    padding: 18px;
    border: 1px solid rgba(82, 191, 255, .18);
    background:
        linear-gradient(135deg, rgba(69,217,255,.06), transparent 38%),
        linear-gradient(180deg, rgba(12, 32, 64, .94), rgba(5, 16, 34, .96));
    clip-path: polygon(14px 0, 100% 0, 100% calc(100% - 14px), calc(100% - 14px) 100%, 0 100%, 0 14px);
    box-shadow: inset 0 1px 0 rgba(255,255,255,.04), 0 18px 42px rgba(0,0,0,.22);
}

.global-village-card::before {
    content: "";
    position: absolute;
    left: 14px;
    top: 0;
    width: 70px;
    height: 1px;
    background: linear-gradient(90deg, rgba(69,217,255,.8), transparent);
}

.global-village-head {
    display: flex;
    justify-content: space-between;
    align-items: start;
    gap: 14px;
}

.global-village-label {
    display: block;
    color: #6fe7ff;
    text-transform: uppercase;
    font-size: .7rem;
    font-weight: 900;
    letter-spacing: .16em;
    margin-bottom: 5px;
}

.global-village-head strong {
    display: block;
    font-size: 1.25rem;
    color: #f7fbff;
}

.global-village-head small {
    display: block;
    margin-top: 4px;
    color: rgba(218, 232, 255, .72);
}

.global-village-resources {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 16px;
}

.global-village-resources span {
    padding: 9px 10px;
    color: #f4f8ff;
    background: rgba(255,255,255,.045);
    border: 1px solid rgba(255,255,255,.055);
    clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px);
    font-weight: 800;
}

.global-village-footer {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 14px;
}

.global-village-footer span {
    padding: 6px 9px;
    border-radius: 999px;
    color: rgba(226, 238, 255, .88);
    background: rgba(69, 119, 255, .10);
    border: 1px solid rgba(82, 191, 255, .12);
    font-size: .82rem;
}

.building-card-highlight {
    animation: buildingHudPulse 2.2s ease;
}

@keyframes buildingHudPulse {
    0%, 100% { box-shadow: inherit; }
    25%, 75% { box-shadow: 0 0 0 1px rgba(69,217,255,.7), 0 0 34px rgba(69,217,255,.25), inset 0 0 22px rgba(69,217,255,.08); }
}

/* Messagerie/village cohérence */
.empty-state {
    padding: 18px;
    color: rgba(232, 242, 255, .78);
    border: 1px dashed rgba(82, 191, 255, .18);
    background: rgba(255,255,255,.035);
    clip-path: polygon(12px 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%, 0 12px);
}


/* HUD Premium V11 - page Commandement unique */
.commandement-shortcuts .mode-tab {
    justify-content: space-between !important;
}

.village-main-column {
    gap: 20px !important;
}

.commandement-section {
    scroll-margin-top: 26px;
}

.commandement-focus {
    animation: commandementFocusPulse 1.2s ease;
}

@keyframes commandementFocusPulse {
    0%, 100% { box-shadow: inherit; }
    35%, 75% {
        box-shadow:
            0 0 0 1px rgba(69,217,255,.55),
            0 0 42px rgba(69,217,255,.16),
            inset 0 0 26px rgba(69,217,255,.06);
    }
}

.village-global-panel {
    order: 2;
}

.village-hero-panel {
    order: 1;
}

.construction-queue-panel {
    order: 3;
}

#buildings-panel {
    order: 4;
}

#combat-panel {
    order: 5;
}

#reports-panel {
    order: 6;
}

#tutorial-panel {
    order: 7;
}

.nav-village-actions .btn-secondary {
    color: #f4f8ff !important;
}

/* Unifie les sections qui étaient avant des onglets */
.village-tab-panel:not(.hidden) {
    display: block;
}

#combat-panel,
#reports-panel,
#buildings-panel,
.construction-queue-panel,
.village-global-panel {
    margin-top: 0 !important;
}

/* Vue globale plus lisible */
.global-villages-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)) !important;
}

.global-village-card .btn-primary {
    white-space: nowrap;
}

/* Messagerie et rapports intégrés visuellement dans la page village */
#reports-panel .panel-header,
#combat-panel .panel-header,
#buildings-panel .panel-header {
    border-bottom: 1px solid rgba(82,191,255,.10);
    padding-bottom: 14px;
}

/* Réduction des gros espaces si tout est sur une page */
.village-hero-panel,
.village-global-panel,
#combat-panel,
#reports-panel,
#buildings-panel,
.construction-queue-panel {
    margin-bottom: 0;
}


/* V12 - fusion navigation + accès rapides */
.nav-village-actions-card { display: none !important; }
.commandement-shortcuts { gap: 10px !important; }
.commandement-shortcuts .mode-tab { width: 100%; }
.commandement-shortcuts .mode-tab.mode-tab-link { justify-content: space-between !important; }


/* HUD Premium V13 - les sections redeviennent des vrais onglets */
.village-tab-panel.hidden {
    display: none !important;
}

.village-tab-panel:not(.hidden) {
    display: block;
}

.commandement-section {
    scroll-margin-top: 26px;
}

.nav-village-actions-card {
    display: none !important;
}


/* V14 - navigation simple + pages bâtiment premium */
.nav-village-actions-card,
.messenger-shortcuts-panel {
    display: none !important;
}

.commandement-shortcuts {
    gap: 10px !important;
}

.commandement-shortcuts .mode-tab {
    width: 100%;
    justify-content: space-between !important;
}

.village-tab-panel.hidden {
    display: none !important;
}

.village-tab-panel:not(.hidden) {
    display: block;
}

/* Header premium réutilisé sur Académie/Caserne/Forge */
.academy-premium-header {
    position: relative;
    z-index: 2;
    padding: 18px 24px 10px;
}

.academy-premium-header .banner-wrap {
    display: flex;
    justify-content: center;
    margin-bottom: 14px;
}

.academy-premium-header .banner-image {
    width: 100%;
    max-width: 1080px;
    border-radius: 18px;
    border: 1px solid rgba(82, 191, 255, .16);
    box-shadow: 0 18px 60px rgba(0,0,0,.35);
}

/* Style techno sur pages Académie/Caserne/Forge */
.academy-panel,
.caserne-panel,
.forge-panel,
.caserne-table-panel,
.forge-section,
.academy-side-panel {
    border-radius: 0 !important;
    border: 1px solid rgba(82, 191, 255, .16) !important;
    background:
        linear-gradient(135deg, rgba(69,217,255,.045), transparent 24%),
        linear-gradient(180deg, rgba(6, 18, 38, .96), rgba(3, 10, 22, .97)) !important;
    box-shadow:
        0 24px 70px rgba(0,0,0,.38),
        inset 0 1px 0 rgba(255,255,255,.045) !important;
}

.academy-btn,
.caserne-return-btn,
.caserne-btn,
.forge-btn,
.forge-action-btn {
    border-radius: 0 !important;
    clip-path: polygon(12px 0, calc(100% - 8px) 0, 100% 8px, 100% calc(100% - 12px), calc(100% - 12px) 100%, 8px 100%, 0 calc(100% - 8px), 0 12px);
}

.academy-title,
.caserne-title,
.forge-title {
    text-shadow: 0 0 24px rgba(69,217,255,.16);
}


/* HUD Premium V18 - Vue globale détaillée + ordre vue générale */
.village-hero-panel {
    order: 1 !important;
}

#overview-panel {
    order: 2 !important;
}

#tutorial-panel {
    order: 3 !important;
}

.village-global-panel {
    order: 1 !important;
}

.global-villages-grid {
    grid-template-columns: repeat(auto-fit, minmax(360px, 1fr)) !important;
    gap: 18px !important;
}

.global-village-card-v18 {
    min-height: 280px;
    display: grid;
    align-content: start;
    gap: 14px;
}

.global-village-card-v18.is-loading {
    min-height: 160px;
    opacity: .72;
}

.global-village-status-line {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.global-status-badge {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 10px;
    border: 1px solid rgba(82, 191, 255, .14);
    background: rgba(69, 119, 255, .09);
    color: rgba(230, 242, 255, .86);
    font-size: .78rem;
    font-weight: 800;
    border-radius: 999px;
}

.global-status-badge.active {
    border-color: rgba(106, 232, 161, .28);
    background: rgba(106, 232, 161, .10);
    color: #a9ffc9;
}

.global-status-badge.stable {
    border-color: rgba(106, 232, 161, .20);
    color: #d9ffe8;
}

.global-status-badge.warning {
    border-color: rgba(255, 117, 117, .28);
    background: rgba(255, 117, 117, .10);
    color: #ffd1d1;
}

.global-status-badge.building {
    border-color: rgba(255, 215, 119, .28);
    background: rgba(255, 215, 119, .10);
    color: #ffe4a8;
}

.global-village-resources.premium {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 10px !important;
}

.global-village-resources.premium div {
    display: grid;
    gap: 5px;
    padding: 12px;
    color: #f4f8ff;
    background:
        linear-gradient(135deg, rgba(69, 217, 255, .055), transparent 48%),
        rgba(255,255,255,.042);
    border: 1px solid rgba(82, 191, 255, .12);
    clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);
}

.global-village-resources.premium span {
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    clip-path: none !important;
    color: rgba(210, 229, 255, .78);
    font-size: .78rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.global-village-resources.premium strong {
    font-size: 1.25rem;
    line-height: 1;
    color: #f8fbff;
}

.global-village-resources.premium small {
    color: rgba(207, 225, 255, .72);
    font-size: .78rem;
}

.global-village-card-v18 .global-village-footer {
    margin-top: 0 !important;
}

/* évite que la vue globale prenne l’ordre du mode commandement */
.village-tab-panel.hidden {
    display: none !important;
}

/* Patch navigation village - lien messagerie et thème premium homogène */
.village-nav-panel {
    background: linear-gradient(180deg, rgba(4, 10, 23, .97), rgba(2, 8, 18, .95)) !important;
    border: 1px solid rgba(53, 138, 255, .36) !important;
    box-shadow: 0 22px 44px rgba(0,0,0,.36), 0 0 34px rgba(0,102,255,.12) !important;
    clip-path: polygon(18px 0, calc(100% - 18px) 0, 100% 18px, 100% calc(100% - 18px), calc(100% - 18px) 100%, 18px 100%, 0 calc(100% - 18px), 0 18px);
}
.commandement-shortcuts .mode-tab {
    position: relative;
    z-index: 2;
    display: flex !important;
    align-items: center;
    justify-content: space-between !important;
    min-height: 44px;
    border: 1px solid rgba(68,156,255,.36) !important;
    background: linear-gradient(180deg, rgba(8,22,47,.86), rgba(4,13,30,.86)) !important;
    color: #edf7ff !important;
    border-radius: 14px !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.04) !important;
    pointer-events: auto !important;
}
.commandement-shortcuts .mode-tab:hover,
.commandement-shortcuts .mode-tab:focus-visible {
    transform: translateY(-1px);
    border-color: rgba(80,210,255,.82) !important;
    background: linear-gradient(180deg, rgba(17,116,231,.95), rgba(7,68,157,.94)) !important;
    outline: none;
}
.commandement-shortcuts .mode-tab.active {
    border-color: rgba(80,210,255,.92) !important;
    background: linear-gradient(180deg, rgba(17,116,231,.98), rgba(7,68,157,.98)) !important;
    box-shadow: inset 0 0 16px rgba(80,166,255,.18), 0 0 22px rgba(22,146,255,.16) !important;
}
.commandement-shortcuts .mode-tab.mode-tab-link::before {
    content: '↗';
    order: 2;
    margin-left: auto;
    color: rgba(216,242,255,.78);
    font-weight: 900;
}
.commandement-shortcuts .mode-tab.mode-tab-link .nav-pill {
    order: 3;
    margin-left: 8px;
}
.village-nav-panel .panel-header h2 {
    color: #f2f8ff !important;
}
.nav-status-card,
.nav-helper-card {
    background: rgba(6,16,34,.72) !important;
    border: 1px solid rgba(53,138,255,.20) !important;
    border-radius: 16px !important;
}
.nav-status-action {
    cursor: pointer;
    pointer-events: auto !important;
}


/* =========================================================
   PATCH MOBILE GLOBAL - 20260610
   Objectif : rendre le village, les constructions et les panneaux premium jouables sur téléphone.
   ========================================================= */
html, body {
    max-width: 100%;
    overflow-x: hidden;
}

button, .btn-primary, .btn-secondary, .academy-btn, .mode-tab, .btn-action-ressources {
    touch-action: manipulation;
}

@media (max-width: 820px) {
    body.ultra-page {
        min-width: 0 !important;
    }

    .main-header,
    .ultra-hero,
    #main-content,
    .village-shell,
    .village-layout,
    .village-main-column,
    .panel,
    .village-global-panel,
    .village-hero-panel,
    #buildings-panel,
    .construction-queue-window,
    .info-panel {
        width: 100% !important;
        max-width: 100% !important;
        min-width: 0 !important;
        box-sizing: border-box !important;
    }

    .banner-wrap { padding: 8px 10px !important; }
    .banner-image { max-height: 78px !important; object-fit: contain !important; }

    .top-bar {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        width: calc(100% - 20px) !important;
        max-width: calc(100% - 20px) !important;
        margin: 8px auto 12px !important;
        padding: 10px !important;
        gap: 8px !important;
        overflow: visible !important;
    }

    .top-bar button,
    .top-bar a {
        width: 100% !important;
        min-width: 0 !important;
        min-height: 44px !important;
        padding: 9px 8px !important;
        font-size: .78rem !important;
        white-space: normal !important;
        line-height: 1.12 !important;
    }

    .ultra-hero,
    .village-summary-panel,
    .village-dashboard-layout,
    .village-layout,
    .main-village-grid,
    .commandement-grid,
    .hero-command-grid,
    .global-villages-grid,
    .combat-summary-grid,
    .mini-stats-grid,
    .resource-strip,
    .resource-strip-detailed,
    .overview-grid,
    .overview-section-grid,
    .panel-grid,
    .academy-meta,
    .academy-stats,
    .academy-card-grid,
    .academy-research-grid,
    .academy-action-grid,
    .academy-summary-grid {
        display: grid !important;
        grid-template-columns: 1fr !important;
    }

    .summary-center,
    .summary-right,
    .village-nav-panel,
    .village-main-column {
        grid-column: auto !important;
    }

    .village-mode-bar,
    .commandement-shortcuts {
        display: grid !important;
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
        gap: 8px !important;
    }

    .mode-tab,
    .mode-tab-link,
    .hero-actions button,
    .summary-action-group button,
    .nav-village-actions button,
    .btn-primary,
    .btn-secondary,
    .btn-action-ressources,
    .action-buttons-wrap button {
        width: 100% !important;
        min-height: 46px !important;
        min-width: 0 !important;
        padding: 10px 12px !important;
        justify-content: center !important;
        white-space: normal !important;
        text-align: center !important;
    }

    .hero-actions,
    .summary-action-group,
    .action-buttons-wrap,
    .button-container {
        display: grid !important;
        grid-template-columns: 1fr !important;
        gap: 8px !important;
        width: 100% !important;
    }

    .table-wrap {
        overflow: visible !important;
        width: 100% !important;
    }

    #buildings-panel table,
    #buildings-panel thead,
    #buildings-panel tbody,
    #buildings-panel tr,
    #buildings-panel th,
    #buildings-panel td {
        display: block !important;
        width: 100% !important;
        box-sizing: border-box !important;
    }

    #buildings-panel thead { display: none !important; }

    #buildings-panel tr {
        margin: 0 0 14px !important;
        padding: 14px !important;
        border: 1px solid rgba(82, 191, 255, .18) !important;
        border-radius: 18px !important;
        background: linear-gradient(180deg, rgba(12,31,58,.94), rgba(5,15,31,.96)) !important;
    }

    #buildings-panel td {
        padding: 8px 0 !important;
        border: 0 !important;
        text-align: left !important;
    }

    #buildings-panel td:nth-child(1)::before,
    #buildings-panel td:nth-child(2)::before,
    #buildings-panel td:nth-child(3)::before {
        display: block;
        margin-bottom: 6px;
        color: rgba(150, 205, 255, .82);
        font-size: .76rem;
        font-weight: 900;
        text-transform: uppercase;
        letter-spacing: .09em;
    }

    #buildings-panel td:nth-child(1)::before { content: 'Bâtiment'; }
    #buildings-panel td:nth-child(2)::before { content: 'Besoins'; }
    #buildings-panel td:nth-child(3)::before { content: 'Actions'; }

    .resource,
    .academy-cost-pill,
    .academy-requirement,
    .top-resource-card,
    .top-meta-card {
        min-width: 0 !important;
        max-width: 100% !important;
    }

    .modal-card,
    .report-modal-dialog,
    .building-detail-dialog,
    .construction-queue-panel {
        width: calc(100vw - 20px) !important;
        max-width: calc(100vw - 20px) !important;
        max-height: calc(100vh - 24px) !important;
        overflow-y: auto !important;
    }
}

@media (max-width: 480px) {
    .top-bar {
        grid-template-columns: 1fr 1fr !important;
    }

    .village-mode-bar,
    .commandement-shortcuts {
        grid-template-columns: 1fr !important;
    }

    .panel,
    .village-global-panel,
    .village-hero-panel,
    #buildings-panel {
        padding-left: 12px !important;
        padding-right: 12px !important;
    }
}


.movement-map-btn {
    min-height: 38px;
    padding: 8px 12px;
}
@media (max-width: 760px) {
    .movement-actions .movement-map-btn,
    .movement-actions .btn-danger {
        width: 100%;
        justify-content: center;
    }
}

/* Patch moral combat */
.classic-chance-track.defense i {
    background: linear-gradient(90deg, #60a5fa, #93c5fd);
    box-shadow: 0 0 16px rgba(96,165,250,0.35);
}
.classic-morale-detail {
    margin: 8px 0 12px;
    padding: 10px 12px;
    border: 1px solid rgba(148,163,184,.16);
    border-radius: 14px;
    background: rgba(15,23,42,.45);
    color: #cbd5e1;
    font-size: .82rem;
}
.classic-stat-pill small {
    color: #94a3b8;
    font-size: .72rem;
    font-weight: 700;
    margin-left: 5px;
}


.unit-report-img {
    width: 24px;
    height: 24px;
    object-fit: contain;
    vertical-align: middle;
    filter: drop-shadow(0 2px 3px rgba(0,0,0,.45));
}

.siege-damage-section {
    border-color: rgba(229, 154, 64, .35);
    background: linear-gradient(135deg, rgba(94, 54, 24, .35), rgba(38, 24, 14, .28));
}

.siege-damage-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 9px 0;
    border-top: 1px solid rgba(255,255,255,.08);
}
.siege-damage-row:first-of-type { border-top: 0; }
.siege-damage-row img {
    width: 42px;
    height: 42px;
    object-fit: contain;
    filter: drop-shadow(0 3px 4px rgba(0,0,0,.45));
}
.siege-damage-row strong { display:block; color:#fff; }
.siege-damage-row span { display:block; color: var(--text-soft, rgba(255,255,255,.72)); font-size: .84rem; margin-top:2px; }


/* Patch visuels unités/bâtiments + soutiens riches */
.building-title-cell{display:flex;align-items:flex-start;gap:12px;min-width:220px}.building-list-icon{width:46px;height:46px;object-fit:contain;border-radius:14px;filter:drop-shadow(0 10px 14px rgba(0,0,0,.35));flex:0 0 auto}.building-title-cell strong{color:#fff}.building-title-cell span{color:#cbd5e1}.support-line-rich{align-items:flex-start}.support-unit-list{display:flex;flex-wrap:wrap;gap:6px;margin-top:7px}.support-unit-chip{display:inline-flex;align-items:center;gap:5px;padding:4px 7px;border:1px solid rgba(148,163,184,.24);border-radius:999px;background:rgba(15,23,42,.62);font-size:.78rem;color:#dbeafe}.support-unit-chip .unit-report-img{width:18px;height:18px}.caserne-unit-img{width:30px;height:30px;object-fit:contain;vertical-align:middle;filter:drop-shadow(0 8px 10px rgba(0,0,0,.38))}.unit-report-img{width:24px;height:24px;object-fit:contain;vertical-align:middle;filter:drop-shadow(0 6px 8px rgba(0,0,0,.35))}

/* Tutoriel étendu + popup alpha */
.tutorial-guide-line,
.tutorial-quest-guide,
.tutorial-progress-line {
    margin-top: 8px;
    color: rgba(237, 243, 255, 0.9);
    font-size: 0.9rem;
}

.tutorial-guide-line,
.tutorial-quest-guide {
    padding: 8px 10px;
    border-radius: 12px;
    border: 1px solid rgba(255, 207, 106, 0.18);
    background: rgba(255, 207, 106, 0.08);
}

.tutorial-progress-line {
    display: inline-flex;
    gap: 8px;
    align-items: center;
    padding: 7px 10px;
    border-radius: 999px;
    border: 1px solid rgba(91, 214, 164, 0.2);
    background: rgba(91, 214, 164, 0.08);
}

.tutorial-progress-line span { opacity: 0.78; }
.tutorial-progress-line strong { color: #eafdf4; }

.tutorial-welcome-backdrop {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 22px;
    background: rgba(4, 9, 22, 0.78);
    backdrop-filter: blur(8px);
}

.tutorial-welcome-card {
    width: min(720px, 100%);
    padding: 26px;
    border-radius: 24px;
    border: 1px solid rgba(118, 150, 255, 0.3);
    background: linear-gradient(145deg, rgba(16, 29, 68, 0.98), rgba(8, 14, 34, 0.98));
    box-shadow: 0 28px 90px rgba(0, 0, 0, 0.46);
}

.tutorial-welcome-badge {
    display: inline-flex;
    margin-bottom: 12px;
    padding: 6px 12px;
    border-radius: 999px;
    border: 1px solid rgba(255, 206, 96, 0.3);
    background: rgba(255, 206, 96, 0.12);
    color: #ffe6a0;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-size: 0.76rem;
}

.tutorial-welcome-card h2 {
    margin: 0 0 10px;
    font-size: clamp(1.6rem, 3vw, 2.25rem);
}

.tutorial-welcome-card p {
    color: rgba(232, 239, 255, 0.86);
    line-height: 1.55;
}

.tutorial-welcome-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    margin: 18px 0;
}

.tutorial-welcome-grid div {
    padding: 14px;
    border-radius: 16px;
    border: 1px solid rgba(120, 149, 255, 0.18);
    background: rgba(7, 15, 36, 0.56);
}

.tutorial-welcome-grid strong,
.tutorial-welcome-grid span {
    display: block;
}

.tutorial-welcome-grid span {
    margin-top: 5px;
    color: rgba(232, 239, 255, 0.76);
    font-size: 0.9rem;
}

.tutorial-welcome-note {
    border-left: 3px solid rgba(91, 214, 164, 0.72);
    padding-left: 12px;
}

.tutorial-welcome-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 18px;
}

@media (max-width: 720px) {
    .tutorial-welcome-card { padding: 20px; }
    .tutorial-welcome-grid { grid-template-columns: 1fr; }
    .tutorial-welcome-actions { justify-content: stretch; }
    .tutorial-welcome-actions .btn-primary { width: 100%; }
}


/* Patch rapports : filtres, archives et Speedsim */
.reports-filter-bar {
    margin: 0 0 14px;
}

.reports-filter-row,
.report-inline-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.reports-filter-select {
    width: auto;
    min-width: 170px;
}

.btn-secondary.active {
    border-color: rgba(112, 169, 255, 0.55);
    background: rgba(69, 119, 255, 0.22);
    color: #eef5ff;
}

.report-status-chip.category {
    color: #d8e8ff;
    border-color: rgba(112, 169, 255, 0.32);
    background: rgba(69, 119, 255, 0.14);
}

.report-status-chip.archive {
    color: #ffe6bb;
    border-color: rgba(255, 190, 102, 0.32);
    background: rgba(255, 190, 102, 0.12);
}

.report-archived {
    opacity: 0.88;
}

.reports-category-select {
    min-width: 180px;
    max-width: 260px;
    cursor: pointer;
}

.report-category-inline-label {
    display: flex;
    align-items: center;
    gap: 8px;
    color: rgba(232, 240, 255, 0.82);
    font-size: 0.84rem;
}

.report-category-modal-select {
    min-height: 38px;
    max-width: 220px;
}

.report-category-select-pulse {
    animation: reportCategoryPulse 0.9s ease-in-out;
}

@keyframes reportCategoryPulse {
    0%, 100% { box-shadow: 0 0 0 rgba(112, 169, 255, 0); }
    45% { box-shadow: 0 0 0 4px rgba(112, 169, 255, 0.22); }
}

.report-inline-actions {
    margin-top: 10px;
}

.speedsim-grid {
    margin-top: 12px;
}

.speedsim-section {
    margin-top: 14px;
    padding: 12px;
    border: 1px solid rgba(112, 169, 255, 0.16);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.025);
}

@media (max-width: 720px) {
    .reports-filter-select,
    .reports-category-select,
    .report-category-modal-select,
    .reports-filter-row > button {
        width: 100%;
        max-width: none;
    }

    .report-category-inline-label {
        align-items: stretch;
        flex-direction: column;
        width: 100%;
    }
}


/* Patch caserne : messages non bloquants, sans alert blanche mobile */
.caserne-inline-message {
    margin: 12px 0 0;
    padding: 10px 12px;
    border-radius: 14px;
    border: 1px solid rgba(112, 169, 255, 0.22);
    background: rgba(112, 169, 255, 0.10);
    color: #eaf2ff;
    font-weight: 700;
    line-height: 1.35;
}

.caserne-inline-message.success {
    border-color: rgba(97, 226, 155, 0.28);
    background: rgba(97, 226, 155, 0.10);
}

.caserne-inline-message.error {
    border-color: rgba(255, 104, 104, 0.30);
    background: rgba(255, 104, 104, 0.10);
}

.caserne-inline-message.hidden {
    display: none;
}

/* Patch Speedsim mobile : fenêtre déplaçable et scroll interne */
#speed-sim-modal.speed-sim-overlay {
    align-items: flex-start;
    justify-content: center;
    padding: 10px;
    overflow: hidden;
    z-index: 60;
}

#speed-sim-modal .speed-sim-card {
    position: fixed;
    top: 10px;
    left: 50%;
    transform: translateX(-50%);
    width: min(980px, calc(100vw - 20px));
    max-height: calc(100vh - 20px);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    padding: 14px;
}

#speed-sim-modal .speed-sim-drag-handle {
    flex: 0 0 auto;
    cursor: grab;
    user-select: none;
    touch-action: none;
    gap: 12px;
    padding-bottom: 10px;
    border-bottom: 1px solid rgba(255,255,255,0.08);
}

#speed-sim-modal .speed-sim-drag-handle:active {
    cursor: grabbing;
}

.speed-sim-drag-tip {
    display: inline-flex;
    margin-top: 4px;
    color: var(--muted);
    font-size: .78rem;
    font-weight: 700;
}

#speed-sim-modal .speed-sim-body {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 10px 6px 8px 0;
}

#speed-sim-modal .speed-sim-body::-webkit-scrollbar {
    width: 8px;
}

#speed-sim-modal .speed-sim-body::-webkit-scrollbar-thumb {
    border-radius: 999px;
    background: rgba(111, 169, 255, 0.38);
}

#speed-sim-modal .speed-sim-actions {
    flex: 0 0 auto;
    margin-top: 8px;
    padding-top: 10px;
    border-top: 1px solid rgba(255,255,255,0.08);
    background: linear-gradient(180deg, rgba(8, 16, 30, 0), rgba(8, 16, 30, 0.98) 30%);
}

body.speedsim-dragging {
    user-select: none;
    cursor: grabbing;
}

@media (max-width: 720px) {
    #speed-sim-modal.speed-sim-overlay {
        padding: 6px;
    }

    #speed-sim-modal .speed-sim-card {
        top: 6px;
        width: calc(100vw - 12px);
        max-height: calc(100vh - 12px);
        padding: 10px;
        border-radius: 18px;
    }

    #speed-sim-modal .speed-sim-body {
        padding-right: 2px;
    }

    #speed-sim-modal .speed-sim-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 8px;
    }

    #speed-sim-modal .modal-input {
        padding: 10px 11px;
        min-height: 40px;
    }

    #speed-sim-modal .speedsim-section {
        padding: 10px;
        margin-top: 10px;
    }

    #speed-sim-modal .report-title-row {
        flex-direction: column;
        align-items: stretch;
        gap: 6px;
    }

    #speed-sim-modal .speed-sim-actions {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    #speed-sim-modal .speed-sim-actions button {
        width: 100%;
    }
}

@media (max-width: 430px) {
    #speed-sim-modal .speed-sim-grid {
        grid-template-columns: 1fr;
    }
}


/* Patch bonus village : sources stèle/territoire/architecture lisibles */
.bonus-source-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 10px;
    margin-bottom: 12px;
}

.bonus-source-card {
    padding: 11px 12px;
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,.10);
    background: rgba(255,255,255,.04);
}

.bonus-source-card strong {
    display: block;
    margin-bottom: 5px;
    color: var(--text-main);
    font-size: .9rem;
}

.bonus-source-card span {
    color: var(--text-soft);
    font-size: .83rem;
    line-height: 1.35;
}

.bonus-source-alliance {
    border-color: rgba(255, 214, 102, .22);
    background: linear-gradient(180deg, rgba(255, 214, 102, .12), rgba(255,255,255,.035));
}

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

    .active-bonus-pill {
        width: 100%;
    }
}

/* Patch 6 rapports : select sombre + suppression catégories */
.modal-input,
.modal-input select,
.reports-filter-select,
.reports-category-select {
    color: #eef5ff;
    background-color: rgba(8, 16, 30, 0.96);
    border-color: rgba(112, 169, 255, 0.28);
}

.modal-input option,
.reports-filter-select option,
.reports-category-select option,
.report-category-modal-select option {
    color: #eef5ff;
    background: #08101e;
}

.reports-filter-select:focus,
.reports-category-select:focus,
.report-category-modal-select:focus {
    outline: none;
    border-color: rgba(112, 169, 255, 0.72);
    box-shadow: 0 0 0 3px rgba(69, 119, 255, 0.20);
}

.reports-category-help {
    margin-top: 8px;
    font-size: 0.82rem;
    line-height: 1.35;
    color: rgba(232, 240, 255, 0.68);
}

.reports-category-help strong {
    color: #ffffff;
}

/* Patch 8 rapports : journal protégé + actions directes */
.report-inline-actions .btn-danger-soft {
    border-color: rgba(255, 111, 111, 0.34);
    background: rgba(255, 111, 111, 0.10);
    color: #ffd7d7;
}

.report-inline-actions .btn-danger-soft:hover {
    background: rgba(255, 111, 111, 0.18);
}

.reports-toolbar-actions .btn-danger-soft {
    white-space: nowrap;
}

@media (max-width: 720px) {
    .report-inline-actions .btn-secondary,
    .report-inline-actions .btn-danger-soft {
        width: 100%;
        justify-content: center;
    }
}


/* Patch stratégie : rapports espionnage + navigation mobile visible */
.spy-buildings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
    margin-top: 10px;
}
.spy-building-pill {
    align-items: flex-start;
    min-height: 74px;
}
.spy-building-pill small {
    color: rgba(255, 224, 148, .85);
    font-size: .76rem;
}
.attack-catapult-target {
    margin: 12px 0;
    padding: 12px;
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 14px;
    background: rgba(5, 12, 24, .72);
    display: grid;
    gap: 6px;
}
.attack-catapult-target label {
    font-weight: 800;
    color: #fff7d7;
}
.attack-catapult-target select {
    width: 100%;
    min-height: 42px;
    border-radius: 10px;
    border: 1px solid rgba(82,191,255,.28);
    background: rgba(0,0,0,.35);
    color: #f7fbff;
    padding: 0 10px;
}
.attack-catapult-target small {
    color: rgba(220,235,255,.72);
    line-height: 1.35;
}
.attack-summary-card-wide {
    grid-column: 1 / -1;
}
.mobile-village-quickbar {
    display: none;
}
@media (max-width: 720px) {
    body {
        padding-bottom: 78px;
    }
    .mobile-village-quickbar {
        position: fixed;
        left: 8px;
        right: 8px;
        bottom: 8px;
        z-index: 1200;
        display: grid;
        grid-template-columns: repeat(5, minmax(0, 1fr));
        gap: 6px;
        padding: 8px;
        border: 1px solid rgba(82,191,255,.26);
        border-radius: 18px;
        background: rgba(4, 10, 22, .94);
        box-shadow: 0 12px 36px rgba(0,0,0,.45), inset 0 0 18px rgba(82,191,255,.08);
        backdrop-filter: blur(10px);
    }
    .mobile-village-quickbar button {
        position: relative;
        min-width: 0;
        min-height: 48px;
        border: 1px solid rgba(255,255,255,.10);
        border-radius: 14px;
        background: rgba(255,255,255,.055);
        color: #f7fbff;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 2px;
        font-size: 1rem;
        font-weight: 800;
    }
    .mobile-village-quickbar button span {
        font-size: .66rem;
        line-height: 1;
    }
    .mobile-village-quickbar .nav-pill {
        position: absolute;
        top: -5px;
        right: -4px;
        min-width: 18px;
        height: 18px;
        padding: 0 5px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        font-size: .66rem;
    }
    .mobile-village-quickbar .nav-pill.hidden {
        display: none !important;
    }
}

/* =========================================================
   VISUELS ÉVOLUTIFS DES BÂTIMENTS - TECHNOLOGIES V1
   Les illustrations sont chargées depuis :
   images/buildings/illustrations/<batiment>/tech_<palier>.webp
   ========================================================= */

.building-visual-help {
    margin: 7px 0 0;
    max-width: 680px;
    color: rgba(203, 222, 246, .78);
    font-size: .88rem;
    line-height: 1.45;
}

#buildings-panel tbody tr {
    grid-template-columns: minmax(340px, 1.15fr) minmax(250px, 1fr) minmax(190px, .7fr) !important;
}

#buildings-panel tbody td:first-child {
    min-width: 0;
    padding: 0 !important;
    overflow: hidden;
    background: rgba(3, 12, 27, .72);
}

.building-title-cell {
    position: relative;
    display: block !important;
    width: 100%;
    min-width: 0 !important;
}

.building-visual-shell {
    position: relative;
    min-height: 218px;
    overflow: hidden;
    isolation: isolate;
    background:
        radial-gradient(circle at 25% 18%, rgba(69, 217, 255, .18), transparent 38%),
        linear-gradient(145deg, #122b4a 0%, #07172c 52%, #030a17 100%);
}

.building-visual-shell::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background:
        linear-gradient(90deg, rgba(255,255,255,.03) 1px, transparent 1px),
        linear-gradient(rgba(255,255,255,.025) 1px, transparent 1px);
    background-size: 34px 34px;
    mask-image: linear-gradient(to bottom, rgba(0,0,0,.5), transparent 85%);
}

.building-visual-image {
    position: absolute;
    inset: 0;
    z-index: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center;
    transform: scale(1.015);
    filter: saturate(.95) contrast(1.04);
    transition: transform .35s ease, filter .35s ease;
}

#buildings-panel tbody tr:hover .building-visual-image {
    transform: scale(1.055);
    filter: saturate(1.08) contrast(1.06);
}

.building-visual-image.is-fallback-icon {
    object-fit: contain;
    object-position: 72% 45%;
    padding: 34px 20px 30px 42%;
    opacity: .46;
    transform: none !important;
    filter: drop-shadow(0 20px 32px rgba(0, 0, 0, .55));
}

.building-visual-image.is-missing {
    display: none;
}

.building-visual-shade {
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    background:
        linear-gradient(90deg, rgba(2, 9, 20, .94) 0%, rgba(2, 9, 20, .72) 45%, rgba(2, 9, 20, .18) 100%),
        linear-gradient(0deg, rgba(2, 8, 18, .95) 0%, rgba(2, 8, 18, .10) 65%);
}

.building-visual-caption {
    position: absolute;
    z-index: 4;
    left: 22px;
    right: 72px;
    bottom: 20px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
    min-width: 0;
}

.building-visual-caption strong {
    display: block;
    max-width: 100%;
    color: #fff !important;
    font-size: clamp(1.18rem, 1.45vw, 1.55rem);
    line-height: 1.1;
    text-wrap: balance;
    text-shadow: 0 3px 14px rgba(0, 0, 0, .8);
}

.building-visual-caption > span:not(.building-tech-badge) {
    color: rgba(226, 238, 255, .9) !important;
    font-size: .92rem;
    font-weight: 700;
    text-shadow: 0 2px 8px rgba(0, 0, 0, .8);
}

.building-tech-badge {
    display: inline-flex;
    align-items: center;
    min-height: 26px;
    margin-bottom: 5px;
    padding: 4px 9px;
    border: 1px solid rgba(91, 214, 255, .45);
    border-radius: 999px;
    background: rgba(5, 25, 47, .78);
    color: #bfeeff !important;
    font-size: .7rem;
    font-weight: 900;
    letter-spacing: .075em;
    text-transform: uppercase;
    backdrop-filter: blur(8px);
    box-shadow: 0 0 18px rgba(50, 183, 255, .14);
}

.building-title-cell > .building-visual-shell > .building-list-icon {
    position: absolute;
    z-index: 5;
    top: 16px;
    right: 16px;
    width: 48px !important;
    height: 48px !important;
    padding: 6px;
    border: 1px solid rgba(255, 255, 255, .2);
    border-radius: 15px;
    background: rgba(5, 18, 36, .7);
    object-fit: contain;
    backdrop-filter: blur(10px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, .3);
}

.building-title-copy {
    padding: 0 18px 18px;
    background: linear-gradient(180deg, rgba(4, 15, 31, .96), rgba(4, 14, 29, .99));
}

.building-title-copy:empty {
    display: none;
}

.building-title-copy .building-info-block {
    margin-top: 0;
    padding: 15px 2px 0;
    border: 0;
    border-top: 1px solid rgba(119, 194, 255, .12);
    border-radius: 0;
    background: transparent;
    color: rgba(222, 234, 249, .82);
    font-size: .85rem;
    line-height: 1.5;
}

@media (max-width: 1100px) {
    #buildings-panel tbody tr {
        grid-template-columns: 1fr !important;
    }

    .building-visual-shell {
        min-height: 250px;
    }
}

@media (max-width: 720px) {
    #buildings-panel tr {
        padding: 0 !important;
        overflow: hidden;
    }

    #buildings-panel td:not(:first-child) {
        padding: 14px !important;
    }

    #buildings-panel td:nth-child(1)::before {
        display: none !important;
    }

    .building-visual-shell {
        min-height: 210px;
    }

    .building-visual-caption {
        left: 16px;
        right: 66px;
        bottom: 16px;
    }

    .building-title-copy {
        padding: 0 14px 15px;
    }

    .building-visual-image.is-fallback-icon {
        object-position: 78% 44%;
        padding: 42px 12px 34px 45%;
    }
}


/* =========================================================
   PATCH JUILLET 2026 - BANNIÈRE INTÉGRÉE POUR LES BÂTIMENTS
   - supprime la petite icône en haut à droite
   - met l'image en vraie bannière sur toute la largeur
   - conserve les besoins / actions en dessous
   ========================================================= */

#buildings-panel tbody tr {
    grid-template-columns: minmax(0, 1.32fr) minmax(250px, 0.88fr) !important;
    align-items: stretch;
}

#buildings-panel tbody td:first-child {
    grid-column: 1 / -1;
    min-width: 0;
    padding: 0 !important;
    overflow: hidden;
    border-bottom: 1px solid rgba(119, 194, 255, .10);
    background: rgba(3, 12, 27, .72);
}

#buildings-panel tbody td:nth-child(2),
#buildings-panel tbody td:nth-child(3) {
    min-width: 0;
    background: linear-gradient(180deg, rgba(4, 15, 31, .92), rgba(3, 12, 25, .98));
}

#buildings-panel tbody td:nth-child(2) {
    border-left: 0 !important;
}

#buildings-panel tbody td:nth-child(3) {
    border-left: 1px solid rgba(255,255,255,.06);
}

.building-title-cell {
    position: relative;
    display: block !important;
    width: 100%;
    min-width: 0 !important;
}

.building-visual-shell {
    position: relative;
    min-height: 240px;
    overflow: hidden;
    isolation: isolate;
    background:
        radial-gradient(circle at 25% 18%, rgba(69, 217, 255, .18), transparent 38%),
        linear-gradient(145deg, #122b4a 0%, #07172c 52%, #030a17 100%);
}

.building-visual-image {
    object-position: center right;
}

.building-visual-shade {
    background:
        linear-gradient(90deg, rgba(2, 9, 20, .96) 0%, rgba(2, 9, 20, .82) 28%, rgba(2, 9, 20, .42) 58%, rgba(2, 9, 20, .10) 100%),
        linear-gradient(0deg, rgba(2, 8, 18, .96) 0%, rgba(2, 8, 18, .20) 55%, rgba(2, 8, 18, .08) 100%);
}

.building-visual-caption {
    left: 24px;
    right: 24px;
    bottom: 22px;
    max-width: min(420px, 70%);
}

.building-visual-caption strong {
    font-size: clamp(1.35rem, 1.9vw, 1.8rem);
}

.building-tech-badge {
    margin-bottom: 8px;
}

.building-title-copy {
    padding: 14px 20px 18px;
    background: linear-gradient(180deg, rgba(4, 15, 31, .96), rgba(4, 14, 29, .99));
}

.building-title-copy .building-info-block {
    padding-top: 14px;
}

/* sécurité : on masque l'ancienne petite icône si elle existe encore */
.building-title-cell > .building-visual-shell > .building-list-icon {
    display: none !important;
}

@media (max-width: 1100px) {
    #buildings-panel tbody tr {
        grid-template-columns: 1fr !important;
    }

    #buildings-panel tbody td:nth-child(3) {
        border-left: 0 !important;
        border-top: 1px solid rgba(255,255,255,.06);
    }

    .building-visual-shell {
        min-height: 250px;
    }

    .building-visual-caption {
        max-width: min(440px, 82%);
    }
}

@media (max-width: 720px) {
    #buildings-panel tr {
        padding: 0 !important;
        overflow: hidden;
    }

    #buildings-panel td:not(:first-child) {
        padding: 14px !important;
    }

    #buildings-panel td:first-child::before,
    #buildings-panel td:nth-child(1)::before {
        display: none !important;
        content: none !important;
    }

    .building-visual-shell {
        min-height: 205px;
    }

    .building-visual-image {
        object-position: 68% center;
    }

    .building-visual-caption {
        left: 16px;
        right: 16px;
        bottom: 16px;
        max-width: calc(100% - 32px);
    }

    .building-visual-caption strong {
        font-size: 1.55rem;
    }

    .building-visual-caption > span:not(.building-tech-badge) {
        font-size: .88rem;
    }

    .building-title-copy {
        padding: 0 14px 15px;
    }
}


/* =========================================================
   PATCH JUILLET 2026 - VERSION FUSIONNÉE EN LIGNE
   - la bannière, la description, les besoins et les boutons
     restent sur la même ligne dans une seule carte
   ========================================================= */

#buildings-panel tbody tr {
    grid-template-columns: minmax(430px, 1.28fr) minmax(250px, 0.72fr) minmax(220px, 0.58fr) !important;
    align-items: stretch;
}

#buildings-panel tbody td:first-child {
    grid-column: auto !important;
    border-bottom: 0 !important;
    min-width: 0;
    padding: 0 !important;
    overflow: hidden;
    background: rgba(3, 12, 27, .72);
}

#buildings-panel tbody td:nth-child(2),
#buildings-panel tbody td:nth-child(3) {
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: linear-gradient(180deg, rgba(4, 15, 31, .92), rgba(3, 12, 25, .98));
}

#buildings-panel tbody td:nth-child(2) {
    border-left: 1px solid rgba(255,255,255,.06);
}

#buildings-panel tbody td:nth-child(3) {
    border-left: 1px solid rgba(255,255,255,.06);
}

.building-title-cell {
    position: relative;
    display: flex !important;
    flex-direction: column;
    width: 100%;
    min-width: 0 !important;
    height: 100%;
}

.building-visual-shell {
    position: relative;
    min-height: 210px;
    overflow: hidden;
    isolation: isolate;
    background:
        radial-gradient(circle at 25% 18%, rgba(69, 217, 255, .18), transparent 38%),
        linear-gradient(145deg, #122b4a 0%, #07172c 52%, #030a17 100%);
}

.building-visual-image {
    object-position: center right;
}

.building-visual-shade {
    background:
        linear-gradient(90deg, rgba(2, 9, 20, .97) 0%, rgba(2, 9, 20, .84) 26%, rgba(2, 9, 20, .42) 58%, rgba(2, 9, 20, .10) 100%),
        linear-gradient(0deg, rgba(2, 8, 18, .88) 0%, rgba(2, 8, 18, .18) 58%, rgba(2, 8, 18, .06) 100%);
}

.building-visual-caption {
    left: 24px;
    right: 24px;
    bottom: 18px;
    max-width: min(410px, 72%);
}

.building-visual-caption strong {
    font-size: clamp(1.28rem, 1.75vw, 1.72rem);
}

.building-title-copy {
    flex: 1 1 auto;
    padding: 12px 18px 16px;
    background: linear-gradient(180deg, rgba(4, 15, 31, .98), rgba(4, 14, 29, .99));
}

.building-title-copy .building-info-block {
    margin-top: 0;
    padding: 0;
    border: 0;
    background: transparent;
    font-size: .92rem;
    line-height: 1.55;
}

.building-title-copy .building-info-line + .building-info-line {
    margin-top: 8px;
}

#buildings-panel .action-buttons-wrap {
    width: 100%;
}

#buildings-panel .action-buttons-wrap button {
    width: 100%;
}

@media (max-width: 1180px) {
    #buildings-panel tbody tr {
        grid-template-columns: minmax(360px, 1fr) minmax(220px, .8fr) minmax(190px, .65fr) !important;
    }
}

@media (max-width: 980px) {
    #buildings-panel tbody tr {
        grid-template-columns: 1fr !important;
    }

    #buildings-panel tbody td:nth-child(2),
    #buildings-panel tbody td:nth-child(3) {
        border-left: 0 !important;
        border-top: 1px solid rgba(255,255,255,.06);
    }

    .building-visual-shell {
        min-height: 220px;
    }
}

@media (max-width: 720px) {
    .building-visual-shell {
        min-height: 190px;
    }

    .building-visual-image {
        object-position: 68% center;
    }

    .building-visual-caption {
        left: 16px;
        right: 16px;
        bottom: 14px;
        max-width: calc(100% - 32px);
    }

    .building-title-copy {
        padding: 12px 14px 14px;
    }
}


/* =========================================================
   PATCH JUILLET 2026 - CORRECTION PNG + IMAGE PLEINE COLONNE
   ========================================================= */

#buildings-panel tbody tr {
    grid-template-columns: minmax(460px, 1.34fr) minmax(230px, 0.72fr) minmax(210px, 0.58fr) !important;
    align-items: stretch;
}

#buildings-panel tbody td:first-child {
    display: flex !important;
    flex-direction: column;
    justify-content: stretch;
    min-height: 292px;
}

.building-title-cell {
    display: flex !important;
    flex-direction: column;
    width: 100%;
    height: 100%;
    min-height: 292px;
}

.building-visual-shell {
    position: relative;
    flex: 1 1 auto;
    min-height: 226px;
    width: 100%;
}

.building-visual-image,
.building-visual-image.is-fallback-icon {
    display: block !important;
    width: 100%;
    height: 100%;
    max-width: none;
    max-height: none;
    opacity: 1;
}

.building-visual-image {
    object-fit: cover;
    object-position: center right;
}

.building-visual-image.is-fallback-icon {
    object-fit: contain;
    object-position: center right;
    padding: 22px 18px 22px 36%;
    opacity: .50;
}

.building-visual-caption {
    left: 22px;
    right: 22px;
    bottom: 18px;
    max-width: min(420px, 74%);
}

.building-title-copy {
    flex: 0 0 auto;
    margin-top: 0;
}

@media (max-width: 1180px) {
    #buildings-panel tbody tr {
        grid-template-columns: minmax(350px, 1fr) minmax(210px, .78fr) minmax(185px, .66fr) !important;
    }
}

@media (max-width: 980px) {
    #buildings-panel tbody tr {
        grid-template-columns: 1fr !important;
    }

    #buildings-panel tbody td:first-child,
    .building-title-cell {
        min-height: auto;
    }

    .building-visual-shell {
        min-height: 220px;
    }
}

@media (max-width: 720px) {
    .building-visual-shell {
        min-height: 190px;
    }

    .building-visual-image {
        object-position: 68% center;
    }

    .building-visual-image.is-fallback-icon {
        padding: 18px 12px 18px 34%;
    }
}


/* Badge technologique masqué jusqu'à l'ajout du vrai système d'âges */
.building-tech-badge {
    display: none !important;
}



/* =========================================================
   PATCH JUILLET 2026 - RAPPORTS UNITÉS PLUS LISIBLES
   - corrige l'icône des boucliers
   - ajoute des pastilles colorées pour mieux distinguer les unités
   ========================================================= */

.report-unit-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 999px;
    border: 1px solid rgba(255,255,255,.14);
    background: linear-gradient(180deg, rgba(255,255,255,.08), rgba(255,255,255,.03));
    box-shadow: inset 0 1px 0 rgba(255,255,255,.08), 0 10px 16px rgba(0,0,0,.16);
    overflow: hidden;
    vertical-align: middle;
}

.classic-unit-head-icon .report-unit-badge {
    width: 30px;
    height: 30px;
    margin-inline: auto;
}

.classic-unit-cell .report-unit-badge {
    width: 24px;
    height: 24px;
}

.report-unit-badge .unit-report-img {
    width: 18px;
    height: 18px;
    object-fit: contain;
    filter: drop-shadow(0 4px 6px rgba(0,0,0,.28));
}

.classic-unit-head-icon .report-unit-badge .unit-report-img {
    width: 20px;
    height: 20px;
}

.report-unit-badge.type-soldat,
.report-unit-badge.type-guerrier {
    background: linear-gradient(180deg, rgba(80, 157, 255, .22), rgba(80, 157, 255, .10));
    border-color: rgba(80,157,255,.30);
}

.report-unit-badge.type-barbare {
    background: linear-gradient(180deg, rgba(181, 123, 73, .24), rgba(181, 123, 73, .10));
    border-color: rgba(181,123,73,.32);
}

.report-unit-badge.type-archer {
    background: linear-gradient(180deg, rgba(76, 181, 120, .22), rgba(76, 181, 120, .10));
    border-color: rgba(76,181,120,.30);
}

.report-unit-badge.type-bouclier {
    background: linear-gradient(180deg, rgba(244, 196, 48, .24), rgba(244, 196, 48, .10));
    border-color: rgba(244,196,48,.32);
}

.report-unit-badge.type-belier {
    background: linear-gradient(180deg, rgba(174, 117, 255, .24), rgba(174, 117, 255, .10));
    border-color: rgba(174,117,255,.32);
}

.report-unit-badge.type-catapulte {
    background: linear-gradient(180deg, rgba(255, 133, 71, .24), rgba(255, 133, 71, .10));
    border-color: rgba(255,133,71,.32);
}

.report-unit-badge.type-espion {
    background: linear-gradient(180deg, rgba(116, 129, 153, .28), rgba(116, 129, 153, .12));
    border-color: rgba(116,129,153,.34);
}

.report-unit-badge.type-diplomate {
    background: linear-gradient(180deg, rgba(68, 208, 213, .24), rgba(68, 208, 213, .10));
    border-color: rgba(68,208,213,.30);
}

.classic-unit-table thead th {
    background: linear-gradient(180deg, rgba(255,255,255,.042), rgba(255,255,255,.02));
}

.classic-unit-table thead small {
    margin-top: 4px;
    color: rgba(220, 232, 255, .92);
    font-weight: 800;
    letter-spacing: .08em;
}


/* =========================================================
   PATCH JUILLET 2026 - PORTRAITS ET COULEURS DES RAPPORTS V4
   ========================================================= */

.classic-unit-table th,
.classic-unit-table td {
    transition: background .18s ease, color .18s ease;
}

.classic-unit-head-icon {
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 3px;
}

.report-unit-badge {
    width: 36px !important;
    height: 36px !important;
    flex: 0 0 36px;
    border-width: 1px;
}

.classic-unit-head-icon .report-unit-badge {
    width: 46px !important;
    height: 46px !important;
    flex-basis: 46px;
}

.classic-unit-cell .report-unit-badge {
    width: 32px !important;
    height: 32px !important;
    flex-basis: 32px;
}

.report-unit-badge .unit-report-img,
.classic-unit-head-icon .report-unit-badge .unit-report-img,
.classic-unit-cell .report-unit-badge .unit-report-img {
    width: 100% !important;
    height: 100% !important;
    padding: 2px;
    box-sizing: border-box;
    border-radius: inherit;
    object-fit: cover;
    object-position: center 22%;
    filter: drop-shadow(0 4px 7px rgba(0,0,0,.34));
}

.report-unit-badge.type-belier .unit-report-img,
.report-unit-badge.type-catapulte .unit-report-img {
    padding: 4px;
    object-fit: contain;
    object-position: center;
}

.classic-unit-cell {
    gap: 7px;
}

.classic-unit-table thead small {
    font-size: .66rem;
    font-weight: 950;
    letter-spacing: .08em;
    text-shadow: 0 1px 8px rgba(0,0,0,.55);
}

/* Couleurs des noms et fonds de colonnes */
.classic-unit-table th.unit-type-soldat small { color: #8fc2ff; }
.classic-unit-table th.unit-type-barbare small { color: #dca776; }
.classic-unit-table th.unit-type-archer small { color: #7ee1a2; }
.classic-unit-table th.unit-type-bouclier small { color: #f4d760; }
.classic-unit-table th.unit-type-belier small { color: #c59aff; }
.classic-unit-table th.unit-type-catapulte small { color: #ffad72; }
.classic-unit-table th.unit-type-espion small { color: #b5c1d5; }
.classic-unit-table th.unit-type-diplomate small { color: #73e0e4; }
.classic-unit-table th.unit-type-total small { color: #ffd76d; }

.classic-unit-table th.unit-type-soldat,
.classic-unit-table td.unit-type-soldat { background: rgba(80,157,255,.045); }
.classic-unit-table th.unit-type-barbare,
.classic-unit-table td.unit-type-barbare { background: rgba(181,123,73,.052); }
.classic-unit-table th.unit-type-archer,
.classic-unit-table td.unit-type-archer { background: rgba(76,181,120,.045); }
.classic-unit-table th.unit-type-bouclier,
.classic-unit-table td.unit-type-bouclier { background: rgba(244,196,48,.045); }
.classic-unit-table th.unit-type-belier,
.classic-unit-table td.unit-type-belier { background: rgba(174,117,255,.045); }
.classic-unit-table th.unit-type-catapulte,
.classic-unit-table td.unit-type-catapulte { background: rgba(255,133,71,.045); }
.classic-unit-table th.unit-type-espion,
.classic-unit-table td.unit-type-espion { background: rgba(116,129,153,.055); }
.classic-unit-table th.unit-type-diplomate,
.classic-unit-table td.unit-type-diplomate { background: rgba(68,208,213,.045); }
.classic-unit-table th.unit-type-total,
.classic-unit-table td.unit-type-total { background: rgba(255,205,73,.035); }

/* Quantités normales colorées par unité */
.classic-unit-table tr:not(.loss-row):not(.survivor-row) td.unit-type-soldat .classic-unit-cell strong { color: #b8d8ff; }
.classic-unit-table tr:not(.loss-row):not(.survivor-row) td.unit-type-barbare .classic-unit-cell strong { color: #efc097; }
.classic-unit-table tr:not(.loss-row):not(.survivor-row) td.unit-type-archer .classic-unit-cell strong { color: #a6efbf; }
.classic-unit-table tr:not(.loss-row):not(.survivor-row) td.unit-type-bouclier .classic-unit-cell strong { color: #ffe98f; }
.classic-unit-table tr:not(.loss-row):not(.survivor-row) td.unit-type-belier .classic-unit-cell strong { color: #d9baff; }
.classic-unit-table tr:not(.loss-row):not(.survivor-row) td.unit-type-catapulte .classic-unit-cell strong { color: #ffc29b; }
.classic-unit-table tr:not(.loss-row):not(.survivor-row) td.unit-type-espion .classic-unit-cell strong { color: #d4ddec; }
.classic-unit-table tr:not(.loss-row):not(.survivor-row) td.unit-type-diplomate .classic-unit-cell strong { color: #a4f2f4; }
.classic-unit-table tr:not(.loss-row):not(.survivor-row) td.unit-type-total .classic-unit-cell strong { color: #ffe19a; }

/* Les pertes et survivants gardent un code universel fort */
.classic-unit-table .loss-row .classic-unit-cell strong {
    color: #ff9fa8 !important;
    text-shadow: 0 0 12px rgba(255,90,105,.16);
}

.classic-unit-table .survivor-row .classic-unit-cell strong {
    color: #91f0b8 !important;
    text-shadow: 0 0 12px rgba(68,220,130,.14);
}

@media (max-width: 720px) {
    .report-unit-badge { width: 32px !important; height: 32px !important; flex-basis: 32px; }
    .classic-unit-head-icon .report-unit-badge { width: 40px !important; height: 40px !important; flex-basis: 40px; }
    .classic-unit-cell .report-unit-badge { width: 28px !important; height: 28px !important; flex-basis: 28px; }
}


/* =========================================================
   PATCH RAPPORTS V5 - PORTRAITS PNG RÉELS
   Les fichiers sont chargés depuis /images/units/reports/*.png
   dans les rapports internes ET les rapports partagés.
   ========================================================= */

.report-unit-badge {
    overflow: hidden !important;
    background-clip: padding-box;
}

.report-unit-badge .report-unit-portrait {
    display: block !important;
    width: 100% !important;
    height: 100% !important;
    min-width: 100% !important;
    min-height: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    object-fit: cover !important;
    object-position: center 18% !important;
    border-radius: inherit !important;
    opacity: 1 !important;
    filter: none !important;
}

.report-unit-badge.type-belier .report-unit-portrait,
.report-unit-badge.type-catapulte .report-unit-portrait {
    object-fit: contain !important;
    object-position: center !important;
    padding: 3px !important;
}

/* Portraits plus visibles dans l'en-tête des rapports */
.classic-unit-head-icon .report-unit-badge {
    width: 54px !important;
    height: 54px !important;
    flex-basis: 54px !important;
}

.classic-unit-cell .report-unit-badge {
    width: 34px !important;
    height: 34px !important;
    flex-basis: 34px !important;
}

@media (max-width: 720px) {
    .classic-unit-head-icon .report-unit-badge {
        width: 44px !important;
        height: 44px !important;
        flex-basis: 44px !important;
    }

    .classic-unit-cell .report-unit-badge {
        width: 30px !important;
        height: 30px !important;
        flex-basis: 30px !important;
    }
}

/* HUD Premium V19 - Gestion multi-villages intégrée */
.global-village-card-v19 {
    min-height: 0;
    gap: 14px;
}

.global-army-overview {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(92px, 1fr));
    gap: 8px;
}

.global-army-overview span {
    display: grid;
    gap: 3px;
    padding: 10px 11px;
    border: 1px solid rgba(86, 167, 255, .14);
    background: rgba(4, 14, 31, .72);
    border-radius: 12px;
}

.global-army-overview small {
    color: rgba(197, 220, 248, .70);
    font-size: .70rem;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.global-army-overview strong {
    color: #f7fbff;
    font-size: 1rem;
}

.global-recruit-panel {
    display: grid;
    gap: 10px;
    padding: 14px;
    border: 1px solid rgba(80, 194, 255, .22);
    background: linear-gradient(135deg, rgba(10, 47, 91, .40), rgba(3, 13, 29, .86));
    border-radius: 16px;
}

.global-recruit-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.global-recruit-heading > div {
    display: grid;
    gap: 2px;
}

.global-recruit-heading small {
    color: rgba(138, 207, 255, .78);
    text-transform: uppercase;
    letter-spacing: .06em;
    font-size: .70rem;
}

.global-recruit-heading strong {
    color: #f5fbff;
}

.global-recruit-max {
    flex: 0 0 auto;
    padding: 7px 10px;
    border-radius: 999px;
    border: 1px solid rgba(113, 235, 171, .28);
    color: #baffd7;
    background: rgba(41, 154, 96, .12);
    font-size: .78rem;
    font-weight: 900;
}

.global-recruit-controls {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) 92px auto auto;
    gap: 8px;
    align-items: center;
}

.global-recruit-select,
.global-recruit-input {
    width: 100%;
    min-height: 42px;
    border: 1px solid rgba(91, 168, 255, .30);
    background: rgba(2, 10, 24, .92);
    color: #eef8ff;
    border-radius: 10px;
    padding: 0 11px;
}

.global-recruit-select option:disabled {
    color: rgba(184, 197, 214, .48);
}

.global-action-message {
    padding: 9px 11px;
    border-radius: 10px;
    font-size: .82rem;
    font-weight: 800;
}

.global-action-message.success {
    border: 1px solid rgba(92, 229, 153, .30);
    background: rgba(39, 151, 88, .12);
    color: #c7ffde;
}

.global-action-message.error {
    border: 1px solid rgba(255, 111, 111, .30);
    background: rgba(180, 45, 45, .14);
    color: #ffd4d4;
}

.global-management-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.global-management-actions .btn-secondary {
    min-height: 38px;
    flex: 1 1 112px;
}

.global-management-modal {
    position: fixed;
    inset: 0;
    z-index: 10050;
    display: grid;
    place-items: center;
    padding: 24px;
}

.global-management-modal.hidden {
    display: none !important;
}

.global-management-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 4, 12, .82);
    backdrop-filter: blur(8px);
}

.global-management-card {
    position: relative;
    z-index: 1;
    width: min(860px, 96vw);
    max-height: min(820px, 90vh);
    overflow: auto;
    padding: 26px;
    border: 1px solid rgba(73, 171, 255, .34);
    background:
        linear-gradient(145deg, rgba(12, 36, 70, .96), rgba(2, 9, 22, .98)),
        #071225;
    box-shadow: 0 32px 90px rgba(0, 0, 0, .58), 0 0 46px rgba(28, 126, 255, .16);
    border-radius: 20px;
}

.global-management-close {
    position: sticky;
    top: 0;
    float: right;
    z-index: 2;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 1px solid rgba(255,255,255,.15);
    background: rgba(1, 8, 20, .88);
    color: #fff;
    font-size: 1.5rem;
    cursor: pointer;
}

.global-modal-open {
    overflow: hidden;
}

.global-modal-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 10px;
    margin: 18px 0;
}

.global-modal-stats span {
    display: grid;
    gap: 6px;
    padding: 13px;
    border: 1px solid rgba(89, 172, 255, .18);
    background: rgba(255,255,255,.035);
    border-radius: 12px;
    color: rgba(207, 225, 247, .76);
}

.global-modal-stats strong {
    color: #fff;
    font-size: 1.05rem;
}

.global-modal-label {
    display: grid;
    gap: 8px;
    margin: 16px 0;
    color: #eaf5ff;
    font-weight: 800;
}

.global-modal-actions,
.global-modal-branches {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 18px;
}

.global-modal-list {
    display: grid;
    gap: 10px;
    margin-top: 18px;
}

.global-modal-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 14px;
    border: 1px solid rgba(82, 166, 255, .16);
    background: rgba(255,255,255,.032);
    border-radius: 13px;
}

.global-modal-item > div {
    display: grid;
    gap: 5px;
}

.global-modal-item small {
    color: rgba(202, 220, 244, .72);
    line-height: 1.45;
}

.global-modal-research {
    align-items: flex-start;
}

.global-modal-error {
    color: #ffbaba;
    font-weight: 800;
}

@media (max-width: 760px) {
    .global-villages-grid {
        grid-template-columns: 1fr !important;
    }

    .global-recruit-heading {
        align-items: flex-start;
        flex-direction: column;
    }

    .global-recruit-controls {
        grid-template-columns: 1fr 92px;
    }

    .global-recruit-controls .btn-primary,
    .global-recruit-controls .btn-secondary {
        width: 100%;
    }

    .global-management-modal {
        padding: 10px;
    }

    .global-management-card {
        width: 100%;
        max-height: 94vh;
        padding: 20px 16px;
    }

    .global-modal-item {
        align-items: stretch;
        flex-direction: column;
    }
}


/* V20 - capacité de recrutement visible pour chaque unité */
.global-army-overview > span em {
    display: block;
    margin-top: 3px;
    font-size: .68rem;
    line-height: 1.25;
    font-style: normal;
    font-weight: 700;
    color: rgba(168, 213, 255, .82);
}
.global-recruit-max {
    white-space: nowrap;
}

/* V21 - disponibilité, engagements et files visibles dans la vue globale */
.global-unit-status-card {
    min-width: 0;
}

.global-unit-status-card strong {
    color: #dff7ff;
}

.global-unit-status-card em {
    display: block;
    font-size: .66rem;
    line-height: 1.25;
    font-style: normal;
    color: rgba(185, 211, 241, .76);
}

.global-unit-status-card em:last-child {
    margin-top: 2px;
    color: rgba(115, 210, 255, .95);
    font-weight: 800;
}

.global-recruit-max {
    max-width: 100%;
    white-space: normal;
    text-align: right;
}


/* Héros affichés dans les rapports de combat */
.hero-report-section {
    margin-top: 12px;
    overflow: hidden;
    border: 1px solid rgba(246, 207, 117, 0.22);
    border-radius: 16px;
    background: rgba(0, 0, 0, 0.20);
}

.hero-report-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 9px;
    padding: 9px;
}

.hero-report-card {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 10px;
    align-items: center;
    padding: 11px;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: rgba(255,255,255,0.035);
}

.hero-report-card.active {
    border-color: rgba(95, 186, 120, 0.28);
    background: linear-gradient(135deg, rgba(95, 186, 120, 0.08), rgba(69, 119, 255, 0.05));
}

.hero-report-card.absent {
    opacity: .82;
}

.hero-report-card.dead {
    border-color: rgba(217, 108, 108, 0.40);
    background: linear-gradient(135deg, rgba(217, 108, 108, 0.11), rgba(0, 0, 0, 0.16));
}

.hero-report-emblem {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border: 1px solid rgba(246, 207, 117, 0.24);
    border-radius: 14px;
    background: rgba(0,0,0,0.22);
    font-size: 1.5rem;
}

.hero-report-main {
    min-width: 0;
}

.hero-report-side {
    display: block;
    color: var(--text-soft);
    font-size: .7rem;
    font-weight: 900;
    text-transform: uppercase;
    letter-spacing: .08em;
}

.hero-report-main strong {
    display: block;
    margin-top: 2px;
    overflow: hidden;
    color: #fff7d7;
    font-size: 1rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.hero-report-main small {
    display: block;
    margin-top: 2px;
    color: var(--text-soft);
}

.hero-report-status {
    margin-top: 6px;
    color: #b7ffd7;
    font-size: .78rem;
    font-weight: 800;
}

.hero-report-card.absent .hero-report-status {
    color: #ffd0a8;
}

.hero-report-card.dead .hero-report-status {
    color: #ffb2b2;
}

.hero-report-stats {
    grid-column: 1 / -1;
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding-top: 8px;
    border-top: 1px solid rgba(255,255,255,0.07);
}

.hero-report-stats span {
    padding: 5px 8px;
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 999px;
    background: rgba(0,0,0,0.18);
    color: var(--text-soft);
    font-size: .72rem;
}

.hero-report-stats b {
    color: #f6cf75;
}

.hero-report-stats .hero-level-up {
    border-color: rgba(246, 207, 117, 0.28);
    color: #fff7d7;
}

/* Patch équilibrage combat et lecture des rapports */
.battle-assessment {
    display: grid;
    grid-template-columns: 38px 1fr;
    gap: 11px;
    align-items: start;
    margin: 10px 0 12px;
    padding: 12px 14px;
    border: 1px solid rgba(245, 158, 11, .28);
    border-radius: 15px;
    background: linear-gradient(135deg, rgba(120, 74, 16, .24), rgba(20, 28, 44, .58));
}
.battle-assessment.victory {
    border-color: rgba(74, 222, 128, .30);
    background: linear-gradient(135deg, rgba(22, 101, 52, .24), rgba(20, 28, 44, .58));
}
.battle-assessment.neutral {
    border-color: rgba(148, 163, 184, .24);
}
.battle-assessment-icon {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 12px;
    background: rgba(245, 158, 11, .14);
    color: #f8cf70;
    font-size: 1.05rem;
    font-weight: 900;
}
.battle-assessment.victory .battle-assessment-icon {
    background: rgba(74, 222, 128, .13);
    color: #86efac;
}
.battle-assessment strong {
    color: #f8d58b;
    font-size: .94rem;
}
.battle-assessment.victory strong {
    color: #a7f3d0;
}
.battle-assessment p {
    margin: 4px 0 0;
    color: #cbd5e1;
    line-height: 1.42;
    font-size: .82rem;
}


/* Speedsim V4 : contexte réel, mur, héros et niveau de fiabilité */
.speedsim-intel {
    display: grid;
    gap: 5px;
    padding: 12px 14px;
    border-radius: 15px;
    border: 1px solid rgba(112, 169, 255, 0.22);
    background: rgba(112, 169, 255, 0.08);
}

.speedsim-intel.good {
    border-color: rgba(95, 220, 154, 0.3);
    background: rgba(95, 220, 154, 0.08);
}

.speedsim-intel.warning {
    border-color: rgba(245, 191, 85, 0.34);
    background: rgba(245, 191, 85, 0.09);
}

.speedsim-intel span,
.speedsim-intel small {
    color: var(--muted);
    line-height: 1.4;
}

.speedsim-toggle {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-top: 10px;
    padding: 11px 12px;
    border-radius: 14px;
    border: 1px solid rgba(255,255,255,0.1);
    background: rgba(255,255,255,0.025);
    cursor: pointer;
}

.speedsim-toggle.disabled {
    opacity: .58;
    cursor: not-allowed;
}

.speedsim-toggle input {
    width: 18px;
    height: 18px;
    margin-top: 2px;
    accent-color: #74a9ff;
}

.speedsim-toggle span {
    display: grid;
    gap: 3px;
}

.speedsim-toggle small,
.market-input-row > small {
    color: var(--muted);
    line-height: 1.35;
}

.speedsim-research-row {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 12px;
}

.speedsim-check {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 9px 11px;
    border-radius: 12px;
    border: 1px solid rgba(112, 169, 255, 0.18);
    background: rgba(112, 169, 255, 0.06);
    cursor: pointer;
}

.speedsim-check input {
    width: 17px;
    height: 17px;
    accent-color: #74a9ff;
}

.speedsim-run-settings {
    display: grid;
    grid-template-columns: minmax(120px, .4fr) minmax(200px, 1fr);
    align-items: center;
    gap: 10px;
}

.speedsim-result-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 10px;
}

.speedsim-confidence {
    display: flex;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 12px;
    padding: 9px 11px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,.12);
    background: rgba(255,255,255,.04);
}

.speedsim-confidence.high,
.speedsim-confidence.good {
    border-color: rgba(95, 220, 154, .32);
    background: rgba(95, 220, 154, .09);
}

.speedsim-confidence.partial {
    border-color: rgba(245, 191, 85, .34);
    background: rgba(245, 191, 85, .09);
}

.speedsim-confidence.danger {
    border-color: rgba(255, 105, 105, .34);
    background: rgba(255, 105, 105, .09);
}

.speedsim-result-grid,
.speedsim-breakdown-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 12px;
}

.speedsim-result-card,
.speedsim-breakdown-card {
    display: grid;
    gap: 4px;
    padding: 11px 12px;
    border-radius: 13px;
    border: 1px solid rgba(112, 169, 255, .14);
    background: rgba(255,255,255,.025);
}

.speedsim-result-card > span,
.speedsim-breakdown-card > span,
.speedsim-result-card > small {
    color: var(--muted);
    line-height: 1.35;
}

.speedsim-result-card > strong {
    font-size: 1.2rem;
}

.speedsim-warning-list {
    margin: 12px 0 0;
    padding: 10px 12px 10px 30px;
    border-radius: 13px;
    border: 1px solid rgba(245, 191, 85, .28);
    background: rgba(245, 191, 85, .07);
    color: #f4ddae;
}

.speedsim-warning-list li + li {
    margin-top: 5px;
}

@media (max-width: 720px) {
    .speedsim-result-grid,
    .speedsim-breakdown-grid,
    .speedsim-run-settings {
        grid-template-columns: 1fr;
    }

    .speedsim-result-head {
        align-items: stretch;
        flex-direction: column;
    }
}

/* =========================================================
   Unités V1 — Cavalerie, synergies et contres souples
   ========================================================= */
.classic-unit-table th.unit-type-cavalier small { color: #f3b7ff; }
.classic-unit-table th.unit-type-cavalier,
.classic-unit-table td.unit-type-cavalier { background: rgba(210, 108, 255, .05); }
.classic-unit-table tr:not(.loss-row):not(.survivor-row) td.unit-type-cavalier .classic-unit-cell strong { color: #f3caff; }

.unit-synergy-section {
    margin: 18px 0;
    padding: 16px;
    border: 1px solid rgba(118, 165, 255, .18);
    border-radius: 16px;
    background: linear-gradient(180deg, rgba(18, 31, 58, .72), rgba(9, 17, 34, .68));
}

.unit-synergy-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.unit-synergy-card {
    display: grid;
    gap: 7px;
    padding: 14px;
    border-radius: 14px;
    border: 1px solid rgba(255, 255, 255, .08);
    background: rgba(255, 255, 255, .035);
}

.unit-synergy-card > span {
    color: rgba(222, 234, 255, .72);
    font-size: .78rem;
    text-transform: uppercase;
    letter-spacing: .08em;
}

.unit-synergy-card > strong { font-size: 1.2rem; }
.unit-synergy-card.attack > strong { color: #9bc6ff; }
.unit-synergy-card.defense > strong { color: #ffd88d; }
.unit-synergy-card small { color: rgba(222, 234, 255, .66); }
.unit-synergy-card ul,
.unit-synergy-mini ul { margin: 3px 0 0; padding-left: 18px; color: rgba(236, 243, 255, .82); }
.unit-synergy-card li,
.unit-synergy-mini li { margin: 4px 0; line-height: 1.35; }
.unit-synergy-note { margin: 12px 0 0; color: rgba(222, 234, 255, .62); font-size: .82rem; }
.unit-synergy-sim { margin-top: 12px; }
.unit-synergy-mini { min-height: 0; }

@media (max-width: 760px) {
    .unit-synergy-grid { grid-template-columns: 1fr; }
}


/* Accès au centre de gestion du royaume */
.panel-header-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    flex-wrap: wrap;
}

@media (max-width: 720px) {
    .panel-header-actions {
        width: 100%;
        justify-content: stretch;
    }
    .panel-header-actions > button {
        flex: 1 1 160px;
    }
}


/* Rapport mobile V5 : lecture confortable sur téléphone */
.classic-unit-mobile-stack {
    display: none;
}

.classic-unit-mobile-card {
    border: 1px solid rgba(255,255,255,0.10);
    border-radius: 16px;
    padding: 12px;
    background: linear-gradient(180deg, rgba(255,255,255,0.04), rgba(255,255,255,0.02));
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
}

.classic-unit-mobile-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
}

.classic-unit-mobile-head strong {
    display: block;
    color: #fff;
    font-size: 0.98rem;
}

.classic-unit-mobile-head small {
    color: var(--text-soft);
    font-size: 0.72rem;
}

.classic-unit-mobile-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    background: rgba(255,255,255,0.05);
    overflow: hidden;
    flex: 0 0 42px;
}

.classic-unit-mobile-icon .report-unit-badge,
.classic-unit-mobile-icon img {
    width: 30px;
    height: 30px;
}

.classic-unit-mobile-stats {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 8px;
}

.classic-unit-mobile-stats.compact {
    grid-template-columns: 1fr;
}

.classic-unit-mobile-stats > div {
    padding: 8px 10px;
    border-radius: 12px;
    background: rgba(0,0,0,0.22);
    border: 1px solid rgba(255,255,255,0.06);
}

.classic-unit-mobile-stats span {
    display: block;
    font-size: 0.72rem;
    color: var(--text-soft);
    margin-bottom: 3px;
}

.classic-unit-mobile-stats strong {
    display: block;
    font-size: 1rem;
    color: #fff;
}

.classic-unit-mobile-stats .losses strong { color: #ffb2b2; }
.classic-unit-mobile-stats .survivors strong { color: #b7ffd7; }

@media (max-width: 720px) {
    #report-modal.modal-overlay {
        padding: 0;
        align-items: stretch;
    }

    #report-modal .modal-card-large {
        width: 100vw;
        max-height: 100vh;
        height: 100vh;
        border-radius: 0;
        padding: 10px 10px 12px;
    }

    #report-modal .modal-header {
        position: sticky;
        top: 0;
        z-index: 5;
        padding-bottom: 8px;
        background: linear-gradient(180deg, rgba(9,14,26,0.98), rgba(9,14,26,0.9));
        backdrop-filter: blur(10px);
    }

    #report-modal .modal-body {
        padding-right: 0;
    }

    #report-modal .classic-report-paper {
        padding: 8px;
    }

    #report-modal .classic-report-topline {
        font-size: 0.72rem;
        padding: 8px 10px 6px;
    }

    #report-modal .classic-title-bar {
        padding: 10px;
        align-items: flex-start;
    }

    #report-modal .classic-title-bar strong,
    #report-modal .classic-title-bar div {
        min-width: 0;
    }

    #report-modal .classic-title-bar {
        font-size: 0.92rem;
    }

    #report-modal .classic-report-summary {
        font-size: 0.86rem;
    }

    #report-modal .classic-stats-strip {
        grid-template-columns: 1fr 1fr;
        gap: 8px;
    }

    #report-modal .classic-stat-pill {
        padding: 10px;
    }

    #report-modal .classic-unit-table-wrap {
        display: none;
    }

    #report-modal .classic-unit-mobile-stack,
    .shared-report-page .classic-unit-mobile-stack {
        display: grid;
        grid-template-columns: 1fr;
        gap: 8px;
        padding: 8px;
    }

    .shared-report-page .classic-unit-table-wrap {
        display: none;
    }

    #report-modal .classic-section-title,
    .shared-report-page .classic-section-title {
        padding: 10px;
    }

    #report-modal .classic-combatant-head,
    #report-modal .classic-combatant-sub {
        padding: 10px;
    }

    #report-modal .classic-visual-image,
    .shared-report-page .classic-visual-image {
        min-height: 86px;
    }

    #report-modal .report-modal-actions {
        display: flex;
        flex-wrap: nowrap;
        align-items: stretch;
        overflow-x: auto;
        gap: 8px;
        margin-top: 10px;
        padding-top: 10px;
        padding-bottom: 4px;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: none;
    }

    #report-modal .report-modal-actions::-webkit-scrollbar {
        display: none;
    }

    #report-modal .report-modal-actions .report-share-btn,
    #report-modal .report-modal-actions .btn-secondary,
    #report-modal .report-modal-actions .btn-primary,
    #report-modal .report-modal-actions .report-action-select {
        width: auto;
        flex: 0 0 auto;
        min-width: max-content;
        margin-top: 0;
        padding: 12px 14px;
        border-radius: 14px;
    }

    #report-modal .report-modal-actions .report-action-select {
        min-width: 168px;
        max-width: 54vw;
    }

    #report-modal .report-modal-actions .report-action-close,
    #report-modal .report-modal-actions .report-action-secondary {
        display: none;
    }

    #report-modal .modal-close {
        width: 52px;
        height: 52px;
        border-radius: 18px;
        font-size: 1.3rem;
    }
}


/* Rapport mobile V6 : résumé, accordéons et mode ultra compact */
.mobile-report-summary {
    display: none;
}

.mobile-report-accordion {
    display: block;
}

.mobile-report-accordion > summary {
    display: none;
}

.mobile-report-accordion-body {
    display: block;
}

@media (max-width: 720px) {
    .mobile-report-summary {
        display: block;
        margin: 8px 0 10px;
        padding: 12px;
        border: 1px solid rgba(255,255,255,0.10);
        border-radius: 18px;
        background: linear-gradient(180deg, rgba(20,38,70,0.92), rgba(8,17,34,0.96));
        box-shadow: inset 0 1px 0 rgba(255,255,255,0.05), 0 14px 30px rgba(0,0,0,0.18);
    }

    .mobile-report-summary.victory,
    .mobile-report-summary.victoire {
        border-color: rgba(95,186,120,0.32);
    }

    .mobile-report-summary.defeat,
    .mobile-report-summary.defaite {
        border-color: rgba(217,108,108,0.35);
    }

    .mobile-report-summary-head {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 10px;
        margin-bottom: 10px;
    }

    .mobile-report-outcome {
        display: flex;
        align-items: center;
        gap: 9px;
        min-width: 0;
    }

    .mobile-report-outcome > span {
        font-size: 1.55rem;
    }

    .mobile-report-outcome small,
    .mobile-report-outcome strong {
        display: block;
    }

    .mobile-report-outcome small {
        color: var(--text-soft);
        font-size: 0.67rem;
        text-transform: uppercase;
        letter-spacing: 0.08em;
    }

    .mobile-report-outcome strong {
        color: #fff;
        font-size: 1rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .mobile-report-compact-toggle {
        flex: 0 0 auto;
        min-height: 38px;
        padding: 8px 11px;
        border: 1px solid rgba(107,164,255,0.34);
        border-radius: 12px;
        background: rgba(35,92,184,0.22);
        color: #eaf3ff;
        font-weight: 800;
        font-size: 0.76rem;
    }

    .mobile-report-summary-grid {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 7px;
    }

    .mobile-report-summary-grid > div {
        min-width: 0;
        padding: 9px 10px;
        border: 1px solid rgba(255,255,255,0.07);
        border-radius: 13px;
        background: rgba(0,0,0,0.20);
    }

    .mobile-report-summary-grid span,
    .mobile-report-summary-grid strong,
    .mobile-report-summary-grid small {
        display: block;
    }

    .mobile-report-summary-grid span {
        color: var(--text-soft);
        font-size: 0.68rem;
    }

    .mobile-report-summary-grid strong {
        margin-top: 2px;
        color: #f6cf75;
        font-size: 1.05rem;
    }

    .mobile-report-summary-grid small {
        margin-top: 2px;
        color: #aebbd2;
        font-size: 0.65rem;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .mobile-report-summary-grid .mobile-report-summary-wide {
        grid-column: 1 / -1;
    }

    .mobile-report-accordion {
        display: block;
        margin: 9px 0;
        overflow: hidden;
        border: 1px solid rgba(255,255,255,0.10);
        border-radius: 16px;
        background: rgba(4,10,21,0.52);
    }

    .mobile-report-accordion.attacker {
        border-color: rgba(76,145,255,0.27);
    }

    .mobile-report-accordion.defender {
        border-color: rgba(246,207,117,0.22);
    }

    .mobile-report-accordion > summary {
        display: grid;
        grid-template-columns: 1fr auto;
        grid-template-areas: "title arrow" "subtitle arrow";
        align-items: center;
        gap: 2px 10px;
        padding: 12px 13px;
        cursor: pointer;
        list-style: none;
        background: linear-gradient(180deg, rgba(30,48,82,0.94), rgba(14,24,44,0.96));
        -webkit-tap-highlight-color: transparent;
    }

    .mobile-report-accordion > summary::-webkit-details-marker {
        display: none;
    }

    .mobile-report-accordion-title {
        grid-area: title;
        color: #fff7d7;
        font-size: 0.9rem;
        font-weight: 900;
    }

    .mobile-report-accordion-subtitle {
        grid-area: subtitle;
        min-width: 0;
        color: #aebbd2;
        font-size: 0.68rem;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .mobile-report-accordion-chevron {
        grid-area: arrow;
        color: #8fbaff;
        font-size: 1.35rem;
        line-height: 1;
        transition: transform 0.18s ease;
    }

    .mobile-report-accordion[open] .mobile-report-accordion-chevron {
        transform: rotate(180deg);
    }

    .mobile-report-accordion-body {
        padding: 0 8px 8px;
    }

    .mobile-report-accordion-body > :first-child {
        margin-top: 8px;
    }

    .mobile-report-accordion-body > :last-child {
        margin-bottom: 0;
    }

    .battle-report.mobile-report-compact .classic-report-topline,
    .battle-report.mobile-report-compact .classic-visual-block,
    .battle-report.mobile-report-compact > .classic-report-paper > .classic-report-summary {
        display: none;
    }

    .battle-report.mobile-report-compact .classic-title-bar {
        padding: 8px 10px;
        border-radius: 13px;
    }

    .battle-report.mobile-report-compact .classic-title-bar > span,
    .battle-report.mobile-report-compact .classic-title-bar > strong:last-child {
        font-size: 0.62rem;
    }

    .battle-report.mobile-report-compact .classic-army-section,
    .battle-report.mobile-report-compact .classic-combatant-block,
    .battle-report.mobile-report-compact .classic-loot-section,
    .battle-report.mobile-report-compact .unit-synergy-section,
    .battle-report.mobile-report-compact .hero-report-section,
    .battle-report.mobile-report-compact .battle-assessment {
        border-radius: 13px;
    }

    .battle-report.mobile-report-compact .classic-unit-mobile-card {
        padding: 9px;
        border-radius: 13px;
    }

    .battle-report.mobile-report-compact .classic-unit-mobile-head {
        margin-bottom: 7px;
    }

    .battle-report.mobile-report-compact .classic-unit-mobile-icon {
        width: 36px;
        height: 36px;
        flex-basis: 36px;
    }

    .battle-report.mobile-report-compact .classic-unit-mobile-stats > div {
        padding: 7px 8px;
    }

    .battle-report.mobile-report-compact .classic-unit-mobile-stats strong {
        font-size: 0.92rem;
    }

    .battle-report.mobile-report-compact .classic-unit-mobile-stats span {
        font-size: 0.64rem;
    }

    .battle-report.mobile-report-compact .classic-loot-section {
        margin-top: 9px;
    }
}

/* =========================================================
   PATCH V4.2 — Commandement + tutoriel prioritaire
   ========================================================= */

/* Le tutoriel visible doit toujours précéder le poste de commandement. */
.village-main-column > #tutorial-panel {
    order: 0 !important;
}

.village-main-column > #main-commandement-section {
    order: 1 !important;
}

.village-main-column > #overview-panel {
    order: 2 !important;
}

#tutorial-panel {
    position: relative;
    overflow: hidden;
    border-color: rgba(82, 191, 255, .28) !important;
    background:
        linear-gradient(135deg, rgba(69, 217, 255, .055), transparent 42%),
        linear-gradient(180deg, rgba(7, 19, 40, .97), rgba(3, 11, 25, .97)) !important;
}

#tutorial-panel::after {
    content: '';
    position: absolute;
    inset: 0 auto 0 0;
    width: 3px;
    background: linear-gradient(180deg, #45d9ff, rgba(69, 119, 255, .25));
    pointer-events: none;
}

#tutorial-panel.tutorial-claim-ready {
    border-color: rgba(255, 92, 92, .54) !important;
    box-shadow:
        0 0 0 1px rgba(255, 92, 92, .10),
        0 0 28px rgba(255, 65, 65, .10),
        inset 0 1px 0 rgba(255, 255, 255, .035) !important;
}

#tutorial-panel.tutorial-claim-ready::after {
    background: linear-gradient(180deg, #ff6b6b, #b82235);
}

/* Badge de récompense disponible dans la navigation. */
#tutorial-claim-badge,
#mobile-tutorial-claim-badge {
    box-shadow: 0 0 16px rgba(255, 68, 68, .34);
    animation: tutorialClaimPulse 1.8s ease-in-out infinite;
}

@keyframes tutorialClaimPulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.08); }
}

/* Poste de commandement plus lisible et moins tassé. */
#main-commandement-section {
    container-type: inline-size;
    padding: 24px !important;
    background:
        radial-gradient(circle at 12% 0%, rgba(44, 123, 255, .13), transparent 34%),
        linear-gradient(180deg, rgba(5, 17, 37, .98), rgba(2, 10, 23, .98)) !important;
}

#main-commandement-section .village-hero-content {
    align-items: flex-start !important;
    padding-bottom: 18px;
    margin-bottom: 18px !important;
    border-bottom: 1px solid rgba(82, 191, 255, .12);
}

#main-commandement-section .hero-actions {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(150px, 1fr));
    gap: 10px !important;
    width: min(360px, 100%);
}

#main-commandement-section .hero-actions > button {
    min-height: 44px;
    justify-content: center;
    text-align: center;
}

.commandement-dashboard-grid {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 12px !important;
    margin-bottom: 12px !important;
}

.commandement-metric-card {
    min-width: 0;
    min-height: 154px;
    padding: 18px !important;
    text-align: left;
    color: #f4f8ff;
    border: 1px solid rgba(82, 191, 255, .16) !important;
    border-radius: 0 !important;
    clip-path: polygon(12px 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%, 0 12px);
    background:
        linear-gradient(135deg, rgba(69, 217, 255, .055), transparent 47%),
        rgba(9, 26, 55, .82) !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.035);
    transition: transform .18s ease, border-color .18s ease, background .18s ease;
}

.commandement-metric-card:hover {
    transform: translateY(-1px);
    border-color: rgba(82, 191, 255, .34) !important;
    background:
        linear-gradient(135deg, rgba(69, 217, 255, .085), transparent 48%),
        rgba(10, 31, 67, .88) !important;
}

.commandement-village-card {
    border-color: rgba(65, 147, 255, .38) !important;
    background:
        linear-gradient(135deg, rgba(27, 108, 230, .20), transparent 58%),
        rgba(8, 28, 61, .92) !important;
}

.commandement-reports-card {
    width: 100%;
    font: inherit;
    cursor: pointer;
    appearance: none;
}

.commandement-reports-card:focus-visible {
    outline: 2px solid rgba(82, 191, 255, .86);
    outline-offset: 2px;
}

.commandement-card-heading {
    display: flex;
    align-items: center;
    gap: 9px;
    min-width: 0;
    margin-bottom: 12px;
}

.commandement-card-icon {
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(82, 191, 255, .16);
    background: rgba(69, 119, 255, .10);
    font-size: 1rem;
    clip-path: polygon(8px 0, 100% 0, 100% calc(100% - 8px), calc(100% - 8px) 100%, 0 100%, 0 8px);
}

.commandement-card-heading .hero-command-label {
    min-width: 0;
    color: rgba(218, 232, 255, .80) !important;
    font-size: .78rem !important;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.commandement-live-badge,
.commandement-card-link {
    margin-left: auto;
    flex: 0 0 auto;
    padding: 4px 8px;
    border: 1px solid rgba(82, 191, 255, .22);
    background: rgba(69, 217, 255, .08);
    color: #aeefff;
    font-size: .68rem;
    font-weight: 900;
    letter-spacing: .05em;
    text-transform: uppercase;
}

.commandement-live-badge::before {
    content: '';
    display: inline-block;
    width: 6px;
    height: 6px;
    margin-right: 6px;
    border-radius: 50%;
    background: #5ef29c;
    box-shadow: 0 0 10px rgba(94, 242, 156, .70);
}

.commandement-metric-card > strong {
    display: block;
    max-width: 100%;
    margin: 0 !important;
    color: #f7fbff;
    font-size: clamp(1.7rem, 3.4cqi, 2.35rem) !important;
    line-height: 1.05;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.commandement-metric-card .hero-command-sub {
    margin: 12px 0 0 !important;
    color: rgba(210, 226, 250, .72) !important;
    font-size: .80rem !important;
}

.commandement-production-list .resource-html-list {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px !important;
    width: 100%;
}

.commandement-production-list .resource-inline-amount {
    min-width: 0;
    padding: 7px 8px !important;
    border: 1px solid rgba(82, 191, 255, .10);
    border-radius: 8px !important;
    background: rgba(255,255,255,.035) !important;
    gap: 5px !important;
    overflow: hidden;
}

.commandement-production-list .resource-inline-amount strong {
    flex: 0 0 auto;
    font-size: .90rem;
}

.commandement-production-list .resource-inline-text {
    min-width: 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: .66rem;
}

.commandement-stock-meter {
    width: 100%;
    height: 7px;
    margin-top: 15px;
    overflow: hidden;
    border: 1px solid rgba(82, 191, 255, .14);
    background: rgba(0, 0, 0, .26);
}

.commandement-stock-meter > span {
    display: block;
    width: 0;
    height: 100%;
    background: linear-gradient(90deg, #2f7cff, #45d9ff);
    box-shadow: 0 0 14px rgba(69, 217, 255, .28);
    transition: width .35s ease;
}

.commandement-stats-grid {
    gap: 10px !important;
}

.commandement-stat-card {
    display: flex !important;
    align-items: center !important;
    gap: 11px !important;
    min-width: 0;
    min-height: 74px;
    padding: 13px 14px !important;
    border: 1px solid rgba(82, 191, 255, .13) !important;
    background: rgba(8, 23, 49, .68) !important;
}

.commandement-stat-card > div {
    display: grid;
    gap: 4px;
    min-width: 0;
}

.hero-stat-icon {
    width: 34px;
    height: 34px;
    flex: 0 0 34px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(82, 191, 255, .14);
    background: rgba(69, 119, 255, .09);
    font-size: .95rem;
}

.commandement-stat-card .hero-stat-label {
    font-size: .75rem;
}

.commandement-stat-card strong {
    font-size: 1.25rem !important;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

@container (max-width: 720px) {
    #main-commandement-section .village-hero-content {
        flex-direction: column;
    }

    #main-commandement-section .hero-actions {
        width: 100%;
    }

    .commandement-dashboard-grid {
        grid-template-columns: 1fr !important;
    }

    .commandement-production-list .resource-html-list {
        grid-template-columns: 1fr !important;
    }

    .commandement-stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    }
}

@media (max-width: 620px) {
    #main-commandement-section {
        padding: 16px !important;
    }

    #main-commandement-section .hero-actions,
    .commandement-stats-grid {
        grid-template-columns: 1fr !important;
    }

    .commandement-metric-card {
        min-height: 140px;
    }
}

@media (prefers-reduced-motion: reduce) {
    #tutorial-claim-badge,
    #mobile-tutorial-claim-badge {
        animation: none;
    }
}


/* =========================================================
   PATCH V4.3 — Production horaire premium du Commandement
   ========================================================= */
.commandement-production-card {
    display: flex !important;
    flex-direction: column;
    min-height: 154px;
}

.commandement-production-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    margin-bottom: 10px;
}

.commandement-production-head .commandement-card-heading {
    margin-bottom: 0;
}

.commandement-production-total {
    flex: 0 0 auto;
    display: inline-flex;
    align-items: baseline;
    gap: 5px;
    min-width: 104px;
    padding: 7px 10px;
    justify-content: flex-end;
    border: 1px solid rgba(82, 191, 255, .18);
    background: linear-gradient(135deg, rgba(47, 124, 255, .13), rgba(69, 217, 255, .045));
    box-shadow: inset 0 1px 0 rgba(255,255,255,.035);
}

.commandement-production-total strong {
    color: #f7fbff;
    font-size: clamp(1.15rem, 2.2cqi, 1.45rem) !important;
    line-height: 1;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.commandement-production-total span {
    color: rgba(174, 239, 255, .75);
    font-size: .68rem;
    font-weight: 800;
    letter-spacing: .04em;
    text-transform: uppercase;
}

.commandement-production-breakdown {
    display: grid;
    gap: 6px;
    margin-top: auto;
}

.commandement-production-row {
    min-width: 0;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 12px;
    min-height: 39px;
    padding: 6px 9px;
    border: 1px solid rgba(82, 191, 255, .09);
    border-left-color: rgba(69, 217, 255, .34);
    background: linear-gradient(90deg, rgba(69, 119, 255, .065), rgba(255,255,255,.018));
}

.commandement-production-resource {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 9px;
}

.commandement-production-resource > span:last-child {
    min-width: 0;
    display: grid;
    gap: 1px;
}

.commandement-production-resource strong {
    overflow: hidden;
    color: rgba(242, 248, 255, .94);
    font-size: .76rem;
    font-weight: 800;
    line-height: 1.15;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.commandement-production-resource small {
    overflow: hidden;
    color: rgba(183, 205, 236, .50);
    font-size: .59rem;
    line-height: 1.15;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.commandement-production-icon {
    width: 27px;
    height: 27px;
    flex: 0 0 27px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(82, 191, 255, .12);
    background: rgba(2, 11, 25, .38);
}

.commandement-production-icon img {
    width: 19px;
    height: 19px;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,.35));
}

.commandement-production-value {
    display: inline-flex;
    align-items: baseline;
    justify-content: flex-end;
    gap: 4px;
    white-space: nowrap;
}

.commandement-production-value strong {
    color: #f6fbff;
    font-size: .98rem;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.commandement-production-value small {
    color: rgba(174, 239, 255, .60);
    font-size: .61rem;
    font-weight: 800;
    text-transform: uppercase;
}

/* Neutralise l'ancien rendu en pastilles de la V4.2. */
.commandement-production-card > #hero-production-hour {
    display: none !important;
}

@container (max-width: 470px) {
    .commandement-production-head {
        align-items: flex-start;
    }

    .commandement-production-total {
        min-width: 90px;
        padding: 6px 8px;
    }

    .commandement-production-resource small {
        display: none;
    }
}

/* =========================================================
   Commandement V4.4 — refonte complète, sans doublons
   ========================================================= */
#main-commandement-section.command-center {
    padding: 22px;
    overflow: hidden;
}

.command-center-head {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(310px, 380px);
    gap: 24px;
    align-items: start;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(116, 189, 255, 0.16);
}

.command-center-identity h2 {
    margin: 7px 0 8px;
    font-size: clamp(1.55rem, 2vw, 2.05rem);
    line-height: 1.1;
    letter-spacing: -0.02em;
}

.command-center-identity .hero-description {
    max-width: 670px;
    margin: 0;
    color: #9eb0c8;
    line-height: 1.55;
}

.command-center-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 8px 14px;
    margin-top: 14px;
    color: #9fb1c9;
    font-size: 0.78rem;
}

.command-center-meta > span {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.command-center-meta strong {
    color: #eef7ff;
    font-weight: 800;
}

.command-center-status {
    color: #9ff5c2 !important;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 800;
}

.command-center-status i {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #42d987;
    box-shadow: 0 0 10px rgba(66, 217, 135, 0.8);
}

.command-center-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

.command-center-actions button {
    min-height: 42px;
    padding: 9px 13px;
    border-radius: 11px;
    font-size: 0.74rem;
    text-transform: uppercase;
    letter-spacing: 0.025em;
}

.command-center-kpis {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 10px;
    margin-top: 18px;
}

.command-kpi-card {
    position: relative;
    display: flex;
    align-items: center;
    gap: 11px;
    min-width: 0;
    min-height: 88px;
    padding: 14px;
    color: inherit;
    text-align: left;
    border: 1px solid rgba(78, 155, 226, 0.2);
    border-radius: 13px;
    background:
        linear-gradient(135deg, rgba(20, 54, 91, 0.55), rgba(8, 22, 43, 0.72));
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.025);
}

button.command-kpi-card {
    font: inherit;
}

.command-kpi-card::after {
    content: '';
    position: absolute;
    left: 13px;
    right: 13px;
    bottom: 0;
    height: 1px;
    background: linear-gradient(90deg, rgba(65, 185, 255, 0.65), transparent);
}

.command-kpi-button:hover,
.command-kpi-button:focus-visible {
    border-color: rgba(89, 187, 255, 0.55);
    background: linear-gradient(135deg, rgba(25, 70, 117, 0.68), rgba(9, 28, 52, 0.82));
}

.command-kpi-icon {
    display: grid;
    place-items: center;
    flex: 0 0 34px;
    width: 34px;
    height: 34px;
    border: 1px solid rgba(105, 187, 255, 0.2);
    border-radius: 9px;
    background: rgba(39, 105, 171, 0.18);
    font-size: 1rem;
}

.command-kpi-copy {
    display: flex;
    flex-direction: column;
    min-width: 0;
    gap: 2px;
}

.command-kpi-copy > span:first-child {
    color: #a7bad1;
    font-size: 0.7rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.055em;
}

.command-kpi-copy strong {
    color: #f5f9ff;
    font-size: clamp(1.15rem, 1.45vw, 1.48rem);
    line-height: 1.1;
    white-space: nowrap;
}

.command-kpi-copy small {
    overflow: hidden;
    color: #8096b2;
    font-size: 0.68rem;
    line-height: 1.25;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.command-kpi-arrow {
    margin-left: auto;
    color: #67c9ff;
    font-size: 1.45rem;
    line-height: 1;
}

.command-center-body {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(245px, 285px);
    gap: 14px;
    margin-top: 14px;
}

.command-operations-panel,
.command-situation-panel {
    border: 1px solid rgba(78, 155, 226, 0.16);
    border-radius: 14px;
    background: linear-gradient(180deg, rgba(8, 22, 43, 0.72), rgba(5, 15, 31, 0.72));
}

.command-operations-panel {
    padding: 17px;
}

.command-situation-panel {
    display: flex;
    flex-direction: column;
    padding: 17px;
}

.command-section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-bottom: 12px;
}

.command-section-heading h3 {
    margin: 4px 0 0;
    font-size: 1rem;
}

.command-section-note {
    color: #7d92ab;
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

.command-order-list {
    display: grid;
    gap: 8px;
}

.command-order-row {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr) auto auto;
    gap: 12px;
    align-items: center;
    min-height: 68px;
    padding: 11px 12px;
    border: 1px solid rgba(92, 150, 207, 0.13);
    border-radius: 11px;
    background: rgba(16, 39, 70, 0.34);
}

.command-order-row:hover {
    border-color: rgba(87, 178, 245, 0.28);
    background: rgba(20, 49, 87, 0.44);
}

.command-order-icon {
    display: grid;
    place-items: center;
    width: 36px;
    height: 36px;
    border-radius: 9px;
    background: rgba(57, 123, 187, 0.16);
    font-size: 1rem;
}

.command-order-main {
    display: flex;
    flex-direction: column;
    min-width: 0;
    gap: 4px;
}

.command-order-main strong {
    font-size: 0.86rem;
}

.command-order-main span {
    overflow: hidden;
    color: #8fa3bc;
    font-size: 0.72rem;
    line-height: 1.3;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.command-order-data {
    min-width: 76px;
    text-align: right;
}

.command-order-data strong {
    display: block;
    color: #f3f8ff;
    font-size: 1.03rem;
}

.command-order-data small {
    color: #748aa4;
    font-size: 0.63rem;
}

.command-order-powers {
    display: flex;
    gap: 11px;
    min-width: 170px;
}

.command-order-powers span {
    color: #8197b1;
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.035em;
}

.command-order-powers strong {
    display: block;
    margin-top: 3px;
    color: #f4f8ff;
    font-size: 0.98rem;
}

.command-order-action {
    min-width: 76px;
    min-height: 36px;
    padding: 8px 11px;
    border-radius: 9px;
    font-size: 0.7rem;
}

.command-situation-list {
    display: grid;
    gap: 0;
    border-top: 1px solid rgba(78, 155, 226, 0.14);
}

.command-situation-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    min-height: 43px;
    border-bottom: 1px solid rgba(78, 155, 226, 0.11);
}

.command-situation-row span {
    color: #8ea3bc;
    font-size: 0.72rem;
}

.command-situation-row strong {
    color: #edf6ff;
    font-size: 0.81rem;
    text-align: right;
}

.command-situation-action {
    width: 100%;
    min-height: 38px;
    margin-top: auto;
    padding: 9px 12px;
    border-radius: 9px;
    font-size: 0.7rem;
}

/* L’ancien panneau principal a été supprimé : la colonne de droite contient déjà
   les stocks et productions détaillés. */
#overview-panel {
    display: none !important;
}

@media (max-width: 1280px) {
    .command-center-head {
        grid-template-columns: 1fr;
    }

    .command-center-actions {
        max-width: 520px;
    }

    .command-center-kpis {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 980px) {
    .command-center-body {
        grid-template-columns: 1fr;
    }

    .command-situation-action {
        margin-top: 14px;
    }
}

@media (max-width: 720px) {
    #main-commandement-section.command-center {
        padding: 15px;
    }

    .command-center-actions,
    .command-center-kpis {
        grid-template-columns: 1fr 1fr;
    }

    .command-order-row {
        grid-template-columns: 36px minmax(0, 1fr) auto;
    }

    .command-order-data,
    .command-order-powers {
        grid-column: 2 / 4;
        justify-content: flex-start;
        min-width: 0;
        text-align: left;
    }

    .command-order-action {
        grid-column: 3;
        grid-row: 1 / 3;
    }
}

@media (max-width: 480px) {
    .command-center-actions,
    .command-center-kpis {
        grid-template-columns: 1fr;
    }

    .command-center-meta {
        flex-direction: column;
        gap: 6px;
    }

    .command-kpi-card {
        min-height: 76px;
    }

    .command-order-row {
        grid-template-columns: 34px minmax(0, 1fr);
    }

    .command-order-data,
    .command-order-powers,
    .command-order-action {
        grid-column: 2;
        grid-row: auto;
    }

    .command-order-action {
        width: 100%;
    }
}


/* V4.5 — Bonus actifs restaurés dans le nouveau Commandement */
.command-active-bonuses {
    margin: 14px 0 16px;
    padding: 14px 16px;
    border: 1px solid rgba(84, 184, 255, .20);
    border-radius: 16px;
    background:
        linear-gradient(135deg, rgba(18, 63, 112, .22), rgba(7, 18, 35, .72)),
        rgba(255, 255, 255, .02);
}

.command-active-bonuses .active-bonuses-head {
    align-items: center;
    margin-bottom: 10px;
}

.command-active-bonuses .active-bonuses-head h3 {
    font-size: 1rem;
    line-height: 1.2;
}

.command-active-bonuses .active-bonuses-head .panel-kicker {
    font-size: .68rem;
}

.command-active-bonuses .active-bonuses-head > span {
    padding: 4px 8px;
    font-size: .72rem;
}

.command-active-bonuses .bonus-source-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    margin-bottom: 10px;
}

.command-active-bonuses .bonus-source-card {
    padding: 9px 10px;
    border-radius: 11px;
}

.command-active-bonuses .bonus-source-card strong {
    margin-bottom: 3px;
    font-size: .78rem;
}

.command-active-bonuses .bonus-source-card span {
    font-size: .73rem;
}

.command-active-bonuses .active-bonus-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 7px;
}

.command-active-bonuses .active-bonus-pill {
    min-width: 0;
    width: 100%;
    padding: 8px 9px;
    border-radius: 10px;
}

.command-active-bonuses .active-bonus-pill span {
    overflow: hidden;
    color: var(--text-soft);
    font-size: .72rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.command-active-bonuses .active-bonus-pill strong {
    flex: 0 0 auto;
    font-size: .78rem;
}

.command-active-bonuses .active-ruins-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 7px;
    margin-top: 10px;
}

.command-active-bonuses .active-ruin-card {
    padding: 8px 10px;
    border-radius: 11px;
}

.command-active-bonuses .active-ruin-card strong {
    margin-bottom: 2px;
    font-size: .78rem;
}

.command-active-bonuses .active-ruin-card span,
.command-active-bonuses .active-ruin-card p,
.command-active-bonuses .active-bonus-empty {
    font-size: .72rem;
}

@media (max-width: 1100px) {
    .command-active-bonuses .active-bonus-grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 760px) {
    .command-active-bonuses .bonus-source-grid,
    .command-active-bonuses .active-ruins-list {
        grid-template-columns: 1fr;
    }

    .command-active-bonuses .active-bonus-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 430px) {
    .command-active-bonuses {
        padding: 12px;
    }

    .command-active-bonuses .active-bonus-grid {
        grid-template-columns: 1fr;
    }
}

/* Centre de rapports global multi-villages */
.reports-scope-panel {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 18px;
    align-items: center;
    margin-bottom: 12px;
    padding: 16px 18px;
    overflow: hidden;
    border: 1px solid rgba(117, 166, 255, 0.24);
    border-radius: 18px;
    background:
        radial-gradient(circle at 12% 0%, rgba(67, 128, 255, 0.20), transparent 36%),
        linear-gradient(135deg, rgba(10, 22, 50, 0.96), rgba(7, 14, 32, 0.92));
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), 0 16px 36px rgba(0, 0, 0, 0.18);
}

.reports-scope-panel::after {
    content: '';
    position: absolute;
    inset: auto -60px -90px auto;
    width: 180px;
    height: 180px;
    border-radius: 50%;
    background: rgba(78, 132, 255, 0.10);
    filter: blur(4px);
    pointer-events: none;
}

.reports-scope-copy,
.report-card-main {
    min-width: 0;
}

.reports-scope-copy {
    display: grid;
    gap: 4px;
}

.reports-scope-kicker {
    color: #79aaff;
    font-size: 0.68rem;
    font-weight: 900;
    letter-spacing: 0.16em;
    text-transform: uppercase;
}

.reports-scope-copy strong {
    color: #f7f9ff;
    font-size: 1.02rem;
}

.reports-scope-copy small {
    max-width: 720px;
    color: rgba(220, 230, 250, 0.68);
    line-height: 1.45;
}

.reports-scope-actions {
    position: relative;
    z-index: 1;
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 8px;
}

.reports-scope-btn,
.reports-important-toggle {
    min-height: 40px;
    border: 1px solid rgba(131, 167, 238, 0.22);
    border-radius: 12px;
    background: rgba(255, 255, 255, 0.045);
    color: rgba(232, 239, 255, 0.78);
    font: inherit;
    font-size: 0.78rem;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease, color 0.18s ease;
}

.reports-scope-btn {
    padding: 0 14px;
}

.reports-scope-btn:hover,
.reports-important-toggle:hover {
    transform: translateY(-1px);
    border-color: rgba(128, 177, 255, 0.48);
    color: #ffffff;
}

.reports-scope-btn.active {
    border-color: rgba(102, 165, 255, 0.62);
    background: linear-gradient(135deg, rgba(57, 115, 232, 0.42), rgba(63, 92, 180, 0.24));
    color: #ffffff;
    box-shadow: 0 8px 20px rgba(31, 81, 177, 0.22);
}

.reports-important-toggle {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0 13px;
    user-select: none;
}

.reports-important-toggle input {
    width: 15px;
    height: 15px;
    accent-color: #e9ad4d;
}

.reports-important-toggle.active {
    border-color: rgba(241, 181, 81, 0.52);
    background: rgba(222, 151, 44, 0.13);
    color: #ffe3a9;
}

.report-premium-card {
    position: relative;
    display: grid;
    grid-template-columns: 4px minmax(0, 1fr);
    gap: 0;
    padding: 0;
    overflow: hidden;
    border: 1px solid rgba(117, 151, 216, 0.18);
    border-radius: 17px;
    background:
        linear-gradient(135deg, rgba(15, 29, 58, 0.94), rgba(8, 16, 34, 0.92));
    box-shadow: 0 12px 28px rgba(0, 0, 0, 0.14);
    transition: transform 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.report-premium-card:hover {
    transform: translateY(-2px);
    border-color: rgba(111, 164, 255, 0.42);
    box-shadow: 0 18px 34px rgba(0, 0, 0, 0.22);
}

.report-premium-card.report-unread {
    border-color: rgba(98, 161, 255, 0.42);
    background:
        radial-gradient(circle at 5% 0%, rgba(61, 119, 232, 0.15), transparent 32%),
        linear-gradient(135deg, rgba(15, 31, 65, 0.98), rgba(8, 17, 37, 0.95));
}

.report-premium-card.important {
    border-color: rgba(231, 170, 71, 0.27);
}

.report-card-accent {
    min-height: 100%;
    background: linear-gradient(180deg, #568dff, #354ca3);
}

.report-premium-card.important .report-card-accent {
    background: linear-gradient(180deg, #ffc665, #bd6727);
}

.report-premium-card.report-read .report-card-accent {
    opacity: 0.48;
}

.report-card-main {
    padding: 15px 16px 14px;
}

.report-context-line {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    margin-top: 6px;
}

.report-village-chip {
    display: inline-flex;
    align-items: center;
    min-height: 28px;
    padding: 0 9px;
    border: 1px solid rgba(98, 153, 255, 0.25);
    border-radius: 999px;
    background: rgba(61, 107, 201, 0.13);
    color: #cfe0ff;
    font: inherit;
    font-size: 0.72rem;
    font-weight: 800;
}

button.report-village-chip {
    cursor: pointer;
}

button.report-village-chip:hover {
    border-color: rgba(112, 173, 255, 0.58);
    background: rgba(68, 125, 237, 0.22);
    color: #ffffff;
}

.report-village-chip.static {
    cursor: default;
}

.report-card-badges {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 6px;
}

.report-badge.interception {
    border-color: rgba(242, 171, 68, 0.42);
    background: rgba(222, 132, 37, 0.14);
    color: #ffd79a;
}

.report-summary {
    margin: 10px 0 0;
    color: rgba(222, 231, 249, 0.72);
    font-size: 0.84rem;
    line-height: 1.48;
}

.report-empty-state {
    display: grid;
    place-items: center;
    gap: 6px;
    min-height: 150px;
    padding: 24px;
    border: 1px dashed rgba(121, 157, 226, 0.25);
    border-radius: 18px;
    background: rgba(8, 17, 36, 0.48);
    color: rgba(221, 231, 250, 0.68);
    text-align: center;
}

.report-empty-state strong {
    color: #f4f7ff;
    font-size: 1rem;
}

@media (max-width: 960px) {
    .reports-scope-panel {
        grid-template-columns: 1fr;
    }

    .reports-scope-actions {
        justify-content: flex-start;
    }
}

@media (max-width: 620px) {
    .reports-scope-panel {
        padding: 14px;
    }

    .reports-scope-actions,
    .reports-scope-btn,
    .reports-important-toggle {
        width: 100%;
    }

    .reports-scope-btn,
    .reports-important-toggle {
        justify-content: center;
    }

    .report-card-main {
        padding: 13px;
    }

    .report-title-row {
        align-items: flex-start;
        flex-direction: column;
    }

    .report-card-badges {
        justify-content: flex-start;
    }
}
