html,
body {
    width: 100%;
    min-height: 100%;
    margin: 0;
}

body {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    overflow-x: hidden;
    background:
        linear-gradient(180deg, rgba(20, 29, 24, .52), rgba(89, 72, 33, .48)),
        var(--site-bg) center/cover fixed no-repeat;
    color: #37281b;
    font-family: Arial, sans-serif;
}

body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    background-image:
        linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,.025) 1px, transparent 1px);
    background-size: 34px 34px;
    pointer-events: none;
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
textarea,
select {
    font: inherit;
}

[hidden] {
    display: none !important;
}

.site-content {
    width: min(1180px, calc(100% - 28px));
    margin: 0 auto;
    flex: 1 0 auto;
}

.header {
    position: sticky;
    top: 0;
    z-index: 300;
    padding: 0 14px;
}

.header-container {
    width: min(1180px, 100%);
    margin: 0 auto;
    min-height: 84px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
    padding: 10px 18px;
    background: linear-gradient(180deg, rgba(74, 56, 34, .94), rgba(34, 30, 22, .96));
    border: 1px solid rgba(250, 215, 139, .58);
    border-top: 0;
    border-radius: 0 0 8px 8px;
    box-shadow: 0 14px 34px rgba(20, 11, 5, .38), inset 0 -3px 0 rgba(0,0,0,.18);
}

.header-logo {
    display: inline-flex;
    align-items: center;
    flex: 0 0 auto;
}

.header-logo img {
    height: 74px;
    width: auto;
    display: block;
    filter: drop-shadow(0 8px 12px rgba(0,0,0,.35));
    transition: transform .2s ease;
}

.header-logo:hover img {
    transform: translateY(-2px);
}

.navbar {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    flex: 1 1 auto;
    min-width: 0;
}

.nav-list {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
    flex-wrap: wrap;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-item {
    position: relative;
}

.nav-link,
.lang-current {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    min-height: 38px;
    padding: 9px 14px;
    border: 1px solid rgba(255, 227, 155, .34);
    border-radius: 4px;
    background: linear-gradient(180deg, rgba(255, 241, 195, .1), rgba(26, 23, 18, .18));
    color: #f6e6b8;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.12), inset 0 -2px 0 rgba(0,0,0,.18);
    text-transform: uppercase;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    white-space: nowrap;
    position: relative;
    overflow: hidden;
}

.nav-link::before,
.lang-current::before {
    content: none;
    position: absolute;
    left: 8px;
    right: 8px;
    top: 4px;
    height: 1px;
    background: rgba(255, 246, 209, .28);
}

.nav-link:hover,
.lang-current:hover,
.nav-link:focus-visible,
.lang-current:focus-visible {
    color: #fff;
    border-color: rgba(255, 217, 114, .62);
    background: linear-gradient(180deg, rgba(189, 134, 38, .68), rgba(79, 57, 25, .74));
}

.submenu,
.lang-menu {
    position: absolute;
    top: calc(100% + 1px);
    z-index: 360;
    min-width: 190px;
    padding: 8px;
    border: 1px solid rgba(240, 206, 125, .5);
    border-radius: 7px;
    background: linear-gradient(180deg, rgba(67, 48, 31, .98), rgba(32, 27, 22, .98));
    box-shadow: 0 16px 30px rgba(0,0,0,.36), inset 0 1px 0 rgba(255,255,255,.08);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-6px);
    pointer-events: none;
    transition: .18s ease;
}

.nav-item::after,
.lang-switcher::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    height: 12px;
}

.submenu {
    left: 0;
    list-style: none;
    margin: 0;
}

.lang-menu {
    right: 0;
    width: max-content;
    max-width: min(330px, calc(100vw - 24px));
    display: grid;
    gap: 5px;
}

.nav-item:hover .submenu,
.nav-item:focus-within .submenu,
.lang-switcher:hover .lang-menu,
.lang-switcher:focus-within .lang-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

.submenu a,
.lang-option {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 10px;
    border-radius: 5px;
    color: #f9e9bd;
    white-space: nowrap;
}

.submenu a:hover,
.lang-option:hover,
.lang-option.active {
    background: rgba(219, 161, 54, .24);
    color: #fff;
}

.lang-switcher {
    position: relative;
    flex: 0 0 auto;
}

.lang-current img,
.lang-option img,
.mobile-lang-grid img {
    width: 69px;
}

.mobile-toggle,
.mobile-menu-close {
    display: none;
    width: 42px;
    height: 42px;
    align-items: center;
    justify-content: center;
    border: 1px solid rgba(250, 215, 139, .55);
    border-radius: 6px;
    background: rgba(64, 42, 23, .92);
    color: #fff2c7;
    cursor: pointer;
    font-size: 24px;
}

.mobile-menu-backdrop {
    position: fixed;
    inset: 0;
    z-index: 380;
    background: rgba(18, 12, 7, .58);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: .2s ease;
}

.mobile-menu-backdrop.open {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
}

.mobile-menu {
    position: fixed;
    top: 0;
    right: 0;
    z-index: 400;
    width: min(86vw, 340px);
    height: 100dvh;
    padding: 18px;
    background: linear-gradient(180deg, #5c4128, #241c17);
    border-left: 1px solid rgba(250, 215, 139, .5);
    box-shadow: -16px 0 34px rgba(0,0,0,.38);
    transform: translateX(105%);
    visibility: hidden;
    pointer-events: none;
    transition: .28s ease;
    overflow-y: auto;
}

.mobile-menu.open {
    transform: translateX(0);
    visibility: visible;
    pointer-events: auto;
}

.mobile-menu-close {
    display: flex;
    margin-left: auto;
}

.mobile-menu ul {
    display: grid;
    gap: 9px;
    list-style: none;
    margin: 20px 0;
    padding: 0;
}

.mobile-menu a {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 11px 12px;
    border: 1px solid rgba(250, 215, 139, .34);
    border-radius: 6px;
    background: rgba(255, 242, 199, .08);
    color: #fff2c7;
}

.mobile-lang-title {
    color: #fff2c7;
    font-weight: 700;
    margin-top: 12px;
}

.mobile-lang-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    margin-top: 10px;
}

footer {
    flex: 0 0 auto;
    margin-top: 34px;
    padding: 24px 0 14px;
    color: #f2dfae;
    background: linear-gradient(180deg, rgba(47, 36, 25, .2), rgba(24, 18, 13, .86));
    font-size: 13px;
}

.footer-container {
    width: min(1180px, calc(100% - 28px));
    margin: 0 auto;
}

.footer-content {
    display: grid;
    grid-template-columns: 1.6fr 1fr 1fr;
    gap: 18px;
    align-items: start;
}

.header-logodescription img {
    height: 58px;
    filter: drop-shadow(0 7px 10px rgba(0,0,0,.32));
}

.footer-description,
.copyright,
.legal {
    color: rgba(242, 223, 174, .78);
    line-height: 1.55;
}

.footer-section h4 {
    color: #fff2c7;
    font-size: 13px;
    margin: 0 0 9px;
    font-weight: 800;
    text-transform: uppercase;
}

.footer-section.links ul {
    display: grid;
    gap: 6px;
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-section.links a:hover {
    color: #fff;
}

.social-btn {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    padding: 8px 10px;
    border-radius: 6px;
    color: #fff;
    background: #5865f2;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    gap: 18px;
    flex-wrap: wrap;
    margin-top: 18px;
    padding-top: 12px;
    border-top: 1px solid rgba(242, 223, 174, .18);
}

@media (max-width: 1000px) {
    .nav-list,
    .desktop-language {
        display: none;
    }

    .navbar {
        justify-content: flex-end;
        flex: 0 0 auto;
    }

    .mobile-toggle {
        display: flex;
    }
}

@media (max-width: 760px) {
    .header {
        padding: 0 6px;
    }

    .header-container {
        min-height: 70px;
        padding: 8px 10px;
    }

    .header-logo img {
        height: 58px;
    }

    .site-content {
        width: min(100% - 16px, 1180px);
    }

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

    .footer-bottom {
        display: grid;
    }
}

/* Avatar du compte dans les navigations bureau et mobile */
.account-avatar-toggle {
    padding: 4px 9px;
    min-width: 58px;
}

.nav-account-avatar,
.mobile-account-avatar {
    width: 34px;
    height: 34px;
    border-radius: 50%;
    object-fit: cover;
    border: 2px solid rgba(255, 229, 160, .72);
    background: rgba(255,255,255,.18);
    box-shadow: 0 4px 12px rgba(0,0,0,.28);
}

.account-submenu {
    left: auto;
    right: 0;
}

.mobile-account-entry {
    display: block;
}

.mobile-account-details {
    width: 100%;
}

.mobile-account-details summary {
    list-style: none;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid rgba(250, 215, 139, .42);
    border-radius: 7px;
    background: rgba(255, 242, 199, .1);
    color: #fff2c7;
    cursor: pointer;
    font-weight: 800;
}

.mobile-account-details summary::-webkit-details-marker {
    display: none;
}

.mobile-account-details[open] summary .nav-caret {
    transform: rotate(180deg);
}

.mobile-account-links {
    display: grid;
    gap: 6px;
    margin: 7px 0 0 16px;
    padding-left: 10px;
    border-left: 2px solid rgba(250, 215, 139, .28);
}

.mobile-account-links a {
    padding: 9px 11px;
}

.footer-created {
    display: inline-block;
    margin-top: 4px;
    font-weight: 700;
    opacity: .88;
}

.sr-only {
    position: absolute !important;
    width: 1px !important;
    height: 1px !important;
    padding: 0 !important;
    margin: -1px !important;
    overflow: hidden !important;
    clip: rect(0, 0, 0, 0) !important;
    white-space: nowrap !important;
    border: 0 !important;
}

.mobile-account-details summary {
    justify-content: space-between;
}


/* Sélecteur vertical des serveurs Sunshine / Oxdya */
.server-switcher {
    position: relative;
    flex: 0 0 auto;
    z-index: 380;
}

.server-switcher::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 100%;
    height: 12px;
}

.server-current {
    width: 176px;
    min-height: 48px;
    display: grid;
    grid-template-columns: 48px minmax(0, 1fr) auto;
    align-items: center;
    gap: 8px;
    padding: 6px 9px;
    border: 1px solid rgba(255, 227, 155, .46);
    border-radius: 7px;
    background: linear-gradient(180deg, rgba(255, 241, 195, .12), rgba(26, 23, 18, .24));
    color: #fff0c2;
    box-shadow: inset 0 1px 0 rgba(255,255,255,.12), inset 0 -2px 0 rgba(0,0,0,.2);
    cursor: pointer;
    font: inherit;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.15;
    text-align: left;
}

.server-current img,
.server-option img,
.mobile-server-list img {
    width: 48px;
    height: 34px;
    object-fit: contain;
    filter: drop-shadow(0 4px 5px rgba(0,0,0,.34));
}

.server-menu {
    position: absolute;
    top: calc(100% + 1px);
    left: 0;
    width: 230px;
    display: grid;
    gap: 6px;
    padding: 8px;
    border: 1px solid rgba(240, 206, 125, .52);
    border-radius: 7px;
    background: linear-gradient(180deg, rgba(67, 48, 31, .99), rgba(27, 23, 19, .99));
    box-shadow: 0 18px 34px rgba(0,0,0,.42), inset 0 1px 0 rgba(255,255,255,.08);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-7px);
    pointer-events: none;
    transition: .18s ease;
}

.server-switcher:hover .server-menu,
.server-switcher:focus-within .server-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
    pointer-events: auto;
}

.server-option {
    display: grid;
    grid-template-columns: 58px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    min-height: 52px;
    padding: 7px 9px;
    border: 1px solid transparent;
    border-radius: 6px;
    color: #f9e9bd;
    font-size: 12px;
    font-weight: 700;
}

.server-option:hover,
.server-option.active {
    border-color: rgba(255, 218, 118, .34);
    background: rgba(219, 161, 54, .24);
    color: #fff;
}

.mobile-server-title {
    margin: 22px 0 8px;
    color: rgba(255, 239, 195, .74);
    font-size: 11px;
    font-weight: 900;
    letter-spacing: .13em;
    text-transform: uppercase;
}

.mobile-server-list {
    display: grid;
    gap: 7px;
}

.mobile-server-list a {
    display: grid;
    grid-template-columns: 62px minmax(0, 1fr);
    align-items: center;
    gap: 10px;
    padding: 8px 11px;
    border: 1px solid rgba(250, 215, 139, .24);
    border-radius: 7px;
    background: rgba(255, 242, 199, .06);
    color: #f9e9bd;
    font-weight: 800;
}

.mobile-server-list a.active {
    border-color: rgba(250, 215, 139, .58);
    background: rgba(219, 161, 54, .2);
    color: #fff;
}

@media (max-width: 1120px) {
    .server-current {
        width: 148px;
    }

    .server-current span:not(.nav-caret) {
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
}

@media (max-width: 1000px) {
    .server-switcher {
        margin-left: auto;
    }
}

@media (max-width: 620px) {
    .server-switcher {
        display: none;
    }
}

/* En-tête sans logo principal : le sélecteur conserve les identités des serveurs. */
.header-container {
    justify-content: flex-start;
}

.header-container > .server-switcher:first-child {
    margin-left: 0;
}

.header-container > .navbar {
    margin-left: auto;
}
