:root {
    --bg: #030915;
    --panel: rgba(5, 12, 26, 0.92);
    --panel-2: rgba(6, 14, 30, 0.88);
    --border: rgba(53, 138, 255, 0.42);
    --border-soft: rgba(53, 138, 255, 0.18);
    --text: #eef6ff;
    --muted: #a2b4ce;
    --blue: #1692ff;
    --blue-2: #3cb0ff;
    --green: #51d86e;
    --orange: #ffb347;
    --danger: #ff5b6e;
    --shadow: 0 0 0 1px rgba(18, 93, 198, 0.12), 0 22px 40px rgba(0,0,0,0.35), 0 0 35px rgba(0, 102, 255, 0.12);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body.account-body {
    margin: 0;
    min-height: 100vh;
    font-family: Inter, Arial, sans-serif;
    color: var(--text);
    background:
        radial-gradient(circle at top right, rgba(0,113,255,0.08), transparent 28%),
        linear-gradient(180deg, rgba(1,5,12,0.90), rgba(1,6,15,0.98)),
        url('../images/background.jpeg') center/cover fixed no-repeat;
}

.page-overlay {
    position: fixed;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(180deg, rgba(0,0,0,0.15), rgba(0,0,0,0.35));
}

.account-header,
.account-shell { position: relative; z-index: 1; }
.account-header { padding: 10px 8px 4px; }
.banner-wrap { display: flex; justify-content: center; }
.banner-image {
    width: min(100%, 1620px);
    display: block;
    border-radius: 20px;
    box-shadow: var(--shadow);
    border: 1px solid rgba(53, 138, 255, 0.38);
}

.top-bar {
    width: min(1620px, calc(100% - 8px));
    margin: 8px auto 0;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: center;
}

button,
.btn-outline,
.more-link,
.file-picker-button {
    border: 1px solid rgba(68, 156, 255, 0.48);
    background: linear-gradient(180deg, rgba(17, 116, 231, 0.95), rgba(7, 68, 157, 0.95));
    color: #fff;
    border-radius: 12px;
    padding: 10px 14px;
    font-weight: 800;
    letter-spacing: .01em;
    cursor: pointer;
    transition: transform .18s ease, border-color .18s ease, filter .18s ease, background .18s ease;
    text-decoration: none;
    font-family: inherit;
}
button:hover,
.btn-outline:hover,
.more-link:hover,
.file-picker-button:hover { transform: translateY(-1px); filter: brightness(1.08); }
button:disabled { opacity: .45; cursor: not-allowed; transform: none; }
.top-bar button.active { border-color: rgba(80, 210, 255, .9); box-shadow: inset 0 0 16px rgba(80, 166, 255, .18); }
.btn-danger { background: linear-gradient(180deg, rgba(190, 53, 72, .95), rgba(117, 23, 39, .95)); border-color: rgba(255, 120, 140, .55); }
.secondary-button,
.btn-outline,
.ghost-button,
.more-link { background: rgba(8, 22, 47, .72); color: var(--text); }
.ghost-button { border-color: rgba(255,255,255,.14); color: var(--muted); }
.more-link { white-space: nowrap; }

.account-shell {
    width: min(1680px, calc(100% - 16px));
    margin: 8px auto 18px;
    display: grid;
    gap: 12px;
}

.panel-shell {
    position: relative;
    background: linear-gradient(180deg, rgba(4, 10, 23, 0.96), rgba(2, 8, 18, 0.96));
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    overflow: hidden;
    clip-path: polygon(18px 0, calc(100% - 18px) 0, 100% 18px, 100% calc(100% - 18px), calc(100% - 18px) 100%, 18px 100%, 0 calc(100% - 18px), 0 18px);
}
.panel-shell::before {
    content: '';
    position: absolute;
    inset: 0;
    pointer-events: none;
    background: linear-gradient(90deg, rgba(17, 133, 255, 0.06), transparent 18%, transparent 82%, rgba(17, 133, 255, 0.04));
}
.panel-shell > * { position: relative; z-index: 1; }

.account-strip {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    min-height: 78px;
}
.strip-item {
    display: flex;
    gap: 14px;
    align-items: center;
    padding: 14px 18px;
    border-right: 1px solid var(--border-soft);
}
.strip-item:last-child { border-right: none; }
.strip-icon {
    width: 44px;
    height: 44px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: rgba(26, 124, 255, .12);
    border: 1px solid rgba(64, 157, 255, .24);
}
.strip-item small,
.eyebrow,
.panel-kicker {
    display: block;
    margin: 0 0 4px;
    color: var(--blue-2);
    text-transform: uppercase;
    font-size: .72rem;
    letter-spacing: .16em;
    font-weight: 900;
}
.strip-item strong { display: block; font-size: 1.02rem; line-height: 1.15; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.strip-item em { display: block; color: var(--muted); font-style: normal; font-size: .84rem; margin-top: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.command-layout {
    display: grid;
    grid-template-columns: minmax(0, 1.55fr) minmax(360px, .75fr);
    gap: 12px;
}
.command-hero { min-height: 430px; }
.hero-background {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(90deg, rgba(2, 8, 19, .92) 0%, rgba(2, 8, 19, .72) 52%, rgba(0,0,0,.28) 100%),
        url('../images/background.jpeg') center/cover no-repeat;
    transform: scale(1.02);
}
.hero-overlay {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 78% 28%, rgba(27, 136, 255, .22), transparent 32%);
}
.hero-content { padding: 42px; max-width: 920px; }
.hero-content h1 {
    margin: 0;
    font-size: clamp(2.35rem, 4vw, 4.6rem);
    line-height: .95;
    letter-spacing: -.06em;
}
.hero-description { max-width: 660px; color: var(--muted); font-size: 1.08rem; line-height: 1.6; margin: 18px 0 0; }

.selector-card {
    margin-top: 28px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
    width: min(720px, 100%);
    padding: 14px;
    background: rgba(3, 10, 23, .66);
    border: 1px solid var(--border-soft);
    border-radius: 18px;
    backdrop-filter: blur(8px);
}
label { color: var(--muted); font-size: .82rem; font-weight: 800; display: grid; gap: 7px; }
select,
input,
textarea {
    width: 100%;
    border: 1px solid rgba(53, 138, 255, .28);
    background: rgba(2, 8, 18, .88);
    color: var(--text);
    border-radius: 12px;
    padding: 11px 12px;
    outline: none;
    font-family: inherit;
}
textarea { min-height: 88px; resize: vertical; }
select:focus,
input:focus,
textarea:focus { border-color: rgba(60, 176, 255, .82); box-shadow: 0 0 0 3px rgba(22, 146, 255, .12); }
.quick-actions { margin-top: 18px; display: flex; flex-wrap: wrap; gap: 9px; }

.active-panel { padding: 22px; }
.panel-head { display: flex; align-items: flex-start; gap: 16px; padding: 22px 22px 0; }
.panel-head.between { justify-content: space-between; }
.active-panel .panel-head { padding: 0 0 14px; }
.panel-head h2 { margin: 0; font-size: 1.45rem; letter-spacing: -.03em; }
.panel-head p:not(.eyebrow) { margin: 6px 0 0; color: var(--muted); }

.active-village-card {
    min-height: 310px;
    display: grid;
    align-content: center;
    gap: 16px;
    padding: 24px;
    border-radius: 18px;
    background: linear-gradient(180deg, rgba(7, 20, 42, .78), rgba(4, 12, 27, .78));
    border: 1px solid var(--border-soft);
}
.active-village-main { display: flex; gap: 18px; align-items: center; }
.village-emblem {
    width: 72px;
    height: 72px;
    border-radius: 22px;
    display: grid;
    place-items: center;
    font-size: 2rem;
    background: rgba(22, 146, 255, .14);
    border: 1px solid rgba(60, 176, 255, .32);
}
.active-village-card h3 { margin: 0; font-size: 1.75rem; letter-spacing: -.04em; }
.village-meta-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.village-meta-row span,
.badge,
.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    border: 1px solid rgba(73, 157, 255, .24);
    background: rgba(9, 24, 51, .75);
    color: var(--muted);
    border-radius: 999px;
    padding: 6px 10px;
    font-size: .8rem;
    font-weight: 800;
}
.badge.success,
.status-pill { color: #bdfbd0; border-color: rgba(81, 216, 110, .34); background: rgba(32, 117, 55, .16); }
.badge.warning { color: #ffe0a3; border-color: rgba(255, 179, 71, .34); background: rgba(139, 91, 20, .18); }
.active-village-actions { display: flex; justify-content: flex-start; }

.content-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(380px, .95fr);
    gap: 12px;
}
.updates-panel,
.world-panel,
.profile-panel,
.prestige-panel,
.archive-panel { padding-bottom: 22px; }
.news-list,
.world-list,
.prestige-grid,
.list-grid { display: grid; gap: 10px; padding: 16px 22px 0; }
.news-card {
    display: grid;
    grid-template-columns: 104px minmax(0, 1fr);
    gap: 14px;
    padding: 12px;
    border-radius: 16px;
    background: rgba(6, 16, 34, .72);
    border: 1px solid var(--border-soft);
}
.news-image,
.news-icon {
    min-height: 82px;
    border-radius: 14px;
    background-size: cover;
    background-position: center;
    border: 1px solid rgba(53, 138, 255, .22);
}
.news-icon { display: grid; place-items: center; font-size: 2rem; background: rgba(22, 146, 255, .10); }
.news-meta,
.prestige-meta { display: flex; flex-wrap: wrap; gap: 8px; color: var(--blue-2); font-size: .74rem; text-transform: uppercase; letter-spacing: .12em; font-weight: 900; }
.news-card h3 { margin: 6px 0; font-size: 1.08rem; }
.news-card p { margin: 0; color: var(--muted); line-height: 1.45; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }

.world-card {
    padding: 14px;
    border-radius: 17px;
    border: 1px solid var(--border-soft);
    background: rgba(6, 16, 34, .70);
}
.world-card-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.world-id { color: rgba(162, 180, 206, .65); font-weight: 800; }
.world-card h3 { margin: 10px 0 6px; font-size: 1.2rem; }
.world-card p { margin: 0 0 8px; color: var(--muted); line-height: 1.45; }
.world-meta-line { color: var(--muted); font-size: .88rem; margin-top: 6px; }
.world-action-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.world-action-row button { padding: 8px 10px; font-size: .86rem; }
.compact-worlds .world-card { opacity: .82; }
.compact-worlds .world-meta-line:nth-of-type(n+2),
.compact-worlds .world-card p { display: none; }

.secondary-grid {
    display: grid;
    grid-template-columns: minmax(340px, .9fr) minmax(360px, 1fr) minmax(360px, 1fr);
    gap: 12px;
    align-items: start;
}
.profile-avatar {
    width: 62px;
    height: 62px;
    border-radius: 20px;
    display: grid;
    place-items: center;
    overflow: hidden;
    background: rgba(22, 146, 255, .14);
    border: 1px solid rgba(60, 176, 255, .35);
    color: #fff;
    font-size: 1.7rem;
    font-weight: 900;
}
.profile-avatar img { width: 100%; height: 100%; object-fit: cover; }
.discord-profile-link {
    margin: 16px 22px 0;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--text);
    text-decoration: none;
    padding: 10px 12px;
    border: 1px solid var(--border-soft);
    border-radius: 14px;
    background: rgba(88, 101, 242, .12);
    font-weight: 900;
}
.discord-profile-link svg { width: 22px; height: 22px; fill: currentColor; }
.profile-editor-grid { display: grid; gap: 12px; padding: 16px 22px 0; }
.avatar-upload-box { display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; gap: 8px; }
.avatar-file-input { position: absolute; opacity: 0; pointer-events: none; }
.file-picker-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--muted); font-size: .82rem; }
.profile-editor-grid small { color: rgba(162, 180, 206, .75); }
.profile-editor-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
#profile-save-status { color: var(--muted); font-size: .86rem; }

.prestige-scroll { max-height: 438px; overflow: auto; padding-right: 14px; }
.prestige-card {
    padding: 12px;
    border-radius: 16px;
    background: rgba(6, 16, 34, .72);
    border: 1px solid var(--border-soft);
}
.prestige-card.locked { opacity: .58; }
.prestige-card-head { display: flex; gap: 12px; align-items: center; }
.prestige-icon {
    width: 48px;
    height: 48px;
    display: grid;
    place-items: center;
    border-radius: 14px;
    background: rgba(22, 146, 255, .12);
    overflow: hidden;
    font-size: 1.45rem;
}
.prestige-icon img { width: 100%; height: 100%; object-fit: cover; }
.prestige-title { font-weight: 900; }
.prestige-desc { color: var(--muted); line-height: 1.45; margin: 10px 0; }
.prestige-bar { height: 8px; border-radius: 999px; background: rgba(255,255,255,.08); overflow: hidden; }
.prestige-bar span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--blue), var(--green)); }

.admin-panel { padding: 0 0 22px; }
.admin-note { margin: 16px 22px 0; color: var(--muted); }
.presence-card { padding: 14px; border: 1px solid var(--border-soft); background: rgba(6, 16, 34, .72); border-radius: 16px; }
.presence-card-head { display: flex; justify-content: space-between; gap: 12px; }
.presence-name { font-weight: 900; }
.presence-meta { color: var(--muted); font-size: .86rem; margin-top: 4px; }
.presence-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-top: 12px; }
.presence-grid div { background: rgba(2,8,18,.65); border-radius: 12px; padding: 10px; }
.presence-grid strong { display: block; font-size: .74rem; color: var(--blue-2); text-transform: uppercase; letter-spacing: .1em; }
.presence-grid span { color: var(--muted); font-size: .86rem; word-break: break-word; }
.empty-state { color: var(--muted); padding: 16px; border: 1px dashed rgba(53, 138, 255, .24); border-radius: 14px; background: rgba(2, 8, 18, .45); }

@media (max-width: 1180px) {
    .account-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .strip-item:nth-child(2) { border-right: none; }
    .strip-item:nth-child(-n+2) { border-bottom: 1px solid var(--border-soft); }
    .command-layout,
    .content-grid,
    .secondary-grid { grid-template-columns: 1fr; }
    .command-hero { min-height: auto; }
}

@media (max-width: 760px) {
    .account-shell { width: min(100% - 10px, 1680px); }
    .account-strip { grid-template-columns: 1fr; }
    .strip-item { border-right: none; border-bottom: 1px solid var(--border-soft); }
    .strip-item:last-child { border-bottom: none; }
    .hero-content { padding: 28px 18px; }
    .selector-card { grid-template-columns: 1fr; }
    .active-panel,
    .active-village-card { padding: 16px; }
    .news-card { grid-template-columns: 1fr; }
    .news-image,
    .news-icon { min-height: 130px; }
    .avatar-upload-box { grid-template-columns: 1fr; }
    .panel-head { padding: 18px 18px 0; }
    .news-list,
    .world-list,
    .prestige-grid,
    .list-grid,
    .profile-editor-grid { padding-left: 18px; padding-right: 18px; }
    .presence-grid { grid-template-columns: 1fr; }
}

/* Patch compte/village - actualités cliquables, succès filtrables et thème aligné */
.top-bar button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 42px;
}

.news-card.clickable {
    cursor: pointer;
    position: relative;
    transition: transform .18s ease, border-color .18s ease, box-shadow .18s ease, background .18s ease;
}
.news-card.clickable:hover,
.news-card.clickable:focus-visible {
    transform: translateY(-2px);
    border-color: rgba(80, 210, 255, .72);
    background: linear-gradient(180deg, rgba(8, 24, 52, .92), rgba(4, 13, 30, .88));
    box-shadow: 0 16px 30px rgba(0, 0, 0, .28), 0 0 24px rgba(22, 146, 255, .14);
    outline: none;
}
.news-open-hint {
    display: inline-flex;
    margin-top: 9px;
    color: #d8f2ff;
    font-size: .78rem;
    font-weight: 900;
    letter-spacing: .08em;
    text-transform: uppercase;
}

.prestige-filter-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    justify-content: flex-end;
}
.prestige-filter-tabs .prestige-filter {
    padding: 8px 10px;
    min-height: 34px;
    border-radius: 999px;
    background: rgba(8, 22, 47, .72);
    border-color: rgba(53, 138, 255, .28);
    color: var(--muted);
    font-size: .78rem;
}
.prestige-filter-tabs .prestige-filter.active {
    color: #fff;
    border-color: rgba(80, 210, 255, .88);
    background: linear-gradient(180deg, rgba(17, 116, 231, .96), rgba(7, 68, 157, .96));
    box-shadow: inset 0 0 16px rgba(80, 166, 255, .18), 0 0 18px rgba(22, 146, 255, .12);
}
.prestige-card.unlocked {
    border-color: rgba(81, 216, 110, .28);
}
.prestige-card.locked {
    opacity: 1;
    border-color: rgba(255, 179, 71, .18);
    background: linear-gradient(180deg, rgba(42, 32, 12, .42), rgba(6, 16, 34, .70));
}

.site-modal {
    position: fixed;
    inset: 0;
    z-index: 60;
}
.site-modal[hidden] { display: none; }
.site-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(1, 4, 10, .78);
    backdrop-filter: blur(8px);
}
.site-modal-card {
    position: relative;
    z-index: 1;
    width: min(980px, calc(100% - 20px));
    max-height: calc(100vh - 20px);
    overflow: auto;
    margin: 10px auto;
    padding: 22px;
    background: linear-gradient(180deg, rgba(5, 11, 24, .98), rgba(2, 8, 18, .98));
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    clip-path: polygon(18px 0, calc(100% - 18px) 0, 100% 18px, 100% calc(100% - 18px), calc(100% - 18px) 100%, 18px 100%, 0 calc(100% - 18px), 0 18px);
}
.site-modal-close {
    position: absolute;
    right: 12px;
    top: 12px;
    width: 40px;
    height: 40px;
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 50%;
    background: rgba(255,255,255,.06);
    color: #fff;
    font-size: 22px;
    cursor: pointer;
    padding: 0;
}
.modal-cover {
    width: 100%;
    max-height: 320px;
    object-fit: cover;
    border-radius: 12px;
    border: 1px solid rgba(87,150,255,.18);
    margin-bottom: 16px;
}
.modal-meta { color: var(--muted); margin-bottom: 8px; }
.modal-content { color: #dce9fb; line-height: 1.65; font-size: 17px; white-space: normal; }
.site-modal-card h2 { margin: 6px 46px 10px 0; font-size: clamp(1.8rem, 3vw, 2.7rem); }

@media (max-width: 760px) {
    .prestige-filter-tabs { justify-content: flex-start; width: 100%; }
    .site-modal-card { padding: 18px; }
}

/* =========================================================
   Patch Bibiflox V4 — Compte aligné sur le thème Village
   Barre, panneaux, boutons et cartes harmonisés.
   ========================================================= */
:root {
    --bg-dark: rgba(8, 12, 21, 0.86);
    --bg-card: rgba(10, 18, 34, 0.88);
    --bg-soft: rgba(255,255,255,0.04);
    --border: rgba(255,255,255,0.08);
    --border-strong: rgba(255,255,255,0.14);
    --text: #f3f7ff;
    --text-soft: #b9c6da;
    --accent: #4577ff;
    --accent-2: #6fa9ff;
    --success: #5fba78;
    --danger: #d96c6c;
    --shadow: 0 18px 40px rgba(0,0,0,0.35);
    --radius-xl: 24px;
    --radius-lg: 18px;
    --radius-md: 14px;
    --muted: var(--text-soft);
    --blue: var(--accent);
    --blue-2: var(--accent-2);
    --green: var(--success);
    --orange: #ffb347;
}

body.account-body {
    font-family: Arial, sans-serif;
    background: url('../images/background.jpeg') center/cover fixed no-repeat;
}

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

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

.banner-wrap {
    margin-bottom: 14px;
}

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

.top-bar {
    width: 100%;
    max-width: 1680px;
    margin: 0 auto;
    display: flex;
    justify-content: center;
    flex-wrap: wrap;
    gap: 12px;
}

button,
.btn-outline,
.more-link,
.file-picker-button {
    border: 0;
    cursor: pointer;
    transition: transform .15s ease, opacity .15s ease, background .2s ease, border-color .2s ease, box-shadow .2s ease;
    text-decoration: none;
}

.top-bar button,
.quick-actions button,
.profile-editor-actions button,
.world-action-row button,
.secondary-button,
.btn-outline,
.more-link,
.file-picker-button,
.prestige-filter-tabs .prestige-filter,
.site-modal-close {
    border-radius: 14px;
    padding: 12px 18px;
    font-weight: 700;
    color: var(--text);
    background: linear-gradient(180deg, rgba(31, 43, 74, 0.98), rgba(17, 25, 44, 0.98));
    border: 1px solid var(--border-strong);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.05);
}

.top-bar button:hover,
.quick-actions button:hover,
.profile-editor-actions button:hover,
.world-action-row button:hover,
.secondary-button:hover,
.btn-outline:hover,
.more-link:hover,
.file-picker-button:hover,
.prestige-filter-tabs .prestige-filter:hover,
.site-modal-close:hover {
    transform: translateY(-1px);
    border-color: rgba(111, 169, 255, 0.42);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.08), 0 12px 28px rgba(0,0,0,0.22);
    filter: none;
}

.top-bar button.active,
.quick-actions button:not(.btn-outline):first-child,
.profile-editor-actions button,
.prestige-filter-tabs .prestige-filter.active {
    background: linear-gradient(180deg, rgba(69, 119, 255, 0.98), rgba(42, 79, 192, 0.98));
    border-color: rgba(111, 169, 255, 0.48);
    color: #fff;
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.08), 0 0 22px rgba(69, 119, 255, 0.14);
}

.btn-danger,
.top-bar .btn-danger {
    background: linear-gradient(180deg, rgba(192, 74, 74, 0.98), rgba(135, 39, 39, 0.98));
    border-color: rgba(255,255,255,0.12);
}

.ghost-button,
.btn-outline,
.more-link {
    background: linear-gradient(180deg, rgba(62, 92, 162, 0.95), rgba(34, 51, 93, 0.98));
    color: var(--text);
}

.account-shell {
    width: min(1680px, calc(100% - 32px));
    margin: 0 auto 24px;
    gap: 18px;
}

.panel-shell {
    clip-path: none;
    overflow: hidden;
    border-radius: 24px;
    background: linear-gradient(145deg, rgba(10,18,34,0.88), rgba(6,10,18,0.86));
    border: 1px solid var(--border);
    box-shadow: var(--shadow);
    backdrop-filter: blur(10px);
}

.panel-shell::before {
    background:
        radial-gradient(circle at top right, rgba(69, 119, 255, 0.10), transparent 34%),
        linear-gradient(135deg, rgba(255,255,255,0.045), rgba(255,255,255,0));
}

.account-strip {
    border-radius: 24px;
}

.strip-item {
    border-color: rgba(255,255,255,0.08);
    background: linear-gradient(180deg, rgba(255,255,255,0.025), rgba(255,255,255,0.01));
}

.strip-icon,
.village-emblem,
.profile-avatar,
.prestige-icon,
.news-icon {
    border-radius: 16px;
    background: linear-gradient(180deg, rgba(31, 43, 74, 0.92), rgba(17, 25, 44, 0.92));
    border: 1px solid var(--border-strong);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.05);
}

.eyebrow,
.strip-item small,
.panel-kicker,
.news-meta,
.prestige-meta {
    color: var(--accent-2);
    letter-spacing: .14em;
}

.command-layout,
.content-grid,
.secondary-grid {
    gap: 18px;
}

.command-hero {
    min-height: 390px;
}

.hero-background {
    background:
        linear-gradient(90deg, rgba(7, 11, 19, .94) 0%, rgba(8, 13, 24, .78) 52%, rgba(9, 15, 28, .42) 100%),
        url('../images/background.jpeg') center/cover no-repeat;
}

.hero-overlay {
    background:
        radial-gradient(circle at 78% 28%, rgba(69, 119, 255, .22), transparent 32%),
        linear-gradient(135deg, rgba(255,255,255,.055), transparent 42%);
}

.hero-content h1 {
    font-size: clamp(2.25rem, 4vw, 4.4rem);
    letter-spacing: -.055em;
}

.selector-card,
.active-village-card,
.news-card,
.world-card,
.prestige-card,
.presence-card,
.empty-state,
.discord-profile-link,
select,
input,
textarea {
    border-radius: 18px;
    border: 1px solid rgba(126, 196, 255, 0.12);
    background: linear-gradient(135deg, rgba(255,255,255,0.052), rgba(255,255,255,0.018));
}

select,
input,
textarea {
    background: rgba(5, 10, 20, .78);
    color: var(--text);
}

select:focus,
input:focus,
textarea:focus {
    border-color: rgba(111, 169, 255, .55);
    box-shadow: 0 0 0 3px rgba(69, 119, 255, .14);
}

.panel-head h2,
.active-village-card h3,
.news-card h3,
.world-card h3,
.prestige-title {
    color: var(--text);
}

.news-card.clickable:hover,
.news-card.clickable:focus-visible,
.world-card:hover,
.prestige-card:hover {
    transform: translateY(-2px);
    border-color: rgba(111, 169, 255, 0.28);
    background: linear-gradient(135deg, rgba(255,255,255,0.075), rgba(255,255,255,0.026));
    box-shadow: 0 18px 36px rgba(0,0,0,0.30), 0 0 26px rgba(69,119,255,0.10);
}

.news-card,
.world-card,
.prestige-card {
    transition: transform .15s ease, border-color .2s ease, background .2s ease, box-shadow .2s ease;
}

.prestige-card.locked {
    opacity: 1;
    background: linear-gradient(135deg, rgba(255,255,255,0.038), rgba(255,255,255,0.014));
    border-color: rgba(255,255,255,0.07);
}

.prestige-card.unlocked {
    border-color: rgba(95, 186, 120, .28);
    box-shadow: inset 0 0 0 1px rgba(95, 186, 120, .04);
}

.prestige-bar {
    background: rgba(255,255,255,.08);
}

.prestige-bar span {
    background: linear-gradient(90deg, var(--accent), var(--success));
}

.status-pill,
.badge,
.village-meta-row span {
    border: 1px solid rgba(255,255,255,0.10);
    background: rgba(255,255,255,0.04);
    color: var(--text-soft);
}

.status-pill,
.badge.success {
    color: #d8ffe2;
    border-color: rgba(95, 186, 120, .30);
    background: rgba(95, 186, 120, .10);
}

.news-open-hint {
    color: var(--accent-2);
}

.site-modal-card {
    clip-path: none;
    border-radius: 24px;
    background: linear-gradient(145deg, rgba(10,18,34,0.96), rgba(6,10,18,0.96));
    border: 1px solid var(--border-strong);
}

.site-modal-close {
    width: 42px;
    height: 42px;
    padding: 0;
    border-radius: 14px;
}

@media (max-width: 760px) {
    .account-header { padding: 12px 8px 8px; }
    .account-shell { width: min(100% - 12px, 1680px); }
    .top-bar { gap: 8px; }
    .top-bar button { padding: 10px 12px; }
}


/* =========================================================
   Patch Bibiflox V5 — Compte encore plus proche du Village
   Nav HUD coupée, hover lumineux, boutons angulaires,
   prochains mondes mis en avant avec réservations/date.
   ========================================================= */
.account-header {
    padding: 8px 24px 10px !important;
}

.banner-wrap {
    margin-bottom: 10px !important;
}

.banner-image {
    max-width: 1080px !important;
    border-radius: 12px !important;
}

.top-bar {
    position: relative !important;
    width: min(1340px, calc(100% - 32px)) !important;
    max-width: 1340px !important;
    margin: 0 auto !important;
    padding: 18px 38px !important;
    gap: 12px !important;
    border-radius: 0 !important;
    clip-path: polygon(36px 0, calc(100% - 36px) 0, 100% 28px, 100% calc(100% - 28px), calc(100% - 36px) 100%, 36px 100%, 0 calc(100% - 28px), 0 28px) !important;
    background:
        linear-gradient(90deg, transparent 0%, rgba(35, 94, 168, .13) 18%, rgba(10, 24, 49, .94) 50%, rgba(35, 94, 168, .13) 82%, transparent 100%),
        linear-gradient(180deg, rgba(9, 25, 50, .92), rgba(3, 10, 23, .96)) !important;
    border: 1px solid rgba(82, 191, 255, .20) !important;
    box-shadow: 0 24px 70px rgba(0,0,0,.38), inset 0 1px 0 rgba(255,255,255,.04) !important;
}

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

.top-bar button,
.quick-actions button,
.profile-editor-actions button,
.world-action-row button,
.secondary-button,
.btn-outline,
.more-link,
.file-picker-button,
.prestige-filter-tabs .prestige-filter,
.site-modal-close {
    border-radius: 0 !important;
    clip-path: polygon(12px 0, calc(100% - 8px) 0, 100% 8px, 100% calc(100% - 12px), calc(100% - 12px) 100%, 8px 100%, 0 calc(100% - 8px), 0 12px) !important;
    background: linear-gradient(180deg, rgba(21, 45, 82, .92), rgba(6, 16, 35, .96)) !important;
    border: 1px solid rgba(105, 173, 255, .17) !important;
    color: rgba(238,246,255,.95) !important;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.06) !important;
}

.top-bar button {
    min-width: 118px !important;
    min-height: 42px !important;
}

.top-bar button:hover,
.quick-actions button:hover,
.profile-editor-actions button:hover,
.world-action-row button:hover,
.secondary-button:hover,
.btn-outline:hover,
.more-link:hover,
.file-picker-button:hover,
.prestige-filter-tabs .prestige-filter:hover,
.site-modal-close:hover,
.top-bar button.active,
.quick-actions button:not(.btn-outline):first-child,
.profile-editor-actions button,
.prestige-filter-tabs .prestige-filter.active {
    transform: translateY(-1px) !important;
    background: linear-gradient(180deg, rgba(45, 134, 255, .78), rgba(16, 52, 112, .94)) !important;
    border-color: rgba(110, 204, 255, .50) !important;
    box-shadow: 0 0 26px rgba(47,140,255,.18), inset 0 1px 0 rgba(255,255,255,.14) !important;
    filter: none !important;
}

.top-bar .btn-danger,
.btn-danger {
    background: linear-gradient(180deg, rgba(155, 48, 58, .88), rgba(79, 17, 28, .95)) !important;
    border-color: rgba(255, 120, 140, .32) !important;
}
.top-bar .btn-danger:hover {
    background: linear-gradient(180deg, rgba(210, 73, 85, .90), rgba(111, 25, 38, .96)) !important;
    border-color: rgba(255, 145, 160, .55) !important;
    box-shadow: 0 0 26px rgba(255, 70, 90, .16), inset 0 1px 0 rgba(255,255,255,.14) !important;
}

.panel-shell,
.selector-card,
.active-village-card,
.news-card,
.world-card,
.prestige-card,
.presence-card,
.empty-state,
.discord-profile-link {
    border-radius: 0 !important;
    clip-path: polygon(18px 0, calc(100% - 18px) 0, 100% 18px, 100% calc(100% - 18px), calc(100% - 18px) 100%, 18px 100%, 0 calc(100% - 18px), 0 18px) !important;
}

select,
input,
textarea,
.strip-icon,
.village-emblem,
.profile-avatar,
.prestige-icon,
.news-icon,
.village-meta-row span,
.badge,
.status-pill {
    border-radius: 0 !important;
    clip-path: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px) !important;
}

.archive-panel {
    border-color: rgba(69, 217, 255, .22) !important;
    background:
        radial-gradient(circle at 88% 20%, rgba(69,217,255,.12), transparent 34%),
        linear-gradient(180deg, rgba(5, 14, 31, .96), rgba(2, 8, 18, .98)) !important;
}
.archive-panel .panel-head {
    padding-bottom: 4px !important;
}
.archive-panel .world-list {
    gap: 14px !important;
}
.compact-worlds .world-card,
.world-card.upcoming-world {
    opacity: 1 !important;
    padding: 18px !important;
    border-color: rgba(69,217,255,.22) !important;
    background:
        linear-gradient(135deg, rgba(15, 42, 82, .60), rgba(4, 13, 30, .86)),
        radial-gradient(circle at top right, rgba(69,217,255,.12), transparent 38%) !important;
}
.compact-worlds .world-card p,
.compact-worlds .world-meta-line:nth-of-type(n+2) {
    display: block !important;
}
.world-card.upcoming-world h3,
.compact-worlds .world-card h3 {
    font-size: 1.35rem !important;
    margin-top: 12px !important;
}
.world-meta-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-top: 14px;
}
.world-meta-box {
    padding: 12px;
    min-height: 84px;
    border: 1px solid rgba(105, 173, 255, .14);
    background: linear-gradient(180deg, rgba(255,255,255,.045), rgba(255,255,255,.016));
    clip-path: polygon(12px 0, 100% 0, 100% calc(100% - 12px), calc(100% - 12px) 100%, 0 100%, 0 12px);
}
.world-meta-box span {
    display: block;
    margin-bottom: 6px;
    color: #7ec4ff;
    text-transform: uppercase;
    letter-spacing: .13em;
    font-size: .68rem;
    font-weight: 900;
}
.world-meta-box strong {
    display: block;
    color: #f3f7ff;
    font-size: .96rem;
    line-height: 1.25;
}
.world-meta-box em {
    display: block;
    color: var(--text-soft);
    font-style: normal;
    font-size: .78rem;
    margin-top: 5px;
}
.world-meta-box.highlight {
    border-color: rgba(69,217,255,.28);
    background: linear-gradient(180deg, rgba(31, 91, 158, .24), rgba(255,255,255,.018));
}
.world-action-row button:disabled {
    opacity: .55 !important;
}

@media (max-width: 760px) {
    .top-bar {
        width: calc(100% - 12px) !important;
        padding: 14px 12px !important;
        clip-path: polygon(20px 0, calc(100% - 20px) 0, 100% 18px, 100% calc(100% - 18px), calc(100% - 20px) 100%, 20px 100%, 0 calc(100% - 18px), 0 18px) !important;
    }
    .top-bar button {
        flex: 1 1 calc(50% - 8px) !important;
        min-width: 120px !important;
    }
    .world-meta-grid {
        grid-template-columns: 1fr !important;
    }
}

/* Patch v13 - navigation premium harmonisée */
.top-bar {
    position: relative;
    width: min(1180px, calc(100% - 32px));
    margin: 0 auto;
    padding: 12px 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
    background: linear-gradient(180deg, rgba(8, 17, 32, .92), rgba(5, 12, 24, .96));
    border: 1px solid rgba(95, 166, 255, .18);
    box-shadow: 0 18px 40px rgba(0,0,0,.32), inset 0 1px 0 rgba(125, 210, 255, .09);
    clip-path: polygon(28px 0, calc(100% - 28px) 0, 100% 50%, calc(100% - 28px) 100%, 28px 100%, 0 50%);
    border-radius: 0 !important;
}
.top-bar::before,
.top-bar::after {
    content: "";
    position: absolute;
    top: -1px;
    width: 74px;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(104, 213, 255, .95));
    pointer-events: none;
}
.top-bar::before { left: 52px; }
.top-bar::after { right: 52px; transform: scaleX(-1); }
.top-bar button,
.top-bar a,
.btn-primary,
.btn-secondary,
.btn-ghost,
.btn-danger,
.tab-btn,
.mini-btn {
    position: relative;
    overflow: hidden;
    border-radius: 0 !important;
    clip-path: polygon(12px 0, calc(100% - 12px) 0, 100% 50%, calc(100% - 12px) 100%, 12px 100%, 0 50%);
    border: 1px solid rgba(105, 164, 255, .20) !important;
    background: linear-gradient(180deg, rgba(23, 40, 72, .94), rgba(8, 18, 34, .96)) !important;
    color: #eef5ff !important;
    box-shadow: inset 0 1px 0 rgba(159, 219, 255, .08), 0 10px 24px rgba(0,0,0,.18);
    transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease, background .16s ease;
}
.top-bar button::before,
.top-bar a::before,
.btn-primary::before,
.btn-secondary::before,
.btn-ghost::before,
.btn-danger::before,
.tab-btn::before,
.mini-btn::before {
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, rgba(104, 213, 255, .22), transparent);
    transform: translateX(-120%);
    transition: transform .42s ease;
    pointer-events: none;
}
.top-bar button:hover,
.top-bar a:hover,
.btn-primary:hover,
.btn-secondary:hover,
.btn-ghost:hover,
.btn-danger:hover,
.tab-btn:hover,
.mini-btn:hover {
    transform: translateY(-1px);
    border-color: rgba(115, 204, 255, .55) !important;
    box-shadow: 0 0 0 1px rgba(69, 154, 255, .18), 0 0 22px rgba(39, 142, 255, .22), inset 0 1px 0 rgba(188, 237, 255, .14);
}
.top-bar button:hover::before,
.top-bar a:hover::before,
.btn-primary:hover::before,
.btn-secondary:hover::before,
.btn-ghost:hover::before,
.btn-danger:hover::before,
.tab-btn:hover::before,
.mini-btn:hover::before { transform: translateX(120%); }
.top-bar button.active,
.top-bar button.is-active,
.top-bar a.active,
.top-bar a.is-active,
.tab-btn.is-active {
    background: linear-gradient(180deg, rgba(37, 115, 235, .96), rgba(18, 58, 128, .98)) !important;
    border-color: rgba(126, 207, 255, .62) !important;
    box-shadow: 0 0 0 1px rgba(76, 160, 255, .20), 0 0 26px rgba(37, 119, 255, .32), inset 0 1px 0 rgba(213, 244, 255, .18);
}
.btn-danger {
    background: linear-gradient(180deg, rgba(145, 42, 54, .96), rgba(79, 19, 28, .98)) !important;
    border-color: rgba(255, 127, 127, .28) !important;
}
.nav-pill.hidden { display: none !important; }
@media (max-width: 760px) {
    .top-bar { width: calc(100% - 18px); padding: 10px; clip-path: polygon(18px 0, calc(100% - 18px) 0, 100% 50%, calc(100% - 18px) 100%, 18px 100%, 0 50%); }
    .top-bar button { flex: 1 1 calc(50% - 8px); }
}
