/* ===== Habillage de Noël du portail — direction artistique du 10K Advent =====
 * Chargé uniquement pendant Noël (isXmas(), Config/config.php).
 * Visuels repris de l'Advent (public/img/xmas) : bokeh, sapin doré, velours.
 * Décor seulement : l'or, les boutons et la mise en page ne bougent pas.
 */
:root {
    --xm-gold: #E2C985;
    --xm-ice: #DCE9F7;
    --xm-band: linear-gradient(180deg, #f8e9b8, #d3b574 45%, #a8823e);
}

/* ===== Fond : bokeh, sapins dorés, neige ===== */
.xm-back {
    position: fixed;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: -1;
}
.xm-photo {
    position: absolute;
    inset: 0;
    background: url("../img/xmas/bg-winter.webp") center / cover no-repeat;
    opacity: 0.55;
}
body:has(.bg) .xm-photo {
    opacity: 0.72;
}
.xm-tree {
    position: absolute;
    right: 0;
    bottom: 0;
    width: min(300px, 20vw);
    aspect-ratio: 310 / 590;
    background: url("../img/xmas/tree.webp") right bottom / contain no-repeat;
    opacity: 0.6;                 /* sous le contenu : les textes passent devant */
}
.xm-tree.l {
    display: none;
    right: auto;
    left: 0;
    transform: scaleX(-1);
}
body:has(.bg) .xm-tree {
    display: block;
    width: min(360px, 26vw, 41vh);
    opacity: 1;
    filter: drop-shadow(0 0 40px rgba(226, 201, 133, 0.28));
}
.xm-gift {
    position: absolute;
    right: min(230px, 15vw);
    bottom: -30px;
    width: min(440px, 30vw);
    aspect-ratio: 700 / 600;
    background: url("../img/xmas/gift.webp") center / cover no-repeat;
    mix-blend-mode: screen;       /* le fond nuit de la photo disparaît */
    -webkit-mask-image: radial-gradient(closest-side, #000 60%, transparent);
    mask-image: radial-gradient(closest-side, #000 60%, transparent);
    opacity: 0.75;
}
body:has(.bg) .xm-gift {
    display: none;
}
.xm-snow {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    opacity: 0.65;
}
body:has(.bg) .xm-snow {
    opacity: 1;
}

/* ===== Menu : branche de sapin sous le logo, éclat sur le logo ===== */
.sidebar-logo {
    position: relative;
}
.sidebar-logo::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: -11px;
    height: 22px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='44' height='22' viewBox='0 0 44 22'%3E%3Cpath d='M0 11H44' stroke='%23123826' stroke-width='5' stroke-linecap='round'/%3E%3Cpath d='M-0.2 11 l-4.5 -4.6' stroke='%231f5c3e' stroke-width='1.6' stroke-linecap='round'/%3E%3Cpath d='M2.1 11 l4.9 3.9' stroke='%232c7a52' stroke-width='1.6' stroke-linecap='round'/%3E%3Cpath d='M2.8 11 l-0.7 -4.7' stroke='%231f5c3e' stroke-width='1.6' stroke-linecap='round'/%3E%3Cpath d='M5.1 11 l5.1 3.5' stroke='%232c7a52' stroke-width='1.6' stroke-linecap='round'/%3E%3Cpath d='M6.9 11 l0.9 -4.6' stroke='%2324694a' stroke-width='1.6' stroke-linecap='round'/%3E%3Cpath d='M7.9 11 l3.6 5.0' stroke='%232c7a52' stroke-width='1.6' stroke-linecap='round'/%3E%3Cpath d='M9.9 11 l-3.4 -3.4' stroke='%2317462f' stroke-width='1.6' stroke-linecap='round'/%3E%3Cpath d='M11.9 11 l-1.9 4.4' stroke='%232c7a52' stroke-width='1.6' stroke-linecap='round'/%3E%3Cpath d='M13.4 11 l0.5 -4.7' stroke='%231f5c3e' stroke-width='1.6' stroke-linecap='round'/%3E%3Cpath d='M15.4 11 l0.0 6.1' stroke='%2317462f' stroke-width='1.6' stroke-linecap='round'/%3E%3Cpath d='M16.9 11 l4.5 -3.3' stroke='%232c7a52' stroke-width='1.6' stroke-linecap='round'/%3E%3Cpath d='M19.0 11 l-2.2 4.7' stroke='%2317462f' stroke-width='1.6' stroke-linecap='round'/%3E%3Cpath d='M20.3 11 l4.9 -4.5' stroke='%2317462f' stroke-width='1.6' stroke-linecap='round'/%3E%3Cpath d='M22.1 11 l4.9 3.6' stroke='%232c7a52' stroke-width='1.6' stroke-linecap='round'/%3E%3Cpath d='M24.0 11 l-4.1 -4.3' stroke='%231f5c3e' stroke-width='1.6' stroke-linecap='round'/%3E%3Cpath d='M25.9 11 l4.9 3.7' stroke='%2317462f' stroke-width='1.6' stroke-linecap='round'/%3E%3Cpath d='M26.9 11 l-1.9 -5.7' stroke='%2324694a' stroke-width='1.6' stroke-linecap='round'/%3E%3Cpath d='M28.3 11 l4.1 3.3' stroke='%231f5c3e' stroke-width='1.6' stroke-linecap='round'/%3E%3Cpath d='M29.9 11 l2.8 -5.8' stroke='%2324694a' stroke-width='1.6' stroke-linecap='round'/%3E%3Cpath d='M31.9 11 l1.6 6.3' stroke='%231f5c3e' stroke-width='1.6' stroke-linecap='round'/%3E%3Cpath d='M34.4 11 l-2.0 -6.0' stroke='%2324694a' stroke-width='1.6' stroke-linecap='round'/%3E%3Cpath d='M35.0 11 l-2.7 4.1' stroke='%232c7a52' stroke-width='1.6' stroke-linecap='round'/%3E%3Cpath d='M37.1 11 l4.8 -3.6' stroke='%232c7a52' stroke-width='1.6' stroke-linecap='round'/%3E%3Cpath d='M38.9 11 l-0.8 7.1' stroke='%2324694a' stroke-width='1.6' stroke-linecap='round'/%3E%3Cpath d='M41.1 11 l-2.7 -5.1' stroke='%2317462f' stroke-width='1.6' stroke-linecap='round'/%3E%3Cpath d='M42.5 11 l1.4 5.0' stroke='%231f5c3e' stroke-width='1.6' stroke-linecap='round'/%3E%3Ccircle cx='14' cy='12' r='2.1' fill='%23e2c985'/%3E%3Ccircle cx='13.4' cy='11.3' r='.7' fill='%23fff' opacity='.7'/%3E%3Ccircle cx='33' cy='10' r='1.8' fill='%23c0283e'/%3E%3C/svg%3E") 0 0 / 44px 22px repeat-x;
    pointer-events: none;
    z-index: 1;
}
.sidebar-nav {
    padding-top: 22px;
}
.sidebar-logo .logo-container,
.wrap .logo {
    position: relative;
}
.sidebar-logo .logo-container::after,
.wrap .logo::after {
    content: '';
    position: absolute;
    width: 26px;
    height: 26px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 32 32'%3E%3Cpath d='M16 0q1.2 14.8 16 16-14.8 1.2-16 16-1.2-14.8-16-16 14.8-1.2 16-16z' fill='%23F3E3B5'/%3E%3C/svg%3E") center / contain no-repeat;
    filter: drop-shadow(0 0 6px rgba(226, 201, 133, 0.9));
    animation: xm-glint 5s ease-in-out infinite;
    pointer-events: none;
}
.sidebar-logo .logo-container::after {
    right: 34px;
    top: -10px;
}
.wrap .logo::after {
    left: calc(50% + 52px);
    top: -12px;
}
@keyframes xm-glint {
    0%, 100% { transform: scale(0.65); opacity: 0.55; }
    50%      { transform: scale(1); opacity: 1; }
}
.nav-item.active {
    box-shadow: inset 0 0 28px rgba(163, 38, 58, 0.3);
}

/* ===== En-tête : liseré doré ; titre de page : ruban de velours et son nœud ===== */
.main-header {
    border-bottom: 2px solid;
    border-image: linear-gradient(90deg, rgba(211, 181, 116, 0.15), #f3e2ac 50%, rgba(211, 181, 116, 0.15)) 1;
}
.page-title-banner,
.profile-page-header,
.aff-header {
    position: relative;
    padding-left: 64px;
    border-left: 0;
    border-radius: 12px;
    background: linear-gradient(90deg, #8d1a2f, rgba(124, 20, 38, 0.75) 45%, rgba(124, 20, 38, 0) 92%);
    box-shadow: inset 0 1px 0 rgba(243, 226, 172, 0.35), inset 0 -1px 0 rgba(243, 226, 172, 0.35);
}
.profile-page-header,
.aff-header {
    padding: 14px 24px 14px 64px;
}
.page-title-banner h2,
.profile-page-header h2,
.aff-header .aff-title {
    color: #f6e7b4;
}
.page-title-banner::before,
.profile-page-header::before,
.aff-header::before {
    content: '';
    position: absolute;
    top: -10px;
    left: -10px;
    width: 66px;
    height: 48px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 44'%3E%3Cpath d='M30 22C24 6 6 2 5 13c-1 9 13 12 25 9z' fill='%23e04a5f'/%3E%3Cpath d='M30 22c6-16 24-20 25-9 1 9-13 12-25 9z' fill='%23c02c40'/%3E%3Cpath d='M28 24l-9 18 6-2 3 4 3-18zM32 24l9 18-6-2-3 4-3-18z' fill='%23a3263a'/%3E%3Cellipse cx='30' cy='22' rx='6.5' ry='6' fill='%23f3d27a'/%3E%3Cellipse cx='28.5' cy='20.5' rx='2' ry='1.4' fill='%23fff' opacity='.6'/%3E%3C/svg%3E") center / contain no-repeat;
    transform: rotate(-10deg);
    filter: drop-shadow(0 5px 7px rgba(0, 0, 0, 0.5));
    pointer-events: none;
}

/* ===== Compte à rebours : une porte de velours (créé par xmas.js) ===== */
.xm-count {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 7px;
    margin: 0 16px 16px;
    aspect-ratio: 700 / 391;
    border-radius: 10px;
    border: 1px solid rgba(226, 201, 133, 0.6);
    background: url("../img/xmas/velvet.webp") center / 100% 100% no-repeat #5e0f1d;
    box-shadow: 0 12px 28px -10px rgba(0, 0, 0, 0.8);
    font-family: var(--font-family);
}
.xm-count.xm-hidden {
    display: none;
}
.xm-count b {
    display: grid;
    place-items: center;
    min-width: 42px;
    height: 42px;
    padding: 0 6px;
    border-radius: 21px;
    border: 1px solid rgba(243, 226, 172, 0.75);
    background: rgba(8, 16, 32, 0.86);
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 20px;
    font-weight: 700;
    color: #f6e7b4;
}
.xm-count span {
    font-size: 11px;
    font-weight: 600;
    color: #f6e7b4;
    text-shadow: 0 1px 3px rgba(0, 0, 0, 0.8);
}
/* Connexion, ou menu court : ruban velours sur une ligne */
.wrap .xm-count,
.xm-count.xm-slim {
    flex-direction: row;
    gap: 10px;
    justify-content: flex-start;
    padding: 5px 18px 5px 6px;
    aspect-ratio: auto;
    border-radius: 999px;
    background: linear-gradient(135deg, #a3263a, #7c1426);
}
.wrap .xm-count {
    width: max-content;
    margin: 18px auto 0;
}
.wrap .xm-count b,
.xm-count.xm-slim b {
    min-width: 34px;
    height: 34px;
    font-size: 16px;
}
.wrap .xm-count span,
.xm-count.xm-slim span {
    font-size: 13px;
}

/* ===== Page de connexion : carte-cadeau (liseré doré, houx) ===== */
.p,
.grid-ov {
    display: none;
}
.wrap .logo {
    z-index: 2;
}
.wrap .logo::before {
    content: '';
    position: absolute;
    right: 20px;
    bottom: -52px;
    width: 64px;
    height: 40px;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 40'%3E%3Cpath d='M30 22C22 10 10 8 2 12c4 2 4 6 1 8 5 1 7 5 6 8 5-2 9 0 10 4 3-4 8-6 11-10z' fill='%231f6b45' stroke='%23d3b574' stroke-width='.8'/%3E%3Cpath d='M34 22c8-12 20-14 28-10-4 2-4 6-1 8-5 1-7 5-6 8-5-2-9 0-10 4-3-4-8-6-11-10z' fill='%23185a3a' stroke='%23d3b574' stroke-width='.8'/%3E%3Cpath d='M30 22C20 16 10 13 3 13M34 22c10-6 20-9 27-9' stroke='%23d3b574' stroke-width='.6' fill='none' opacity='.7'/%3E%3Ccircle cx='29' cy='24' r='4' fill='%23c0283e'/%3E%3Ccircle cx='35' cy='24.5' r='4' fill='%23a3263a'/%3E%3Ccircle cx='32' cy='19.5' r='4' fill='%23d33a50'/%3E%3Ccircle cx='27.8' cy='22.8' r='1.2' fill='%23fff' opacity='.55'/%3E%3Ccircle cx='33.8' cy='23.3' r='1.2' fill='%23fff' opacity='.5'/%3E%3Ccircle cx='30.8' cy='18.3' r='1.2' fill='%23fff' opacity='.55'/%3E%3C/svg%3E") center / contain no-repeat;
    transform: rotate(8deg);
    filter: drop-shadow(0 6px 8px rgba(0, 0, 0, 0.5));
    pointer-events: none;
}
.wrap .card {
    background: rgba(8, 16, 32, 0.88);
    border-color: rgba(226, 201, 133, 0.4);
    box-shadow: 0 30px 80px rgba(0, 0, 0, 0.55);
}
.wrap .card::before {
    height: 6px;
    background: var(--xm-band);
    opacity: 1;
}

/* ===== Ornements des cartes =====
 * xmas.js choisit quelques cartes par page et leur donne un décor de l'Advent
 * (.xm-deco + .xm-o-<nom>). Décor seulement, posé à cheval sur le bord haut. */
.xm-deco {
    position: relative;
}
.xm-deco:not(.wallet-card) {
    box-shadow: inset 0 4px 0 #d3b574, 0 14px 34px -16px rgba(0, 0, 0, 0.75);
}
.xm-deco::before {
    content: '';
    position: absolute;
    top: -20px;
    right: 22px;
    z-index: 2;
    background: center / contain no-repeat;
    filter: drop-shadow(0 5px 7px rgba(0, 0, 0, 0.5));
    transform: rotate(6deg);
    pointer-events: none;
}
.account-section.xm-deco::before {
    right: 64px;
}
.wallet-card.xm-deco::before {
    right: 96px;
}
.account-section.xm-deco::before,
.wallet-card.xm-deco::before {
    top: -27px;
}
/* Cartes à bords coupés : le décor dépasse seulement si le navigateur sait le faire */
.account-section.xm-deco::before,
.wallet-card.xm-deco::before {
    display: none;
}
@supports (overflow-clip-margin: 1px) {
    .account-section.xm-deco,
    .wallet-card.xm-deco {
        overflow: clip;
        overflow-clip-margin: 36px;
    }
    .account-section.xm-deco .account-section-header {
        border-radius: 16px 16px 0 0;
    }
    .wallet-card.xm-deco > :first-child {
        border-radius: var(--border-radius) var(--border-radius) 0 0;
    }
    .wallet-card.xm-deco > :last-child {
        border-radius: 0 0 var(--border-radius) var(--border-radius);
    }
    .account-section.xm-deco::before,
    .wallet-card.xm-deco::before {
        display: block;
    }
}
.xm-deco.xm-o-holly::before {
    width: 60px;
    height: 38px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 40'%3E%3Cpath d='M30 22C22 10 10 8 2 12c4 2 4 6 1 8 5 1 7 5 6 8 5-2 9 0 10 4 3-4 8-6 11-10z' fill='%231f6b45' stroke='%23d3b574' stroke-width='.8'/%3E%3Cpath d='M34 22c8-12 20-14 28-10-4 2-4 6-1 8-5 1-7 5-6 8-5-2-9 0-10 4-3-4-8-6-11-10z' fill='%23185a3a' stroke='%23d3b574' stroke-width='.8'/%3E%3Cpath d='M30 22C20 16 10 13 3 13M34 22c10-6 20-9 27-9' stroke='%23d3b574' stroke-width='.6' fill='none' opacity='.7'/%3E%3Ccircle cx='29' cy='24' r='4' fill='%23c0283e'/%3E%3Ccircle cx='35' cy='24.5' r='4' fill='%23a3263a'/%3E%3Ccircle cx='32' cy='19.5' r='4' fill='%23d33a50'/%3E%3Ccircle cx='27.8' cy='22.8' r='1.2' fill='%23fff' opacity='.55'/%3E%3Ccircle cx='33.8' cy='23.3' r='1.2' fill='%23fff' opacity='.5'/%3E%3Ccircle cx='30.8' cy='18.3' r='1.2' fill='%23fff' opacity='.55'/%3E%3C/svg%3E");
}
.xm-deco.xm-o-bow::before {
    width: 62px;
    height: 46px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 44'%3E%3Cpath d='M30 22C24 6 6 2 5 13c-1 9 13 12 25 9z' fill='%23e04a5f'/%3E%3Cpath d='M30 22c6-16 24-20 25-9 1 9-13 12-25 9z' fill='%23c02c40'/%3E%3Cpath d='M28 24l-9 18 6-2 3 4 3-18zM32 24l9 18-6-2-3 4-3-18z' fill='%23a3263a'/%3E%3Cellipse cx='30' cy='22' rx='6.5' ry='6' fill='%23f3d27a'/%3E%3Cellipse cx='28.5' cy='20.5' rx='2' ry='1.4' fill='%23fff' opacity='.6'/%3E%3C/svg%3E");
}
.xm-deco.xm-o-balls::before {
    width: 66px;
    height: 40px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 72 44'%3E%3Cdefs%3E%3CradialGradient id='r' cx='.35' cy='.3' r='.8'%3E%3Cstop offset='0' stop-color='%23ff9aa6'/%3E%3Cstop offset='.3' stop-color='%23c0283e'/%3E%3Cstop offset='1' stop-color='%235e0f1d'/%3E%3C/radialGradient%3E%3CradialGradient id='o' cx='.35' cy='.3' r='.8'%3E%3Cstop offset='0' stop-color='%23fffbe8'/%3E%3Cstop offset='.3' stop-color='%23e2c985'/%3E%3Cstop offset='1' stop-color='%2380622a'/%3E%3C/radialGradient%3E%3CradialGradient id='v' cx='.35' cy='.3' r='.8'%3E%3Cstop offset='0' stop-color='%239fe0bf'/%3E%3Cstop offset='.3' stop-color='%2324895a'/%3E%3Cstop offset='1' stop-color='%230d3b25'/%3E%3C/radialGradient%3E%3C/defs%3E%3Cg fill='none' stroke='%231f6b45' stroke-width='2.2' stroke-linecap='round'%3E%3Cpath d='M4 12Q36 4 68 12'/%3E%3Cpath d='M8 11l-5 6M14 10l-5 8M20 9l-4 8M26 8l-3 8M46 8l3 8M52 9l4 8M58 10l5 8M64 11l5 6M12 10L7 4M20 8l-5-5M52 8l5-5M60 10l5-6' stroke='%232c7a52' stroke-width='1.7'/%3E%3C/g%3E%3Cpath d='M18 13h6v5h-6zM33 15h6v5h-6zM48 13h6v5h-6z' fill='%23d3b574'/%3E%3Ccircle cx='21' cy='25' r='9' fill='url(%23r)'/%3E%3Ccircle cx='51' cy='25' r='9' fill='url(%23v)'/%3E%3Ccircle cx='36' cy='30' r='11' fill='url(%23o)'/%3E%3Cg fill='%23fff' opacity='.5'%3E%3Ccircle cx='18' cy='21' r='2'/%3E%3Ccircle cx='48' cy='21' r='2'/%3E%3Ccircle cx='32' cy='25' r='2.6'/%3E%3C/g%3E%3C/svg%3E");
}

/* ===== Module de souscription : emballé comme les cadeaux de l'Advent ===== */
body .phidias-home .pr-card-wrap::before {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    height: 28px;
    border-radius: 28px 28px 0 0;
    border-top: 7px solid #d3b574;
    z-index: 3;
    pointer-events: none;
}
body .phidias-home .pr-card-wrap::after {
    content: '';
    position: absolute;
    top: -26px;
    right: 34px;
    width: 78px;
    height: 57px;
    z-index: 4;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 60 44'%3E%3Cpath d='M30 22C24 6 6 2 5 13c-1 9 13 12 25 9z' fill='%23e04a5f'/%3E%3Cpath d='M30 22c6-16 24-20 25-9 1 9-13 12-25 9z' fill='%23c02c40'/%3E%3Cpath d='M28 24l-9 18 6-2 3 4 3-18zM32 24l9 18-6-2-3 4-3-18z' fill='%23a3263a'/%3E%3Cellipse cx='30' cy='22' rx='6.5' ry='6' fill='%23f3d27a'/%3E%3Cellipse cx='28.5' cy='20.5' rx='2' ry='1.4' fill='%23fff' opacity='.6'/%3E%3C/svg%3E") center / contain no-repeat;
    filter: drop-shadow(0 8px 10px rgba(0, 0, 0, 0.5));
    pointer-events: none;
}
body .phidias-home .pr-config::before {
    content: '';
    position: absolute;
    top: -16px;
    left: 20px;
    width: 64px;
    height: 40px;
    z-index: 3;
    background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 64 40'%3E%3Cpath d='M30 22C22 10 10 8 2 12c4 2 4 6 1 8 5 1 7 5 6 8 5-2 9 0 10 4 3-4 8-6 11-10z' fill='%231f6b45' stroke='%23d3b574' stroke-width='.8'/%3E%3Cpath d='M34 22c8-12 20-14 28-10-4 2-4 6-1 8-5 1-7 5-6 8-5-2-9 0-10 4-3-4-8-6-11-10z' fill='%23185a3a' stroke='%23d3b574' stroke-width='.8'/%3E%3Cpath d='M30 22C20 16 10 13 3 13M34 22c10-6 20-9 27-9' stroke='%23d3b574' stroke-width='.6' fill='none' opacity='.7'/%3E%3Ccircle cx='29' cy='24' r='4' fill='%23c0283e'/%3E%3Ccircle cx='35' cy='24.5' r='4' fill='%23a3263a'/%3E%3Ccircle cx='32' cy='19.5' r='4' fill='%23d33a50'/%3E%3Ccircle cx='27.8' cy='22.8' r='1.2' fill='%23fff' opacity='.55'/%3E%3Ccircle cx='33.8' cy='23.3' r='1.2' fill='%23fff' opacity='.5'/%3E%3Ccircle cx='30.8' cy='18.3' r='1.2' fill='%23fff' opacity='.55'/%3E%3C/svg%3E") center / contain no-repeat;
    transform: rotate(-10deg) scaleX(-1);
    filter: drop-shadow(0 6px 8px rgba(0, 0, 0, 0.5));
    pointer-events: none;
}

/* ===== Interrupteur de la neige ===== */
.xm-toggle {
    position: fixed;
    left: calc(var(--sidebar-width, 0px) + 4px);
    bottom: 6px;
    z-index: 60;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    border: 1px solid rgba(220, 233, 247, 0.18);
    background: rgba(8, 16, 32, 0.7);
    color: var(--xm-ice);
    cursor: pointer;
    opacity: 0.5;
    transition: opacity 0.2s ease;
}
.xm-toggle:hover,
.xm-toggle:focus-visible {
    opacity: 1;
}
.xm-toggle svg {
    width: 12px;
    height: 12px;
}
.xm-toggle.off {
    color: #64748b;
}
body:has(.bg) .xm-toggle {
    left: 14px;
}

/* ===== Étoile à attraper et carte du code (seulement si XMAS_PROMO_CODE) ===== */
.xm-star {
    position: fixed;
    right: 26px;
    bottom: 26px;
    z-index: 60;
    width: 44px;
    height: 44px;
    padding: 9px;
    border: 1px solid rgba(226, 201, 133, 0.45);
    border-radius: 50%;
    background: rgba(8, 16, 32, 0.8);
    color: var(--xm-gold);
    cursor: pointer;
    animation: xm-pop 0.5s ease both;
}
.xm-star svg {
    display: block;
    width: 100%;
    height: 100%;
}
.xm-egg {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(3, 8, 16, 0.74);
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
}
.xm-egg.open {
    display: flex;
}
.xm-egg-card {
    position: relative;
    width: 100%;
    max-width: 390px;
    padding: 32px 26px 28px;
    text-align: center;
    border-radius: var(--border-radius);
    background: linear-gradient(165deg, #12213a, #0a1426);
    border: 1px solid rgba(226, 201, 133, 0.35);
    color: var(--pure-white);
    font-family: var(--font-family);
    animation: xm-pop 0.35s ease both;
}
@keyframes xm-pop {
    from { transform: scale(0.94); opacity: 0; }
    to   { transform: scale(1); opacity: 1; }
}
.xm-egg-title {
    font-size: 21px;
    font-weight: 600;
    margin-bottom: 8px;
}
.xm-egg-text {
    font-size: 14px;
    color: var(--cool-grey);
    margin-bottom: 20px;
}
.xm-egg-code {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    font-family: inherit;
    font-size: 19px;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: var(--xm-gold);
    background: rgba(226, 201, 133, 0.08);
    border: 1px solid rgba(226, 201, 133, 0.4);
    border-radius: var(--border-radius-xs);
    cursor: pointer;
}
.xm-egg-code small {
    font-size: 11px;
    font-weight: 500;
    letter-spacing: 0;
    color: var(--cool-grey);
}
.xm-egg-close {
    position: absolute;
    top: 8px;
    right: 12px;
    padding: 4px 8px;
    font-size: 24px;
    line-height: 1;
    color: var(--cool-grey);
    background: none;
    border: none;
    cursor: pointer;
}

@media (max-width: 1150px) {
    body:has(.bg) .xm-tree {
        display: none;
    }
}

@media (max-width: 900px) {
    .xm-toggle {
        left: 4px;
    }
    .xm-tree,
    .xm-gift {
        display: none;
    }
}

/* Écran peu haut : la carte de connexion garde toute la place */
@media (max-height: 800px) {
    .wrap .xm-count {
        display: none;
    }
}

@media (prefers-reduced-motion: reduce) {
    .sidebar-logo .logo-container::after,
    .wrap .logo::after,
    .xm-star,
    .xm-egg-card {
        animation: none;
    }
}
