@import url('https://fonts.googleapis.com/css2?family=Dela+Gothic+One&display=swap');
@import url('/public/fontawesome/css/all.min.css');

/* ==========================================================
   OPENSHOGUN - STYLE TABLER NATIF & TYPOGRAPHIE SENGOKU
   ========================================================== */

/* Normalisation d'alignement des icônes Font Awesome */
.fa-solid, .fa-regular, .fa-brands {
    vertical-align: -0.125em;
}
.nav-link-icon .fa-solid,
.nav-link-icon .fa-regular {
    font-size: 1.1rem;
    vertical-align: middle;
}
.dropdown-item-icon .fa-solid,
.dropdown-item-icon .fa-regular {
    font-size: 0.95rem;
    width: 1.25rem;
    text-align: center;
}

:root {
    --bg-dark: var(--tblr-body-bg, #f6f8fb);
    --bg-surface: #ffffff;
    --bg-card: #ffffff;
    --bg-card-solid: #ffffff;
    --bg-ink: #f8fafc;

    /* Typographie Féodale Sengoku (Dela Gothic One) */
    --font-game-title: 'Dela Gothic One', cursive, sans-serif;
    --font-feodal: 'Dela Gothic One', cursive, sans-serif;
    --tblr-font-game: 'Dela Gothic One', cursive, sans-serif;

    /* Bordures & Ombres Tabler */
    --border-color: rgba(98, 105, 118, 0.16);
    --border-highlight: var(--tblr-primary, #206bc4);

    /* Typographie Tabler */
    --text-main: var(--tblr-body-color, #1e293b);
    --text-muted: var(--tblr-muted, #64748b);
    --text-secondary: #475569;
    --text-subtle: #64748b;
    --text-bright: #0f172a;

    /* Couleurs de factions */
    --color-oda: #d63939;
    --color-takeda: #d63939;
    --color-tokugawa: #f59f00;

    /* Ressources */
    --res-wood: #f59f00;
    --res-stone: #206bc4;
    --res-deut: #2fb344;
    --res-energy: #d63939;
}

/* Classes Utilitaires pour Typographie Féodale */
.font-game,
.title-feodal,
.feudal-title,
.font-feodal {
    font-family: var(--font-game-title) !important;
    letter-spacing: 0.03em;
}

.brand-game-title,
.hero-banner-title,
.feudal-card-header,
.clan-banner-name {
    font-family: var(--font-game-title);
    letter-spacing: 0.025em;
}

/* ==========================================================
   TOPBAR HUD & NAVIGATION (STYLE TRAVIAN & LAQUE SENGOKU)
   ========================================================== */
.hud-header {
    background: transparent;
    position: relative;
    z-index: 100;
}

/* Bannière Logo Centré Haut & Agrandie */
.hud-brand-header {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1.1rem 1.5rem 0.85rem 1.5rem;
    border-bottom: 1px solid rgba(220, 203, 179, 0.5);
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.85) 0%, rgba(246, 242, 232, 0.55) 100%);
}

.brand-logo-link {
    display: inline-flex;
    justify-content: center;
    align-items: center;
    text-decoration: none;
    transition: transform 0.25s ease, filter 0.25s ease;
}

.brand-logo-link:hover {
    transform: scale(1.03);
}

.brand-logo-img {
    height: 175px;
    max-height: 195px;
    width: auto;
    max-width: 92vw;
    object-fit: contain;
    filter: drop-shadow(0 6px 16px rgba(60, 45, 30, 0.22));
}

@media (max-width: 768px) {
    .brand-logo-img {
        height: 115px;
        max-height: 125px;
    }
}

@media (max-width: 480px) {
    .brand-logo-img {
        height: 90px;
        max-height: 95px;
    }
}

/* ==========================================================
   BARRE DE COMMANDE TRAVIAN SENGOKU (PLAQUE FÉODALE CENTRÉE)
   ========================================================== */
.travian-hud-console {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    padding: 0.35rem 1rem 0.5rem 1rem;
    position: relative;
    z-index: 100;
}

.travian-bar-wrapper {
    width: 100%;
    max-width: 1368px;
    margin: 0 auto;
    background: none;
    padding: 6.5% 6.5% 5.5% 6.5%;
    position: relative;
    z-index: 100;
    filter: drop-shadow(0 6px 20px rgba(25, 12, 6, 0.28));
    box-sizing: border-box;
}

.travian-bar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    width: 100%;
    margin: 0 auto;
    position: relative;
    z-index: 5;
}

/* 🥋 HÉROS SAMOURAÏ (MÉDAILLON GAUCHE STYLE TRAVIAN) */
.travian-hero-pod {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    position: relative;
    z-index: 10;
}

.travian-hero-disc {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: 2.5px solid #765e46;
    background: #fdfbf7;
    box-shadow: 0 3px 8px rgba(45, 30, 15, 0.35), inset 0 1px 2px rgba(0, 0, 0, 0.25);
    text-decoration: none;
    transition: transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1), border-color 0.2s;
}

.travian-hero-disc:hover {
    transform: scale(1.08);
    border-color: #c2252b;
}

.travian-hero-disc.active {
    border-color: #c2252b;
    box-shadow: 0 0 14px rgba(194, 37, 43, 0.55);
}

.travian-hero-img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    object-position: top center;
    display: block;
}

.travian-hero-hp-ring {
    position: absolute;
    inset: -3px;
    border-radius: 50%;
    border: 2px solid #16a34a;
    pointer-events: none;
}

.travian-hero-lvl-tag {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 20px;
    height: 20px;
    border-radius: 50%;
    background: radial-gradient(circle, #5b8731 0%, #3f6212 100%);
    border: 1.5px solid #ffffff;
    color: #ffffff;
    font-weight: 900;
    font-size: 0.68rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
    z-index: 2;
}

.travian-hero-bonus {
    position: absolute;
    bottom: -4px;
    right: -4px;
    background: linear-gradient(180deg, #d97706 0%, #92400e 100%);
    color: #ffffff;
    font-weight: 900;
    font-size: 0.6rem;
    border-radius: 9999px;
    padding: 1px 5px;
    border: 1.5px solid #ffffff;
    animation: pulse 1.5s infinite;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.4);
    z-index: 2;
}

/* 🏛️ PILE CENTRALE : COMMANDES & RESSOURCES */
.travian-center-stack {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    flex: 1;
    align-items: center;
}

/* Rangée 1 : Boutons Circulaires & Domaine */
.travian-nav-row {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    flex-wrap: wrap;
}

.travian-circle-btn {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 2px solid #7a6248;
    background: radial-gradient(circle, #fffefb 0%, #ded3be 100%);
    box-shadow: 0 2px 5px rgba(45, 30, 15, 0.25), inset 0 1px 1.5px rgba(255, 255, 255, 0.95), inset 0 -1px 1.5px rgba(0, 0, 0, 0.15);
    cursor: pointer;
    text-decoration: none;
    color: #1c1917;
    transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.travian-circle-btn:hover {
    transform: translateY(-2px) scale(1.09);
    border-color: #c2252b;
    box-shadow: 0 4px 10px rgba(194, 37, 43, 0.4), inset 0 1px 1.5px #ffffff;
}

.travian-circle-btn.active {
    border-color: #c2252b;
    border-width: 2.5px;
    box-shadow: 0 0 10px rgba(194, 37, 43, 0.55), inset 0 0 3px rgba(194, 37, 43, 0.25);
}

.travian-circle-img {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    display: block;
}

.travian-icon-badge {
    font-size: 1.15rem;
    line-height: 1;
    filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.2));
}

/* Cachet de Cire Rouge Féodal (Sceau Hanko / Travian Wax Badge) */
.travian-wax-badge {
    position: absolute;
    top: -4px;
    right: -4px;
    min-width: 17px;
    height: 17px;
    padding: 0 2px;
    border-radius: 9999px;
    background: radial-gradient(circle, #dc2626 0%, #991b1b 100%);
    border: 1.5px solid #ffffff;
    color: #ffffff;
    font-weight: 900;
    font-size: 0.65rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.45);
}

.travian-wax-badge.claimable {
    background: radial-gradient(circle, #22c55e 0%, #15803d 100%);
    animation: pulse 1.5s infinite;
}

/* Infobulle Travian */
.travian-tooltip {
    position: absolute;
    top: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%) translateY(4px);
    background: #2b2014;
    border: 1.5px solid #c2252b;
    color: #fffdfa;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 0.22rem 0.55rem;
    border-radius: 4px;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: all 0.2s ease;
    z-index: 120;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.travian-circle-btn:hover .travian-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(0);
}

/* Plaque du Domaine / Coordonnées Cadastrales */
.travian-domain-plaque {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: linear-gradient(180deg, #503c29 0%, #3b2a1a 100%);
    border: 1.5px solid #82664a;
    border-radius: 4px;
    padding: 0.16rem 0.5rem;
    color: #ffffff;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.4), 0 2px 4px rgba(45, 30, 15, 0.2);
    margin-left: 0.25rem;
}

.domain-crest {
    font-size: 0.88rem;
}

.domain-name {
    color: #fef08a;
    font-weight: 800;
    font-size: 0.82rem;
    letter-spacing: 0.2px;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.8);
}

.domain-coords {
    color: #e2d2ba;
    font-family: monospace;
    font-size: 0.76rem;
    font-weight: 700;
}

/* 🪙 Grand Médaillon Mon Shōgun (Inspiré de la pièce dorée Travian) */
.travian-shogun-mon-pod {
    display: inline-flex;
    align-items: center;
    text-decoration: none;
    margin-left: 0.2rem;
    position: relative;
}

.travian-shogun-mon {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    border: 2px solid #dfb74a;
    background: radial-gradient(circle, #fde047 0%, #ca8a04 55%, #78350f 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 3px 7px rgba(45, 30, 15, 0.35), inset 0 1.5px 2px rgba(255, 255, 255, 0.8), inset 0 -1.5px 2px rgba(0, 0, 0, 0.4);
    transition: transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.22s ease;
}

.travian-shogun-mon:hover {
    transform: scale(1.1) rotate(6deg);
    box-shadow: 0 4px 12px rgba(223, 183, 74, 0.65), inset 0 2px 3px rgba(255, 255, 255, 0.95);
}

.shogun-mon-symbol {
    font-size: 1.12rem;
    font-weight: 900;
    color: #581c1c;
    text-shadow: 0 1px 1px rgba(254, 240, 138, 0.8);
}

/* Rangée 2 : Les 2 Cartouches de Ressources Travian */
.travian-res-deck {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    flex-wrap: wrap;
}

.travian-cartridge {
    display: flex;
    align-items: stretch;
    background: #fbf8f2;
    border: 1.5px solid #644d36;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(45, 30, 15, 0.16), inset 0 1px 1px rgba(255, 255, 255, 0.9);
}

.t-cap-cell {
    display: flex;
    align-items: center;
    gap: 0.3rem;
    background: linear-gradient(180deg, #533e2b 0%, #3e2d1d 100%);
    border-right: 1.5px solid #644d36;
    padding: 0.16rem 0.5rem;
    font-weight: 800;
    font-size: 0.78rem;
    color: #fef08a;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.7);
}

.t-cap-ico {
    font-size: 0.95rem;
    line-height: 1;
}

.t-res-cell {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.16rem 0.52rem;
    border-right: 1px solid #dfd3bf;
    background: #fdfbf7;
}

.t-res-cell:last-child {
    border-right: none;
}

.t-res-ico {
    font-size: 1.05rem;
    line-height: 1;
    filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.12));
}

.t-res-core {
    display: flex;
    flex-direction: column;
    min-width: 44px;
}

.t-res-val {
    font-size: 0.8rem;
    font-weight: 800;
    color: #1a1614;
    font-variant-numeric: tabular-nums;
    line-height: 1.12;
}

.t-res-meter {
    width: 100%;
    height: 3px;
    background: #d6cbbe;
    border-radius: 1.5px;
    margin-top: 1.5px;
    overflow: hidden;
    box-shadow: inset 0 1px 1px rgba(0, 0, 0, 0.25);
}

/* Jauge de progression rouge signature de Travian */
.t-meter-bar {
    height: 100%;
    background: #c2252b;
    transition: width 0.3s ease;
    border-radius: 1.5px;
}

.t-meter-bar.wood { background: #c2252b; }
.t-meter-bar.stone { background: #c2252b; }
.t-meter-bar.crop { background: #c2252b; }
.t-meter-bar.shinto { background: #16a34a; }

/* ⚙️ FLANC DROIT : DAIMYŌ & OUTILS SYSTÈME */
.travian-right-flank {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 0.2rem;
    flex-shrink: 0;
}

.travian-daimyo-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    background: #fbf8f2;
    border: 1.5px solid #7c6248;
    border-radius: 4px;
    padding: 0.15rem 0.5rem;
    font-size: 0.8rem;
    box-shadow: 0 1px 3px rgba(45, 30, 15, 0.12);
}

.faction-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
    box-shadow: 0 0 4px currentColor;
}

.faction-dot.oda { background: #c2252b; color: #c2252b; }
.faction-dot.takeda { background: #991b1b; color: #991b1b; }
.faction-dot.tokugawa { background: #b45309; color: #b45309; }

.daimyo-name {
    cursor: pointer;
    color: #1c1917;
    font-weight: 700;
}

.daimyo-name:hover {
    color: #c2252b;
}

.motto-chip {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 0.85rem;
    padding: 0;
    line-height: 1;
    transition: transform 0.15s ease;
}

.motto-chip:hover {
    transform: scale(1.2);
}

.travian-sys-cluster {
    display: flex;
    align-items: center;
    gap: 0.3rem;
}

.travian-sys-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    border: 1.5px solid #7c6248;
    background: radial-gradient(circle, #ffffff 0%, #dfd5c4 100%);
    text-decoration: none;
    font-size: 0.82rem;
    color: #1c1917;
    box-shadow: 0 1px 3px rgba(45, 30, 15, 0.2), inset 0 1px 1px rgba(255, 255, 255, 0.9);
    transition: transform 0.18s cubic-bezier(0.34, 1.56, 0.64, 1), border-color 0.18s;
}

.travian-sys-btn:hover {
    transform: scale(1.14);
    border-color: #c2252b;
    box-shadow: 0 3px 8px rgba(194, 37, 43, 0.35);
}

.travian-sys-btn.admin {
    background: radial-gradient(circle, #fef3c7 0%, #fde68a 100%);
    border-color: #b45309;
}

.travian-sys-btn.exit:hover {
    background: #fee2e2;
    border-color: #ef4444;
}

/* ==========================================================
   BANNIÈRE D'ALERTE MILITAIRE & TOUR DE GUET (STYLE SENGOKU)
   ========================================================== */
.travian-alert-banner {
    width: 100%;
    margin: 0.4rem 0 0.65rem 0;
    border-radius: 8px;
    padding: 0.5rem 1.25rem;
    font-size: 0.88rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    cursor: pointer;
    overflow: hidden;
    color: #ffffff;
    transition: transform 0.2s ease, box-shadow 0.2s ease, filter 0.2s ease;
    user-select: none;
}

.travian-alert-banner:hover {
    transform: translateY(-2px);
    filter: brightness(1.08);
}

.travian-alert-banner.alert-threat {
    background: linear-gradient(90deg, #7f1d1d 0%, #991b1b 50%, #7f1d1d 100%);
    border: 1px solid #ef4444;
    box-shadow: 0 4px 14px rgba(220, 38, 38, 0.4), inset 0 1px 1px rgba(255, 255, 255, 0.2);
    animation: alertPulseThreat 2.5s infinite;
}

.travian-alert-banner.alert-spy {
    background: linear-gradient(90deg, #4c1d95 0%, #6b21a8 50%, #4c1d95 100%);
    border: 1px solid #c084fc;
    box-shadow: 0 4px 14px rgba(168, 85, 247, 0.35), inset 0 1px 1px rgba(255, 255, 255, 0.2);
    animation: alertPulseSpy 3s infinite;
}

.travian-alert-banner.alert-info {
    background: linear-gradient(90deg, #1e293b 0%, #334155 50%, #1e293b 100%);
    border: 1px solid #64748b;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.25);
}

.alert-banner-left {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    flex-wrap: wrap;
}

.alert-status-badge {
    padding: 0.25rem 0.65rem;
    border-radius: 4px;
    font-weight: 800;
    font-size: 0.72rem;
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.alert-status-badge.threat {
    background: #dc2626;
    color: #ffffff;
    border: 1px solid #f87171;
}

.alert-status-badge.spy {
    background: #9333ea;
    color: #ffffff;
    border: 1px solid #d8b4fe;
}

.alert-status-badge.info {
    background: #0284c7;
    color: #ffffff;
    border: 1px solid #7dd3fc;
}

.alert-headline {
    color: #ffffff;
    font-size: 0.88rem;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.5);
}

.alert-countdown-chip {
    background: rgba(0, 0, 0, 0.45);
    padding: 0.22rem 0.65rem;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    font-size: 0.82rem;
    color: #fef08a;
    font-family: monospace;
    letter-spacing: 0.3px;
}

.alert-banner-right {
    display: flex;
    align-items: center;
}

.alert-cta-btn {
    display: flex;
    align-items: center;
    gap: 0.45rem;
    background: rgba(255, 255, 255, 0.16);
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 0.35rem 0.85rem;
    border-radius: 6px;
    font-size: 0.82rem;
    font-weight: 700;
    color: #ffffff;
    white-space: nowrap;
    transition: background 0.2s, transform 0.2s;
}

.travian-alert-banner:hover .alert-cta-btn {
    background: rgba(255, 255, 255, 0.28);
    transform: translateX(2px);
}

@keyframes alertPulseThreat {
    0%, 100% {
        box-shadow: 0 4px 14px rgba(220, 38, 38, 0.4);
    }
    50% {
        box-shadow: 0 4px 22px rgba(239, 68, 68, 0.75);
    }
}

@keyframes alertPulseSpy {
    0%, 100% {
        box-shadow: 0 4px 14px rgba(168, 85, 247, 0.35);
    }
    50% {
        box-shadow: 0 4px 22px rgba(192, 132, 252, 0.7);
    }
}

/* 🏯 Modale Tour de Guet */
.watchtower-modal-card {
    max-width: 860px;
    width: 95%;
}

.badge-threat-pulse {
    background: #dc2626;
    color: #fff;
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    font-size: 0.72rem;
    font-weight: 700;
    border: 1px solid #ef4444;
    animation: alertPulseThreat 2s infinite;
}

.watchtower-kpi-bar {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.85rem;
    margin-bottom: 1.25rem;
}

.watchtower-kpi-item {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.75rem 1rem;
    box-shadow: 0 1px 3px rgba(60, 45, 30, 0.04);
}

.watchtower-kpi-item.threat {
    border-top: 3px solid #dc2626;
}

.watchtower-kpi-item.spy {
    border-top: 3px solid #9333ea;
}

.watchtower-kpi-item.info {
    border-top: 3px solid #0284c7;
}

.watchtower-kpi-item .kpi-icon {
    font-size: 1.6rem;
}

.watchtower-kpi-item .kpi-num {
    font-size: 1.35rem;
    font-weight: 800;
    line-height: 1;
    color: #1c1917;
}

.watchtower-kpi-item.threat .kpi-num {
    color: #dc2626;
}

.watchtower-kpi-item.spy .kpi-num {
    color: #9333ea;
}

.watchtower-kpi-item.info .kpi-num {
    color: #0284c7;
}

.watchtower-kpi-item .kpi-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    margin-top: 0.2rem;
}

.watchtower-section {
    margin-bottom: 1.5rem;
}

.watchtower-section-title {
    font-size: 0.95rem;
    font-weight: 800;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding-bottom: 0.35rem;
    border-bottom: 2px solid;
}

.watchtower-section-title.threat {
    color: #dc2626;
    border-color: rgba(220, 38, 38, 0.3);
}

.watchtower-section-title.spy {
    color: #9333ea;
    border-color: rgba(147, 51, 234, 0.3);
}

.watchtower-section-title.info {
    color: #0284c7;
    border-color: rgba(2, 132, 199, 0.3);
}

.watchtower-cards-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.watchtower-mission-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 1px 4px rgba(60, 45, 30, 0.05);
}

.watchtower-mission-card.threat {
    border-left: 4px solid #dc2626;
}

.watchtower-mission-card.spy {
    border-left: 4px solid #9333ea;
}

.watchtower-mission-card.info {
    border-left: 4px solid #0284c7;
}

.wt-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.65rem 1rem;
    background: #faf8f5;
    border-bottom: 1px solid var(--border-color);
    flex-wrap: wrap;
    gap: 0.5rem;
}

.wt-card-title {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    font-size: 0.88rem;
}

.wt-type-badge {
    padding: 0.2rem 0.55rem;
    border-radius: 4px;
    font-weight: 800;
    font-size: 0.72rem;
    letter-spacing: 0.4px;
}

.wt-type-badge.threat {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

.wt-type-badge.spy {
    background: #f3e8ff;
    color: #6b21a8;
    border: 1px solid #d8b4fe;
}

.wt-type-badge.info {
    background: #e0f2fe;
    color: #0369a1;
    border: 1px solid #7dd3fc;
}

.wt-card-timer {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.82rem;
}

.wt-card-timer .timer-label {
    color: var(--text-muted);
}

.wt-card-timer .timer-val {
    font-family: monospace;
    font-weight: 800;
    color: #dc2626;
    background: #fee2e2;
    padding: 0.15rem 0.5rem;
    border-radius: 4px;
    border: 1px solid #fca5a5;
    font-size: 0.85rem;
}

.watchtower-mission-card.spy .wt-card-timer .timer-val {
    color: #7e22ce;
    background: #f3e8ff;
    border-color: #d8b4fe;
}

.watchtower-mission-card.info .wt-card-timer .timer-val {
    color: #0369a1;
    background: #e0f2fe;
    border-color: #7dd3fc;
}

.wt-card-body {
    padding: 0.85rem 1rem;
}

.wt-detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1rem;
}

.wt-detail-col {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    font-size: 0.85rem;
}

.wt-col-label {
    font-size: 0.75rem;
    color: var(--text-muted);
    text-transform: uppercase;
    font-weight: 700;
}

.wt-col-val {
    color: #1c1917;
    display: flex;
    align-items: center;
    gap: 0.45rem;
    flex-wrap: wrap;
}

.wt-col-sub {
    color: #64748b;
    font-size: 0.8rem;
    margin-top: 0.15rem;
}

.wt-hero-tag {
    background: #fef08a;
    color: #854d0e;
    border: 1px solid #fde047;
    padding: 0.1rem 0.45rem;
    border-radius: 4px;
    font-size: 0.72rem;
    font-weight: 700;
}

.wt-units-breakdown {
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    margin-top: 0.45rem;
}

.wt-unit-badge {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    padding: 0.15rem 0.45rem;
    border-radius: 4px;
    font-size: 0.75rem;
    color: #334155;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
}

@media (max-width: 1050px) {
    .travian-bar-inner {
        flex-wrap: wrap;
        justify-content: center;
    }
    .travian-right-flank {
        align-items: center;
    }
}

@media (max-width: 768px) {
    .travian-hud-console {
        padding: 0.35rem 0.25rem;
    }
    .travian-bar-wrapper {
        width: 100%;
        padding: 0.5rem 0.5rem;
        border-radius: 6px;
    }
    .travian-nav-row {
        justify-content: center;
    }
    .travian-res-deck {
        justify-content: center;
    }
}



/* ==========================================================
   HARMONISATION DU LAYOUT GLOBAL FLUIDE (PLEINE LARGEUR)
   Calé précisément sur les gouttières du header et de la barre de ressources
   ========================================================== */
.page-body > .container-fluid,
.page-body > .container-xl,
.page-body > .container-lg,
.page-body > .container {
    width: 100% !important;
    max-width: 100% !important;
    padding-left: 1rem !important; /* Calé sur px-3 */
    padding-right: 1rem !important;
}

@media (min-width: 992px) {
    .page-body > .container-fluid,
    .page-body > .container-xl,
    .page-body > .container-lg,
    .page-body > .container {
        padding-left: 1.5rem !important; /* Calé sur px-lg-4 */
        padding-right: 1.5rem !important;
    }
}

/* Exception pour la carte stratégique plein écran */
.page-body > .container-fluid.px-0 {
    padding-left: 0 !important;
    padding-right: 0 !important;
}

/* Extension fluide des conteneurs internes des pages */
.page-body .container,
.page-body .container-xl,
.page-body .container-lg,
.page-body .container-md,
.page-body .castle-view-container,
.page-body .docs-container,
.page-body .support-container,
.page-body .edit-ticket-container {
    max-width: 100% !important;
    width: 100% !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
}

.container {
    max-width: 100% !important;
    width: 100% !important;
    margin: 0.5rem auto;
    padding: 0 1rem;
}

.container.container-fullwidth {
    max-width: 100% !important;
    width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
}

.grid-main {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 1.5rem;
}

@media (max-width: 960px) {
    .grid-main {
        grid-template-columns: 1fr;
    }
}



/* ==========================================================
   VUE 1 : INTERFACE RTS SOL PLANÉTAIRE & COMPLEXE MINIER
   ========================================================== */
.fields-viewport {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 9;
    background: url('/public/assets/shogun_rural_terroir_bg.jpg') center/cover no-repeat;
    border-radius: 12px;
    border: 2px solid var(--border-color);
    box-shadow: inset 0 0 50px rgba(0, 0, 0, 0.3), 0 10px 25px rgba(60, 45, 30, 0.15);
    overflow: visible;
    user-select: none;
}

/* Barre de filtres tactiques par secteur */
.rts-sector-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
    align-items: center;
}

.sector-btn {
    background: #ffffff;
    border: 1px solid var(--border-color);
    color: var(--text-muted);
    padding: 0.35rem 0.75rem;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    box-shadow: 0 2px 5px rgba(60, 45, 30, 0.04);
}

.sector-btn:hover, .sector-btn.active {
    background: rgba(194, 37, 43, 0.08);
    color: #c2252b;
    border-color: #c2252b;
    box-shadow: 0 2px 8px rgba(194, 37, 43, 0.2);
}

.sector-btn.filter-wood:hover { border-color: #78350f; color: #78350f; }
.sector-btn.filter-stone:hover { border-color: #334155; color: #334155; }
.sector-btn.filter-deut:hover { border-color: #b45309; color: #b45309; }
.sector-btn.filter-energy:hover { border-color: #c2252b; color: #c2252b; }
.sector-btn.filter-hq:hover { border-color: #b91c1c; color: #b91c1c; }

/* Hotspots cliquables sur les bâtiments du terrain */
.rts-hotspot {
    position: absolute;
    cursor: pointer;
    z-index: 10;
    border-radius: 6px;
}

/* Cadre de visée tactique RTS (Désactivé pour pure immersion féodale) */
.rts-reticle,
.rts-reticle-alt {
    display: none !important;
}

/* Couleurs par secteur */
.sector-lumber_camp { --sector-color: #78350f; }
.sector-stone_quarry { --sector-color: #334155; }
.sector-rice_paddy { --sector-color: #b45309; }
.sector-shinto_shrine { --sector-color: #c2252b; }
.sector-hq { --sector-color: #b91c1c; }

/* Sprites PNG transparents des bâtiments féodaux (stables, sans effet yoyo au survol) */
.rts-tile-sprite {
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
    height: 100%;
    object-fit: contain;
    pointer-events: none;
    filter: drop-shadow(0 4px 6px rgba(0, 0, 0, 0.4));
}

/* Terroirs ruraux : les 19 parcelles circulaires occupent 100% de la largeur du socle */
.fields-viewport .rts-hotspot:not(.hotspot-bunker-hq) .rts-tile-sprite {
    width: 100%;
    height: auto;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
}

.rts-tenshu-sprite {
    filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.5));
}

.rts-hotspot.highlighted .rts-tile-sprite,
.rts-hotspot:hover .rts-tile-sprite {
    filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.6)) brightness(1.06);
}

/* Parcelles au niveau 0 : semi-transparentes mais présentes sur leur slot */
.rts-hotspot.is-level-zero .rts-tile-sprite {
    opacity: 0.82;
    filter: drop-shadow(0 3px 5px rgba(0, 0, 0, 0.35)) grayscale(20%);
}

.rts-hotspot.is-level-zero:hover .rts-tile-sprite {
    opacity: 1;
    filter: drop-shadow(0 6px 14px rgba(22, 101, 52, 0.45)) brightness(1.08);
}

/* Badge HUD de Niveau sur la structure (Cité) */
.rts-badge {
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(253, 251, 247, 0.96);
    backdrop-filter: blur(8px);
    border: 1.5px solid var(--sector-color);
    border-radius: 4px;
    padding: 2px 7px;
    font-size: 0.72rem;
    font-weight: 700;
    color: #1c1917;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    box-shadow: 0 4px 10px rgba(60, 45, 30, 0.25);
    white-space: nowrap;
    transition: all 0.2s ease;
    pointer-events: none;
    z-index: 10;
}

.rts-lvl-pill {
    background: rgba(28, 25, 23, 0.08);
    padding: 0 0.35rem;
    border-radius: 3px;
    font-size: 0.7rem;
    color: #1c1917;
}

.rts-upgrading-pulse {
    animation: pulseQueue 1.5s infinite;
    color: #b45309;
}

@keyframes pulseQueue {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.2); }
}

/* ==========================================================
   BADGE DE NIVEAU MINIMALISTE TERROIR (STYLE TRAVIAN)
   En hauteur et à droite du bâtiment
   ========================================================== */
.rts-level-bubble {
    position: absolute;
    top: 6%;
    right: 8%;
    min-width: 28px;
    height: 28px;
    padding: 0 4px;
    border-radius: 50%;
    background: #ffffff;
    border: 2px solid #b91c1c;
    box-shadow: 0 3px 10px rgba(60, 45, 30, 0.4), inset 0 1px 2px rgba(255, 255, 255, 0.9);
    color: #1c1917;
    font-size: 0.9rem;
    font-weight: 900;
    font-family: 'Segoe UI', system-ui, -apple-system, sans-serif;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 25;
    pointer-events: none;
}

.rts-level-bubble.upgrading {
    border-color: #b45309;
    background: #fef3c7;
    color: #92400e;
    border-radius: 14px;
    padding: 0 6px;
    min-width: 38px;
    gap: 2px;
}

.rts-level-bubble.demolishing {
    border-color: #dc2626;
    background: #fee2e2;
    color: #991b1b;
    border-radius: 14px;
    padding: 0 6px;
    min-width: 38px;
    gap: 2px;
}

.rts-level-bubble.level-zero {
    border-color: #78716c;
    background: #f5f5f4;
    color: #57534e;
    opacity: 0.9;
}

.bubble-pulse {
    font-size: 0.72rem;
    animation: pulse 1.5s infinite;
}

.rts-level-bubble.rts-tenshu-bubble {
    top: 10%;
    right: 12%;
    min-width: 32px;
    height: 32px;
    border-width: 2.5px;
    border-color: #c2252b;
    font-size: 0.95rem;
    color: #c2252b;
}

/* Infobulle Tactique d'Amélioration au survol (Tooltip RTS) */
.rts-tooltip {
    position: absolute;
    width: 230px;
    background: rgba(253, 251, 247, 0.98);
    backdrop-filter: blur(12px);
    border: 1.5px solid var(--sector-color);
    border-radius: 6px;
    padding: 0.65rem 0.8rem;
    box-shadow: 0 8px 25px rgba(60, 45, 30, 0.2);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s ease, transform 0.2s ease;
    transform: translateY(4px);
    pointer-events: none;
    z-index: 100;
    font-size: 0.75rem;
    color: #1c1917;
}

.rts-hotspot:hover .rts-tooltip {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.rts-tt-title {
    font-size: 0.85rem;
    font-weight: 800;
    color: #1c1917;
    margin-bottom: 0.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.rts-tt-prod {
    color: #6b6355;
    margin-bottom: 0.4rem;
    font-size: 0.75rem;
}

.rts-tt-cost {
    border-top: 1px solid var(--border-color);
    padding-top: 0.4rem;
    margin-top: 0.4rem;
    display: flex;
    justify-content: space-between;
    gap: 0.25rem;
    font-size: 0.7rem;
}

.rts-tt-cta {
    margin-top: 0.45rem;
    text-align: center;
    color: var(--sector-color);
    font-weight: 700;
    font-size: 0.7rem;
    background: rgba(194, 37, 43, 0.06);
    padding: 0.2rem;
    border-radius: 3px;
}

/* ==========================================================
   POSITIONNEMENT PRÉCIS DES 19 PARCELLES SUR LE TERROIR
   ========================================================== */
.hotspot-slot-1  { left: 10.5%; top: 31.5%; width: 12.0%; height: 16.0%; z-index: 43; }
.hotspot-slot-2  { left: 9.5%;  top: 40.5%; width: 12.0%; height: 16.0%; z-index: 52; }
.hotspot-slot-3  { left: 11.5%; top: 51.0%; width: 12.0%; height: 16.0%; z-index: 62; }
.hotspot-slot-4  { left: 19.5%; top: 38.0%; width: 12.0%; height: 16.0%; z-index: 49; }
.hotspot-slot-5  { left: 23.5%; top: 47.5%; width: 12.0%; height: 16.0%; z-index: 59; }
.hotspot-slot-6  { left: 20.8%; top: 65.5%; width: 12.0%; height: 16.0%; z-index: 77; }
.hotspot-slot-7  { left: 28.5%; top: 73.0%; width: 12.0%; height: 16.0%; z-index: 85; }
.hotspot-slot-8  { left: 30.0%; top: 57.0%; width: 12.0%; height: 16.0%; z-index: 68; }
.hotspot-slot-9  { left: 38.5%; top: 63.0%; width: 12.0%; height: 16.0%; z-index: 74; }
.hotspot-slot-10 { left: 49.5%; top: 61.5%; width: 12.0%; height: 16.0%; z-index: 73; }
.hotspot-slot-11 { left: 59.5%; top: 55.5%; width: 12.0%; height: 16.0%; z-index: 67; }
.hotspot-slot-12 { left: 59.0%; top: 75.5%; width: 12.0%; height: 16.0%; z-index: 87; }
.hotspot-slot-13 { left: 68.0%; top: 72.5%; width: 12.0%; height: 16.0%; z-index: 84; }
.hotspot-slot-14 { left: 57.0%; top: 64.0%; width: 18.0%; height: 13.5%; z-index: 65; }
.hotspot-slot-15 { left: 71.5%; top: 37.0%; width: 12.0%; height: 16.0%; z-index: 48; }
.hotspot-slot-16 { left: 80.0%; top: 32.0%; width: 12.0%; height: 16.0%; z-index: 43; }
.hotspot-slot-17 { left: 72.0%; top: 25.5%; width: 12.0%; height: 16.0%; z-index: 37; }
.hotspot-slot-18 { left: 64.0%; top: 18.5%; width: 12.0%; height: 16.0%; z-index: 30; }
.hotspot-slot-19 { left: 65.5%; top: 73.0%; width: 17.5%; height: 13.0%; z-index: 75; }
.hotspot-slot-20 { left: 83.5%; top: 41.5%; width: 12.5%; height: 17.5%; z-index: 45; }

/* Tooltip position par défaut pour les parcelles */
.rts-hotspot .rts-tooltip {
    bottom: 105%;
    left: 50%;
    transform: translateX(-50%);
}

/* Ajustements pour les parcelles du haut pour que le tooltip s'affiche vers le bas */
.hotspot-slot-17 .rts-tooltip,
.hotspot-slot-18 .rts-tooltip,
.hotspot-slot-1 .rts-tooltip,
.hotspot-slot-4 .rts-tooltip,
.hotspot-slot-16 .rts-tooltip {
    bottom: auto;
    top: 105%;
}

/* Tenshu et Cœur Castral Central */
.hotspot-bunker-hq {
    left: 43.5%;
    top: 17.0%;
    width: 19.0%;
    height: 32.0%;
    z-index: 7;
}

.hotspot-bunker-hq .rts-badge {
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    background: #ffffff;
    border: 2px solid #c2252b;
    box-shadow: 0 4px 15px rgba(194, 37, 43, 0.3);
    color: #1c1917;
    font-size: 0.8rem;
    padding: 3px 10px;
}

.hotspot-bunker-hq .rts-tooltip {
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-bottom: 8px;
    width: 250px;
}

/* ==========================================================
   VUE CITÉ CASTRALE FÉODALE RTS (STYLE TRAVIAN DORF 2)
   ========================================================== */
.fields-viewport.rts-city-surface {
    background: url('/public/assets/shogun_castle_city_bg.jpg') center/cover no-repeat;
}

.sector-military { --sector-color: #c2252b; }
.sector-science { --sector-color: #b45309; }
.sector-logistics { --sector-color: #334155; }
.sector-gateway { --sector-color: #15803d; }

.sector-btn.filter-military:hover { border-color: #c2252b; color: #c2252b; }
.sector-btn.filter-science:hover { border-color: #b45309; color: #b45309; }
.sector-btn.filter-logistics:hover { border-color: #334155; color: #334155; }
.sector-btn.filter-gateway:hover { border-color: #15803d; color: #15803d; }

/* Positions précises des slots urbains calibrées sur shogun_castle_city_bg.jpg */
.hotspot-city-slot-19 { left: 52.5%; top: 2.4%; width: 18.0%; height: 27.0%; z-index: 10; }
.hotspot-city-slot-20 { left: 36.2%; top: 11.4%; width: 12.5%; height: 20.0%; z-index: 6; }
.hotspot-city-slot-21 { left: 27.0%; top: 19.1%; width: 12.0%; height: 21.0%; z-index: 7; }
.hotspot-city-slot-22 { left: 19.0%; top: 25.9%; width: 13.0%; height: 20.0%; z-index: 8; }
.hotspot-city-slot-23 { left: 11.5%; top: 34.1%; width: 14.0%; height: 21.0%; z-index: 9; }
.hotspot-city-slot-24 { left: 19.5%; top: 44.2%; width: 13.0%; height: 19.0%; z-index: 11; }
.hotspot-city-slot-25 { left: 28.0%; top: 34.1%; width: 13.0%; height: 21.0%; z-index: 10; }
.hotspot-city-slot-26 { left: 47.2%; top: 44.3%; width: 11.5%; height: 24.0%; z-index: 12; }
.hotspot-city-slot-27 { left: 37.2%; top: 59.7%; width: 12.5%; height: 19.0%; z-index: 14; }
.hotspot-city-slot-28 { left: 47.0%; top: 64.1%; width: 13.0%; height: 21.0%; z-index: 15; }
.hotspot-city-slot-29 { left: 56.2%; top: 59.0%; width: 11.5%; height: 18.0%; z-index: 14; }
.hotspot-city-slot-30 { left: 62.2%; top: 52.5%; width: 11.5%; height: 18.0%; z-index: 13; }
.hotspot-city-slot-31 { left: 59.8%; top: 37.0%; width: 11.5%; height: 18.0%; z-index: 10; }
.hotspot-city-slot-32 { left: 69.8%; top: 44.5%; width: 11.5%; height: 18.0%; z-index: 12; }
.hotspot-city-slot-33 { left: 73.8%; top: 34.5%; width: 11.5%; height: 18.0%; z-index: 10; }
.hotspot-city-slot-34 { left: 17.5%; top: 56.5%; width: 13.5%; height: 20.0%; z-index: 15; }
.hotspot-city-slot-gateway { left: 12.0%; top: 68.5%; width: 7.5%; height: 12.0%; z-index: 16; }

/* Slot Muraille & Remparts (Slot 34) : Aucune image superposée, uniquement le badge ou le bouton '+' */
.hotspot-city-slot-34 .rts-tile-sprite,
.hotspot-city-slot-34 img {
    display: none !important;
}

.hotspot-city-slot-34 .rts-level-bubble {
    top: 50% !important;
    left: 50% !important;
    right: auto !important;
    bottom: auto !important;
    transform: translate(-50%, -50%) !important;
}

.hotspot-city-slot-34:hover .rts-level-bubble {
    transform: translate(-50%, -50%) scale(1.12) !important;
}

/* Emplacements libres / Terrains disponibles (Cité & Terroirs Ruraux) */
.rts-hotspot.is-empty-plot {
    border: 1.5px dashed rgba(194, 37, 43, 0.45);
    border-radius: 50%;
    transition: background 0.2s, border-color 0.2s, box-shadow 0.2s;
}
.rts-hotspot.is-empty-plot:hover {
    background: rgba(194, 37, 43, 0.1);
    border-color: #c2252b;
    box-shadow: 0 0 14px rgba(194, 37, 43, 0.3);
}
.rts-hotspot.is-empty-plot .rts-level-bubble {
    top: 50% !important;
    left: 50% !important;
    right: auto !important;
    bottom: auto !important;
    transform: translate(-50%, -50%) !important;
    background: #fdfbf7;
    border: 2px solid #78716c;
    color: #78716c;
    font-size: 1.05rem;
    font-weight: 900;
    min-width: 28px;
    height: 28px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.35);
    transition: transform 0.2s ease, border-color 0.2s ease, color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}
.rts-hotspot.is-empty-plot:hover .rts-level-bubble {
    transform: translate(-50%, -50%) scale(1.18) !important;
    background: #ffffff;
    border-color: #c2252b;
    color: #c2252b;
    box-shadow: 0 0 12px rgba(194, 37, 43, 0.6);
}

.rts-level-bubble.rts-gateway-bubble {
    border-color: #15803d;
    color: #15803d;
    font-size: 0.95rem;
}

/* ==========================================================
   VUE 2 : CITÉ PLANÉTAIRE (BÂTIMENTS)
   ========================================================== */
.city-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.25rem;
}

.building-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    transition: all 0.2s;
    position: relative;
    box-shadow: 0 2px 8px rgba(60, 45, 30, 0.05);
}

.building-card:hover {
    border-color: #c2252b;
    box-shadow: 0 4px 16px rgba(194, 37, 43, 0.2);
    transform: translateY(-2px);
}

.building-avatar {
    width: 65px;
    height: 65px;
    border-radius: 12px;
    background: rgba(194, 37, 43, 0.08);
    border: 1px solid rgba(194, 37, 43, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    margin-bottom: 0.75rem;
}

.building-title {
    font-size: 0.95rem;
    font-weight: 700;
    color: #1c1917;
    margin-bottom: 0.25rem;
}

.building-lvl-badge {
    background: rgba(194, 37, 43, 0.1);
    color: #c2252b;
    padding: 0.15rem 0.6rem;
    border-radius: 9999px;
    font-size: 0.8rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}

/* ==========================================================
   FILE DE CONSTRUCTION (SIDEBAR)
   ========================================================== */
.queue-item {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 0.75rem;
    margin-bottom: 0.75rem;
    box-shadow: 0 2px 6px rgba(60, 45, 30, 0.04);
}

.queue-progress-box {
    width: 100%;
}

.building-progress-bar {
    transition: width 0.35s ease;
}

.queue-info h4 {
    font-size: 0.9rem;
    color: #1c1917;
}

.queue-timer {
    font-size: 0.85rem;
    font-weight: 700;
    color: #c2252b;
    font-family: monospace;
}

.btn-cancel {
    background: rgba(194, 37, 43, 0.08);
    border: 1px solid #c2252b;
    color: #c2252b;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.75rem;
}

.btn-cancel:hover {
    background: #c2252b;
    color: #ffffff;
}

/* ==========================================================
   MODALES UNIFIÉES STYLE TABLER & ARRIÈRE-PLAN OPAQUE
   ========================================================== */
.modal-backdrop {
    --bs-backdrop-bg: #090d16;
    --bs-backdrop-opacity: 0.96;
    --tblr-backdrop-bg: #090d16;
    --tblr-backdrop-opacity: 0.96;
    background-color: #090d16 !important;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    transition: opacity 0.2s ease-in-out !important;
}

.modal-backdrop.fade {
    opacity: 0 !important;
}

.modal-backdrop.show {
    opacity: 0.96 !important;
}

.modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(9, 13, 22, 0.96) !important;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 1rem;
}

.modal-card {
    background: #ffffff;
    border: 1px solid rgba(98, 105, 118, 0.16);
    box-shadow: 0 16px 50px rgba(0, 0, 0, 0.2);
    border-radius: 8px;
    width: 94%;
    max-width: 520px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    color: inherit;
    animation: modalPop 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}

.modal-card-sm { max-width: 440px; }
.modal-card-md { max-width: 680px; }
.modal-card-lg { max-width: 820px; }
.modal-card-xl { max-width: 980px; }

@keyframes modalPop {
    from { opacity: 0; transform: scale(0.95) translateY(6px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}

.modal-header, .modal-card > .card-header {
    background: #ffffff;
    border-bottom: 1px solid rgba(98, 105, 118, 0.16);
    padding: 1rem 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
}

.modal-title, .modal-header h2, .modal-header h3, .modal-card > .card-header .card-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: inherit;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.modal-body, .modal-card > .card-body {
    padding: 1.25rem;
    overflow-y: auto;
    flex: 1 1 auto;
    color: inherit;
}

.modal-footer {
    background: #ffffff;
    border-top: 1px solid rgba(98, 105, 118, 0.16);
    padding: 0.85rem 1.25rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-shrink: 0;
    gap: 0.75rem;
}

.modal-inner-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    box-shadow: 0 2px 6px rgba(60, 45, 30, 0.04);
}

.modal-close-btn {
    background: rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.1);
    color: #64748b;
    width: 34px;
    height: 34px;
    border-radius: 8px;
    font-size: 1.4rem;
    line-height: 1;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s;
}

.modal-close-btn:hover {
    background: rgba(0, 0, 0, 0.1);
    color: #0f172a;
    border-color: rgba(0, 0, 0, 0.2);
    transform: rotate(90deg);
}

/* Modales d'alerte et de confirmation */
.alert-modal-card {
    max-width: 460px;
    border: 1px solid var(--tblr-border-color, rgba(0, 0, 0, 0.12));
}
.alert-modal-card.type-error {
    border-color: #ef4444;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
}
.alert-modal-card.type-success {
    border-color: #15803d;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
}
.alert-modal-card.type-warning {
    border-color: #b45309;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
}
.alert-modal-card.type-confirm {
    border-color: var(--tblr-border-color, rgba(0, 0, 0, 0.12));
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
}

.alert-modal-content {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    padding: 0.75rem 0;
}
.alert-modal-icon {
    font-size: 2.4rem;
    flex-shrink: 0;
}
.alert-modal-text {
    font-size: 0.95rem;
    color: #1c1917;
    line-height: 1.5;
    font-weight: 500;
}
.alert-modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
    margin-top: 1.25rem;
}



.cost-row {
    display: flex;
    gap: 1rem;
    margin: 1rem 0;
    padding: 0.75rem;
    background: rgba(246, 242, 232, 0.7);
    border-radius: 6px;
    justify-content: space-around;
}

.cost-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.9rem;
    font-weight: 700;
    color: #1c1917;
}

/* ==========================================================
   CARTE GALACTIQUE 2D
   ========================================================== */
.galaxy-nav-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    background: #ffffff;
    padding: 0.75rem 1rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 6px rgba(60, 45, 30, 0.04);
}

.galaxy-grid {
    display: grid;
    grid-template-columns: repeat(9, 1fr);
    gap: 6px;
    background: #ffffff;
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    overflow-x: auto;
}

/* ==========================================================
   CARTE GALACTIQUE AVEC DRAG & DROP
   ========================================================== */
.galaxy-map-wrapper {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    background: #ffffff;
}

.galaxy-hud-overlay {
    position: absolute;
    top: 12px;
    left: 12px;
    right: 12px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    z-index: 10;
    pointer-events: none;
}

.hud-coords-badge {
    background: #ffffff;
    border: 1px solid var(--border-color);
    padding: 0.4rem 0.85rem;
    border-radius: 6px;
    font-size: 0.85rem;
    color: var(--text-muted);
    box-shadow: 0 2px 8px rgba(60, 45, 30, 0.08);
    pointer-events: auto;
}

.hud-coords-badge strong {
    color: #c2252b;
    margin-left: 0.35rem;
    font-family: monospace;
    font-size: 0.95rem;
}

.hud-controls-group {
    display: flex;
    gap: 0.4rem;
    pointer-events: auto;
}

/* ========================================================
   BOÎTIER DE NAVIGATION FÉODALE UNIFIÉ (BAS À DROITE)
   Mini-Map Centrale + Flèches Directionnelles Extérieures
   ======================================================== */
.map-unified-nav-pad {
    position: absolute;
    bottom: 16px;
    right: 16px;
    z-index: 25;
    pointer-events: auto;
    background: rgba(253, 251, 247, 0.95);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(194, 37, 43, 0.28);
    border-radius: 14px;
    padding: 6px;
    box-shadow: 0 4px 18px rgba(60, 45, 30, 0.18);
    display: grid;
    grid-template-columns: 28px 78px 28px;
    grid-template-rows: 28px 78px 28px;
    gap: 4px;
    user-select: none;
    align-items: center;
    justify-items: center;
}

/* 1. Flèches directionnelles extérieures (Nord, Sud, Ouest, Est) */
.map-unified-nav-pad .nav-pad-arrow {
    background: #ffffff;
    border: 1px solid var(--border-color, #e2d9cc);
    border-radius: 6px;
    color: #1c1917;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.95rem;
    transition: all 0.12s ease;
    box-shadow: 0 1px 3px rgba(60, 45, 30, 0.08);
    padding: 0;
    margin: 0;
}

.map-unified-nav-pad .nav-pad-arrow:hover {
    background: #c2252b;
    color: #ffffff;
    border-color: #c2252b;
    box-shadow: 0 2px 8px rgba(194, 37, 43, 0.35);
}

.map-unified-nav-pad .nav-pad-arrow:active {
    transform: scale(0.92);
}

.map-unified-nav-pad .arrow-up {
    grid-column: 2;
    grid-row: 1;
    width: 78px;
    height: 28px;
}

.map-unified-nav-pad .arrow-down {
    grid-column: 2;
    grid-row: 3;
    width: 78px;
    height: 28px;
}

.map-unified-nav-pad .arrow-left {
    grid-column: 1;
    grid-row: 2;
    width: 28px;
    height: 78px;
}

.map-unified-nav-pad .arrow-right {
    grid-column: 3;
    grid-row: 2;
    width: 28px;
    height: 78px;
}

/* 2. Cœur Mini-Map au centre (occupant la case [2, 2]) */
.map-unified-nav-pad .nav-pad-minimap-core {
    grid-column: 2;
    grid-row: 2;
    width: 78px;
    height: 78px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 1fr 1fr;
    gap: 3px;
    position: relative;
    background: rgba(0, 0, 0, 0.04);
    border-radius: 6px;
    padding: 2px;
}

.map-unified-nav-pad .minimap-q-cell {
    border: 1px solid rgba(0, 0, 0, 0.1);
    border-radius: 4px;
    background: #ffffff;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.68rem;
    font-weight: 800;
    color: #334155;
    padding: 0;
    margin: 0;
    transition: all 0.12s ease;
    text-decoration: none;
}

.map-unified-nav-pad .minimap-q-cell:hover {
    border-color: #c2252b;
    background: rgba(194, 37, 43, 0.08);
}

.map-unified-nav-pad .minimap-q-cell.active {
    border-color: #c2252b;
    background: rgba(194, 37, 43, 0.18);
    color: #c2252b;
    box-shadow: 0 0 0 1px #c2252b inset;
}

/* Pastille Torii centrale (Kyoto / Centre [0 : 0]) */
.map-unified-nav-pad .minimap-center-torii {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: #c2252b;
    color: #ffffff;
    font-size: 0.6rem;
    border: 2px solid #ffffff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 5;
    transition: transform 0.15s ease, background 0.15s ease;
    padding: 0;
}

.map-unified-nav-pad .minimap-center-torii:hover {
    transform: translate(-50%, -50%) scale(1.25);
    background: #991b1b;
}

.map-unified-nav-pad .minimap-center-torii.active {
    background: #e11d48;
    box-shadow: 0 0 0 2px #f43f5e;
}

/* 3. Angles extérieurs (Zoom +, Zoom -, Mon Fief, Boussole) */
.map-unified-nav-pad .nav-pad-corner {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    margin: 0;
    box-shadow: 0 1px 3px rgba(60, 45, 30, 0.08);
    transition: all 0.12s ease;
}

.map-unified-nav-pad .corner-compass {
    grid-column: 1;
    grid-row: 1;
    background: transparent;
    border: 1px dashed rgba(194, 37, 43, 0.3);
    font-size: 0.8rem;
    box-shadow: none;
}

.map-unified-nav-pad .corner-zoom-in {
    grid-column: 3;
    grid-row: 1;
    background: #ffffff;
    border: 1px solid var(--border-color, #e2d9cc);
    color: #1c1917;
    cursor: pointer;
    font-size: 0.78rem;
    font-weight: 800;
}

.map-unified-nav-pad .corner-zoom-in:hover {
    background: #c2252b;
    color: #ffffff;
    border-color: #c2252b;
}

.map-unified-nav-pad .corner-home {
    grid-column: 1;
    grid-row: 3;
    background: rgba(194, 37, 43, 0.08);
    border: 1px solid rgba(194, 37, 43, 0.3);
    color: #c2252b;
    cursor: pointer;
    font-size: 0.82rem;
}

.map-unified-nav-pad .corner-home:hover {
    background: #c2252b;
    color: #ffffff;
    border-color: #c2252b;
}

.map-unified-nav-pad .corner-zoom-out {
    grid-column: 3;
    grid-row: 3;
    background: #ffffff;
    border: 1px solid var(--border-color, #e2d9cc);
    color: #1c1917;
    cursor: pointer;
    font-size: 0.78rem;
    font-weight: 800;
}

.map-unified-nav-pad .corner-zoom-out:hover {
    background: #c2252b;
    color: #ffffff;
    border-color: #c2252b;
}

.hud-btn {
    background: #ffffff;
    border: 1px solid var(--border-color);
    color: #1c1917;
    padding: 0.4rem 0.75rem;
    border-radius: 6px;
    font-size: 0.85rem;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 2px 6px rgba(60, 45, 30, 0.06);
}

.hud-btn:hover {
    background: rgba(194, 37, 43, 0.08);
    border-color: #c2252b;
    color: #c2252b;
}

.galaxy-viewport {
    width: 100%;
    height: calc(100vh - 280px);
    min-height: 600px;
    max-height: 860px;
    overflow: hidden;
    position: relative;
    cursor: grab;
    user-select: none;
    touch-action: none;
    background: #b0cb78;
    display: flex;
    align-items: center;
    justify-content: center;
}

.galaxy-viewport.grabbing {
    cursor: grabbing;
}

.galaxy-canvas {
    display: grid;
    will-change: transform;
    transform: translate3d(0, 0, 0);
    background: #b0cb78;
    position: relative;
}

/* ==========================================================
   COUCHE DE TRAÇAGE VECTORIEL DES MOUVEMENTS (SVG & SPRITES)
   ========================================================== */
.galaxy-movements-svg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 20;
    overflow: visible;
}

.galaxy-movements-sprites {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 25;
}

/* Lignes et trajectoires de marche (pointillés rectangulaires espacés) */
.movement-route-glow {
    fill: none;
    stroke: rgba(15, 23, 42, 0.65);
    stroke-linecap: butt !important;
    stroke-linejoin: miter;
    stroke-dasharray: 8 12;
    animation: marchDash 1.2s linear infinite;
}

.movement-route-glow.movement-route-return {
    stroke-dasharray: 6 12;
    animation: marchDashReverse 1.5s linear infinite;
    opacity: 0.6;
}

.movement-route-glow.movement-route-threat {
    stroke-dasharray: 8 12;
    animation: marchDashThreat 0.8s linear infinite !important;
}

.movement-route-active {
    fill: none;
    stroke-linecap: butt !important;
    stroke-linejoin: miter;
    stroke-dasharray: 8 12;
    animation: marchDash 1.2s linear infinite;
    pointer-events: stroke;
    cursor: pointer;
    transition: stroke-width 0.2s ease, filter 0.2s ease;
}

.movement-route-active:hover {
    stroke-width: 4.2px !important;
    filter: drop-shadow(0 0 6px currentColor);
}

.movement-route-return {
    fill: none;
    stroke-linecap: butt !important;
    stroke-linejoin: miter;
    stroke-dasharray: 6 12;
    animation: marchDashReverse 1.5s linear infinite;
    opacity: 0.75;
    pointer-events: stroke;
    cursor: pointer;
}

.movement-route-return:hover {
    opacity: 1;
    stroke-width: 4.2px !important;
}

.movement-route-threat {
    animation: marchDashThreat 0.8s linear infinite, threatPulse 1.5s infinite alternate ease-in-out !important;
}

@keyframes marchDash {
    to {
        stroke-dashoffset: -40px;
    }
}

@keyframes marchDashReverse {
    to {
        stroke-dashoffset: 36px;
    }
}

@keyframes marchDashThreat {
    to {
        stroke-dashoffset: -40px;
    }
}

@keyframes threatPulse {
    from {
        stroke-width: 3.5px;
        filter: drop-shadow(0 0 4px rgba(220, 38, 38, 0.6));
    }
    to {
        stroke-width: 5px;
        filter: drop-shadow(0 0 10px rgba(220, 38, 38, 0.95));
    }
}

/* Marqueurs Mobiles Vivants (Sprites) */
.movement-sprite {
    position: absolute;
    transform: translate(-50%, -50%);
    pointer-events: auto;
    cursor: pointer;
    z-index: 26;
    transition: transform 0.15s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.movement-sprite:hover {
    transform: translate(-50%, -50%) scale(1.22);
    z-index: 30;
}

.movement-sprite-badge {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5), inset 0 1px 1px rgba(255, 255, 255, 0.4);
    border: 2px solid #ffffff;
    position: relative;
    user-select: none;
}

.movement-sprite-badge.threat {
    animation: spriteThreatShake 2s infinite ease-in-out;
}

@keyframes spriteThreatShake {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.12); }
}

.movement-sprite-counter {
    position: absolute;
    bottom: -6px;
    right: -6px;
    background: #0f172a;
    color: #f8fafc;
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 8px;
    font-size: 9px;
    font-weight: 800;
    padding: 0 4px;
    line-height: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.4);
}

/* Infobulle Féodale Flottante de Mouvement */
.movement-popover {
    position: fixed;
    z-index: 9999;
    background: #ffffff;
    color: #1e293b;
    border-radius: 8px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.3), 0 8px 10px -6px rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(0, 0, 0, 0.12);
    padding: 12px 14px;
    width: 300px;
    max-width: calc(100vw - 24px);
    box-sizing: border-box;
    pointer-events: auto;
    font-family: inherit;
    animation: popoverFadeIn 0.18s ease-out;
}

.movement-popover .btn-close {
    flex-shrink: 0 !important;
    opacity: 0.75;
    cursor: pointer;
    padding: 0.25rem;
    box-sizing: content-box;
    transition: opacity 0.15s ease, transform 0.15s ease;
}

.movement-popover .btn-close:hover {
    opacity: 1;
    transform: scale(1.1);
}

.movement-popover-badges {
    display: flex;
    align-items: center;
    gap: 6px;
    min-width: 0;
    flex: 1;
    overflow: hidden;
}

.movement-popover-badge-category {
    max-width: 140px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: inline-block;
    vertical-align: middle;
}

.movement-popover-badge-dir {
    max-width: 85px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: inline-block;
    vertical-align: middle;
}

@keyframes popoverFadeIn {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

.galaxy-drag-hint {
    position: absolute;
    bottom: 12px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(253, 251, 247, 0.92);
    border: 1px solid var(--border-color);
    padding: 0.3rem 0.85rem;
    border-radius: 20px;
    font-size: 0.75rem;
    color: var(--text-muted);
    pointer-events: none;
    z-index: 5;
    white-space: nowrap;
    box-shadow: 0 2px 8px rgba(60, 45, 30, 0.08);
    transition: opacity 0.3s ease-out;
}

.galaxy-tile {
    background: #b0cb78;
    border: 0.5px solid rgba(0, 0, 0, 0.04);
    border-radius: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    position: relative;
    transition: outline 0.12s ease-in-out, box-shadow 0.12s ease-in-out, transform 0.12s ease-in-out;
    font-size: 0.75rem;
    user-select: none;
    box-shadow: none;
    overflow: hidden;
    box-sizing: border-box;
}

.tile-inner-overlay {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: transparent;
    pointer-events: none;
}

.galaxy-tile:hover {
    outline: 2px solid #c2252b;
    outline-offset: -2px;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.4), 0 4px 12px rgba(0, 0, 0, 0.18);
    z-index: 10;
}

.galaxy-tile:hover .tile-inner-overlay {
    background: rgba(255, 255, 255, 0.08);
}

.galaxy-tile.village-tile {
    outline: 1.5px solid #2563eb;
    outline-offset: -1.5px;
}

.galaxy-tile.village-tile:hover {
    outline: 2.5px solid #1d4ed8;
    outline-offset: -2.5px;
}

.galaxy-tile.current-planet {
    outline: 2px solid #c2252b;
    outline-offset: -2px;
    box-shadow: inset 0 0 8px rgba(194, 37, 43, 0.35);
    z-index: 3;
}

.galaxy-tile.current-planet:hover {
    outline: 2.5px solid #dc2626;
    outline-offset: -2.5px;
}

.galaxy-tile.tile-center {
    outline: 1.5px solid rgba(194, 37, 43, 0.5);
    outline-offset: -1.5px;
}

.galaxy-tile.authentic-castle-tile {
    outline: 2px solid #d97706;
    outline-offset: -2px;
    box-shadow: inset 0 0 8px rgba(217, 119, 6, 0.35);
    z-index: 3;
}

.galaxy-tile.authentic-castle-tile:hover {
    outline: 2.5px solid #b45309;
    outline-offset: -2.5px;
    box-shadow: inset 0 0 12px rgba(217, 119, 6, 0.6), 0 4px 14px rgba(0, 0, 0, 0.25);
    z-index: 10;
}

.galaxy-tile.ronin-camp-tile {
    outline: 2px solid #e11d48;
    outline-offset: -2px;
    box-shadow: inset 0 0 8px rgba(225, 29, 72, 0.4);
    z-index: 3;
}

.galaxy-tile.ronin-camp-tile:hover {
    outline: 2.5px solid #be123c;
    outline-offset: -2.5px;
    box-shadow: inset 0 0 12px rgba(225, 29, 72, 0.7), 0 4px 14px rgba(0, 0, 0, 0.35);
    z-index: 10;
}

.galaxy-tile.imperial-dojo-tile {
    outline: 3px solid #f59e0b !important;
    outline-offset: -3px;
    box-shadow: inset 0 0 15px rgba(245, 158, 11, 0.7), 0 0 15px rgba(245, 158, 11, 0.6);
    z-index: 4;
    animation: dojoSanctuaryPulse 2.5s infinite alternate ease-in-out;
}

.galaxy-tile.imperial-dojo-tile:hover {
    outline: 3px solid #fbbf24 !important;
    box-shadow: inset 0 0 20px rgba(251, 191, 36, 0.9), 0 0 25px rgba(245, 158, 11, 0.9);
    z-index: 6;
}

@keyframes dojoSanctuaryPulse {
    0% { box-shadow: inset 0 0 10px rgba(245, 158, 11, 0.5), 0 0 10px rgba(245, 158, 11, 0.4); }
    100% { box-shadow: inset 0 0 22px rgba(245, 158, 11, 0.9), 0 0 25px rgba(234, 179, 8, 0.8); }
}

.tile-authentic-badge {
    position: absolute;
    top: 3px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(217, 119, 6, 0.92);
    color: #ffffff;
    font-size: 0.50rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    padding: 1px 6px;
    border-radius: 999px;
    border: 1px solid rgba(254, 240, 138, 0.4);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.25);
    white-space: nowrap;
    line-height: 1.1;
    z-index: 2;
}

.tile-planet-icon {
    font-size: 1.4rem;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.tile-empty-star {
    opacity: 0.3;
    font-size: 1.1rem;
    color: #a8a29e;
}

.tile-coords {
    position: absolute;
    bottom: 2px;
    right: 3px;
    font-size: 0.50rem;
    font-family: monospace;
    font-weight: 600;
    color: rgba(30, 45, 10, 0.4);
    pointer-events: none;
    line-height: 1;
    transition: opacity 0.15s ease, color 0.15s ease;
}

.galaxy-tile:hover .tile-coords {
    opacity: 0.95;
    color: #1e293b;
    font-weight: 800;
    background: rgba(255, 255, 255, 0.85);
    padding: 1px 3px;
    border-radius: 3px;
}

.tile-owner {
    position: absolute;
    bottom: 3px;
    left: 50%;
    transform: translateX(-50%);
    font-weight: 700;
    color: #1e293b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 90%;
    font-size: 0.54rem;
    background: rgba(255, 255, 255, 0.90);
    padding: 1px 5px;
    border-radius: 4px;
    border: 1px solid rgba(0, 0, 0, 0.1);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12);
    line-height: 1.15;
    z-index: 2;
}

.tile-owner.castle-label {
    background: rgba(180, 83, 9, 0.92);
    color: #ffffff;
    border-color: #d97706;
}

.tile-owner.village-label {
    background: rgba(30, 58, 138, 0.90);
    color: #ffffff;
    border-color: #2563eb;
}

.tile-oasis-res-group {
    position: absolute;
    top: 3px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: 2px;
    justify-content: center;
    align-items: center;
    max-width: 96%;
    z-index: 2;
}

.tile-res-badge {
    background: rgba(15, 23, 42, 0.85);
    color: #ffffff;
    font-size: 0.48rem;
    font-weight: 800;
    padding: 0.5px 4px;
    border-radius: 999px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.3);
    white-space: nowrap;
    line-height: 1.15;
    border: 1px solid rgba(255, 255, 255, 0.15);
    display: inline-flex;
    align-items: center;
    gap: 1px;
}

.tile-res-badge.res-rice {
    background: rgba(161, 98, 7, 0.92);
    border-color: rgba(250, 204, 21, 0.6);
    color: #fef08a;
}

.tile-res-badge.res-wood {
    background: rgba(22, 101, 52, 0.92);
    border-color: rgba(74, 222, 128, 0.6);
    color: #bbf7d0;
}

.tile-res-badge.res-stone {
    background: rgba(51, 65, 85, 0.92);
    border-color: rgba(203, 213, 225, 0.6);
    color: #f8fafc;
}

.galaxy-tile.oasis-tile {
    outline: 1.5px solid rgba(34, 197, 94, 0.5);
    outline-offset: -1.5px;
}

.galaxy-tile.oasis-tile.oasis-occupied {
    outline: 2px solid #16a34a;
    outline-offset: -2px;
}

.galaxy-tile.oasis-tile.oasis-wild {
    outline: 1.5px solid rgba(234, 179, 8, 0.45);
    outline-offset: -1.5px;
}

/* ==========================================================
   CARTES DE SOLDATS & TROUPES (CASERNE MILITAIRE)
   ========================================================== */
.unit-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    transition: transform 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
    box-shadow: 0 2px 8px rgba(60, 45, 30, 0.05);
}

.unit-card:hover {
    transform: translateY(-4px);
    border-color: #c2252b !important;
    box-shadow: 0 8px 24px rgba(60, 45, 30, 0.15), 0 0 15px rgba(194, 37, 43, 0.2) !important;
}

.unit-card:hover .unit-img {
    transform: scale(1.05);
}

.unit-locked {
    opacity: 0.65;
    filter: grayscale(0.4);
}

.unit-locked:hover {
    border-color: #c2252b !important;
    box-shadow: 0 0 12px rgba(194, 37, 43, 0.2) !important;
}

.unit-img-thumb {
    transition: transform 0.2s ease;
}

.unit-img-thumb:hover {
    transform: scale(1.2);
}

/* ==========================================================
   CENTRE DE COMMUNICATIONS (MESSAGERIE INTERNE)
   ========================================================== */
@keyframes msgPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.45); }
    50% { box-shadow: 0 0 0 6px rgba(239, 68, 68, 0); }
}

.hud-unread-count {
    position: absolute;
    top: -6px;
    right: -6px;
    background: #c2252b;
    color: #fff;
    font-size: 0.65rem;
    font-weight: 800;
    padding: 1px 5px;
    border-radius: 9999px;
    border: 1px solid #ffffff;
}

.nav-badge-unread, .badge-unread {
    background: #c2252b;
    color: #fff;
    font-size: 0.68rem;
    font-weight: 800;
    padding: 1px 6px;
    border-radius: 9999px;
    margin-left: 0.35rem;
}

.msg-table-container {
    overflow-x: auto;
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(60, 45, 30, 0.05);
}

.msg-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
}

.msg-table th {
    background: #f8fafc;
    padding: 0.85rem 1rem;
    text-align: left;
    color: inherit;
    font-weight: 700;
    border-bottom: 1px solid var(--border-color);
}

.msg-table td {
    padding: 0.85rem 1rem;
    border-bottom: 1px solid #f0e8db;
    color: #292524;
    transition: background 0.15s;
}

.msg-table tr:hover td {
    background: rgba(194, 37, 43, 0.05);
}

.msg-table tr.msg-unread td {
    background: rgba(194, 37, 43, 0.08);
    color: #1c1917;
}

.unread-dot {
    color: #c2252b;
    font-size: 1rem;
}

.msg-subject {
    color: #1c1917;
}

.msg-unread .msg-subject {
    font-weight: 700;
    color: #c2252b;
}

/* ==========================================================
   PAGE DÉDIÉE CHAMP DE RESSOURCES (STYLE TRAVIAN BUILD.PHP)
   ========================================================== */
.field-view-container {
    animation: fadeIn 0.3s ease-out;
}

.field-nav-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.field-back-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: #ffffff;
    border: 1px solid var(--border-color);
    padding: 0.6rem 1.25rem;
    border-radius: 8px;
    color: #1c1917;
    font-size: 0.9rem;
    font-weight: 700;
    text-decoration: none;
    transition: all 0.2s ease;
    box-shadow: 0 2px 5px rgba(60, 45, 30, 0.04);
}

.field-back-btn:hover {
    background: rgba(194, 37, 43, 0.08);
    border-color: #c2252b;
    color: #c2252b;
    transform: translateX(-3px);
}

.field-slot-switcher {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.3rem 0.5rem;
    box-shadow: 0 2px 5px rgba(60, 45, 30, 0.04);
}

.field-arrow-btn {
    padding: 0.4rem 0.8rem;
    border-radius: 6px;
    color: var(--text-muted);
    font-size: 0.85rem;
    text-decoration: none;
    transition: all 0.2s;
}

.field-arrow-btn:hover {
    background: rgba(194, 37, 43, 0.08);
    color: #c2252b;
}

.field-slot-badge {
    padding: 0.35rem 0.85rem;
    background: rgba(194, 37, 43, 0.1);
    border: 1px solid rgba(194, 37, 43, 0.3);
    border-radius: 6px;
    color: #c2252b;
    font-size: 0.85rem;
    font-weight: 800;
    letter-spacing: 0.5px;
}

/* CARTE DE HÉROS : FOND DE CARTE SCÉNIQUE & TILE */
.field-hero-card {
    position: relative;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    margin-bottom: 1.5rem;
    background: #ffffff;
}

/* NOUVELLE MISE EN PAGE : RECTANGLE D'INFORMATIONS AU-DESSUS & ESTAMPE SANS COUCHE ALPHA */
.field-info-card {
    position: relative;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    margin-bottom: 1.5rem;
    background: #ffffff;
    padding: 2rem 2.2rem;
    display: flex;
    align-items: center;
    gap: 2.5rem;
    flex-wrap: wrap;
}

.field-info-card .field-meta-pane {
    flex: 1;
    min-width: 300px;
    background: transparent;
    border: none;
    box-shadow: none;
    padding: 0;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
}

.field-artwork-card {
    position: relative;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid var(--border-color);
    box-shadow: 0 8px 30px rgba(60, 45, 30, 0.12);
    margin-bottom: 1.5rem;
    background: #0f172a;
    cursor: pointer;
    transition: box-shadow 0.3s ease, border-color 0.3s ease;
}

.field-artwork-card:hover {
    box-shadow: 0 12px 35px rgba(194, 37, 43, 0.2);
    border-color: rgba(194, 37, 43, 0.4);
}

.field-artwork-img {
    width: 100%;
    height: 380px;
    object-fit: cover;
    object-position: center 35%;
    display: block;
    filter: brightness(1) saturate(1.05);
    transition: transform 0.4s ease, filter 0.3s ease;
}

.field-artwork-card:hover .field-artwork-img {
    transform: scale(1.015);
    filter: brightness(1.03) saturate(1.08);
}

.field-artwork-badge {
    position: absolute;
    bottom: 14px;
    right: 16px;
    background: rgba(15, 23, 42, 0.82);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    color: #f8fafc;
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 8px;
    padding: 0.4rem 0.95rem;
    font-size: 0.82rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 0.55rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.4);
    pointer-events: none;
}

@media (max-width: 768px) {
    .field-info-card {
        padding: 1.25rem 1rem;
        gap: 1.5rem;
    }
    .field-artwork-img {
        height: 240px;
    }
}

.field-hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-size: cover;
    background-position: center 35%;
    filter: brightness(0.95) saturate(1.15);
    transform: scale(1.02);
}

.field-hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, rgba(253, 251, 247, 0.70) 0%, rgba(253, 251, 247, 0.35) 45%, rgba(253, 251, 247, 0.10) 100%);
    pointer-events: none;
}

.field-hero-content {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 2.5rem;
    padding: 2.5rem;
    flex-wrap: wrap;
}

.field-tile-stage {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.field-tile-container {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.field-tile-img {
    width: 260px;
    height: 260px;
    max-width: 100%;
    object-fit: contain;
    filter: none;
    user-select: none;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.field-tile-img:hover {
    transform: scale(1.05);
}

.field-level-emblem {
    position: absolute;
    bottom: -6px;
    background: linear-gradient(135deg, #c2252b, #991b1b);
    border: 2px solid #ffffff;
    border-radius: 20px;
    padding: 0.25rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.35rem;
    box-shadow: 0 4px 12px rgba(60, 45, 30, 0.25);
    z-index: 3;
}

.field-demolish-rect {
    margin-top: 1.25rem;
    width: 100%;
    max-width: 240px;
    background: rgba(239, 68, 68, 0.05);
    border: 1px dashed rgba(239, 68, 68, 0.35);
    border-radius: 8px;
    padding: 0.4rem;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.2s ease;
}

.field-demolish-rect:hover {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.6);
}

.field-demolish-btn {
    background: linear-gradient(135deg, #991b1b, #dc2626);
    border: 1px solid #f87171;
    color: #ffffff;
    font-weight: 800;
    font-size: 0.8rem;
    padding: 0.45rem 1rem;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.45rem;
    width: 100%;
    box-shadow: 0 3px 10px rgba(220, 38, 38, 0.25);
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.field-demolish-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 5px 14px rgba(220, 38, 38, 0.4);
}

.emblem-lvl-text {
    font-size: 0.65rem;
    letter-spacing: 1px;
    color: #fecaca;
    font-weight: 700;
}

.emblem-lvl-number {
    font-size: 1.1rem;
    font-weight: 900;
    color: #fff;
}

.field-meta-pane {
    flex: 1;
    min-width: 300px;
    background: rgba(253, 251, 247, 0.90);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    padding: 1.5rem 1.8rem;
    border-radius: 12px;
    border: 1px solid rgba(180, 83, 9, 0.22);
    box-shadow: 0 4px 20px rgba(60, 45, 30, 0.12);
}

.field-header-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 0.85rem;
    flex-wrap: wrap;
}

.field-type-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.2rem 0.65rem;
    border-radius: 4px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.4rem;
}

.field-type-pill.sec-wood { background: rgba(120, 53, 15, 0.1); color: #78350f; border: 1px solid rgba(120, 53, 15, 0.3); }
.field-type-pill.sec-stone { background: rgba(51, 65, 85, 0.1); color: #334155; border: 1px solid rgba(51, 65, 85, 0.3); }
.field-type-pill.sec-deut { background: rgba(180, 83, 9, 0.1); color: #b45309; border: 1px solid rgba(180, 83, 9, 0.3); }
.field-type-pill.sec-energy { background: rgba(194, 37, 43, 0.1); color: #c2252b; border: 1px solid rgba(194, 37, 43, 0.3); }
.field-type-pill.sec-hq { background: rgba(185, 28, 28, 0.1); color: #b91c1c; border: 1px solid rgba(185, 28, 28, 0.3); }
.field-type-pill.sec-military { background: rgba(220, 38, 38, 0.1); color: #c2252b; border: 1px solid rgba(220, 38, 38, 0.3); }
.field-type-pill.sec-science { background: rgba(30, 64, 175, 0.1); color: #1e40af; border: 1px solid rgba(30, 64, 175, 0.3); }
.field-type-pill.sec-logistics { background: rgba(180, 83, 9, 0.1); color: #b45309; border: 1px solid rgba(180, 83, 9, 0.3); }

.field-title {
    font-size: 2rem;
    font-weight: 800;
    color: #1c1917;
    margin: 0;
    letter-spacing: -0.5px;
    line-height: 1.2;
}

.field-subtitle {
    font-size: 0.85rem;
    color: var(--text-muted);
}

.field-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.85rem;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 700;
}

.field-status-badge.ready {
    background: rgba(34, 197, 94, 0.12);
    color: #15803d;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.field-status-badge.upgrading {
    background: rgba(180, 83, 9, 0.12);
    color: #b45309;
    border: 1px solid rgba(180, 83, 9, 0.3);
}

.pulse-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #b45309;
    animation: pulse 1.5s infinite;
}

.field-description {
    font-size: 0.95rem;
    line-height: 1.65;
    color: #292524;
    margin: 0.85rem 0 1.25rem 0;
    max-width: 850px;
}

.field-quick-stats {
    display: flex;
    gap: 1.25rem;
    flex-wrap: wrap;
}

.quick-stat-box {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 0.65rem 1rem;
    display: flex;
    flex-direction: column;
    box-shadow: 0 2px 6px rgba(60, 45, 30, 0.04);
}

.quick-stat-box.highlight {
    border-color: rgba(34, 197, 94, 0.4);
    background: rgba(34, 197, 94, 0.06);
}

.stat-label {
    font-size: 0.72rem;
    text-transform: uppercase;
    color: var(--text-muted);
    font-weight: 600;
}

.stat-value {
    font-size: 1.15rem;
    font-weight: 800;
    color: #1c1917;
}

.stat-value small {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-muted);
}

.stat-gain {
    font-size: 0.75rem;
    font-weight: 700;
    color: #15803d;
}

/* SECTION AMÉLIORATION & COÛTS */
.field-upgrade-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
    margin-bottom: 1.5rem;
}

@media (max-width: 900px) {
    .field-upgrade-grid {
        grid-template-columns: 1fr;
    }
}

.field-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 4px 16px rgba(60, 45, 30, 0.05);
}

.field-card-header {
    background: rgba(246, 242, 232, 0.7);
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.field-card-header h3 {
    margin: 0;
    font-size: 1.1rem;
    color: #1c1917;
    font-weight: 700;
}

.field-card-body {
    padding: 1.25rem;
    flex: 1;
}

.cost-grid {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 1.25rem;
}

.cost-item {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.65rem 0.85rem;
    border-radius: 6px;
    background: #fdfbf7;
    border: 1px solid var(--border-color);
}

.cost-item.cost-ok {
    border-left: 3px solid #16a34a;
}

.cost-item.cost-missing {
    border-left: 3px solid #dc2626;
    background: rgba(220, 38, 38, 0.04);
}

.cost-icon {
    font-size: 1.35rem;
    width: 32px;
    text-align: center;
}

.cost-details {
    flex: 1;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.cost-name {
    font-size: 0.85rem;
    font-weight: 600;
    color: #292524;
}

.cost-req {
    font-size: 1rem;
    font-weight: 800;
    color: #1c1917;
}

.cost-stock {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.cost-check {
    font-weight: 800;
    font-size: 1rem;
    width: 24px;
    text-align: center;
}

.cost-ok .cost-check { color: #16a34a; }
.cost-missing .cost-check { color: #dc2626; }

/* BANDEAU TEMPS DE CONSTRUCTION POUR LE NIVEAU SUIVANT */
.construction-time-banner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(135deg, rgba(194, 37, 43, 0.08), rgba(246, 242, 232, 0.9));
    border: 1px solid rgba(194, 37, 43, 0.3);
    border-radius: 8px;
    padding: 0.85rem 1.15rem;
    margin-top: 1rem;
}

.time-label-group {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.time-icon {
    font-size: 1.5rem;
}

.time-value-display {
    font-size: 1.4rem;
    font-weight: 900;
    color: #c2252b;
    letter-spacing: 1px;
    font-family: monospace;
}

/* BOÎTES D'ACTION */
.field-active-job-box, .field-blocked-box, .field-ready-box {
    text-align: center;
    padding: 1.5rem 1rem;
}

.job-status-title {
    font-size: 1.15rem;
    color: #b45309;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.job-timer-display {
    font-size: 1.8rem;
    font-weight: 900;
    font-family: monospace;
    color: #15803d;
    background: #ffffff;
    border: 1px solid rgba(34, 197, 94, 0.4);
    border-radius: 8px;
    padding: 0.6rem;
    display: inline-block;
    min-width: 180px;
    margin: 0.5rem 0;
    box-shadow: 0 2px 8px rgba(60, 45, 30, 0.05);
}

.field-btn-primary {
    background: linear-gradient(135deg, #c2252b, #991b1b);
    color: #fff;
    border: 1px solid #c2252b;
    padding: 0.85rem 1.75rem;
    font-size: 1rem;
    font-weight: 800;
    border-radius: 8px;
    cursor: pointer;
    box-shadow: 0 4px 14px rgba(194, 37, 43, 0.3);
    transition: all 0.2s ease;
    width: 100%;
    max-width: 360px;
}

.field-btn-primary:hover:not(:disabled) {
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(194, 37, 43, 0.45);
}

.field-btn-cancel {
    background: rgba(194, 37, 43, 0.08);
    color: #c2252b;
    border: 1px solid rgba(194, 37, 43, 0.3);
    padding: 0.65rem 1.25rem;
    font-size: 0.85rem;
    font-weight: 700;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.field-btn-cancel:hover {
    background: #c2252b;
    color: #fff;
}

.field-btn-secondary {
    background: #ffffff;
    color: #1c1917;
    border: 1px solid var(--border-color);
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.2s;
}

.field-btn-secondary:hover {
    background: #f8fafc;
    color: var(--tblr-primary, #206bc4);
    border-color: var(--tblr-primary, #206bc4);
}

.time-to-afford {
    margin-top: 0.75rem;
    font-size: 0.85rem;
    color: #b45309;
    background: rgba(180, 83, 9, 0.1);
    border: 1px solid rgba(180, 83, 9, 0.25);
    border-radius: 6px;
    padding: 0.4rem 0.75rem;
    display: inline-block;
}

/* BANDEAU DES 20 PARCELLES DU DOMAINE (STYLE TRAVIAN - PLEINE LARGEUR) */
.field-strip-card {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem 1.25rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    width: 100%;
    box-sizing: border-box;
    margin-top: 1.5rem;
}

.field-strip-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.85rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.field-strip-header h4 {
    margin: 0;
    font-size: 0.95rem;
    color: #1c1917;
    font-weight: 700;
}

.field-strip-grid {
    display: grid;
    grid-template-columns: repeat(20, 1fr);
    gap: 0.4rem;
    width: 100%;
}

@media (max-width: 1200px) {
    .field-strip-grid {
        grid-template-columns: repeat(10, 1fr);
    }
}

@media (max-width: 680px) {
    .field-strip-grid {
        grid-template-columns: repeat(5, 1fr);
    }
}

@media (max-width: 440px) {
    .field-strip-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.field-strip-item {
    background: #ffffff;
    border: 1px solid var(--border-color);
    border-radius: 6px;
    padding: 0.35rem 0.2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-decoration: none;
    transition: all 0.2s ease;
}

.field-strip-item:hover {
    background: rgba(194, 37, 43, 0.08);
    border-color: #c2252b;
    transform: translateY(-2px);
}

.field-strip-item.active {
    background: rgba(194, 37, 43, 0.12);
    border-color: #c2252b;
    box-shadow: 0 2px 8px rgba(194, 37, 43, 0.25);
}

.strip-item-img {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

.strip-item-num {
    font-size: 0.65rem;
    color: var(--text-muted);
    margin-top: 0.1rem;
}

.strip-item-lvl {
    font-size: 0.7rem;
    font-weight: 800;
    color: #c2252b;
}

/* ========================================================
   EFFET DE PARALLAXE PROFONDEUR 2.5D & RESPIRATION CINÉMATIQUE
   Sans assujettissement au scroll de page (Modales Féodales)
   ======================================================== */
.depth-parallax-scene {
    position: relative;
    overflow: hidden !important;
    perspective: 1200px;
    transform-style: preserve-3d;
}

.depth-parallax-img {
    width: 110% !important;
    height: 110% !important;
    max-width: 110% !important;
    margin-top: -5% !important;
    margin-left: -5% !important;
    object-fit: cover;
    pointer-events: none;
    will-change: transform;
    transform-origin: center center;
    transform: translate3d(0, 0, 0) scale(1.04);
    transition: transform 0.2s cubic-bezier(0.22, 1, 0.36, 1);
}

@keyframes cinematicBreathing {
    0% {
        transform: scale(1.04) translate3d(0, 0, 0);
    }
    33% {
        transform: scale(1.08) translate3d(-1%, -0.8%, 0);
    }
    66% {
        transform: scale(1.06) translate3d(1%, 0.9%, 0);
    }
    100% {
        transform: scale(1.04) translate3d(0, 0, 0);
    }
}

/* Respiration cinématique autonome et automatique */
.depth-parallax-scene:not(.is-interacting) .depth-parallax-img.has-cinematic-breathing,
.modal .depth-parallax-scene .depth-parallax-img.has-cinematic-breathing,
.modal .depth-parallax-scene .depth-parallax-img {
    animation: cinematicBreathing 18s ease-in-out infinite !important;
}

/* Dans les modales : suppression totale de l'effet au survol souris, maintien de l'animation autonome */
.modal .depth-parallax-scene.is-interacting .depth-parallax-img,
.modal .depth-parallax-scene:hover .depth-parallax-img {
    animation: cinematicBreathing 18s ease-in-out infinite !important;
}

.depth-parallax-scene:not(.in-modal).is-interacting .depth-parallax-img {
    animation: none !important;
}

.depth-parallax-foreground {
    will-change: transform;
    transform: translate3d(0, 0, 15px);
    transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1);
}

/* Dans les fenêtres modales : stabilité des textes et boutons au passage du curseur */
.modal .depth-parallax-foreground,
.modal .depth-parallax-scene:hover .depth-parallax-foreground {
    transform: none !important;
    transition: none !important;
}

.depth-parallax-overlay {
    pointer-events: none;
    z-index: 2;
}

@media (prefers-reduced-motion: reduce) {
    .depth-parallax-img {
        animation: none !important;
        transform: none !important;
        transition: none !important;
    }
    .depth-parallax-foreground {
        transform: none !important;
        transition: none !important;
    }
}

/* ==========================================================
   CHIPS DE COÛT & INDICATEURS DE MATÉRIAUX REQUIS (MODALES)
   ========================================================== */
.cost-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.3rem 0.65rem;
    border-radius: 6px;
    font-size: 0.82rem;
    font-weight: 600;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    transition: all 0.2s ease;
}

.cost-chip.affordable {
    color: #10b981 !important;
    border-color: rgba(16, 185, 129, 0.35) !important;
    background: rgba(16, 185, 129, 0.08) !important;
}

.cost-chip.affordable strong {
    color: #10b981 !important;
}

.cost-chip.missing {
    color: #ef4444 !important;
    border-color: rgba(239, 68, 68, 0.35) !important;
    background: rgba(239, 68, 68, 0.1) !important;
}

.cost-chip.missing i,
.cost-chip.missing strong {
    color: #ef4444 !important;
}

/* Suppression globale des badges et modale d'affichage des prompts IA */
.ai-prompt-badge,
.ai-prompt-badge-pill,
.ai-prompt-badge-sm,
#aiPromptModal,
.ai-modal-overlay {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
    pointer-events: none !important;
}

/* ==========================================================
   GAMESTUDIO - SENTINELLE CYBER-SÉCURITÉ & LOGS APACHE
   ========================================================== */
.log-row-threat {
    transition: background 0.15s ease-in-out;
}

.log-row-threat-crit {
    border-left: 4px solid #ef4444 !important;
    background-color: rgba(239, 68, 68, 0.08) !important;
}

.log-row-threat-crit:hover {
    background-color: rgba(239, 68, 68, 0.15) !important;
}

.log-row-threat-warn {
    border-left: 4px solid #f59e0b !important;
    background-color: rgba(245, 158, 11, 0.08) !important;
}

.log-row-threat-warn:hover {
    background-color: rgba(245, 158, 11, 0.14) !important;
}

.threat-mark {
    background: #fee2e2 !important;
    color: #b91c1c !important;
    font-weight: 700 !important;
    padding: 1px 4px !important;
    border-radius: 3px !important;
    border: 1px solid #fca5a5 !important;
    text-decoration: underline wavy #ef4444 !important;
}

.sentinel-card {
    background: linear-gradient(135deg, #ffffff 0%, #fff7f7 100%);
    border-left: 4px solid #dc2626 !important;
}

.btn-xs {
    padding: 0.1rem 0.35rem;
    font-size: 0.72rem;
    line-height: 1.2;
    border-radius: 0.2rem;
}

@keyframes threat-pulse {
    0%, 100% {
        opacity: 1;
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.5);
    }
    50% {
        opacity: 0.85;
        box-shadow: 0 0 0 8px rgba(239, 68, 68, 0);
    }
}

.animate-pulse {
    animation: threat-pulse 2s infinite cubic-bezier(0.4, 0, 0.6, 1);
}






