/* ========================================================
   HATOMS'S KINGDOM — DESIGN SYSTEM MÉDIÉVAL FÉODAL & GLASSMORPHISM
   ======================================================== */

:root {
    --bg-main: #0c0d12;
    --bg-surface: #141721;
    --bg-card: rgba(20, 23, 33, 0.88);
    --bg-card-hover: rgba(28, 32, 46, 0.96);
    --border-color: rgba(201, 168, 78, 0.22);
    --border-hover: rgba(232, 202, 116, 0.55);
    
    --gold-primary: #c9a84e;
    --gold-bright: #e8ca74;
    --gold-dark: #8c6f24;
    --gold-gradient: linear-gradient(135deg, #e8ca74 0%, #c9a84e 50%, #8c6f24 100%);
    
    --crimson: #8b1523;
    --crimson-dark: #560a12;
    --blurple: #5865f2;
    --green-emerald: #2ec4b6;
    --green-light: #57cc99;
    --purple-arcane: #7b2cbf;

    --text-primary: #f4ecd8;
    --text-secondary: #beb399;
    --text-muted: #827966;

    --font-heading: 'Cinzel', serif;
    --font-medieval: 'MedievalSharp', cursive;
    --font-body: 'Crimson Text', 'Inter', serif;
    --font-mono: 'JetBrains Mono', monospace;

    --shadow-soft: 0 8px 32px 0 rgba(0, 0, 0, 0.6);
    --shadow-gold: 0 0 24px rgba(201, 168, 78, 0.25);
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    background-color: var(--bg-main);
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    line-height: 1.5;
}

/* Background Atmosphere */
.app-background {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(circle at 15% 20%, rgba(131, 56, 236, 0.12) 0%, transparent 40%),
        radial-gradient(circle at 85% 15%, rgba(212, 175, 55, 0.10) 0%, transparent 45%),
        radial-gradient(circle at 50% 80%, rgba(230, 57, 70, 0.08) 0%, transparent 50%),
        #0a0b10;
    pointer-events: none;
    z-index: -1;
}

/* ==================== HEADER ==================== */
.royal-header {
    background: rgba(14, 16, 24, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 100;
}

.header-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 18px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand-wrapper {
    display: flex;
    align-items: center;
    gap: 16px;
}

.royal-crest {
    font-size: 2.4rem;
    width: 58px;
    height: 58px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(212, 175, 55, 0.1);
    border: 1px solid var(--border-hover);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-gold);
    animation: crestGlow 4s ease-in-out infinite alternate;
}

@keyframes crestGlow {
    0% { box-shadow: 0 0 12px rgba(212, 175, 55, 0.15); }
    100% { box-shadow: 0 0 28px rgba(246, 226, 122, 0.35); }
}

.main-title {
    font-family: var(--font-heading);
    font-size: 1.55rem;
    font-weight: 900;
    letter-spacing: 1.5px;
    background: var(--gold-gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 2px 10px rgba(212, 175, 55, 0.2);
}

.sub-title {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 400;
}

.header-right-side {
    display: flex;
    align-items: center;
    gap: 14px;
}

.btn-discord-login {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: #5865F2;
    color: #ffffff !important;
    font-weight: 700;
    font-size: 0.82rem;
    padding: 7px 14px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 12px rgba(88, 101, 242, 0.35);
    white-space: nowrap;
}

.btn-discord-login:hover {
    background: #4752c4;
    box-shadow: 0 4px 18px rgba(88, 101, 242, 0.6);
    transform: translateY(-1px);
}

.user-auth-pill {
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    padding: 6px 14px;
    border-radius: 24px;
    transition: all 0.2s ease;
}

.user-auth-pill:hover {
    border-color: var(--border-hover);
    background: rgba(255, 255, 255, 0.07);
}

.user-avatar-wrap {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(212, 175, 55, 0.15);
    border: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    flex-shrink: 0;
}

.user-avatar-placeholder {
    font-size: 1.1rem;
}

.user-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.user-details {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.user-name {
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--text-primary);
    max-width: 130px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.user-role-badge {
    font-size: 0.72rem;
    color: var(--text-muted);
}

.user-role-badge.admin {
    color: var(--gold-bright);
    font-weight: 600;
}

.user-role-badge.mod {
    color: var(--blue-light);
    font-weight: 600;
}

.user-role-badge.guest {
    color: var(--text-secondary);
}

.user-header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: 6px;
}

.btn-auth-toggle {
    background: rgba(212, 175, 55, 0.12);
    border: 1px solid rgba(212, 175, 55, 0.35);
    color: var(--gold-bright);
    font-family: var(--font-heading);
    font-size: 0.78rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 6px;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.btn-auth-toggle:hover {
    background: rgba(212, 175, 55, 0.25);
    border-color: var(--gold-bright);
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(212, 175, 55, 0.25);
}

.btn-logout-header {
    background: rgba(220, 20, 60, 0.12);
    border: 1px solid rgba(220, 20, 60, 0.35);
    color: #ff708d;
    font-family: var(--font-heading);
    font-size: 0.78rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: 6px;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.btn-logout-header:hover {
    background: rgba(220, 20, 60, 0.25);
    border-color: #ff5577;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(220, 20, 60, 0.25);
}

.header-status {
    display: flex;
    align-items: center;
    gap: 14px;
}

.status-pill {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.82rem;
    font-weight: 600;
    border: 1px solid rgba(46, 196, 182, 0.3);
    background: rgba(46, 196, 182, 0.1);
    color: var(--green-light);
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--green-light);
    box-shadow: 0 0 8px var(--green-light);
    animation: pulse 2s infinite;
}

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

.latency-badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 0.82rem;
    font-family: var(--font-mono);
    color: var(--gold-bright);
    background: rgba(212, 175, 55, 0.12);
    border: 1px solid var(--border-color);
}

/* ==================== NAVIGATION ROYALE : 4 GRANDS HUBS ==================== */
.royal-hubs-nav {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.realm-tabs-bar {
    display: flex;
    gap: 8px;
    background: rgba(14, 16, 23, 0.92);
    padding: 6px;
    border-radius: 12px;
    border: 1px solid rgba(212, 175, 55, 0.25);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
    overflow-x: auto;
}

.realm-tab {
    flex: 1;
    min-width: 140px;
    padding: 10px 18px;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 8px;
    color: var(--text-secondary);
    font-family: var(--font-heading);
    font-size: 0.92rem;
    font-weight: 700;
    cursor: pointer;
    text-align: center;
    transition: all 0.25s ease;
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 0.6px;
}

.realm-tab:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.04);
    border-color: rgba(212, 175, 55, 0.25);
}

.realm-tab.active {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.25) 0%, rgba(184, 134, 11, 0.1) 100%);
    color: var(--gold-bright);
    border-color: rgba(212, 175, 55, 0.55);
    box-shadow: 0 2px 12px rgba(212, 175, 55, 0.2);
}

.sub-tabs-container {
    position: relative;
    width: 100%;
}

.sub-tabs-realm {
    display: none;
    gap: 8px;
    overflow-x: auto;
    padding: 2px 4px 6px;
    scrollbar-width: thin;
    animation: fadeInRealm 0.25s ease forwards;
}

.sub-tabs-realm.active {
    display: flex;
}

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

.sub-tabs-realm .nav-tab {
    background: rgba(18, 22, 32, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 9px 18px;
    font-size: 0.9rem;
    color: var(--text-secondary);
    transition: all 0.2s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.3);
}

.sub-tabs-realm .nav-tab:hover {
    background: rgba(28, 34, 50, 0.95);
    color: var(--text-primary);
    border-color: rgba(212, 175, 55, 0.35);
}

.sub-tabs-realm .nav-tab.active {
    background: rgba(212, 175, 55, 0.18);
    color: var(--gold-bright);
    border-color: var(--gold-primary);
    box-shadow: 0 0 12px rgba(212, 175, 55, 0.25);
}

/* ==================== TABS ==================== */
.nav-tabs-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 16px;
    position: relative;
}

.nav-tabs-wrapper {
    display: flex;
    align-items: center;
    position: relative;
    gap: 8px;
}

.nav-scroll-btn {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: rgba(18, 21, 30, 0.95);
    border: 1px solid var(--border-color);
    color: var(--gold-bright);
    font-size: 1.3rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
    z-index: 5;
    user-select: none;
}

.nav-scroll-btn:hover:not(:disabled) {
    background: var(--gold-primary);
    color: #111;
    border-color: var(--gold-bright);
    box-shadow: 0 0 12px rgba(212, 175, 55, 0.4);
    transform: scale(1.08);
}

.nav-scroll-btn:disabled {
    opacity: 0.2;
    cursor: not-allowed;
}

.nav-tabs {
    display: flex;
    gap: 8px;
    overflow-x: auto;
    scroll-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color: rgba(212, 175, 55, 0.4) rgba(0, 0, 0, 0.25);
    padding: 4px 0 8px;
    width: 100%;
    -webkit-overflow-scrolling: touch;
}

.nav-tabs::-webkit-scrollbar {
    height: 4px;
}

.nav-tabs::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.25);
    border-radius: 4px;
}

.nav-tabs::-webkit-scrollbar-thumb {
    background: linear-gradient(90deg, #d4af37, #f6e27a);
    border-radius: 4px;
}

.nav-tab {
    background: transparent;
    border: none;
    outline: none;
    color: var(--text-secondary);
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 600;
    padding: 12px 20px;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.25s ease;
    white-space: nowrap;
}

.nav-tab:hover {
    color: var(--text-primary);
    border-bottom-color: rgba(218, 165, 32, 0.4);
}

.nav-tab.active {
    color: var(--gold-bright);
    border-bottom-color: var(--gold-primary);
    background: linear-gradient(180deg, transparent 0%, rgba(212, 175, 55, 0.08) 100%);
}

.badge {
    padding: 2px 7px;
    border-radius: 12px;
    font-size: 0.72rem;
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-secondary);
}

.nav-tab.active .badge {
    background: var(--gold-primary);
    color: #111;
    font-weight: 700;
}

.new-badge {
    background: var(--crimson) !important;
    color: #fff !important;
    font-weight: 700;
}

/* ==================== GUEST BANNER & ACTIONS ==================== */
.guest-banner {
    max-width: 1400px;
    margin: 16px auto 0;
    padding: 12px 20px;
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.12) 0%, rgba(18, 21, 30, 0.95) 100%);
    border: 1px solid rgba(212, 175, 55, 0.35);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.35);
}

.guest-banner .banner-icon {
    font-size: 1.6rem;
    flex-shrink: 0;
}

.guest-banner .banner-content {
    flex: 1;
    font-size: 0.92rem;
    color: var(--text-primary);
    line-height: 1.4;
}

.guest-banner .banner-content code {
    background: rgba(0, 0, 0, 0.4);
    color: var(--gold-bright);
    padding: 2px 7px;
    border-radius: 4px;
    font-weight: bold;
    border: 1px solid rgba(212, 175, 55, 0.3);
}

.guest-banner .banner-actions {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-shrink: 0;
}

/* ==================== DISCORD BUTTONS & AUTH MODAL ==================== */
.btn-discord {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: #5865F2;
    color: #ffffff !important;
    font-weight: 600;
    font-size: 0.88rem;
    padding: 8px 16px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 10px rgba(88, 101, 242, 0.3);
    white-space: nowrap;
}

.btn-discord:hover {
    background: #4752c4;
    box-shadow: 0 4px 18px rgba(88, 101, 242, 0.55);
    transform: translateY(-1px);
}

.btn-discord.btn-lg {
    padding: 12px 20px;
    font-size: 1rem;
    border-radius: 10px;
}

.modal-oauth-action {
    margin: 16px 0;
}

.auth-modal-divider {
    display: flex;
    align-items: center;
    margin: 18px 0;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.72rem;
    letter-spacing: 1px;
}

.auth-modal-divider::before,
.auth-modal-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.auth-modal-divider span {
    padding: 0 10px;
}

.auth-royal-modal {
    max-width: 520px;
}

/* ==================== MAIN LAYOUT ==================== */
.main-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 28px 24px 60px;
    flex: 1;
    width: 100%;
}

.tab-content {
    display: none;
    animation: fadeIn 0.35s ease;
}

.tab-content.active {
    display: block;
}

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

/* ==================== TAB 1 : GRIMOIRE ==================== */
.grimoire-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.search-box-wrapper {
    position: relative;
    flex: 1;
    min-width: 320px;
}

.search-icon {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.1rem;
    opacity: 0.6;
}

.search-input {
    width: 100%;
    padding: 14px 44px 14px 48px;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-size: 0.95rem;
    outline: none;
    transition: all 0.25s ease;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
}

.search-input:focus {
    border-color: var(--gold-primary);
    box-shadow: 0 0 16px rgba(212, 175, 55, 0.25);
    background: rgba(25, 28, 42, 0.95);
}

.clear-search-btn {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 1.1rem;
    cursor: pointer;
    display: none;
}

.clear-search-btn:hover {
    color: var(--text-primary);
}

.stats-summary {
    font-size: 0.88rem;
    color: var(--text-secondary);
}

.stats-summary span {
    color: var(--gold-bright);
    font-weight: 700;
}

/* Category Filters Container */
.category-filters-container {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 24px;
    position: relative;
}

.chip-scroll-btn {
    flex-shrink: 0;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(18, 21, 30, 0.95);
    border: 1px solid var(--border-color);
    color: var(--gold-bright);
    font-size: 1.2rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    z-index: 4;
    user-select: none;
}

.chip-scroll-btn:hover:not(:disabled) {
    background: var(--gold-primary);
    color: #111;
    border-color: var(--gold-bright);
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.35);
    transform: scale(1.08);
}

.chip-scroll-btn:disabled {
    opacity: 0.2;
    cursor: not-allowed;
}

.category-filters-scroll {
    overflow-x: auto;
    padding-bottom: 6px;
    scroll-behavior: smooth;
    scrollbar-width: thin;
    scrollbar-color: rgba(212, 175, 55, 0.4) rgba(0, 0, 0, 0.25);
    width: 100%;
    -webkit-overflow-scrolling: touch;
}

.category-filters-scroll::-webkit-scrollbar {
    height: 4px;
}

.category-filters-scroll::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.25);
    border-radius: 4px;
}

.category-filters-scroll::-webkit-scrollbar-thumb {
    background: linear-gradient(90deg, #d4af37, #f6e27a);
    border-radius: 4px;
}

.category-filters {
    display: flex;
    gap: 10px;
    white-space: nowrap;
}

.filter-chip {
    padding: 9px 16px;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-chip:hover {
    border-color: var(--border-hover);
    color: var(--text-primary);
}

.filter-chip.active {
    background: rgba(212, 175, 55, 0.15);
    border-color: var(--gold-primary);
    color: var(--gold-bright);
    font-weight: 700;
    box-shadow: 0 0 12px rgba(212, 175, 55, 0.2);
}

/* Commands Grid */
.commands-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
    gap: 20px;
}

.command-card {
    background: var(--bg-card);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all 0.25s cubic-bezier(0.2, 0.8, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.command-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--gold-primary);
    opacity: 0.3;
    transition: opacity 0.25s ease;
}

.command-card:hover {
    transform: translateY(-4px);
    border-color: var(--border-hover);
    box-shadow: 0 12px 30px rgba(0, 0, 0, 0.5), var(--shadow-gold);
}

.command-card:hover::before {
    opacity: 1;
}

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

.command-name {
    font-family: var(--font-mono);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--gold-bright);
}

.perm-badge {
    padding: 3px 8px;
    border-radius: 6px;
    font-size: 0.72rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.perm-admin {
    background: rgba(230, 57, 70, 0.2);
    border: 1px solid rgba(230, 57, 70, 0.4);
    color: #ff6b6b;
}

.perm-mod {
    background: rgba(88, 101, 242, 0.2);
    border: 1px solid rgba(88, 101, 242, 0.4);
    color: #8da2fb;
}

.perm-user {
    background: rgba(46, 196, 182, 0.15);
    border: 1px solid rgba(46, 196, 182, 0.3);
    color: var(--green-light);
}

.command-desc {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 16px;
    line-height: 1.5;
}

.command-options {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-bottom: 16px;
}

.option-pill {
    padding: 3px 8px;
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 4px;
    font-family: var(--font-mono);
    font-size: 0.78rem;
    color: #cad5e2;
}

.card-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 14px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.category-tag {
    font-size: 0.78rem;
    color: var(--text-muted);
}

.copy-btn {
    background: rgba(212, 175, 55, 0.1);
    border: 1px solid var(--border-color);
    color: var(--gold-bright);
    padding: 6px 12px;
    border-radius: var(--radius-sm);
    font-size: 0.78rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.copy-btn:hover {
    background: var(--gold-primary);
    color: #111;
    border-color: var(--gold-primary);
}

/* ==================== TAB 2 : AUTOMOD GRANULAIRE ==================== */
.admin-auth-bar {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 14px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    margin-bottom: 24px;
    flex-wrap: wrap;
}

.auth-info {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.88rem;
    color: var(--text-secondary);
}

.auth-actions {
    display: flex;
    gap: 10px;
}

.admin-key-input {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    padding: 8px 14px;
    color: var(--text-primary);
    font-size: 0.88rem;
    width: 220px;
}

.automod-header-banner {
    background: linear-gradient(135deg, rgba(22, 25, 37, 0.9) 0%, rgba(35, 25, 60, 0.7) 100%);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px 28px;
    margin-bottom: 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
}

.banner-text h2 {
    font-family: var(--font-heading);
    color: var(--gold-bright);
    font-size: 1.35rem;
    margin-bottom: 6px;
}

.banner-text p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    max-width: 800px;
}

.hierarchy-legend {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.82rem;
    color: var(--text-secondary);
}

.badge-source {
    padding: 2px 7px;
    border-radius: 4px;
    font-size: 0.72rem;
    font-weight: 700;
}

.badge-source.server { background: rgba(88, 101, 242, 0.25); color: #8da2fb; }
.badge-source.category { background: rgba(131, 56, 236, 0.25); color: #d0a4ff; }
.badge-source.channel { background: rgba(212, 175, 55, 0.25); color: var(--gold-bright); }

/* Guild Tree Component */
.automod-guild-tree {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.category-block {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
}

.category-header {
    background: rgba(18, 20, 30, 0.9);
    padding: 16px 20px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    flex-wrap: wrap;
    gap: 12px;
}

.category-title-wrap {
    display: flex;
    align-items: center;
    gap: 10px;
}

.category-name {
    font-family: var(--font-heading);
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-primary);
}

.feature-toggles-row {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
}

.toggle-label-wrap {
    display: flex;
    align-items: center;
    gap: 8px;
    background: rgba(0, 0, 0, 0.3);
    padding: 5px 10px;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.toggle-name {
    font-size: 0.78rem;
    color: var(--text-secondary);
}

/* Switch styling */
.switch {
    position: relative;
    display: inline-block;
    width: 38px;
    height: 20px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: #33394a;
    transition: .3s cubic-bezier(0.2, 0.8, 0.2, 1);
    border-radius: 20px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 14px;
    width: 14px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .3s cubic-bezier(0.2, 0.8, 0.2, 1);
    border-radius: 50%;
}

input:checked + .slider {
    background-color: var(--green-light);
}

input:checked + .slider:before {
    transform: translateX(18px);
}

.channels-sublist {
    padding: 8px 16px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.channel-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: rgba(14, 16, 25, 0.4);
    border-radius: var(--radius-sm);
    border: 1px solid rgba(255, 255, 255, 0.03);
    transition: background 0.2s ease;
    flex-wrap: wrap;
    gap: 10px;
}

.channel-row:hover {
    background: rgba(22, 25, 38, 0.7);
}

.channel-tag {
    display: flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-mono);
    font-size: 0.88rem;
    color: var(--gold-bright);
}

/* ==================== TAB 3 : BROADCAST ==================== */
.broadcast-container {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 28px;
}

.broadcast-form-card, .broadcast-preview-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 28px;
}

.card-header h2 {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    color: var(--gold-bright);
    margin-bottom: 6px;
}

.card-header p {
    font-size: 0.88rem;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 6px;
    color: var(--text-secondary);
}

.form-input, .form-textarea, .form-select {
    width: 100%;
    padding: 12px 14px;
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-sm);
    color: var(--text-primary);
    font-family: var(--font-body);
    font-size: 0.9rem;
    outline: none;
    transition: all 0.25s ease;
}

.form-input:focus, .form-textarea:focus, .form-select:focus {
    border-color: var(--gold-primary);
    box-shadow: 0 0 12px rgba(212, 175, 55, 0.2);
}

.form-row {
    display: flex;
    gap: 16px;
}

.form-group.half {
    flex: 1;
}

/* Discord Preview */
.discord-embed-preview {
    background: #2b2d31;
    border-radius: 8px;
    display: flex;
    overflow: hidden;
    margin-top: 18px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
}

.embed-border {
    width: 4px;
    background: var(--gold-primary);
}

.embed-border.gold { background: #d4af37; }
.embed-border.crimson { background: #e63946; }
.embed-border.blue { background: #5865f2; }
.embed-border.purple { background: #8338ec; }
.embed-border.green { background: #2ec4b6; }

.embed-content {
    padding: 16px 20px;
    flex: 1;
}

.embed-author {
    font-size: 0.8rem;
    color: #dbdee1;
    font-weight: 600;
}

.embed-title {
    font-size: 1rem;
    font-weight: 700;
    color: #fff;
    margin: 6px 0 8px;
}

.embed-description {
    font-size: 0.88rem;
    color: #dbdee1;
    line-height: 1.45;
    margin-bottom: 12px;
    white-space: pre-wrap;
}

.embed-footer {
    font-size: 0.72rem;
    color: #949ba4;
    display: flex;
    gap: 6px;
}

/* ==================== TAB 4 : TELEMETRY ==================== */
.telemetry-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
    margin-bottom: 28px;
}

.telemetry-card.metric {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 22px;
    display: flex;
    align-items: center;
    gap: 18px;
}

.metric-icon {
    font-size: 2.2rem;
    width: 58px;
    height: 58px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.04);
    border-radius: var(--radius-md);
}

.metric-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.metric-value {
    font-family: var(--font-heading);
    font-size: 1.45rem;
    color: var(--gold-bright);
    margin: 4px 0;
}

.metric-sub {
    font-size: 0.78rem;
    color: var(--green-light);
}

.telemetry-actions-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 28px;
}

.telemetry-actions-card h2 {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    color: var(--gold-bright);
    margin-bottom: 6px;
}

.telemetry-actions-card p {
    font-size: 0.88rem;
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.actions-buttons-row {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.action-feedback {
    margin-top: 16px;
    font-size: 0.9rem;
    font-weight: 600;
}

/* ==================== BUTTONS ==================== */
.btn {
    padding: 10px 20px;
    border-radius: var(--radius-sm);
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.25s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.btn-gold {
    background: var(--gold-gradient);
    color: #111;
    box-shadow: 0 4px 14px rgba(212, 175, 55, 0.3);
}

.btn-gold:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(246, 226, 122, 0.45);
}

.btn-outline {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid var(--border-color);
    color: var(--text-primary);
}

.btn-outline:hover {
    background: rgba(212, 175, 55, 0.12);
    border-color: var(--gold-primary);
    color: var(--gold-bright);
    transform: translateY(-2px);
}

.btn-block {
    width: 100%;
}

/* ==================== FOOTER ==================== */
.royal-footer {
    border-top: 1px solid var(--border-color);
    background: rgba(10, 11, 16, 0.9);
    padding: 24px 20px;
    text-align: center;
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-top: auto;
}

.royal-footer .copyright {
    font-size: 0.78rem;
    color: var(--text-muted);
    margin-top: 6px;
}

/* ==================== TOASTS ==================== */
.toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 1000;
}

.toast {
    padding: 12px 20px;
    border-radius: var(--radius-sm);
    background: var(--bg-surface);
    color: var(--text-primary);
    border: 1px solid var(--border-hover);
    box-shadow: var(--shadow-soft);
    font-size: 0.88rem;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: toastSlideIn 0.3s ease;
}

@keyframes toastSlideIn {
    from { transform: translateX(100%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

/* Loading Spinner */
.loading-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
}

.spinner {
    width: 44px;
    height: 44px;
    border: 3px solid rgba(212, 175, 55, 0.2);
    border-top-color: var(--gold-primary);
    border-radius: 50%;
    margin: 0 auto 16px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Responsive */
@media (max-width: 900px) {
    .broadcast-container {
        grid-template-columns: 1fr;
    }
    .commands-grid {
        grid-template-columns: 1fr;
    }
    .header-container {
        flex-direction: column;
        align-items: flex-start;
        gap: 14px;
    }
}

/* ==================== AUTH & USER PROFILE ==================== */
.header-right-side {
    display: flex;
    align-items: center;
    gap: 18px;
    flex-wrap: wrap;
}

.user-auth-pill {
    display: flex;
    align-items: center;
    gap: 12px;
    background: rgba(22, 25, 37, 0.85);
    border: 1px solid var(--border-color);
    padding: 6px 14px;
    border-radius: var(--radius-pill);
    transition: var(--transition-fast);
}

.user-auth-pill:hover {
    border-color: var(--gold-primary);
    box-shadow: 0 0 12px rgba(212, 175, 55, 0.2);
}

.user-avatar-wrap {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    overflow: hidden;
    background: rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(212, 175, 55, 0.4);
}

.user-avatar-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.user-details {
    display: flex;
    flex-direction: column;
}

.user-name {
    font-size: 0.84rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.1;
}

.user-role-badge {
    font-size: 0.68rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-top: 2px;
}

.user-role-badge.guest { color: var(--text-muted); }
.user-role-badge.mod { color: #57f287; font-weight: 700; }
.user-role-badge.admin { color: var(--gold-bright); font-weight: 800; }

.nav-tab .badge.locked-badge {
    background: rgba(235, 69, 158, 0.2);
    color: #ff708d;
    border: 1px solid rgba(235, 69, 158, 0.3);
}

.nav-tab .badge.upcoming-badge {
    background: rgba(88, 101, 242, 0.2);
    color: #8da2fb;
    border: 1px solid rgba(88, 101, 242, 0.3);
}

/* ==================== TAVERNE & MINI-JEUX ==================== */
.tavern-container {
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.tavern-header-card {
    background: linear-gradient(135deg, rgba(30, 20, 10, 0.85) 0%, rgba(50, 30, 15, 0.7) 100%);
    border: 1px solid rgba(212, 175, 55, 0.4);
    border-radius: var(--radius-lg);
    padding: 32px;
    text-align: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.tavern-crest {
    font-size: 2.8rem;
    display: inline-block;
    margin-bottom: 8px;
}

.tavern-header-card h2 {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    color: var(--gold-bright);
    margin-bottom: 8px;
}

.tavern-subtitle {
    color: var(--text-secondary);
    font-size: 0.95rem;
    max-width: 680px;
    margin: 0 auto;
}

.tavern-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.tavern-game-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 24px;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    transition: var(--transition-medium);
}

.tavern-game-card:hover {
    transform: translateY(-4px);
    border-color: var(--gold-primary);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.4);
}

.tavern-game-card .game-icon {
    font-size: 2.4rem;
    margin-bottom: 12px;
}

.tavern-game-card h3 {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    color: var(--gold-bright);
    margin-bottom: 8px;
}

.tavern-game-card p {
    color: var(--text-secondary);
    font-size: 0.88rem;
    line-height: 1.45;
    flex-grow: 1;
    margin-bottom: 16px;
}

.tavern-game-card .game-tag {
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--gold-primary);
    background: rgba(212, 175, 55, 0.12);
    border: 1px solid rgba(212, 175, 55, 0.25);
    padding: 4px 10px;
    border-radius: var(--radius-pill);
}

/* ==================== MODAL AUTHENTIFICATION ==================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.75);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2000;
    padding: 20px;
    animation: fadeIn 0.2s ease;
}

.modal-card {
    background: var(--bg-surface);
    border: 1px solid var(--gold-primary);
    border-radius: var(--radius-lg);
    width: 100%;
    max-width: 520px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.8);
    overflow: hidden;
}

.modal-header {
    padding: 18px 24px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(0, 0, 0, 0.3);
}

.modal-header h3 {
    font-family: var(--font-heading);
    color: var(--gold-bright);
    font-size: 1.1rem;
}

.btn-close-modal {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.2rem;
    cursor: pointer;
    padding: 4px 8px;
    transition: var(--transition-fast);
}

.btn-close-modal:hover {
    color: #ff5555;
}

.modal-body {
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.modal-intro {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.modal-method-card {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 18px;
    position: relative;
}

.modal-method-card .method-badge {
    position: absolute;
    top: -10px;
    right: 14px;
    background: var(--gold-primary);
    color: #0b0d14;
    font-size: 0.65rem;
    font-weight: 800;
    padding: 2px 8px;
    border-radius: var(--radius-pill);
    text-transform: uppercase;
}

.modal-method-card h4 {
    font-size: 0.95rem;
    color: var(--text-primary);
    margin-bottom: 6px;
}

.modal-method-card p {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

.modal-method-card code {
    background: rgba(212, 175, 55, 0.15);
    color: var(--gold-bright);
    padding: 2px 6px;
    border-radius: 4px;
    font-weight: 700;
}

.modal-key-row {
    display: flex;
    gap: 10px;
    margin-top: 12px;
}

.modal-key-row .form-input {
    flex-grow: 1;
}

.hidden {
    display: none !important;
}

/* ========================================================
   SECTION 2 : ESPACE CITOYEN / PROFIL & DECK BUILDER
   ======================================================== */

.profile-layout {
    display: grid;
    grid-template-columns: 340px 1fr;
    gap: 28px;
    align-items: start;
}

@media (max-width: 980px) {
    .profile-layout {
        grid-template-columns: 1fr;
    }
}

/* Carte d'Identité Féodale */
.noble-id-card {
    background: var(--bg-card);
    backdrop-filter: blur(14px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    box-shadow: var(--shadow-soft);
    position: relative;
    overflow: hidden;
}

.noble-id-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--gold-gradient);
}

.noble-crest-wrapper {
    position: relative;
    width: 100px;
    height: 100px;
    margin-bottom: 14px;
}

.noble-avatar {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    object-fit: cover;
    border: 3px solid var(--gold-primary);
    box-shadow: 0 0 20px rgba(229, 184, 66, 0.35);
    background: #141724;
}

.faction-emblem-badge {
    position: absolute;
    bottom: -4px;
    right: -4px;
    width: 32px;
    height: 32px;
    background: #0e1018;
    border: 2px solid var(--gold-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}

.noble-name {
    font-family: var(--font-heading);
    font-size: 1.35rem;
    color: var(--text-primary);
    margin-bottom: 4px;
    letter-spacing: 0.5px;
}

.noble-rank {
    font-size: 0.85rem;
    color: var(--gold-bright);
    font-weight: 600;
    margin-bottom: 2px;
}

.noble-faction {
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.profile-faction-box {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    width: 100%;
    padding: 6px 12px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(229, 184, 66, 0.25);
    border-radius: var(--radius-sm);
    margin: 8px 0 16px 0;
    box-sizing: border-box;
}

.profile-faction-box .noble-faction {
    margin: 0;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.profile-faction-box #btnOpenFactionModal {
    padding: 4px 10px;
    font-size: 0.72rem;
    white-space: nowrap;
    flex-shrink: 0;
    margin: 0;
    line-height: 1.2;
}

/* Bourse & Banque */
.profile-wealth-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    width: 100%;
    margin-bottom: 18px;
}

.wealth-item {
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(229, 184, 66, 0.2);
    border-radius: var(--radius-sm);
    padding: 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    text-align: left;
}

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

.wealth-body {
    display: flex;
    flex-direction: column;
}

.wealth-label {
    font-size: 0.7rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.wealth-val {
    font-size: 0.95rem;
    color: var(--gold-bright);
    font-family: var(--font-mono);
}

/* XP Bar */
.profile-xp-card {
    width: 100%;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-sm);
    padding: 12px;
    margin-bottom: 18px;
}

.xp-header {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    margin-bottom: 6px;
    font-weight: 600;
}

.xp-lvl {
    color: var(--gold-primary);
}

.xp-pct {
    color: var(--text-secondary);
    font-family: var(--font-mono);
}

.xp-bar-track {
    width: 100%;
    height: 8px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 6px;
}

.xp-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #d4af37, #f6e27a);
    box-shadow: 0 0 10px rgba(246, 226, 122, 0.5);
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.xp-sub {
    font-size: 0.72rem;
    color: var(--text-muted);
    display: block;
}

/* Quêtes Fiche */
.profile-quests-box {
    width: 100%;
    text-align: left;
}

.profile-quests-box h3 {
    font-family: var(--font-heading);
    font-size: 0.95rem;
    color: var(--gold-primary);
    margin-bottom: 10px;
    display: flex;
    align-items: center;
    gap: 6px;
}

.quests-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.quest-item {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: var(--radius-sm);
    padding: 8px 10px;
    font-size: 0.8rem;
}

.quest-item.completed {
    border-color: rgba(46, 196, 182, 0.4);
    background: rgba(46, 196, 182, 0.08);
}

.quest-title-row {
    display: flex;
    justify-content: space-between;
    font-weight: 600;
    margin-bottom: 4px;
}

.quest-reward-tag {
    color: var(--gold-bright);
    font-size: 0.75rem;
    font-family: var(--font-mono);
}

.quest-desc {
    color: var(--text-secondary);
    font-size: 0.75rem;
    margin-bottom: 6px;
}

.quest-progress-track {
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    overflow: hidden;
}

.quest-progress-fill {
    height: 100%;
    background: var(--gold-primary);
}

/* Deck Builder */
.deck-builder-card {
    background: var(--bg-card);
    backdrop-filter: blur(14px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: var(--shadow-soft);
}

.deck-builder-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 18px;
    flex-wrap: wrap;
    gap: 12px;
}

.deck-builder-header h2 {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    color: var(--gold-bright);
}

.deck-builder-header p {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.deck-slots-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

@media (max-width: 768px) {
    .deck-slots-grid {
        grid-template-columns: 1fr;
    }
}

.deck-slot-card {
    background: rgba(14, 16, 26, 0.75);
    border: 2px dashed rgba(229, 184, 66, 0.3);
    border-radius: var(--radius-md);
    padding: 14px;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-height: 220px;
    position: relative;
    transition: all 0.25s ease;
    cursor: pointer;
}

.deck-slot-card:hover {
    border-color: var(--gold-primary);
    background: rgba(22, 26, 42, 0.85);
    transform: translateY(-2px);
}

.deck-slot-card.active-target {
    border-color: var(--green-light);
    box-shadow: 0 0 16px rgba(87, 204, 153, 0.3);
}

.slot-role-badge {
    position: absolute;
    top: -10px;
    background: var(--gold-gradient);
    color: #0b0d14;
    font-size: 0.65rem;
    font-weight: 800;
    padding: 2px 10px;
    border-radius: var(--radius-pill);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

.slot-card-preview {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
}

.empty-slot-placeholder {
    color: var(--text-muted);
    font-size: 0.8rem;
    font-style: italic;
    padding: 20px 10px;
}

.slot-assigned-card {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.slot-card-avatar {
    width: 64px;
    height: 64px;
    border-radius: var(--radius-sm);
    border: 2px solid var(--gold-primary);
    object-fit: cover;
}

.slot-card-title {
    font-weight: 700;
    font-size: 0.9rem;
    color: var(--text-primary);
}

.slot-card-rarity {
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.slot-card-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 4px;
    width: 100%;
    font-size: 0.7rem;
    font-family: var(--font-mono);
    text-align: center;
    background: rgba(0, 0, 0, 0.4);
    padding: 6px;
    border-radius: 6px;
}

.slot-card-stats span strong {
    color: var(--gold-bright);
}

.btn-remove-slot {
    margin-top: 6px;
    background: rgba(230, 57, 70, 0.15);
    border: 1px solid rgba(230, 57, 70, 0.3);
    color: #ff6b6b;
    font-size: 0.7rem;
    padding: 3px 8px;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-remove-slot:hover {
    background: rgba(230, 57, 70, 0.3);
}

/* Armoire aux Reliques (Collection) */
.card-collection-card {
    background: var(--bg-card);
    backdrop-filter: blur(14px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: var(--shadow-soft);
}

.collection-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    flex-wrap: wrap;
    gap: 12px;
}

.collection-header h2 {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    color: var(--gold-primary);
}

.collection-header p {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.player-cards-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 14px;
    max-height: 550px;
    overflow-y: auto;
    padding-right: 6px;
}

/* Carte Objet dans la grille */
.card-tile {
    background: rgba(18, 20, 32, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-md);
    padding: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    cursor: pointer;
    position: relative;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.card-tile:hover {
    transform: translateY(-4px);
    border-color: var(--gold-primary);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.6);
}

.card-tile.in-deck {
    border-color: var(--green-light);
    box-shadow: 0 0 12px rgba(87, 204, 153, 0.25);
}

.card-tile.in-deck::after {
    content: 'ÉQUIPÉE';
    position: absolute;
    top: 6px;
    right: 6px;
    background: var(--green-light);
    color: #0b0d14;
    font-size: 0.6rem;
    font-weight: 800;
    padding: 1px 5px;
    border-radius: 4px;
}

.card-tile-avatar {
    width: 60px;
    height: 60px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 8px;
    border: 2px solid rgba(255, 255, 255, 0.15);
}

.card-tile-name {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.card-tile-stars {
    color: var(--gold-bright);
    font-size: 0.75rem;
    margin-bottom: 4px;
}

.card-tile-stats-row {
    font-size: 0.7rem;
    font-family: var(--font-mono);
    color: var(--text-secondary);
    display: flex;
    gap: 6px;
    margin-bottom: 8px;
}

.card-tile-actions {
    display: flex;
    gap: 4px;
    width: 100%;
}

.card-tile-actions button {
    flex: 1;
    font-size: 0.65rem;
    padding: 4px 2px;
}

/* Couleurs de Raretés des Cartes */
.rarity-mythic {
    border-color: #ff007f !important;
    box-shadow: 0 0 14px rgba(255, 0, 127, 0.4);
    animation: mythicGlow 3s infinite alternate;
}
.rarity-legendary {
    border-color: #e5b842 !important;
    box-shadow: 0 0 12px rgba(229, 184, 66, 0.35);
}
.rarity-epic {
    border-color: #8338ec !important;
    box-shadow: 0 0 10px rgba(131, 56, 236, 0.3);
}
.rarity-rare {
    border-color: #3a86ff !important;
    box-shadow: 0 0 8px rgba(58, 134, 255, 0.25);
}
.rarity-uncommon {
    border-color: #2ec4b6 !important;
}
.rarity-common {
    border-color: #647087 !important;
}

@keyframes mythicGlow {
    0% { box-shadow: 0 0 10px #ff007f, 0 0 20px #8338ec; }
    50% { box-shadow: 0 0 14px #3a86ff, 0 0 24px #e5b842; }
    100% { box-shadow: 0 0 10px #ff007f, 0 0 20px #8338ec; }
}

/* ========================================================
   SECTION 3 : ARÈNE DE COMBAT (DONJON PVE)
   ======================================================== */

.arena-container {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.arena-banner {
    background: linear-gradient(135deg, rgba(230, 57, 70, 0.15) 0%, rgba(22, 25, 37, 0.9) 100%);
    border: 1px solid rgba(230, 57, 70, 0.3);
    border-radius: var(--radius-lg);
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 20px;
    margin-bottom: 24px;
}

.arena-banner-crest {
    font-size: 3rem;
}

.arena-banner h2 {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.arena-banner p {
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* Grille des Étages */
/* Grille des Étages */
.floors-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
    align-items: stretch;
}

.floor-card {
    background: linear-gradient(165deg, #12141c 0%, #0c0d12 100%);
    backdrop-filter: blur(14px);
    border: 1px solid rgba(212, 175, 55, 0.28);
    border-radius: var(--radius-md);
    padding: 16px;
    display: flex;
    flex-direction: column;
    height: 100%;
    min-height: 240px;
    gap: 12px;
    position: relative;
    transition: all 0.25s ease;
    box-shadow: inset 0 0 0 1px rgba(255, 215, 0, 0.05), 0 8px 24px rgba(0, 0, 0, 0.5);
}

.floor-card:hover:not(.locked) {
    border-color: var(--gold-primary);
    transform: translateY(-4px);
    box-shadow: inset 0 0 0 1px rgba(255, 215, 0, 0.15), 0 12px 30px rgba(0, 0, 0, 0.7), 0 0 18px rgba(212, 175, 55, 0.25);
}

.floor-card.locked {
    opacity: 0.5;
    filter: grayscale(0.85);
    cursor: not-allowed;
    border-color: rgba(255, 255, 255, 0.08);
}

.floor-card.cleared {
    border-color: rgba(46, 196, 182, 0.45);
    background: linear-gradient(165deg, rgba(46, 196, 182, 0.08) 0%, #0c0d12 100%);
}

.floor-header-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.floor-number-badge {
    font-size: 0.75rem;
    font-weight: 800;
    font-family: var(--font-heading);
    color: var(--gold-bright);
    background: rgba(229, 184, 66, 0.15);
    border: 1px solid rgba(212, 175, 55, 0.3);
    padding: 2px 10px;
    border-radius: var(--radius-pill);
    letter-spacing: 0.5px;
}

.floor-status-badge {
    font-size: 0.75rem;
    font-weight: 600;
}

.floor-boss-info {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 54px;
    height: 54px;
}

.floor-boss-avatar {
    width: 52px;
    height: 52px;
    min-width: 52px;
    border-radius: 6px;
    border: 1.5px solid var(--gold-primary);
    object-fit: cover;
    background: #000;
    box-shadow: 0 0 10px rgba(212, 175, 55, 0.25);
}

.floor-boss-text-wrapper {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.floor-boss-name {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 0.88rem;
    color: #f5edd8;
    line-height: 1.25;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
}

.floor-boss-lvl {
    font-size: 0.72rem;
    color: #e63946;
    font-family: var(--font-mono);
    margin-top: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.floor-rewards-row {
    font-size: 0.74rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 4px;
    border-top: 1px solid rgba(212, 175, 55, 0.12);
    padding-top: 10px;
    margin-top: 2px;
    white-space: nowrap;
    flex-wrap: nowrap;
    overflow: hidden;
}

.floor-rewards-row .reward-badge {
    font-size: 0.72rem;
    padding: 3px 5px;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.btn-challenge-floor {
    margin-top: auto;
    width: 100%;
}

/* CHAMP DE BATAILLE EN DIRECT */
.arena-battle-stage {
    background: radial-gradient(circle at center, #1a1e2d 0%, #0d0f17 100%);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.7);
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.battle-stage-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding-bottom: 14px;
}

.battle-title-wrap {
    display: flex;
    align-items: center;
    gap: 12px;
}

.battle-round-badge {
    background: var(--gold-gradient);
    color: #0b0d14;
    font-weight: 800;
    font-size: 0.8rem;
    padding: 4px 12px;
    border-radius: var(--radius-pill);
    box-shadow: 0 2px 6px rgba(0,0,0,0.4);
}

.battle-stage-header h2 {
    font-family: var(--font-heading);
    font-size: 1.3rem;
    color: var(--text-primary);
}

.battle-field {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.battle-team-row {
    background: rgba(0, 0, 0, 0.35);
    border-radius: var(--radius-md);
    padding: 16px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.battle-team-row.enemy-row {
    border-left: 4px solid var(--crimson);
}

.battle-team-row.ally-row {
    border-left: 4px solid var(--green-light);
}

.team-header-tag {
    font-size: 0.85rem;
    color: var(--text-secondary);
    margin-bottom: 12px;
}

.combat-units-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 14px;
}

/* Carte d'Unité en Combat */
.combat-unit-card {
    background: rgba(22, 26, 40, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-sm);
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    position: relative;
    transition: transform 0.2s;
}

.combat-unit-card.active-turn {
    border-color: var(--gold-primary);
    box-shadow: 0 0 16px rgba(229, 184, 66, 0.4);
    transform: scale(1.02);
}

.combat-unit-card.dead {
    opacity: 0.35;
    filter: grayscale(1);
}

.combat-unit-card.shake {
    animation: unitShake 0.4s cubic-bezier(0.36, 0.07, 0.19, 0.97) both;
}

@keyframes unitShake {
    10%, 90% { transform: translate3d(-2px, 0, 0); }
    20%, 80% { transform: translate3d(4px, 0, 0); }
    30%, 50%, 70% { transform: translate3d(-6px, 0, 0); }
    40%, 60% { transform: translate3d(6px, 0, 0); }
}

.unit-info-header {
    display: flex;
    align-items: center;
    gap: 8px;
}

.unit-avatar-sm {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    object-fit: cover;
    border: 1px solid var(--gold-primary);
}

.unit-names {
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.unit-name-txt {
    font-weight: 700;
    font-size: 0.85rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.unit-role-txt {
    font-size: 0.65rem;
    color: var(--text-muted);
}

/* Barres de Vie & Énergie */
.unit-meter-wrap {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.meter-labels {
    display: flex;
    justify-content: space-between;
    font-size: 0.7rem;
    font-family: var(--font-mono);
}

.hp-track {
    width: 100%;
    height: 8px;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 4px;
    overflow: hidden;
}

.hp-fill {
    height: 100%;
    background: linear-gradient(90deg, #2ec4b6, #57cc99);
    transition: width 0.4s ease, background 0.4s ease;
}

.hp-fill.danger {
    background: linear-gradient(90deg, #e63946, #ff758f);
}

.energy-track {
    width: 100%;
    height: 5px;
    background: rgba(0, 0, 0, 0.6);
    border-radius: 3px;
    overflow: hidden;
}

.energy-fill {
    height: 100%;
    background: linear-gradient(90deg, #3a86ff, #00f0ff);
    transition: width 0.4s ease;
}

.energy-fill.ready {
    box-shadow: 0 0 8px #00f0ff;
    animation: energyPulse 1s infinite alternate;
}

@keyframes energyPulse {
    from { opacity: 0.8; }
    to { opacity: 1; filter: brightness(1.3); }
}

.unit-status-badges {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    min-height: 18px;
}

.status-badge-chip {
    font-size: 0.65rem;
    padding: 1px 4px;
    border-radius: 3px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* Séparateur Choc */
.battle-clash-divider {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
}

.battle-clash-divider::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(229, 184, 66, 0.4), transparent);
}

.clash-icon {
    background: #0d0f17;
    border: 1px solid var(--border-color);
    padding: 4px 16px;
    border-radius: var(--radius-pill);
    font-family: var(--font-heading);
    font-size: 0.85rem;
    color: var(--gold-bright);
    z-index: 2;
}

/* Panneau de Contrôle Tactique */
.battle-control-panel {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-top: 16px;
}

@media (max-width: 800px) {
    .battle-control-panel {
        grid-template-columns: 1fr;
    }
}

.tactical-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
}

.action-combat-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 10px;
    font-size: 0.9rem;
    font-weight: 700;
}

/* Journal des Coups */
.battle-log-card {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-sm);
    display: flex;
    flex-direction: column;
    max-height: 160px;
}

.log-header {
    background: rgba(255, 255, 255, 0.03);
    padding: 6px 12px;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--gold-primary);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.battle-log-scroll {
    overflow-y: auto;
    padding: 8px 12px;
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 0.75rem;
    font-family: var(--font-mono);
}

.log-entry {
    color: var(--text-secondary);
    line-height: 1.3;
}

.log-entry.crit {
    color: #ff9e00;
    font-weight: 700;
}

.log-entry.ultimate {
    color: #00f0ff;
    font-weight: 700;
}

.log-entry.defeat {
    color: #ff4d4d;
}

.log-entry.victory {
    color: #57cc99;
    font-weight: 700;
}

/* ========================================================
   SECTION 4 : TAVERNE ROYALE / BLACKJACK 21
   ======================================================== */

.blackjack-container {
    max-width: 960px;
    margin: 0 auto;
}

.tavern-table-felt {
    background: radial-gradient(ellipse at center, #1b6338 0%, #0d381e 65%, #071f11 100%);
    border: 12px solid #38220f;
    border-radius: 40px;
    box-shadow: inset 0 0 60px rgba(0, 0, 0, 0.8), 0 16px 40px rgba(0, 0, 0, 0.7);
    padding: 32px 24px;
    display: flex;
    flex-direction: column;
    gap: 24px;
    position: relative;
}

.felt-header {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 4px;
    border-bottom: 1px dashed rgba(229, 184, 66, 0.3);
    padding-bottom: 12px;
}

.felt-logo {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    color: var(--gold-bright);
    letter-spacing: 2px;
    text-shadow: 0 2px 4px rgba(0,0,0,0.8);
}

.felt-rules {
    font-size: 0.72rem;
    color: rgba(255, 255, 255, 0.75);
    letter-spacing: 1px;
}

.bj-hand-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.hand-meta {
    display: flex;
    align-items: center;
    gap: 12px;
}

.hand-owner {
    font-size: 0.95rem;
    font-weight: 700;
    color: #ffffff;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.8);
}

.hand-score-pill {
    background: rgba(0, 0, 0, 0.6);
    border: 1px solid var(--gold-primary);
    color: var(--gold-bright);
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 0.85rem;
    padding: 2px 10px;
    border-radius: var(--radius-pill);
}

.bj-cards-row {
    display: flex;
    gap: 10px;
    min-height: 120px;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
}

/* Carte de Jeu Réelle */
.bj-card {
    width: 80px;
    height: 116px;
    background: #ffffff;
    color: #111111;
    border-radius: 8px;
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.5);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 8px;
    font-weight: 800;
    position: relative;
    user-select: none;
    transition: transform 0.25s ease;
}

.bj-card:hover {
    transform: translateY(-6px);
}

.bj-card.red {
    color: #c91818;
}

.bj-card .card-corner {
    display: flex;
    flex-direction: column;
    align-items: center;
    line-height: 1;
    font-size: 0.9rem;
}

.bj-card .card-center-suit {
    align-self: center;
    font-size: 1.8rem;
    opacity: 0.9;
}

.bj-card .card-corner.bottom {
    transform: rotate(180deg);
}

.bj-card.back-card {
    background: #7a1d25;
    background-image: repeating-linear-gradient(45deg, rgba(229, 184, 66, 0.2) 0, rgba(229, 184, 66, 0.2) 10px, transparent 10px, transparent 20px);
    border: 2px solid var(--gold-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--gold-bright);
}

.bj-card.empty-card {
    background: rgba(0, 0, 0, 0.25);
    border: 2px dashed rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: rgba(255, 255, 255, 0.3);
}

.felt-center-strip {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.current-bet-display {
    font-family: var(--font-heading);
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.9);
    background: rgba(0, 0, 0, 0.4);
    padding: 6px 18px;
    border-radius: var(--radius-pill);
    border: 1px solid rgba(229, 184, 66, 0.3);
}

.current-bet-display strong {
    color: var(--gold-bright);
}

.bj-outcome-banner {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 800;
    padding: 8px 24px;
    border-radius: var(--radius-md);
    animation: popIn 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    text-align: center;
}

.bj-outcome-banner.win {
    background: linear-gradient(135deg, #10b981, #059669);
    color: #ffffff;
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.5);
}

.bj-outcome-banner.blackjack {
    background: var(--gold-gradient);
    color: #0b0d14;
    box-shadow: 0 0 30px rgba(229, 184, 66, 0.7);
}

.bj-outcome-banner.loss {
    background: linear-gradient(135deg, #ef4444, #b91c1c);
    color: #ffffff;
}

.bj-outcome-banner.push {
    background: #475569;
    color: #ffffff;
}

/* Contrôles & Jetons */
.felt-controls {
    background: rgba(0, 0, 0, 0.5);
    border-radius: var(--radius-md);
    padding: 16px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.betting-console {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 14px;
}

.wallet-balance-indicator {
    font-size: 0.9rem;
    color: rgba(255, 255, 255, 0.85);
}

.wallet-balance-indicator strong {
    color: var(--gold-bright);
    font-size: 1.05rem;
}

.chips-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
}

.chip-btn {
    width: 58px;
    height: 58px;
    border-radius: 50%;
    border: 4px dashed rgba(255, 255, 255, 0.8);
    font-weight: 800;
    font-size: 0.75rem;
    color: #ffffff;
    cursor: pointer;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5);
    transition: transform 0.15s, box-shadow 0.15s;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: #000;
}

.chip-btn:hover {
    transform: translateY(-4px) scale(1.05);
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.6);
}

.chip-btn[data-val="50"] { background: #1e3a8a; border-color: #60a5fa; }
.chip-btn[data-val="100"] { background: #991b1b; border-color: #f87171; }
.chip-btn[data-val="250"] { background: #065f46; border-color: #34d399; }
.chip-btn[data-val="500"] { background: #5b21b6; border-color: #a78bfa; }
.chip-btn[data-val="1000"] { background: #854d0e; border-color: #fde047; }

.custom-bet-row {
    display: flex;
    gap: 10px;
    align-items: center;
}

.bj-bet-input {
    width: 140px;
    text-align: center;
    font-family: var(--font-mono);
    font-size: 1.1rem;
    font-weight: 700;
}

.play-console {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

/* ========================================================
   SECTION 5 : CRYPTE AUX TRÉSORS / BOOSTERS
   ======================================================== */

.packs-container {
    max-width: 1100px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.packs-header-banner {
    background: linear-gradient(135deg, rgba(131, 56, 236, 0.15) 0%, rgba(22, 25, 37, 0.9) 100%);
    border: 1px solid rgba(131, 56, 236, 0.3);
    border-radius: var(--radius-lg);
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 20px;
}

.pack-banner-icon {
    font-size: 3rem;
}

.packs-showcase-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 24px;
}

@media (max-width: 860px) {
    .packs-showcase-grid {
        grid-template-columns: 1fr;
    }
}

.pack-showcase-card {
    background: var(--bg-card);
    backdrop-filter: blur(14px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    box-shadow: var(--shadow-soft);
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease, border-color 0.3s ease;
}

.pack-showcase-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.6);
}

.pack-serf:hover { border-color: #647087; }
.pack-garde:hover { border-color: #3a86ff; box-shadow: 0 16px 40px rgba(58, 134, 255, 0.25); }
.pack-trone:hover { border-color: #e5b842; box-shadow: 0 16px 40px rgba(229, 184, 66, 0.35); }

.pack-foil-wrapper {
    perspective: 800px;
    margin-bottom: 20px;
}

.pack-3d-foil {
    width: 170px;
    height: 250px;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 16px;
    position: relative;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.6);
    background: #111;
    overflow: hidden;
    transition: transform 0.4s ease;
}

.pack-showcase-card:hover .pack-3d-foil {
    transform: rotateY(10deg) scale(1.03);
}

.pack-3d-foil::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    right: -50%;
    bottom: -50%;
    background: linear-gradient(45deg, rgba(255,255,255,0) 0%, rgba(255,255,255,0.2) 50%, rgba(255,255,255,0) 100%);
    transform: rotate(25deg);
    animation: foilShimmer 4s infinite linear;
}

@keyframes foilShimmer {
    0% { transform: translateY(-100%) rotate(25deg); }
    100% { transform: translateY(100%) rotate(25deg); }
}

.pack-serf .pack-3d-foil {
    background: linear-gradient(135deg, #2b3040, #141724);
    border: 2px solid #5a647a;
}

.pack-garde .pack-3d-foil {
    background: linear-gradient(135deg, #1e3a8a, #0f172a);
    border: 2px solid #3b82f6;
}

.pack-trone .pack-3d-foil {
    background: linear-gradient(135deg, #78350f, #1c1917);
    border: 2px solid #f59e0b;
}

.pack-foil-badge {
    font-size: 3rem;
    margin-bottom: 8px;
    z-index: 2;
}

.pack-3d-foil h3 {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    color: #ffffff;
    margin-bottom: 8px;
    z-index: 2;
}

.pack-odds {
    font-size: 0.65rem;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.4;
    z-index: 2;
}

.pack-card-footer {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 10px;
    align-items: center;
}

.pack-price-tag {
    font-family: var(--font-mono);
    font-weight: 700;
    font-size: 1.15rem;
    color: var(--gold-bright);
}

/* Scène d'Ouverture de Pack */
.unboxing-stage {
    background: rgba(14, 16, 26, 0.95);
    border: 2px solid var(--gold-primary);
    border-radius: var(--radius-lg);
    padding: 28px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.9);
    animation: popIn 0.3s ease-out;
}

.unboxing-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.unboxing-header h3 {
    font-family: var(--font-heading);
    color: var(--gold-bright);
    font-size: 1.3rem;
}

.unboxed-cards-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}

@media (max-width: 768px) {
    .unboxed-cards-row {
        grid-template-columns: 1fr;
    }
}

.unboxed-card-reveal {
    background: #141724;
    border-radius: var(--radius-md);
    padding: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    border: 2px solid var(--gold-primary);
    animation: cardReveal 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.7);
}

@keyframes cardReveal {
    0% { transform: scale(0.6) rotateY(180deg); opacity: 0; }
    100% { transform: scale(1) rotateY(0deg); opacity: 1; }
}

.equipment-loot-alert {
    background: rgba(229, 184, 66, 0.15);
    border: 1px solid var(--gold-primary);
    border-radius: var(--radius-sm);
    padding: 12px;
    font-size: 0.9rem;
    color: var(--gold-bright);
    text-align: center;
    animation: pulseGlow 1.5s infinite alternate;
}

@keyframes pulseGlow {
    from { box-shadow: 0 0 5px rgba(229, 184, 66, 0.2); }
    to { box-shadow: 0 0 16px rgba(229, 184, 66, 0.5); }
}

/* ========================================================
   SECTION 6 : CLASSEMENTS PUBLICS (LEADERBOARD)
   ======================================================== */

.leaderboard-container {
    max-width: 1050px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.lb-tabs-bar {
    display: flex;
    gap: 12px;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 12px;
}

.lb-subtab {
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-secondary);
    padding: 8px 18px;
    border-radius: var(--radius-pill);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s;
}

.lb-subtab:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.05);
}

.lb-subtab.active {
    background: var(--gold-primary);
    color: #0b0d14;
    font-weight: 700;
}

/* Podium Féodal */
.podium-row {
    display: flex;
    justify-content: center;
    align-items: flex-end;
    gap: 16px;
    margin: 20px 0 32px 0;
}

.podium-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    width: 170px;
}

.podium-avatar {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    object-fit: cover;
    margin-bottom: 8px;
    border: 3px solid #ccc;
    background: #141724;
}

.podium-name {
    font-weight: 700;
    font-size: 0.85rem;
    margin-bottom: 2px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

.podium-val {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--gold-bright);
    margin-bottom: 8px;
}

.podium-pedestal {
    width: 100%;
    border-radius: 8px 8px 0 0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.5rem;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
}

.podium-rank-1 .podium-pedestal {
    height: 120px;
    background: linear-gradient(180deg, #d4af37, #854d0e);
    color: #ffffff;
}
.podium-rank-1 .podium-avatar {
    border-color: #ffd700;
    box-shadow: 0 0 16px rgba(255, 215, 0, 0.5);
    width: 76px;
    height: 76px;
}

.podium-rank-2 .podium-pedestal {
    height: 90px;
    background: linear-gradient(180deg, #94a3b8, #475569);
    color: #ffffff;
}
.podium-rank-2 .podium-avatar { border-color: #cbd5e1; }

.podium-rank-3 .podium-pedestal {
    height: 70px;
    background: linear-gradient(180deg, #b45309, #78350f);
    color: #ffffff;
}
.podium-rank-3 .podium-avatar { border-color: #d97706; }

/* Tableaux */
.lb-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-card);
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--border-color);
}

.lb-table th {
    background: rgba(0, 0, 0, 0.4);
    padding: 12px 16px;
    text-align: left;
    font-size: 0.75rem;
    text-transform: uppercase;
    color: var(--text-muted);
    letter-spacing: 0.5px;
}

.lb-table td {
    padding: 12px 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 0.85rem;
}

.lb-table tr:hover td {
    background: rgba(255, 255, 255, 0.02);
}

.rank-pill {
    font-family: var(--font-mono);
    font-weight: 700;
    padding: 2px 8px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.06);
}

.rank-pill.gold { background: #d4af37; color: #0b0d14; }
.rank-pill.silver { background: #94a3b8; color: #0b0d14; }
.rank-pill.bronze { background: #b45309; color: #ffffff; }

/* Guerre des Ordres */
.factions-war-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
}

.faction-war-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.faction-war-card h3 {
    font-family: var(--font-heading);
    font-size: 1.2rem;
    color: var(--text-primary);
}

/* Modale de Résultat de Combat */
.battle-result-card {
    max-width: 480px;
    text-align: center;
}

.result-header {
    padding: 24px 20px 10px 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
}

.result-emoji {
    font-size: 3.5rem;
    animation: popIn 0.4s ease-out;
}

.result-header h2 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    color: var(--gold-bright);
}

.result-body {
    padding: 16px 24px;
    font-size: 0.9rem;
    color: var(--text-secondary);
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.result-footer {
    padding: 16px 24px 24px 24px;
}

/* Toast de Diffusion Discord d'Exploit */
.toast.exploit-toast {
    background: linear-gradient(135deg, #1e1b4b, #0f172a);
    border: 1px solid var(--gold-primary);
    box-shadow: 0 8px 30px rgba(229, 184, 66, 0.4);
    color: #ffffff;
}

/* ==================== STYLES DU DASHBOARD PROFESSIONNEL ==================== */

/* --- TRIBUNAL & ANNUAIRE DES MEMBRES --- */
.stats-overview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--bg-card);
    backdrop-filter: blur(14px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 18px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: var(--shadow-soft);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    border-color: var(--gold-primary);
}

.stat-icon {
    font-size: 2rem;
    background: rgba(255, 255, 255, 0.05);
    width: 52px;
    height: 52px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
}

.stat-info .stat-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    display: block;
    margin-bottom: 2px;
}

.stat-info .stat-val {
    font-size: 1.6rem;
    font-weight: 800;
    font-family: var(--font-heading);
    margin: 0;
}

.text-crimson { color: #f87171 !important; }
.text-gold { color: var(--gold-bright) !important; }
.text-green { color: #34d399 !important; }

.members-toolbar-card {
    background: var(--bg-card);
    backdrop-filter: blur(14px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px 20px;
    margin-bottom: 24px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.toolbar-search-box {
    position: relative;
    width: 100%;
}

.toolbar-search-box .search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.1rem;
    opacity: 0.6;
}

.toolbar-search-box .form-input {
    padding-left: 42px;
    width: 100%;
}

.toolbar-filters-row {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.filter-group .form-select {
    padding: 6px 12px;
    font-size: 0.85rem;
    min-width: 150px;
    height: 38px;
    box-sizing: border-box;
}

.filter-group.filter-btn-group label.filter-btn-label {
    display: none;
}

.filter-group.filter-btn-group #btnRefreshMembers {
    height: 38px;
    padding: 0 16px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    box-sizing: border-box;
    white-space: nowrap;
}

/* ==================== TRIBUNAL & MEMBRES (STRICTEMENT UNIFORMES) ==================== */
.members-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
    gap: 16px;
    grid-auto-rows: 1fr;
}

.member-card {
    background: rgba(18, 20, 28, 0.92);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100%;
    position: relative;
    transition: all 0.2s ease;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.5);
    overflow: hidden;
}

.member-card:hover {
    border-color: var(--gold-primary);
    transform: translateY(-2px);
    box-shadow: 0 8px 24px rgba(201, 168, 78, 0.2);
}

.member-card.is-jailed {
    border-color: rgba(239, 68, 68, 0.6);
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.12), rgba(18, 20, 28, 0.95));
}

.member-card-header {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 52px;
    max-height: 52px;
}

.member-avatar {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--gold-primary);
    flex-shrink: 0;
}

.member-avatar-fallback {
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: rgba(201, 168, 78, 0.2);
    border: 2px solid var(--gold-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
    color: var(--gold-bright);
    flex-shrink: 0;
}

.member-meta {
    flex: 1;
    min-width: 0;
}

.member-display-name {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    display: flex;
    align-items: center;
    gap: 6px;
}

.member-username {
    font-size: 0.75rem;
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.member-username code {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    opacity: 0.8;
}

.member-status-badges {
    min-height: 22px;
    max-height: 22px;
    display: flex;
    align-items: center;
    gap: 4px;
    margin-top: 4px;
    overflow: hidden;
}

.status-badge {
    font-size: 0.68rem;
    padding: 1px 6px;
    border-radius: 4px;
    font-weight: 600;
    white-space: nowrap;
}

.status-badge.jailed {
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.4);
}

.status-badge.timeout {
    background: rgba(249, 115, 22, 0.2);
    color: #fb923c;
    border: 1px solid rgba(249, 115, 22, 0.4);
}

.status-badge.warned {
    background: rgba(234, 179, 8, 0.2);
    color: #fde047;
    border: 1px solid rgba(234, 179, 8, 0.4);
}

.trust-score-wrapper {
    min-height: 38px;
    margin: 8px 0;
}

.trust-score-header {
    display: flex;
    justify-content: space-between;
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-bottom: 4px;
}

.trust-score-bar-bg {
    height: 6px;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 3px;
    overflow: hidden;
}

.trust-score-bar-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.3s ease;
}

.member-roles-row {
    height: 28px;
    overflow: hidden;
    display: flex;
    align-items: center;
    gap: 6px;
    white-space: nowrap;
    margin-bottom: 6px;
}

.member-role-pill {
    font-size: 0.7rem;
    padding: 2px 7px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 140px;
}

.member-finances-snippet {
    font-size: 0.82rem;
    color: var(--text-secondary);
    min-height: 22px;
    display: flex;
    align-items: center;
    margin-bottom: 12px;
}

.member-finances-snippet strong {
    color: var(--gold-bright);
    margin-left: 4px;
}

.member-card-actions {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 6px;
    margin-top: auto;
}

.member-card-actions .btn {
    padding: 6px 2px;
    font-size: 0.72rem;
    font-weight: 600;
    text-align: center;
    white-space: nowrap;
    height: 32px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 3px;
    box-shadow: none;
    transition: all 0.15s ease;
}

.member-card-actions .btn:hover {
    transform: translateY(-1px);
}

/* ==================== MOTEUR DE GIFS (NON ROGNÉS & ALIGNÉS) ==================== */
.gifs-search-card {
    background: var(--bg-card);
    backdrop-filter: blur(14px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 20px;
    margin-bottom: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.gif-search-bar {
    display: flex;
    gap: 10px;
    position: relative;
}

.gif-search-bar .search-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.1rem;
    opacity: 0.6;
}

.gif-search-bar .form-input {
    padding-left: 42px;
    flex: 1;
}

.gif-categories-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.pill {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.82rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.pill:hover {
    background: rgba(201, 168, 78, 0.15);
    color: var(--gold-bright);
    border-color: var(--gold-primary);
}

.pill.active {
    background: var(--gold-primary);
    color: #0b0c10;
    font-weight: 700;
    border-color: var(--gold-bright);
}

.pill-special.pill-welcome {
    border-color: rgba(34, 197, 94, 0.4);
    color: #4ade80;
}
.pill-special.pill-welcome.active {
    background: linear-gradient(135deg, #15803d, #22c55e);
    color: #fff;
    border-color: #86efac;
    box-shadow: 0 0 15px rgba(34, 197, 94, 0.35);
}

.pill-special.pill-levelup {
    border-color: rgba(168, 85, 247, 0.4);
    color: #c084fc;
}
.pill-special.pill-levelup.active {
    background: linear-gradient(135deg, #7e22ce, #a855f7);
    color: #fff;
    border-color: #e9d5ff;
    box-shadow: 0 0 15px rgba(168, 85, 247, 0.35);
}

.gifs-rotation-info {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 18px;
    border-radius: var(--radius-md);
    background: linear-gradient(135deg, rgba(30, 27, 75, 0.7), rgba(15, 23, 42, 0.85));
    border: 1px solid rgba(168, 85, 247, 0.3);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    animation: fadeIn 0.3s ease;
}

.rotation-info-badge {
    padding: 4px 10px;
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.8px;
    border-radius: 6px;
    background: rgba(168, 85, 247, 0.2);
    border: 1px solid rgba(168, 85, 247, 0.5);
    color: #e9d5ff;
    white-space: nowrap;
}

.rotation-info-content h4 {
    margin: 0 0 3px 0;
    font-family: var(--font-heading);
    color: var(--gold-bright);
    font-size: 0.95rem;
}

.rotation-info-content p {
    margin: 0;
    font-size: 0.82rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

.custom-gif-importer {
    background: rgba(0, 0, 0, 0.25);
    border: 1px dashed rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    padding: 10px 14px;
}

.importer-details summary {
    cursor: pointer;
    color: var(--gold-bright);
    font-size: 0.85rem;
    font-weight: 600;
}

.importer-body {
    margin-top: 12px;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.importer-row {
    display: flex;
    gap: 10px;
}

.importer-preview-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    background: rgba(0, 0, 0, 0.4);
    padding: 12px;
    border-radius: 8px;
}

.direct-gif-preview-img {
    max-height: 220px;
    border-radius: 8px;
    border: 1px solid var(--gold-primary);
}

.importer-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}

.gifs-masonry-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 18px;
}

.gif-card {
    background: #11131a;
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: all 0.25s ease;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.gif-card:hover {
    border-color: var(--gold-primary);
    transform: translateY(-3px);
    box-shadow: 0 10px 28px rgba(201, 168, 78, 0.22);
}

.gif-media-wrapper {
    position: relative;
    width: 100%;
    height: 190px;
    background: #08090d;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    border-bottom: 1px solid rgba(201, 168, 78, 0.15);
}

.gif-media-img {
    max-width: 100%;
    max-height: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
    transition: transform 0.2s ease;
}

.gif-card:hover .gif-media-img {
    transform: scale(1.03);
}

.gif-overlay-actions {
    position: absolute;
    inset: 0;
    background: rgba(10, 11, 16, 0.88);
    backdrop-filter: blur(4px);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 6px;
    padding: 14px;
    align-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.gif-card:hover .gif-overlay-actions {
    opacity: 1;
    pointer-events: auto;
}

.gif-action-btn {
    background: rgba(25, 28, 38, 0.95);
    border: 1px solid var(--gold-primary);
    color: var(--text-primary);
    font-size: 0.75rem;
    font-weight: 600;
    padding: 8px 6px;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    transition: all 0.15s ease;
}

.gif-action-btn:hover {
    background: var(--gold-primary);
    color: #0c0d12;
    transform: translateY(-1px);
}

.gif-meta-footer {
    padding: 10px 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #141722;
}

.gif-title {
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--text-primary);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 170px;
}

.gif-tag-badge {
    font-size: 0.7rem;
    color: var(--gold-bright);
    background: rgba(201, 168, 78, 0.12);
    padding: 2px 8px;
    border-radius: 12px;
    border: 1px solid rgba(201, 168, 78, 0.25);
    text-transform: capitalize;
}

.gif-action-btn-danger {
    background: rgba(220, 38, 38, 0.25);
    border: 1px solid rgba(239, 68, 68, 0.5);
    color: #fca5a5;
    font-size: 0.72rem;
    font-weight: 700;
    padding: 4px 10px;
    border-radius: var(--radius-xs);
    cursor: pointer;
    transition: all 0.2s ease;
}

.gif-action-btn-danger:hover {
    background: rgba(220, 38, 38, 0.85);
    border-color: #ef4444;
    color: #fff;
    box-shadow: 0 0 10px rgba(239, 68, 68, 0.5);
}

.btn-delete-gif-footer {
    padding: 3px 8px;
    font-size: 0.72rem;
    color: #f87171;
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.35);
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-delete-gif-footer:hover {
    background: #dc2626;
    color: #fff;
    border-color: #ef4444;
}

body.is-admin #btnAuthToggle,
body.is-admin .btn-auth-toggle {
    display: none !important;
}

.gif-category-tag {
    font-size: 0.7rem;
    color: var(--text-secondary);
    text-transform: capitalize;
}

/* --- VISUAL EMBED STUDIO --- */
.embed-studio-layout {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 24px;
    align-items: start;
}

@media (max-width: 1100px) {
    .embed-studio-layout {
        grid-template-columns: 1fr;
    }
}

.embed-builder-card {
    background: var(--bg-card);
    backdrop-filter: blur(14px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.color-palette-row {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
    margin-top: 4px;
}

.color-swatch {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.2);
    cursor: pointer;
    transition: transform 0.15s ease, border-color 0.15s ease;
}

.color-swatch:hover {
    transform: scale(1.15);
}

.color-swatch.active {
    border-color: #ffffff;
    box-shadow: 0 0 10px var(--gold-bright);
    transform: scale(1.15);
}

.color-picker-input {
    width: 34px;
    height: 34px;
    padding: 0;
    border: 2px solid rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    cursor: pointer;
    background: transparent;
}

.embed-fields-section {
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 14px;
}

.fields-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.embed-field-row {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-bottom: 8px;
}

.embed-field-row .form-input {
    font-size: 0.85rem;
    padding: 6px 10px;
}

.btn-remove-field {
    background: rgba(239, 68, 68, 0.2);
    color: #f87171;
    border: 1px solid rgba(239, 68, 68, 0.4);
    border-radius: 4px;
    padding: 6px 10px;
    cursor: pointer;
}

/* --- REPRODUCTION FIDÈLE DISCORD DARK MODE --- */
.embed-preview-wrapper {
    position: sticky;
    top: 20px;
    background: #1e1f22;
    border: 1px solid #35363c;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.6);
}

.preview-header {
    background: #111214;
    padding: 10px 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #2b2d31;
    font-size: 0.8rem;
    color: #949ba4;
}

.channel-indicator {
    font-family: var(--font-mono);
    color: var(--gold-bright);
}

.discord-message-mock {
    background: #313338;
    padding: 16px;
    display: flex;
    gap: 14px;
}

.discord-avatar-img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
}

.discord-content {
    flex: 1;
    min-width: 0;
}

.discord-header-line {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-bottom: 4px;
}

.discord-bot-name {
    font-weight: 600;
    color: #f2f3f5;
    font-size: 0.95rem;
}

.discord-bot-badge {
    background: #5865f2;
    color: #ffffff;
    font-size: 0.65rem;
    font-weight: 700;
    padding: 1px 4px;
    border-radius: 3px;
    letter-spacing: 0.5px;
}

.discord-timestamp {
    color: #949ba4;
    font-size: 0.72rem;
}

.discord-message-text {
    color: #dbdee1;
    font-size: 0.92rem;
    margin-bottom: 8px;
    word-break: break-word;
}

.discord-embed-card {
    background: #2b2d31;
    border-left: 4px solid #d4af37;
    border-radius: 4px;
    padding: 12px 16px;
    max-width: 520px;
    display: flex;
    gap: 16px;
}

.embed-main-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.embed-author-line {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    font-weight: 600;
    color: #ffffff;
}

.embed-author-icon {
    width: 22px;
    height: 22px;
    border-radius: 50%;
    object-fit: cover;
}

.embed-title {
    font-size: 1rem;
    font-weight: 700;
    color: #ffffff;
    line-height: 1.3;
}

.embed-desc {
    font-size: 0.88rem;
    color: #dbdee1;
    line-height: 1.4;
    white-space: pre-wrap;
    word-break: break-word;
}

.embed-fields-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-top: 4px;
}

.discord-field-item {
    font-size: 0.85rem;
}

.discord-field-item.full-width {
    grid-column: 1 / -1;
}

.discord-field-name {
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 2px;
}

.discord-field-val {
    color: #dbdee1;
    white-space: pre-wrap;
}

.embed-image-box {
    margin-top: 8px;
    border-radius: 4px;
    overflow: hidden;
    max-width: 100%;
}

.embed-main-image {
    max-width: 100%;
    max-height: 280px;
    border-radius: 4px;
    display: block;
}

.embed-thumb-box {
    flex-shrink: 0;
}

.embed-thumb-img {
    width: 80px;
    height: 80px;
    border-radius: 4px;
    object-fit: cover;
}

.embed-footer-line {
    display: flex;
    align-items: center;
    gap: 6px;
    margin-top: 6px;
    font-size: 0.72rem;
    color: #949ba4;
}

.embed-footer-icon {
    width: 18px;
    height: 18px;
    border-radius: 50%;
    object-fit: cover;
}

/* --- BANQUE ROYALE & TRÉSORERIE --- */
.treasury-kpi-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 18px;
    margin-bottom: 24px;
}

.kpi-card {
    background: var(--bg-card);
    backdrop-filter: blur(14px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    position: relative;
    box-shadow: var(--shadow-soft);
}

.kpi-card.gold-glow {
    border-color: rgba(229, 184, 66, 0.4);
    box-shadow: 0 0 25px rgba(229, 184, 66, 0.15);
}

.kpi-icon {
    font-size: 1.8rem;
    margin-bottom: 4px;
}

.kpi-label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.kpi-val {
    font-size: 1.8rem;
    font-weight: 800;
    font-family: var(--font-heading);
    color: var(--text-primary);
    margin: 2px 0;
}

.kpi-sub {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.treasury-dual-layout {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 24px;
}

@media (max-width: 992px) {
    .treasury-dual-layout {
        grid-template-columns: 1fr;
    }
}

.treasury-adjust-card, .treasury-richest-card {
    background: var(--bg-card);
    backdrop-filter: blur(14px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
}

.royal-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 12px;
}

.royal-table th {
    background: rgba(0, 0, 0, 0.4);
    color: var(--gold-bright);
    font-size: 0.8rem;
    text-transform: uppercase;
    padding: 10px 12px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.royal-table td {
    padding: 10px 12px;
    font-size: 0.88rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.royal-table tr:hover td {
    background: rgba(255, 255, 255, 0.03);
}

/* --- CONFIGURATION DU ROYAUME --- */
.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
    gap: 20px;
}

.settings-card {
    background: var(--bg-card);
    backdrop-filter: blur(14px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.settings-save-card {
    grid-column: 1 / -1;
    background: linear-gradient(135deg, rgba(229, 184, 66, 0.1), rgba(0, 0, 0, 0.5));
    border-color: var(--gold-primary);
}

/* --- HUB D'OUTILS & LIENS EXTERNES --- */
.tools-hub-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 20px;
}

.tool-hub-card {
    background: var(--bg-card);
    backdrop-filter: blur(14px);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    display: flex;
    gap: 18px;
    text-decoration: none;
    color: inherit;
    transition: all 0.25s ease;
}

.tool-hub-card:hover {
    transform: translateY(-4px);
    border-color: var(--gold-primary);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5), 0 0 20px rgba(229, 184, 66, 0.2);
}

.tool-card-icon {
    font-size: 2.5rem;
    flex-shrink: 0;
}

.tool-card-body {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.tool-card-badge {
    font-size: 0.68rem;
    font-weight: 700;
    text-transform: uppercase;
    padding: 2px 8px;
    border-radius: 12px;
    display: inline-block;
    width: fit-content;
}

.tool-card-badge.official { background: rgba(88, 101, 242, 0.2); color: #818cf8; }
.tool-card-badge.oci { background: rgba(234, 88, 12, 0.2); color: #fb923c; }
.tool-card-badge.status { background: rgba(34, 197, 94, 0.2); color: #4ade80; }
.tool-card-badge.media { background: rgba(236, 72, 153, 0.2); color: #f472b6; }
.tool-card-badge.secure { background: rgba(229, 184, 66, 0.2); color: var(--gold-bright); }

.tool-card-body h3 {
    font-size: 1.1rem;
    font-family: var(--font-heading);
    margin: 2px 0;
    color: var(--text-primary);
}

.tool-card-body p {
    font-size: 0.82rem;
    color: var(--text-secondary);
    line-height: 1.4;
}

.tool-card-link {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--gold-bright);
    margin-top: 4px;
}

/* Modales d'administration */
.member-detail-card {
    max-width: 650px;
}

.sanction-card {
    max-width: 480px;
}

.sanction-target-desc {
    background: rgba(0, 0, 0, 0.3);
    padding: 10px 14px;
    border-radius: 6px;
    border-left: 3px solid var(--gold-primary);
    font-size: 0.88rem;
    margin-bottom: 14px;
}

.toolbar-filters-row {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
    margin-top: 14px;
}

.toolbar-filters-row .filter-group {
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.toolbar-filters-row .filter-group label {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 600;
}

/* ==================== NOTIFICATIONS TOAST ROYALES ==================== */
.royal-toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: #151824;
    border: 1px solid var(--gold-primary);
    color: #fff;
    padding: 12px 22px;
    border-radius: 10px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.7), 0 0 15px rgba(212, 175, 55, 0.3);
    font-size: 0.92rem;
    font-weight: 600;
    font-family: var(--font-body);
    z-index: 10000;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease;
    pointer-events: none;
}

.royal-toast.show {
    opacity: 1;
    transform: translateY(0);
}

.royal-toast.success {
    border-color: var(--green-light);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.7), 0 0 15px rgba(46, 196, 182, 0.3);
}

.royal-toast.error {
    border-color: var(--crimson);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.7), 0 0 15px rgba(230, 57, 70, 0.3);
}

/* ========================================================
   SECTION FIEF & TRAVAIL : ÉCONOMIE FÉODALE (LABEUR, MINES, BANQUE, CHAPELLE)
   ======================================================== */

.feudal-wallet-bar {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 14px;
    margin-bottom: 24px;
}

.feudal-wallet-pill {
    background: rgba(18, 20, 29, 0.88);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 14px 18px;
    display: flex;
    align-items: center;
    gap: 14px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
    transition: all 0.2s ease;
}

.feudal-wallet-pill:hover {
    border-color: var(--gold-primary);
    transform: translateY(-2px);
}

.feudal-wallet-pill.highlight-gold {
    background: linear-gradient(135deg, rgba(201, 168, 78, 0.15), rgba(18, 20, 29, 0.95));
    border-color: var(--gold-primary);
}

.feudal-wallet-pill .wallet-icon {
    font-size: 1.8rem;
}

.feudal-wallet-pill .wallet-info {
    display: flex;
    flex-direction: column;
}

.feudal-wallet-pill .wallet-label {
    font-size: 0.75rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.feudal-wallet-pill .wallet-val {
    font-size: 1.25rem;
    font-weight: 700;
    font-family: var(--font-heading);
    color: var(--text-primary);
}

.feudal-stations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(360px, 1fr));
    gap: 20px;
}

.feudal-station-card {
    background: rgba(18, 20, 29, 0.92);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 22px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
    position: relative;
    overflow: hidden;
    transition: all 0.25s ease;
}

.feudal-station-card:hover {
    border-color: var(--gold-primary);
    box-shadow: 0 10px 30px rgba(201, 168, 78, 0.2);
}

.station-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 16px;
    border-bottom: 1px solid rgba(201, 168, 78, 0.15);
    padding-bottom: 14px;
}

.station-icon-wrap {
    font-size: 2rem;
    width: 52px;
    height: 52px;
    background: rgba(201, 168, 78, 0.12);
    border: 1px solid rgba(201, 168, 78, 0.3);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.station-title-box h3 {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    color: var(--gold-bright);
    margin: 0;
}

.station-title-box .station-sub {
    font-size: 0.78rem;
    color: var(--text-secondary);
}

.station-body {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 14px;
    margin-bottom: 18px;
}

.station-flavor-box {
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-left: 3px solid var(--gold-primary);
    border-radius: 8px;
    padding: 12px;
}

.flavor-job-badge {
    display: inline-block;
    font-size: 0.75rem;
    font-weight: 700;
    color: var(--gold-bright);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.flavor-job-desc {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.4;
    margin: 0;
}

.station-specs {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.spec-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.station-footer {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.cooldown-timer-box {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    background: rgba(239, 68, 68, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.3);
    border-radius: 6px;
    padding: 8px;
    font-size: 0.85rem;
    color: #fca5a5;
    font-weight: 600;
}

.btn-station-action {
    padding: 12px;
    font-size: 0.95rem;
    font-weight: 700;
    font-family: var(--font-heading);
}

/* --- BANQUE ROYALE DANS LE FIEF --- */
.bank-tabs {
    display: flex;
    gap: 8px;
    background: rgba(0, 0, 0, 0.3);
    padding: 4px;
    border-radius: 8px;
}

.bank-tab-btn {
    flex: 1;
    padding: 8px;
    border: none;
    background: transparent;
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.85rem;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.bank-tab-btn.active {
    background: var(--gold-primary);
    color: #0c0d12;
    font-weight: 700;
}

.bank-form-body {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.bank-input-group {
    display: flex;
    gap: 8px;
}

.bank-input-group .form-input {
    flex: 1;
}

.quick-amounts-row {
    display: flex;
    gap: 6px;
}

.quick-bank-chip {
    flex: 1;
    padding: 6px 4px;
    font-size: 0.72rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    color: var(--text-secondary);
    cursor: pointer;
    text-align: center;
    transition: all 0.15s ease;
}

.quick-bank-chip:hover {
    background: rgba(201, 168, 78, 0.2);
    color: var(--gold-bright);
    border-color: var(--gold-primary);
}

/* --- CHAPELLE & FOYER CONJUGAL --- */
.chapel-married-box {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.married-partner-card {
    display: flex;
    align-items: center;
    gap: 14px;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(201, 168, 78, 0.3);
    border-radius: 10px;
    padding: 12px;
}

.partner-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid var(--gold-primary);
}

.partner-info {
    flex: 1;
}

.partner-badge {
    font-size: 0.7rem;
    color: var(--gold-bright);
    font-weight: 700;
    text-transform: uppercase;
    display: block;
}

.partner-info h4 {
    margin: 2px 0;
    font-size: 1rem;
    color: var(--text-primary);
}

.partner-sub {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

.couple-vault-card {
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(201, 168, 78, 0.2);
    border-radius: 10px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.couple-vault-card .vault-header {
    display: flex;
    align-items: center;
    gap: 10px;
}

.couple-vault-card .vault-icon {
    font-size: 1.5rem;
}

.couple-vault-card .vault-label {
    font-size: 0.72rem;
    color: var(--text-secondary);
    text-transform: uppercase;
}

.couple-vault-card .vault-val {
    margin: 0;
    font-size: 1.2rem;
    font-family: var(--font-heading);
}

.couple-bank-actions {
    display: flex;
    gap: 6px;
}

.couple-bank-actions .form-input-sm {
    flex: 1;
    padding: 6px 8px;
    font-size: 0.8rem;
}

.chapel-single-box {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 10px;
}

.single-crest {
    font-size: 2.2rem;
}

.chapel-single-box h4 {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    color: var(--gold-bright);
    margin: 0;
}

.chapel-intro {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.4;
    margin: 0;
}

.chapel-form-group {
    width: 100%;
    text-align: left;
    margin-top: 6px;
}

.chapel-form-group label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    display: block;
    margin-bottom: 4px;
}

.chapel-ring-note {
    font-size: 0.8rem;
    font-weight: 600;
    margin: 4px 0 8px 0;
}

/* ========================================================
   SECTION BOUTIQUE ROYALE COMPLETE & CRYPTE DES RELIQUES
   ======================================================== */

.shop-wallet-banner {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    background: rgba(18, 20, 28, 0.9);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 12px 18px;
    margin-bottom: 20px;
    align-items: center;
}

.shop-balance-pill {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.9rem;
    color: var(--text-secondary);
    padding: 4px 10px;
    background: rgba(0, 0, 0, 0.25);
    border-radius: 6px;
}

.shop-balance-pill strong {
    color: var(--gold-bright);
    font-family: var(--font-heading);
    font-size: 1.05rem;
}

.shop-balance-pill.highlight-gold {
    border: 1px solid rgba(201, 168, 78, 0.35);
    background: rgba(201, 168, 78, 0.1);
}

.unopened-shelf-box {
    background: linear-gradient(135deg, rgba(30, 24, 16, 0.9), rgba(18, 20, 28, 0.95));
    border: 1px solid var(--gold-primary);
    border-radius: var(--radius-md);
    padding: 16px 20px;
    margin-bottom: 24px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.shelf-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 14px;
}

.shelf-header h3 {
    font-family: var(--font-heading);
    font-size: 1.05rem;
    color: var(--gold-bright);
    margin: 0;
}

.shelf-hint {
    font-size: 0.78rem;
    color: var(--text-secondary);
}

.unopened-shelf-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 12px;
}

.unopened-pack-card {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(201, 168, 78, 0.3);
    border-radius: 8px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 6px;
    transition: all 0.2s ease;
}

.unopened-pack-card:hover {
    border-color: var(--gold-bright);
    transform: translateY(-2px);
}

.unopened-pack-badge {
    font-size: 1.4rem;
    font-weight: 700;
}

.unopened-pack-card h4 {
    font-size: 0.9rem;
    margin: 0;
    color: var(--text-primary);
}

.unopened-pack-sub {
    font-size: 0.72rem;
    color: var(--gold-bright);
    margin-bottom: 4px;
}

.shop-category-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 22px;
}

.shop-catalog-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
    gap: 18px;
    margin-bottom: 30px;
}

.shop-item-card {
    background: rgba(18, 20, 28, 0.92);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 18px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    transition: all 0.25s ease;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

.shop-item-card:hover {
    border-color: var(--gold-primary);
    transform: translateY(-3px);
    box-shadow: 0 8px 26px rgba(201, 168, 78, 0.2);
}

.shop-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.shop-item-icon {
    font-size: 2rem;
    width: 48px;
    height: 48px;
    background: rgba(201, 168, 78, 0.1);
    border: 1px solid rgba(201, 168, 78, 0.25);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.shop-cat-pill {
    font-size: 0.72rem;
    font-weight: 600;
    background: rgba(255, 255, 255, 0.06);
    padding: 3px 10px;
    border-radius: 12px;
    color: var(--text-secondary);
}

.shop-item-body {
    flex: 1;
    margin-bottom: 14px;
}

.shop-item-body h4 {
    font-family: var(--font-heading);
    font-size: 1.05rem;
    color: var(--text-primary);
    margin: 0 0 6px 0;
}

.shop-item-desc {
    font-size: 0.82rem;
    color: var(--text-secondary);
    line-height: 1.4;
    margin: 0;
}

.shop-item-footer {
    display: flex;
    flex-direction: column;
    gap: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    padding-top: 12px;
}

.shop-item-price {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.shop-item-price strong {
    font-size: 1.1rem;
    color: var(--gold-bright);
    font-family: var(--font-heading);
}

/* --- MODAL POPUP : DÉBALLAGE IMMÉDIAT DU PACK ACHETÉ --- */
.instant-unbox-dialog {
    max-width: 460px;
    text-align: center;
    padding: 30px 24px;
    border: 2px solid var(--gold-primary);
    background: linear-gradient(135deg, rgba(28, 22, 16, 0.98), rgba(16, 18, 26, 0.98));
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.8), 0 0 25px rgba(201, 168, 78, 0.3);
}

.instant-crest {
    font-size: 3rem;
    margin-bottom: 10px;
    animation: bounce 1.5s infinite;
}

.instant-unbox-dialog h2 {
    font-family: var(--font-heading);
    color: var(--gold-bright);
    font-size: 1.4rem;
    margin-bottom: 10px;
}

.instant-unbox-dialog p {
    font-size: 0.92rem;
    color: var(--text-secondary);
    line-height: 1.5;
    margin-bottom: 22px;
}

.instant-unbox-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.btn-glow {
    box-shadow: 0 0 18px rgba(201, 168, 78, 0.5);
    font-weight: 700;
    font-family: var(--font-heading);
}

.btn-glow:hover {
    box-shadow: 0 0 26px rgba(201, 168, 78, 0.8);
    transform: scale(1.02);
}

/* ==================== GUICHET BANQUE ROYALE & COFFRE DE COUPLE ==================== */
.bank-account-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 14px;
}

.bank-acc-tab {
    flex: 1;
    background: rgba(22, 25, 37, 0.7);
    border: 1px solid rgba(212, 175, 55, 0.25);
    color: var(--text-secondary);
    font-family: var(--font-heading);
    font-size: 0.82rem;
    font-weight: 600;
    padding: 8px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.25s ease;
    text-align: center;
}

.bank-acc-tab:hover {
    background: rgba(212, 175, 55, 0.15);
    color: var(--gold-bright);
    border-color: rgba(212, 175, 55, 0.4);
}

.bank-acc-tab.active {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.25), rgba(154, 114, 24, 0.35));
    border-color: var(--gold-bright);
    color: var(--gold-bright);
    box-shadow: 0 0 12px rgba(212, 175, 55, 0.2);
}

.bank-balance-card {
    background: rgba(10, 12, 18, 0.75);
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: 8px;
    padding: 10px 14px;
    margin-bottom: 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.bank-balance-label {
    font-family: var(--font-heading);
    font-size: 0.82rem;
    color: var(--text-muted);
}

.bank-balance-val {
    font-family: var(--font-heading);
    font-size: 1.15rem;
    color: var(--gold-bright);
    text-shadow: 0 0 8px rgba(212, 175, 55, 0.4);
}

.couple-bank-notice {
    background: rgba(235, 69, 158, 0.08);
    border: 1px solid rgba(235, 69, 158, 0.25);
    color: #ff9ec0;
    font-size: 0.82rem;
    padding: 8px 12px;
    border-radius: 6px;
    margin-bottom: 14px;
    line-height: 1.4;
}

.couple-bank-notice.married-info {
    background: rgba(212, 175, 55, 0.1);
    border-color: rgba(212, 175, 55, 0.35);
    color: var(--gold-bright);
}

/* ==================== TAVERNE JEUX ROYAUX (NAVIGATION) ==================== */
.tavern-games-nav {
    display: flex;
    gap: 12px;
    background: rgba(14, 16, 24, 0.85);
    border: 1px solid rgba(212, 175, 55, 0.25);
    border-radius: 12px;
    padding: 8px 12px;
    margin-bottom: 20px;
}

.tavern-game-btn {
    flex: 1;
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-secondary);
    font-family: var(--font-heading);
    font-size: 0.95rem;
    font-weight: 700;
    padding: 10px 16px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.25s ease;
    text-align: center;
    letter-spacing: 0.5px;
}

.tavern-game-btn:hover {
    color: var(--gold-bright);
    background: rgba(212, 175, 55, 0.1);
}

.tavern-game-btn.active {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.25), rgba(138, 98, 14, 0.35));
    border-color: var(--gold-bright);
    color: var(--gold-bright);
    box-shadow: 0 0 16px rgba(212, 175, 55, 0.25);
}

.tavern-game-panel {
    display: none;
    width: 100%;
}

.tavern-game-panel.active {
    display: block;
    animation: fadeIn 0.3s ease-out;
}

/* ==================== PILE OU FACE FÉODAL (COINFLIP) ==================== */
.coinflip-felt {
    background: radial-gradient(circle at center, #1b263b 0%, #0d131f 70%, #06090e 100%);
    border: 2px solid rgba(212, 175, 55, 0.35);
    box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.8), 0 8px 32px rgba(0, 0, 0, 0.6);
}

.coinflip-arena {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 20px 30px 20px;
    gap: 16px;
}

.coin-3d-stage {
    position: relative;
    width: 200px;
    height: 250px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    padding-bottom: 20px;
    overflow: visible;
}

.coin-3d-wrapper {
    perspective: 1200px;
    width: 130px;
    height: 130px;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

.medieval-coin {
    width: 124px;
    height: 124px;
    position: relative;
    transform-style: preserve-3d;
    border-radius: 50%;
    cursor: pointer;
    transform: translateY(0px) rotateY(0deg) rotateX(12deg);
    transition: transform 0.4s ease;
    filter: drop-shadow(0 6px 12px rgba(0, 0, 0, 0.5));
}

.medieval-coin.spinning {
    animation: coinTossPhysics 1.6s cubic-bezier(0.2, 0.8, 0.35, 1) forwards;
}

@keyframes coinTossPhysics {
    0% {
        transform: translateY(0px) rotateY(0deg) rotateX(12deg) scale(1);
    }
    18% {
        transform: translateY(-130px) rotateY(720deg) rotateX(6deg) scale(1.22);
    }
    40% {
        transform: translateY(-175px) rotateY(1440deg) rotateX(0deg) scale(1.35);
    }
    68% {
        transform: translateY(-60px) rotateY(2160deg) rotateX(-5deg) scale(1.15);
    }
    85% {
        transform: translateY(0px) rotateY(var(--target-spin, 2520deg)) rotateX(0deg) scale(1);
    }
    90% {
        transform: translateY(-18px) rotateY(var(--target-spin, 2520deg)) rotateX(-6deg) scale(1.04);
    }
    95% {
        transform: translateY(0px) rotateY(var(--target-spin, 2520deg)) rotateX(3deg) scale(1);
    }
    100% {
        transform: translateY(0px) rotateY(var(--target-spin, 2520deg)) rotateX(0deg) scale(1);
    }
}

.coin-floor-shadow {
    width: 100px;
    height: 16px;
    border-radius: 50%;
    background: radial-gradient(ellipse at center, rgba(0, 0, 0, 0.8) 0%, rgba(0, 0, 0, 0) 75%);
    margin-top: 10px;
    z-index: 1;
    transition: all 0.3s ease;
}

.coin-floor-shadow.spinning {
    animation: coinShadowToss 1.6s cubic-bezier(0.2, 0.8, 0.35, 1) forwards;
}

@keyframes coinShadowToss {
    0% {
        transform: scale(1);
        opacity: 0.85;
        filter: blur(2px);
    }
    40% {
        transform: scale(0.32);
        opacity: 0.12;
        filter: blur(12px);
    }
    85% {
        transform: scale(1);
        opacity: 0.85;
        filter: blur(2px);
    }
    90% {
        transform: scale(0.78);
        opacity: 0.5;
        filter: blur(5px);
    }
    95% {
        transform: scale(1);
        opacity: 0.85;
        filter: blur(2px);
    }
    100% {
        transform: scale(1);
        opacity: 0.85;
        filter: blur(2px);
    }
}

.coin-face {
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    backface-visibility: hidden;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    border: 5px double #ffe066;
    box-shadow: 0 0 24px rgba(255, 215, 0, 0.45), inset 0 0 16px rgba(0, 0, 0, 0.7);
    user-select: none;
}

.coin-front {
    background: radial-gradient(circle at 35% 35%, #fff2a3 0%, #f9d71c 30%, #d4af37 65%, #805300 100%);
    color: #2b1800;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.4);
}

.coin-back {
    background: radial-gradient(circle at 35% 35%, #ffb48a 0%, #e65c00 35%, #992200 70%, #520000 100%);
    color: #fff;
    transform: rotateY(180deg);
    border-color: #ffaa66;
    box-shadow: 0 0 24px rgba(255, 120, 50, 0.4), inset 0 0 16px rgba(0, 0, 0, 0.7);
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.7);
}

.coin-crest {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 900;
    letter-spacing: 1px;
}

.coin-legend {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 2px;
    opacity: 0.85;
}

.coinflip-choice-selector {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.selector-label {
    font-family: var(--font-heading);
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.coin-choice-buttons {
    display: flex;
    gap: 16px;
}

.coin-side-btn {
    background: rgba(20, 24, 36, 0.9);
    border: 2px solid rgba(212, 175, 55, 0.3);
    color: var(--text-primary);
    font-family: var(--font-heading);
    font-size: 0.92rem;
    font-weight: 700;
    padding: 10px 22px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.25s ease;
}

.coin-side-btn:hover {
    border-color: var(--gold-bright);
    background: rgba(212, 175, 55, 0.15);
    color: var(--gold-bright);
}

.coin-side-btn.active {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.35), rgba(138, 98, 14, 0.45));
    border-color: var(--gold-bright);
    color: var(--gold-bright);
    box-shadow: 0 0 16px rgba(212, 175, 55, 0.3);
    transform: scale(1.04);
}

.coinflip-outcome-banner {
    padding: 12px 24px;
    border-radius: 8px;
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 700;
    text-align: center;
    animation: fadeIn 0.3s ease-out;
}

.coinflip-outcome-banner.win {
    background: rgba(46, 204, 113, 0.15);
    border: 1px solid rgba(46, 204, 113, 0.5);
    color: #2ecc71;
    box-shadow: 0 0 20px rgba(46, 204, 113, 0.2);
}

.coinflip-outcome-banner.loss {
    background: rgba(231, 76, 60, 0.15);
    border: 1px solid rgba(231, 76, 60, 0.5);
    color: #e74c3c;
    box-shadow: 0 0 20px rgba(231, 76, 60, 0.2);
}

/* ==================== CHIFOUMI ROYAL (RPS) ==================== */
.rps-felt {
    background: radial-gradient(circle at center, #24141e 0%, #160c13 70%, #0b050a 100%);
    border: 2px solid rgba(235, 69, 158, 0.35);
    box-shadow: inset 0 0 40px rgba(0, 0, 0, 0.8), 0 8px 32px rgba(0, 0, 0, 0.6);
}

.rps-arena {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 24px 20px;
    gap: 22px;
}

.rps-duel-display {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 24px;
    width: 100%;
    max-width: 650px;
}

.rps-fighter-card {
    flex: 1;
    background: rgba(18, 20, 30, 0.85);
    border: 2px solid rgba(212, 175, 55, 0.35);
    border-radius: 12px;
    padding: 16px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
    transition: all 0.3s ease;
}

.rps-fighter-card.guard-fighter {
    border-color: rgba(231, 76, 60, 0.4);
}

.fighter-title {
    font-family: var(--font-heading);
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.rps-symbol-box {
    width: 110px;
    height: 110px;
    border-radius: 10px;
    background: rgba(10, 12, 18, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
    text-align: center;
}

.rps-symbol-name {
    font-family: var(--font-heading);
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--gold-bright);
}

.rps-vs-divider {
    display: flex;
    align-items: center;
    justify-content: center;
}

.vs-text {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 900;
    color: #ff5577;
    background: rgba(220, 20, 60, 0.15);
    border: 1px solid rgba(220, 20, 60, 0.4);
    padding: 6px 14px;
    border-radius: 20px;
    letter-spacing: 1.5px;
    box-shadow: 0 0 12px rgba(220, 20, 60, 0.3);
}

.rps-choice-selector {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    width: 100%;
}

.rps-choice-cards {
    display: flex;
    gap: 14px;
    flex-wrap: wrap;
    justify-content: center;
}

.rps-card-btn {
    background: rgba(20, 24, 36, 0.9);
    border: 2px solid rgba(212, 175, 55, 0.3);
    color: var(--text-primary);
    font-family: var(--font-heading);
    font-size: 0.88rem;
    font-weight: 700;
    padding: 10px 18px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.25s ease;
}

.rps-card-btn:hover {
    border-color: var(--gold-bright);
    background: rgba(212, 175, 55, 0.15);
    color: var(--gold-bright);
    transform: translateY(-2px);
}

.rps-card-btn.active {
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.35), rgba(138, 98, 14, 0.45));
    border-color: var(--gold-bright);
    color: var(--gold-bright);
    box-shadow: 0 0 16px rgba(212, 175, 55, 0.35);
    transform: scale(1.03);
}

.rps-outcome-banner {
    padding: 12px 24px;
    border-radius: 8px;
    font-family: var(--font-heading);
    font-size: 1.05rem;
    font-weight: 700;
    text-align: center;
    animation: fadeIn 0.3s ease-out;
}

.rps-outcome-banner.win {
    background: rgba(46, 204, 113, 0.15);
    border: 1px solid rgba(46, 204, 113, 0.5);
    color: #2ecc71;
    box-shadow: 0 0 20px rgba(46, 204, 113, 0.2);
}

.rps-outcome-banner.loss {
    background: rgba(231, 76, 60, 0.15);
    border: 1px solid rgba(231, 76, 60, 0.5);
    color: #e74c3c;
    box-shadow: 0 0 20px rgba(231, 76, 60, 0.2);
}

.rps-outcome-banner.tie {
    background: rgba(52, 152, 219, 0.15);
    border: 1px solid rgba(52, 152, 219, 0.5);
    color: #3498db;
    box-shadow: 0 0 20px rgba(52, 152, 219, 0.2);
}

.falling-coin-particle {
    position: fixed;
    z-index: 9999;
    font-size: 1.6rem;
    pointer-events: none;
    animation: coinFall 1.8s linear forwards;
    filter: drop-shadow(0 0 6px rgba(255, 215, 0, 0.6));
}

@keyframes coinFall {
    0% { transform: translateY(0) rotate(0deg); opacity: 1; }
    80% { opacity: 0.9; }
    100% { transform: translateY(105vh) rotate(720deg); opacity: 0; }
}

/* ==================== QG & CASERNE MILITAIRE ==================== */
.caserne-atelier-nav {
    display: flex;
    gap: 10px;
    margin-bottom: 24px;
    flex-wrap: wrap;
    background: rgba(11, 13, 20, 0.6);
    padding: 8px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
}
.caserne-nav-btn {
    background: transparent;
    border: 1px solid transparent;
    color: var(--text-secondary);
    padding: 10px 18px;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-family: var(--font-heading);
    font-size: 0.92rem;
    font-weight: 600;
    transition: all 0.2s ease;
}
.caserne-nav-btn:hover {
    color: var(--gold-bright);
    background: rgba(212, 175, 55, 0.08);
}
.caserne-nav-btn.active {
    background: var(--gold-gradient);
    color: #0b0d14;
    font-weight: 700;
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.25);
}

.atelier-panel.hidden { display: none; }
.atelier-panel.active { display: block; animation: fadeIn 0.3s ease; }

/* Profil Showcase (Lecture Seule) */
.profile-showcase-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 24px;
}
.showcase-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
    margin-bottom: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding-bottom: 16px;
}
.profile-trio-showcase {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 18px;
    margin-bottom: 20px;
}
.showcase-unit-card {
    background: rgba(11, 13, 20, 0.7);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: transform 0.2s ease, border-color 0.2s ease;
}
.showcase-unit-card:hover {
    transform: translateY(-2px);
    border-color: var(--gold-primary);
}
.showcase-unit-img-box {
    position: relative;
    width: 100%;
    height: 180px;
    border-radius: var(--radius-sm);
    overflow: hidden;
    background: #000;
}
.showcase-unit-img-box img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}
.showcase-role-tag {
    position: absolute;
    top: 8px;
    left: 8px;
    background: rgba(0, 0, 0, 0.75);
    color: var(--gold-bright);
    font-size: 0.75rem;
    padding: 2px 8px;
    border-radius: 4px;
    border: 1px solid rgba(212, 175, 55, 0.4);
    font-weight: 700;
}
.showcase-stats-row {
    display: flex;
    justify-content: space-around;
    background: rgba(0, 0, 0, 0.4);
    padding: 8px;
    border-radius: 6px;
    font-size: 0.85rem;
}
.showcase-gear-badges {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    font-size: 0.78rem;
}

/* Faction Synergies Banner */
.faction-synergy-banner {
    display: flex;
    align-items: center;
    gap: 16px;
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.12), rgba(11, 13, 20, 0.8));
    border: 1px solid var(--gold-primary);
    border-radius: var(--radius-md);
    padding: 14px 18px;
}
.synergy-badge-icon {
    font-size: 2rem;
}

/* ==================== CASIER MILITAIRE & EXPLOITS DE GUERRE ==================== */
.profile-military-record {
    background: linear-gradient(145deg, rgba(16, 20, 32, 0.92), rgba(9, 11, 18, 0.98));
    border: 1px solid rgba(212, 175, 55, 0.28);
    border-radius: var(--radius-lg);
    padding: 24px;
    box-shadow: 0 12px 36px rgba(0, 0, 0, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.06);
    margin-top: 24px;
    position: relative;
    overflow: hidden;
}
.profile-military-record::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--gold-bright), #e67e22, transparent);
}
.military-record-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 20px;
    padding-bottom: 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.mil-section-badge {
    display: inline-block;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    color: var(--gold-bright);
    margin-bottom: 4px;
}
.military-record-header h3 {
    font-family: var(--font-cinzel);
    font-size: 1.35rem;
    color: #fff;
    margin: 0;
    letter-spacing: 0.5px;
}
.mil-record-motto {
    font-style: italic;
    font-size: 0.88rem;
    color: var(--text-muted);
}
.military-stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
}
@media (max-width: 1024px) {
    .military-stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
@media (max-width: 600px) {
    .military-stats-grid {
        grid-template-columns: 1fr;
    }
}
.mil-stat-card {
    background: rgba(13, 16, 26, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.07);
    border-radius: var(--radius-md);
    padding: 18px 16px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    position: relative;
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
    backdrop-filter: blur(8px);
}
.mil-stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 28px rgba(0, 0, 0, 0.4);
}
.mil-card-dungeon {
    border-top: 3px solid #8e44ad;
}
.mil-card-dungeon:hover {
    border-color: #9b59b6;
    box-shadow: 0 12px 30px rgba(142, 68, 173, 0.25);
}
.mil-card-boss {
    border-top: 3px solid #c0392b;
}
.mil-card-boss:hover {
    border-color: #e74c3c;
    box-shadow: 0 12px 30px rgba(192, 57, 43, 0.25);
}
.mil-card-cards {
    border-top: 3px solid #27ae60;
}
.mil-card-cards:hover {
    border-color: #2ecc71;
    box-shadow: 0 12px 30px rgba(39, 174, 96, 0.25);
}
.mil-card-gear {
    border-top: 3px solid #d4af37;
}
.mil-card-gear:hover {
    border-color: #f1c40f;
    box-shadow: 0 12px 30px rgba(212, 175, 55, 0.25);
}
.mil-stat-top {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.mil-icon-box {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
}
.mil-card-dungeon .mil-icon-box {
    background: rgba(142, 68, 173, 0.15);
    border-color: rgba(142, 68, 173, 0.35);
}
.mil-card-boss .mil-icon-box {
    background: rgba(192, 57, 43, 0.15);
    border-color: rgba(192, 57, 43, 0.35);
}
.mil-card-cards .mil-icon-box {
    background: rgba(39, 174, 96, 0.15);
    border-color: rgba(39, 174, 96, 0.35);
}
.mil-card-gear .mil-icon-box {
    background: rgba(212, 175, 55, 0.15);
    border-color: rgba(212, 175, 55, 0.35);
}
.mil-badge-pill {
    font-size: 0.72rem;
    padding: 3px 8px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-muted);
    font-weight: 600;
}
.mil-stat-body {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.mil-stat-label {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}
.mil-stat-val {
    font-family: var(--font-cinzel);
    font-size: 1.85rem;
    font-weight: 800;
    color: #fff;
    line-height: 1.1;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.5);
}
.mil-stat-footer {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-top: auto;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}
.mil-mini-track {
    width: 100%;
    height: 6px;
    background: rgba(0, 0, 0, 0.5);
    border-radius: 3px;
    overflow: hidden;
    position: relative;
}
.mil-mini-fill {
    height: 100%;
    border-radius: 3px;
    transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}
.mil-mini-fill.dungeon-fill {
    background: linear-gradient(90deg, #8e44ad, #bb86fc);
}
.mil-mini-fill.boss-fill {
    background: linear-gradient(90deg, #c0392b, #ff7675);
}
.mil-mini-fill.cards-fill {
    background: linear-gradient(90deg, #27ae60, #55efc4);
}
.mil-mini-fill.gear-fill {
    background: linear-gradient(90deg, #d4af37, #ffeaa7);
}
.mil-sub-txt {
    font-size: 0.76rem;
    color: var(--text-muted);
    font-family: var(--font-mono, monospace);
}

/* Arène Deployed Trio Banner */
.arena-team-deployed-banner {
    background: linear-gradient(180deg, rgba(20, 24, 38, 0.9), rgba(11, 13, 20, 0.95));
    border: 1px solid var(--gold-border);
    border-radius: var(--radius-lg);
    padding: 20px;
    margin-bottom: 24px;
}
.arena-team-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 16px;
}
.arena-team-badge {
    color: var(--gold-bright);
    font-size: 0.75rem;
    letter-spacing: 1px;
    font-weight: 700;
}
.arena-deployed-cards-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}
.arena-deployed-card {
    display: flex;
    align-items: center;
    gap: 14px;
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-md);
    padding: 12px;
}
.arena-deployed-card img {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    object-fit: cover;
    border: 1px solid var(--gold-primary);
}

/* Arène PvP Challenge Card */
.arena-pvp-card {
    background: linear-gradient(135deg, rgba(192, 57, 43, 0.1), rgba(11, 13, 20, 0.85));
    border: 1px solid rgba(192, 57, 43, 0.4);
    border-radius: var(--radius-lg);
    padding: 24px;
    margin-bottom: 24px;
}
.arena-pvp-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 18px;
}
.arena-pvp-header .pvp-crest {
    font-size: 2.2rem;
}
.arena-pvp-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
}
.pvp-input-col.full-width {
    grid-column: 1 / -1;
}
.pvp-submit-wrap {
    grid-column: 1 / -1;
    margin-top: 6px;
}

/* Forge & Fusion */
.forge-container-card, .fusion-container-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
}
.forge-content-layout {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 24px;
    margin-top: 20px;
}
@media (max-width: 900px) {
    .forge-content-layout { grid-template-columns: 1fr; }
}
.forge-gear-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
    gap: 12px;
}
.forge-gear-item {
    background: rgba(11, 13, 20, 0.6);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 12px;
    cursor: pointer;
    transition: all 0.2s ease;
}
.forge-gear-item:hover, .forge-gear-item.selected {
    border-color: var(--gold-bright);
    background: rgba(212, 175, 55, 0.1);
}
.forge-action-pane {
    background: rgba(11, 13, 20, 0.8);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}
.forge-stats-comparison {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin: 16px 0;
    background: rgba(0, 0, 0, 0.4);
    padding: 12px;
    border-radius: 8px;
}
.stat-compare-box.highlight { color: #2ecc71; font-weight: 700; }
.forge-cost-box {
    margin-bottom: 16px;
    font-size: 1.1rem;
    color: var(--gold-bright);
    text-align: center;
}
.fusion-candidates-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 16px;
    margin-top: 16px;
}
.fusion-candidate-card {
    background: rgba(11, 13, 20, 0.7);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.caserne-packs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
    margin-top: 20px;
}
.caserne-pack-card {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    padding: 24px;
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}
.caserne-pack-card .pack-card-crest { font-size: 3rem; }
.caserne-pack-card.highlight-gold { border-color: var(--gold-primary); }
.caserne-pack-card.highlight-mythic { border-color: #9b59b6; box-shadow: 0 0 20px rgba(155, 89, 182, 0.2); }
.pack-price-tag {
    font-size: 1.3rem;
    font-weight: 800;
    color: var(--gold-bright);
    margin: 8px 0;
}

/* Taverne : Poker de Dés (The Witcher) */
.dice-poker-felt, .passe-dix-felt {
    background: radial-gradient(circle at center, #1b3a24 0%, #0c1c11 100%);
    border: 2px solid #2d5a38;
}
.dice-section {
    background: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: var(--radius-md);
    padding: 16px;
    margin-bottom: 16px;
}
.dice-section-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    font-size: 0.9rem;
}
.dice-tray {
    display: flex;
    justify-content: center;
    gap: 14px;
}
.dice-box {
    width: 52px;
    height: 52px;
    background: #fdf6e2;
    color: #111;
    font-size: 1.8rem;
    font-weight: 900;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.5), inset 0 0 4px rgba(0, 0, 0, 0.2);
    cursor: pointer;
    user-select: none;
    transition: all 0.2s ease;
}
.dice-box.reroll-selected {
    outline: 3px solid #e74c3c;
    transform: translateY(-4px);
    box-shadow: 0 6px 14px rgba(231, 76, 60, 0.6);
}
.dice-reroll-hint {
    display: block;
    text-align: center;
    margin-top: 10px;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

/* Taverne : Passe-Dix (GoT) */
.passe-dix-arena {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 18px;
    padding: 24px 0;
}
.passedix-dice-row {
    display: flex;
    gap: 20px;
}
.dice-box-lg {
    width: 70px;
    height: 70px;
    background: #fdf6e2;
    color: #111;
    font-size: 2.4rem;
    font-weight: 900;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 14px;
    box-shadow: 0 6px 12px rgba(0, 0, 0, 0.6);
}
.passedix-choices-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
}
.passedix-choice-btn {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: var(--text-primary);
    padding: 10px 18px;
    border-radius: 8px;
    cursor: pointer;
    font-family: var(--font-heading);
    font-size: 0.9rem;
    transition: all 0.2s ease;
}
.passedix-choice-btn.active {
    background: var(--gold-gradient);
    color: #0b0d14;
    font-weight: 700;
    border-color: var(--gold-bright);
}
.passedix-choice-btn.highlight { border-color: #9b59b6; }
.passedix-choice-btn.highlight.active { background: #9b59b6; color: #fff; }

/* Taverne : Coinflip Mode Switch */
.coinflip-mode-selector {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-bottom: 20px;
}
.cf-mode-btn {
    background: rgba(0, 0, 0, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: var(--text-secondary);
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.88rem;
    transition: all 0.2s ease;
}
.cf-mode-btn.active {
    background: var(--gold-primary);
    color: #0b0d14;
    font-weight: 700;
}

/* Modal Factions */
.modal-subtitle-sm {
    color: var(--text-muted);
    font-size: 0.92rem;
    margin-bottom: 12px;
    line-height: 1.4;
}
.faction-modal-card {
    max-width: 780px;
    width: 95%;
}
.factions-modal-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 16px;
    margin-top: 14px;
}
.faction-opt-card {
    background: rgba(11, 13, 20, 0.85);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    position: relative;
}
.faction-opt-card.active-faction {
    border-color: var(--gold-primary);
    background: linear-gradient(135deg, rgba(212, 175, 55, 0.15), rgba(11, 13, 20, 0.9));
}
.faction-opt-header {
    display: flex;
    align-items: center;
    gap: 12px;
}
.faction-opt-header h4 {
    margin: 0;
    font-family: var(--font-heading);
    font-size: 1.15rem;
}
.faction-opt-motto {
    font-style: italic;
    font-size: 0.82rem;
    color: var(--text-secondary);
}
.faction-opt-synergies {
    background: rgba(0, 0, 0, 0.4);
    padding: 8px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

/* ==================== ROUE DU DESTIN DU GARDE (CHIFOUMI) ==================== */
.rps-wheel-container {
    position: relative;
    width: 170px;
    height: 170px;
    margin: 6px auto 10px auto;
    display: flex;
    align-items: center;
    justify-content: center;
}

.rps-wheel-needle {
    position: absolute;
    top: -8px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 1.4rem;
    color: var(--gold-bright);
    text-shadow: 0 0 10px rgba(255, 215, 0, 0.9), 0 2px 4px #000;
    z-index: 10;
    pointer-events: none;
    transition: transform 0.15s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.rps-wheel-needle.needle-tick {
    transform: translateX(-50%) rotate(-18deg);
}

.rps-wheel-canvas {
    width: 160px;
    height: 160px;
    border-radius: 50%;
    box-shadow: 0 0 15px rgba(0, 0, 0, 0.8), 0 0 10px rgba(212, 175, 55, 0.4);
    border: 3px solid #d4af37;
    background: #111;
    transform: rotate(0deg);
    transition: transform 0.05s linear;
}

.rps-wheel-hub {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: radial-gradient(circle, #f3d069 0%, #b8860b 70%, #5a4103 100%);
    border: 2px solid #fff;
    box-shadow: 0 0 8px rgba(0, 0, 0, 0.9);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    color: #fff;
    z-index: 5;
    pointer-events: none;
}

/* ==================== ROULETTE ROYALE DU GRAND CASINO ==================== */
.roulette-table-felt {
    background: radial-gradient(circle at center, #0f3d23 0%, #061c10 85%, #020b06 100%);
    border: 2px solid rgba(212, 175, 55, 0.4);
    box-shadow: inset 0 0 50px rgba(0, 0, 0, 0.8), 0 10px 30px rgba(0, 0, 0, 0.6);
    border-radius: var(--radius-lg);
    padding: 24px;
    position: relative;
    overflow: hidden;
}

.roulette-main-layout {
    display: grid;
    grid-template-columns: 360px 1fr;
    gap: 28px;
    align-items: start;
    margin: 20px 0;
}

@media (max-width: 1100px) {
    .roulette-main-layout {
        grid-template-columns: 1fr;
        justify-items: center;
    }
}

.roulette-wheel-column {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.roulette-wheel-stage {
    position: relative;
    width: 340px;
    height: 340px;
    border-radius: 50%;
    background: radial-gradient(circle, #2b1d0c 0%, #150e05 60%, #0a0602 100%);
    box-shadow: 0 0 35px rgba(0, 0, 0, 0.9), inset 0 0 25px rgba(0, 0, 0, 0.95), 0 0 0 6px #5a3d16, 0 0 0 10px #2a1c09, 0 0 20px rgba(212, 175, 55, 0.3);
    padding: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.roulette-wheel-bezel {
    position: relative;
    width: 320px;
    height: 320px;
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

#rouletteCanvas {
    width: 320px;
    height: 320px;
    border-radius: 50%;
    transform-origin: center center;
}

.roulette-center-turret {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: radial-gradient(circle, #ffe082 0%, #d4af37 50%, #8c6b12 85%, #423206 100%);
    border: 3px solid #fff;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.8), inset 0 2px 5px rgba(255, 255, 255, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 1.1rem;
    font-weight: bold;
    pointer-events: none;
    z-index: 10;
}

.roulette-stats-card {
    background: rgba(0, 0, 0, 0.55);
    border: 1px solid rgba(212, 175, 55, 0.3);
    border-radius: var(--radius-md);
    padding: 12px 18px;
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 8px;
    align-items: center;
}

.roulette-recent-title {
    font-family: var(--font-heading);
    font-size: 0.82rem;
    letter-spacing: 1px;
    color: var(--text-secondary);
    text-transform: uppercase;
}

.roulette-history-row {
    display: flex;
    gap: 8px;
    align-items: center;
}

.roulette-num-badge {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 0.9rem;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.roulette-num-badge.badge-red {
    background: linear-gradient(135deg, #e53935 0%, #b71c1c 100%);
    color: #fff;
}

.roulette-num-badge.badge-black {
    background: linear-gradient(135deg, #374151 0%, #111827 100%);
    color: #fff;
}

.roulette-num-badge.badge-green {
    background: linear-gradient(135deg, #10b981 0%, #047857 100%);
    color: #fff;
}

/* --- TAPIS DE MISES VERT ÉMERAUDE --- */
.roulette-board-column {
    display: flex;
    flex-direction: column;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 8px;
}

.roulette-felt-board {
    background: #08331a;
    border: 2px solid #d4af37;
    border-radius: 8px;
    padding: 10px;
    box-shadow: inset 0 0 30px rgba(0, 0, 0, 0.7);
    user-select: none;
    min-width: 680px;
}

.roulette-grid-wrapper {
    display: flex;
    gap: 4px;
    margin-bottom: 4px;
}

.roulette-bet-cell {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-weight: bold;
    color: #fff;
    transition: all 0.15s ease;
    border: 1px solid rgba(212, 175, 55, 0.4);
    box-shadow: inset 0 0 8px rgba(0, 0, 0, 0.3);
}

.roulette-bet-cell:hover {
    filter: brightness(1.25);
    border-color: #ffd700;
    box-shadow: 0 0 10px rgba(255, 215, 0, 0.6);
    transform: translateY(-1px);
}

.roulette-bet-cell:active {
    transform: scale(0.97);
}

.cell-zero {
    width: 48px;
    background: linear-gradient(135deg, #10b981, #065f46);
    border-radius: 6px 0 0 6px;
    font-size: 1.4rem;
    font-family: var(--font-heading);
}

.roulette-numbers-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    grid-template-rows: repeat(3, 46px);
    gap: 3px;
    flex: 1;
}

.roulette-num-cell {
    font-size: 1.05rem;
    font-family: var(--font-heading);
}

.roulette-num-cell.cell-red {
    background: linear-gradient(135deg, #b71c1c 0%, #7f0000 100%);
    border-color: #ef5350;
}

.roulette-num-cell.cell-black {
    background: linear-gradient(135deg, #263238 0%, #10171a 100%);
    border-color: #78909c;
}

.roulette-cols-wrapper {
    display: flex;
    flex-direction: column;
    gap: 3px;
    width: 52px;
}

.cell-col {
    flex: 1;
    background: rgba(0, 0, 0, 0.4);
    font-size: 0.85rem;
}

.roulette-dozens-row {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
    margin-left: 52px;
    margin-right: 56px;
    margin-bottom: 4px;
}

.cell-dozen {
    height: 38px;
    background: rgba(0, 0, 0, 0.45);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.roulette-outside-row {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 4px;
    margin-left: 52px;
    margin-right: 56px;
}

.cell-outside {
    height: 40px;
    background: rgba(0, 0, 0, 0.4);
    font-size: 0.85rem;
    text-transform: uppercase;
}

.cell-outside.cell-red {
    background: linear-gradient(135deg, #b71c1c, #7f0000);
}

.cell-outside.cell-black {
    background: linear-gradient(135deg, #263238, #10171a);
}

/* Jeton posé sur la feutrine */
.chip-badge {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    min-width: 24px;
    height: 24px;
    padding: 0 4px;
    border-radius: 12px;
    background: radial-gradient(circle, #ffe082 0%, #d4af37 60%, #8c6b12 100%);
    border: 2px dashed #ffffff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.9), 0 0 8px rgba(255, 215, 0, 0.7);
    color: #000;
    font-size: 0.75rem;
    font-weight: 900;
    display: flex;
    align-items: center;
    justify-content: center;
    pointer-events: none;
    z-index: 5;
    animation: chipPop 0.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes chipPop {
    0% { transform: translate(-50%, -50%) scale(0.3); opacity: 0; }
    100% { transform: translate(-50%, -50%) scale(1); opacity: 1; }
}

.chip-badge.hidden {
    display: none !important;
}

.roulette-action-buttons {
    display: flex;
    gap: 10px;
    align-items: center;
    justify-content: flex-end;
    margin-top: 10px;
}

.roulette-outcome-banner {
    margin: 16px 0;
    padding: 14px 20px;
    border-radius: var(--radius-md);
    font-family: var(--font-heading);
    text-align: center;
    font-size: 1.15rem;
    animation: bannerFadeIn 0.3s ease-out;
}

.roulette-outcome-banner.win {
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.25), rgba(6, 78, 59, 0.6));
    border: 1px solid #10b981;
    color: #6ee7b7;
    box-shadow: 0 0 20px rgba(16, 185, 129, 0.4);
}

.roulette-outcome-banner.loss {
    background: linear-gradient(135deg, rgba(239, 68, 68, 0.25), rgba(153, 27, 27, 0.6));
    border: 1px solid #ef4444;
    color: #fca5a5;
}

.roulette-outcome-banner.tie {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.25), rgba(180, 83, 9, 0.6));
    border: 1px solid #f59e0b;
    color: #fde68a;
}

