/*
 * Play4Geek — header global (menu profil, notifications, modale auth)
 * Présent sur toutes les pages ; extrait de play4geek-member-surfaces.css.
 */

.member-auth-form label:not(.member-auth-check) {
    font-size: 0.9rem;
    font-weight: 600;
    color: #374151;
}

.member-auth-form,
.member-profile-form {
    display: grid;
    gap: 0.5rem;
}

.member-auth-form input[type="text"],
.member-auth-form input[type="email"],
.member-auth-form input[type="password"],
.member-auth-form input[type="url"],
.member-profile-form input[type="text"],
.member-profile-form input[type="email"],
.member-profile-form input[type="password"],
.member-profile-form input[type="url"],
.member-profile-form input[type="date"],
.member-profile-form textarea {
    min-height: 42px;
    border-radius: 10px;
    border: 1px solid rgba(20, 89, 130, 0.2);
    padding: 0.55rem 0.7rem;
    color: #111827;
}

.member-auth-form input::placeholder {
    color: #6b7280;
}

.member-auth-form button,
.member-logout-btn {
    min-height: 42px;
    border: 0;
    border-radius: 10px;
    padding: 0.45rem 0.85rem;
    font-weight: 700;
    color: var(--button-text, #fff);
    background: var(--button-bg, var(--bg-blue));
}

.member-profile-form button:not(.member-composer-icon):not(.member-emoji-choice):not(.member-gif-choice):not(.member-gif-picker-clear):not(.member-klipy-picker-page-btn):not(.member-life-event-fb-choice):not(.member-life-event-fb-back):not(.member-life-event-fb-close):not(.member-life-event-fb-done):not(.member-life-event-fb-media-btn):not(.member-life-event-fb-media-remove):not(.member-composer-gallery-remove):not(.member-life-event-clear):not(.member-emoji-picker-nav-btn):not(.member-ma-choice):not(.member-ma-tab):not(.member-ma-done):not(.member-ma-clear):not(.member-poll-clear):not(.member-feed-poll-option-btn):not(.member-ma-dialog-dismiss):not(.member-ma-place-locate):not(.member-ma-place-suggestion):not(.member-place-done):not(.member-place-dialog-dismiss):not(.member-post-privacy-toggle):not(.member-post-privacy-option):not(.member-text-bg-picker-swatch):not(.member-text-bg-picker-clear):not(.member-text-bg-tool-btn):not(.member-text-bg-aa-btn):not(.member-composer-emoji-btn) {
    min-height: 42px;
    border: 0;
    border-radius: 10px;
    padding: 0.45rem 0.85rem;
    font-weight: 700;
    color: var(--button-text, #fff);
    background: var(--reviews-score-bg, var(--bg-blue));
}

.member-auth-form button:hover,
.member-logout-btn:hover {
    background: var(--button-hover-bg, var(--bg-accent));
    color: var(--button-text, #fff);
}

.member-oauth-connect-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 0.35rem 0.85rem;
    border-radius: 10px;
    font-weight: 700;
    text-decoration: none;
    background: var(--bg-blue);
    color: #fff !important;
}

.member-auth-linkline-oauth {
    margin-top: 0.6rem;
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.5rem;
}

.member-auth-linkline-oauth .member-oauth-connect-btn,
.member-auth-form .member-oauth-connect-btn {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box;
    align-self: stretch;
    min-height: 42px;
    justify-content: center !important;
    gap: 0.5rem;
    padding: 0.55rem 0.9rem;
    border: 1px solid transparent;
    border-radius: 10px;
    text-decoration: none !important;
    font-size: 0.9rem;
    font-weight: 700;
    box-shadow: 0 8px 18px rgba(14, 32, 56, 0.12);
}

.member-auth-form .member-auth-linkline-oauth {
    width: 100%;
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 0.5rem;
}

.member-auth-panel .member-auth-form .member-auth-linkline-oauth {
    width: 100% !important;
    margin: 0.5rem 0 0 !important;
    justify-items: stretch !important;
}

.member-auth-panel .member-auth-form .member-auth-linkline-oauth .member-oauth-connect-btn {
    display: flex !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    justify-content: center !important;
}

.member-auth-form .member-oauth-connect-btn + .member-oauth-connect-btn {
    margin-top: 0.5rem;
}

.member-oauth-item .member-oauth-connect-btn {
    display: flex;
    width: 100%;
    justify-content: center;
    gap: 0.5rem;
}

.member-oauth-connect-btn.is-discord {
    background: #5865f2;
    border-color: #4d5add;
    color: #ffffff !important;
}

.member-oauth-connect-btn.is-discord:hover {
    background: #4f5bda;
    color: #ffffff !important;
    text-decoration: none;
}

.member-oauth-connect-btn.is-twitch {
    background: #9146ff;
    border-color: #7f3fe0;
    color: #ffffff !important;
}

.member-oauth-connect-btn.is-google {
    background: #fff;
    border-color: #dadce0;
    color: #3c4043 !important;
    box-shadow: 0 1px 2px rgba(60, 64, 67, 0.12);
}

.member-oauth-connect-btn.is-google:hover {
    background: #f8f9fa;
    border-color: #d2d4d8;
    color: #202124 !important;
    text-decoration: none;
}

.member-oauth-connect-btn.is-google .fa-google {
    color: #4285f4;
}

.member-oauth-connect-btn.is-microsoft {
    background: #0078d4;
    border-color: #006cbd;
    color: #ffffff !important;
}

.member-oauth-connect-btn.is-microsoft:hover {
    background: #006cbd;
    color: #ffffff !important;
    text-decoration: none;
}

.member-oauth-connect-btn.is-steam {
    background: #1b2838;
    border-color: #171a21;
    color: #ffffff !important;
}

.member-oauth-connect-btn.is-steam:hover {
    background: #171a21;
    color: #ffffff !important;
    text-decoration: none;
}

.member-auth-linkline-oauth .member-oauth-connect-btn.is-steam {
    order: -2;
}

.member-auth-linkline-oauth .member-oauth-connect-btn.is-microsoft {
    order: -1;
}

.member-auth-2fa-title {
    margin: 0 0 0.85rem;
    text-align: center;
    font-size: 1.15rem;
    color: #1f2937;
}

.member-2fa-form input[name="member_2fa_code"],
.member-2fa-form input[name="member_2fa_setup_code"],
.member-2fa-disable-form input[name="member_2fa_disable_code"] {
    letter-spacing: 0.15em;
    font-size: 1.15rem;
    text-align: center;
}

.member-auth-panel > .member-auth-linkline-oauth .member-oauth-connect-btn.is-microsoft,
.member-auth-panel .member-auth-form .member-auth-linkline-oauth .member-oauth-connect-btn.is-microsoft {
    display: flex !important;
    visibility: visible !important;
    opacity: 1 !important;
}

.member-auth-oauth-divider {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 1rem 0 0.65rem;
    color: var(--text-muted, #6b7280);
    font-size: 0.875rem;
    text-align: center;
}

.member-auth-oauth-divider::before,
.member-auth-oauth-divider::after {
    content: "";
    flex: 1;
    height: 1px;
    background: currentColor;
    opacity: 0.35;
}

.member-auth-oauth-divider span {
    flex-shrink: 0;
    padding: 0 0.15rem;
}

.member-oauth-connect-btn.is-twitch:hover {
    background: #7f3ee0;
    color: #ffffff !important;
    text-decoration: none;
}

.header-notifications {
    position: relative;
}

.header-notifications-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: 1px solid rgba(255,255,255,0.14);
    border-radius: 50%;
    background: transparent;
    color: var(--text-light);
    font-size: 1rem;
    cursor: pointer;
    position: relative;
}

.header-notifications-badge {
    position: absolute;
    top: -3px;
    right: -3px;
    background: #ef4444;
    color: #fff;
    min-width: 18px;
    height: 18px;
    border-radius: 999px;
    font-size: 0.72rem;
    line-height: 18px;
    text-align: center;
    padding: 0 4px;
}

.header-notifications-menu {
    position: absolute;
    right: 0;
    top: calc(100% + 0.45rem);
    width: min(360px, 92vw);
    background: #fff;
    border: 1px solid rgba(20, 89, 130, 0.16);
    border-radius: 12px;
    box-shadow: 0 10px 28px rgba(15, 23, 42, 0.18);
    z-index: 120;
    color: var(--bg-dark);
}

.header-notifications-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.65rem 0.75rem;
    border-bottom: 1px solid rgba(20, 89, 130, 0.1);
}

.header-notifications-actions {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.header-notifications-action {
    border: 0;
    background: transparent;
    color: var(--bg-blue);
    font-weight: 600;
    font-size: 0.82rem;
    cursor: pointer;
    transition: color 0.15s ease;
    padding: 0.15rem 0.25rem;
}

.header-notifications-action:hover:not(:disabled) {
    color: var(--button-hover-bg, var(--bg-accent));
}

.header-notifications-action:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.header-notifications-action--danger {
    color: #b42318;
}

.header-notifications-action--danger:hover:not(:disabled) {
    color: #912018;
}

.header-notifications-head form button {
    border: 0;
    background: transparent;
    color: var(--bg-blue);
    font-weight: 600;
    cursor: pointer;
    transition: color 0.15s ease;
}

.header-notifications-head form button:hover {
    color: var(--button-hover-bg, var(--bg-accent));
}

.header-notifications-list {
    max-height: 320px;
    overflow: auto;
}

.header-notification-item {
    display: block;
    padding: 0.68rem 0.75rem;
    border-bottom: 1px solid rgba(20, 89, 130, 0.08);
}

.header-notification-item.is-unread {
    background: rgba(20, 89, 130, 0.06);
}

.header-notification-item small {
    display: block;
    margin-top: 0.2rem;
    color: rgba(14, 32, 56, 0.62);
}

.header-notifications-empty {
    margin: 0;
    padding: 0.75rem;
    color: rgba(14, 32, 56, 0.7);
}

.member-auth-trigger {
    min-height: 34px;
    border: 1px solid rgba(20, 89, 130, 0.3);
    background: #fff;
    border-radius: 999px;
    padding: 0 0.7rem;
    font-weight: 700;
    color: rgba(14, 32, 56, 0.86);
}

.member-auth-shortcuts {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
}

.member-auth-trigger.is-icon {
    width: 44px;
    min-width: 44px;
    height: 44px;
    min-height: 44px;
    border-radius: 50%;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.member-auth-trigger.is-icon i {
    font-size: 0.9rem;
    line-height: 1;
    pointer-events: none;
}

.drawer-member-menu .member-auth-trigger {
    width: 100%;
    justify-content: center;
}

@media (max-width: 1100px) {
    .header-topbar {
        grid-template-columns: auto 1fr auto;
        gap: 0.65rem;
    }

    .header-left,
    .header-right {
        gap: 0.5rem;
    }

    .header-left {
        grid-column: 1;
    }

    .header-brand {
        grid-column: 1 / -1;
        justify-self: center;
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
        z-index: 2;
    }

    .header-right {
        grid-column: 3;
    }

    .header-brand .custom-logo-link img,
    .header-brand .custom-logo,
    .header-brand .site-logo-link--dual .site-logo-image,
    .header-brand .site-logo-link--switchable .site-logo-image--switchable {
        max-height: 44px;
        width: auto;
    }

    .header-brand .site-logo-link--switchable {
        height: 44px;
    }

    .header-right .social-links {
        display: none;
    }
}

@media (max-width: 760px) {
    :root {
        --p4g-sticky-site-header-height: 7.25rem;
    }

    .site-header {
        position: sticky;
        top: 0;
        z-index: 200;
    }

    .header-topbar {
        display: grid;
        grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
        gap: 0.5rem;
        padding: 0.55rem 0.85rem;
        align-items: center;
    }

    .header-left,
    .header-right {
        display: inline-flex;
        min-width: 0;
        gap: 0.5rem;
        flex-wrap: nowrap;
        width: auto;
    }

    .header-right {
        justify-content: flex-end;
    }

    .header-left {
        grid-column: 1;
    }

    .header-brand {
        grid-column: 2;
        position: relative;
        left: auto;
        transform: none;
        justify-self: center;
    }

    .header-livedirect {
        display: none !important;
    }

    .header-right {
        grid-column: 3;
    }

    .header-brand .custom-logo-link img,
    .header-brand .custom-logo,
    .header-brand .site-logo-link--dual .site-logo-image,
    .header-brand .site-logo-link--switchable .site-logo-image--switchable {
        max-height: 36px;
        width: auto;
    }

    .header-brand .site-logo-link--switchable {
        height: 36px;
    }

    .member-auth-shortcuts {
        gap: 0.5rem;
    }

    .member-auth-trigger.is-icon,
    .menu-toggle,
    .header-notifications-toggle {
        width: 44px;
        min-width: 44px;
        height: 44px;
        min-height: 44px;
    }

    /* Recherche : formulaire dans le menu latÃ©ral (drawer) uniquement */
    .header-right .search-toggle,
    .header-search-panel {
        display: none !important;
    }

    body.search-open {
        overflow: auto;
    }

    .header-topbar .member-space-link.member-space-link-profile {
        width: 44px;
        height: 44px;
        min-width: 44px;
        min-height: 44px;
    }
}

.member-auth-modal {
    position: fixed;
    inset: 0;
    z-index: 1200;
    background: rgba(5, 14, 26, 0.62);
    display: none;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.member-auth-modal.is-open {
    display: flex;
}

.member-auth-modal-panel {
    width: min(100%, 460px);
    max-height: min(92vh, 720px);
    overflow-y: auto;
    background: #fff;
    /* Pas dâ€™hÃ©ritage du header (texte clair) : le panneau reste lisible sur fond blanc */
    color: #1f2937;
    border-radius: 16px;
    padding: 1.85rem 1.35rem 2rem;
    border: 1px solid rgba(20, 89, 130, 0.16);
    position: relative;
}

.member-auth-logo {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.65rem;
    margin-bottom: 0.85rem;
}

.member-auth-logo img {
    max-height: 152px;
    max-width: min(100%, 380px);
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
}

.member-auth-logo .logo-mark {
    min-width: 68px;
    width: auto;
    height: 68px;
    font-size: 1.2rem;
    border-radius: 16px;
}

.member-auth-logo .logo-text {
    font-size: 1.55rem;
    font-weight: 700;
    margin-left: 0;
}

.member-auth-modal-close {
    position: absolute;
    top: 0.6rem;
    right: 0.6rem;
    border: 0;
    background: transparent;
    font-size: 1.15rem;
    line-height: 1;
    min-width: 34px;
    min-height: 34px;
    border-radius: 8px;
    color: #1f2937;
    z-index: 2;
}

.member-auth-modal-close:hover {
    background: rgba(20, 89, 130, 0.08);
}

.member-auth-tabs {
    display: flex;
    gap: 0.45rem;
    margin-bottom: 0.7rem;
    padding: 0 2.5rem;
    justify-content: center;
}

.member-auth-tab {
    flex: 1;
    min-height: 38px;
    border-radius: 10px;
    border: 1px solid rgba(20, 89, 130, 0.2);
    background: #f6f9fd;
    font-weight: 700;
    color: #1f2937;
}

.member-auth-tab.is-active {
    background: rgba(30, 115, 190, 0.14);
    border-color: rgba(30, 115, 190, 0.46);
    color: var(--bg-blue);
}

.member-auth-notice {
    margin: 0 0 0.7rem;
    border-radius: 8px;
    padding: 0.55rem 0.6rem;
    font-size: 0.9rem;
}

.member-auth-notice.is-success {
    background: rgba(22, 163, 74, 0.12);
    color: #14532d;
}

.member-auth-notice.is-error {
    background: rgba(220, 38, 38, 0.11);
    color: #7f1d1d;
}

.member-auth-panel {
    display: none;
}

.member-auth-panel.is-active {
    display: block;
}

.member-auth-panel form {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0.5rem 0.75rem;
    align-items: center;
}

.member-auth-panel form > input[type="hidden"] {
    display: none;
}

.member-auth-panel form > input[type="text"],
.member-auth-panel form > input[type="email"],
.member-auth-panel form > input[type="password"],
.member-auth-panel form > button[type="submit"],
.member-auth-panel form > .member-auth-oauth-divider,
.member-auth-panel form > .member-auth-linkline-oauth,
.member-auth-panel > .member-auth-oauth-divider,
.member-auth-panel > .member-auth-linkline-oauth {
    grid-column: 1 / -1;
}

.member-auth-panel form > .member-auth-oauth-divider {
    margin: 0.35rem 0 0;
}

.member-auth-panel > .member-auth-oauth-divider {
    margin: 0.75rem 0 0;
}

.member-auth-panel > .member-auth-linkline-oauth,
.member-auth-panel .member-auth-form .member-auth-linkline-oauth {
    width: 100% !important;
    margin: 0.35rem 0 0 !important;
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 0.5rem;
    justify-items: stretch !important;
}

.member-auth-panel > .member-auth-linkline-oauth .member-oauth-connect-btn,
.member-auth-panel .member-auth-form .member-auth-linkline-oauth .member-oauth-connect-btn {
    display: flex !important;
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    justify-content: center !important;
}

.member-auth-panel input[type="text"],
.member-auth-panel input[type="email"],
.member-auth-panel input[type="password"] {
    min-height: 42px;
    border-radius: 10px;
    border: 1px solid rgba(20, 89, 130, 0.24);
    padding: 0.45rem 0.62rem;
    color: #111827;
}

.member-auth-panel input::placeholder {
    color: #6b7280;
}

.member-auth-panel button[type="submit"] {
    min-height: 42px;
    border-radius: 10px;
    border: 0;
    background: var(--button-bg, var(--bg-blue));
    color: var(--button-text, #fff);
    font-weight: 700;
    transition: background 0.15s ease;
}

.member-auth-panel button[type="submit"]:hover {
    background: var(--button-hover-bg, var(--bg-accent));
}

.member-auth-remember {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    font-size: 0.86rem;
    color: #374151;
    justify-self: start;
}

.member-auth-lost-link {
    font-size: 0.86rem;
    color: var(--bg-blue);
    text-decoration: none;
    justify-self: end;
}

.member-auth-lost-link:hover {
    text-decoration: underline;
}

/* Scroll horizontal uniquement sur la liste des jeux (lien Tendances fixe Ã  gauche). */
.header-secondary .category-menu-nav {
    flex: 1 1 auto;
    min-width: 0;
    width: auto !important;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: visible;
    overscroll-behavior-x: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.35) rgba(255, 255, 255, 0.08);
}

.header-secondary .category-menu-nav::-webkit-scrollbar {
    height: 5px;
}

.header-secondary .category-menu-nav::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.35);
    border-radius: 999px;
}

.header-secondary .category-menu-nav::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.12);
    border-radius: 999px;
}

.header-secondary .category-menu {
    flex-wrap: nowrap;
    overflow-x: visible;
    width: max-content;
    min-width: max-content;
}

.header-secondary .category-menu li {
    flex: 0 0 auto;
}

.header-secondary .category-menu a {
    display: inline-flex;
    max-width: none;
    white-space: nowrap;
    overflow: visible;
    text-overflow: clip;
    line-height: 1.1;
}

.header-tendances-shortcut a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 0.35rem 0.15rem;
    border-radius: 0;
    text-transform: uppercase;
    letter-spacing: 0.11em;
    font-size: 0.68rem;
    font-weight: 800;
    color: var(--text-light);
    background: transparent;
    border: 0;
    border-bottom: 2px solid rgba(255, 255, 255, 0.7);
    opacity: 0.95;
    text-decoration: none;
}

.footer-tendances-band {
    background: var(--footer-tendances-bg, var(--header-secondary-bg, #513628));
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    border-bottom: 1px solid rgba(0, 0, 0, 0.25);
}

.footer-tendances-inner {
    max-width: 1600px;
    width: min(100%, 1600px);
    margin: 0 auto;
    padding: 0.65rem 1.5rem;
    padding-inline-end: max(1.5rem, env(safe-area-inset-right, 0px));
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: flex-start;
    gap: 0.55rem;
    box-sizing: border-box;
}

.footer-tendances-pill.is-title {
    flex: 0 0 auto;
    white-space: nowrap;
    padding: 0.35rem 0.15rem;
    border-radius: 0;
    text-transform: uppercase;
    letter-spacing: 0.11em;
    font-size: 0.68rem;
    font-weight: 800;
    background: transparent;
    border: 0;
    border-bottom: 2px solid rgba(255, 255, 255, 0.7);
    color: var(--footer-tendances-text, var(--text-light, #f7f1ea));
    opacity: 0.95;
    text-decoration: none;
}

.footer-tendances-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    border-radius: 999px;
    padding: 0.45rem 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.72rem;
    color: var(--footer-tendances-text, var(--text-light, #f7f1ea));
    background: rgba(255, 255, 255, 0.08);
    white-space: nowrap;
}

.footer-tendances-nav {
    min-width: 0;
    flex: 1 1 auto;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: hidden;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
    padding-inline-end: 1rem;
    scroll-padding-inline-end: 1rem;
}

.footer-tendances-menu {
    margin: 0;
    padding: 0;
    padding-inline-end: 0.35rem;
    list-style: none;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    flex-wrap: nowrap;
    gap: 0.5rem;
    overflow-x: visible;
    scrollbar-width: none;
    width: max-content;
    max-width: none;
}

.footer-tendances-menu::-webkit-scrollbar,
.footer-tendances-nav::-webkit-scrollbar {
    display: none;
}

.footer-tendances-menu li {
    margin: 0;
    list-style: none;
    flex: 0 0 auto;
}

.footer-tendances-menu a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    border-radius: 999px;
    padding: 0.45rem 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.72rem;
    color: var(--footer-tendances-text, var(--text-light, #f7f1ea));
    background: rgba(255, 255, 255, 0.08);
    white-space: nowrap;
    max-width: none;
    overflow: visible;
    text-overflow: clip;
    line-height: 1.1;
    text-decoration: none;
}

@media (max-width: 720px) {
    .header-secondary-inner {
        justify-content: flex-start;
    }

    .footer-tendances-inner {
        padding: 0.55rem 1rem;
        padding-inline-end: max(1rem, env(safe-area-inset-right, 0px));
    }
}

.member-space-link {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.14);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
}

/* Profil dans le header : lien circulaire = mÃªme gabarit que cloche / recherche (Ã©vite la Â« pilule Â» autour de lâ€™avatar). */
.header-topbar .member-space-link.member-space-link-profile {
    width: 44px;
    height: 44px;
    min-width: 44px;
    min-height: 44px;
    padding: 0;
    border-radius: 50%;
    gap: 0;
    overflow: hidden;
    flex-shrink: 0;
    text-decoration: none;
}

.header-topbar .member-space-link-profile .member-space-profile-text {
    display: none;
}

.header-topbar .member-space-avatar {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-topbar .member-space-avatar img {
    width: 100%;
    height: 100%;
    max-width: none;
    border-radius: 50%;
    object-fit: cover;
    display: block;
}

.member-space-link-profile {
    width: auto;
    height: 44px;
    border-radius: 999px;
    padding: 0 0.65rem 0 0.28rem;
    gap: 0.45rem;
    text-decoration: none;
}

.member-space-profile-text {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    min-width: 0;
    max-width: 160px;
}

.member-profile-menu {
    position: relative;
    padding-bottom: 6px;
    margin-bottom: -6px;
    overflow: visible;
}

.member-space-avatar {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

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

.member-space-name {
    font-size: 0.82rem;
    font-weight: 700;
    color: var(--text-light);
    min-width: 0;
    flex: 1 1 auto;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.member-profile-submenu {
    position: absolute;
    top: 100%;
    right: 0;
    min-width: 180px;
    margin: 0;
    padding: 0.35rem;
    list-style: none;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.12);
    background: var(--bg-dark);
    box-shadow: 0 14px 32px rgba(0, 0, 0, 0.22);
    display: none;
    z-index: 120;
}

.member-profile-submenu::before {
    content: "";
    position: absolute;
    top: -8px;
    left: 0;
    right: 0;
    height: 8px;
}

.member-profile-submenu li {
    margin: 0;
}

.member-profile-submenu a {
    display: flex;
    align-items: center;
    gap: 0.55rem;
    padding: 0.5rem 0.65rem;
    border-radius: 8px;
    color: var(--text-light);
    font-size: 0.85rem;
    font-weight: 600;
    text-decoration: none;
    transition: background 0.15s ease, color 0.15s ease;
}

.member-profile-submenu-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.15rem;
    flex-shrink: 0;
    font-size: 0.88rem;
    color: color-mix(in srgb, var(--text-light) 70%, var(--bg-blue));
    transition: color 0.15s ease;
}

.member-profile-submenu a span {
    min-width: 0;
}

.member-profile-submenu a:hover,
.member-profile-submenu a:focus-visible {
    background: color-mix(in srgb, var(--bg-blue) 16%, transparent);
    color: var(--bg-blue);
}

.member-profile-submenu a:hover .member-profile-submenu-icon,
.member-profile-submenu a:focus-visible .member-profile-submenu-icon {
    color: var(--bg-blue);
}

.member-profile-menu:hover .member-profile-submenu,
.member-profile-menu:focus-within .member-profile-submenu {
    display: block;
}

.drawer-member-menu {
    margin-bottom: 0.35rem;
}

.drawer-member-menu > li > a {
    font-weight: 700;
}

@media (max-width: 1100px) {
        .header-topbar {
            grid-template-columns: auto 1fr auto;
            gap: 0.65rem;
        }

        .header-left,
        .header-right {
            gap: 0.5rem;
        }

        .header-left {
            grid-column: 1;
        }

        .header-brand {
            grid-column: 1 / -1;
            justify-self: center;
            position: absolute;
            left: 50%;
            transform: translateX(-50%);
            z-index: 2;
        }

        .header-right {
            grid-column: 3;
        }

        .header-brand .custom-logo-link img,
        .header-brand .custom-logo,
        .header-brand .site-logo-link--dual .site-logo-image,
        .header-brand .site-logo-link--switchable .site-logo-image--switchable {
            max-height: 44px;
            width: auto;
        }

        .header-brand .site-logo-link--switchable {
            height: 44px;
        }

        .header-right .social-links {
            display: none;
        }
    }
}

@media (max-width: 760px) {
        :root {
            --p4g-sticky-site-header-height: 7.25rem;
        }

        .site-header {
            position: sticky;
            top: 0;
            z-index: 200;
        }

        .header-topbar {
            display: grid;
            grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
            gap: 0.5rem;
            padding: 0.55rem 0.85rem;
            align-items: center;
        }

        .header-left,
        .header-right {
            display: inline-flex;
            min-width: 0;
            gap: 0.5rem;
            flex-wrap: nowrap;
            width: auto;
        }

        .header-right {
            justify-content: flex-end;
        }

        .header-left {
            grid-column: 1;
        }

        .header-brand {
            grid-column: 2;
            position: relative;
            left: auto;
            transform: none;
            justify-self: center;
        }

        .header-livedirect {
            display: none !important;
        }

        .header-right {
            grid-column: 3;
        }

        .header-brand .custom-logo-link img,
        .header-brand .custom-logo,
        .header-brand .site-logo-link--dual .site-logo-image,
        .header-brand .site-logo-link--switchable .site-logo-image--switchable {
            max-height: 36px;
            width: auto;
        }

        .header-brand .site-logo-link--switchable {
            height: 36px;
        }

        .member-auth-shortcuts {
            gap: 0.5rem;
        }

        .member-auth-trigger.is-icon,
        .menu-toggle,
        .header-notifications-toggle {
            width: 44px;
            min-width: 44px;
            height: 44px;
            min-height: 44px;
        }

        /* Recherche : formulaire dans le menu latÃ©ral (drawer) uniquement */
        .header-right .search-toggle,
        .header-search-panel {
            display: none !important;
        }

        body.search-open {
            overflow: auto;
        }

        .header-topbar .member-space-link.member-space-link-profile {
            width: 44px;
            height: 44px;
            min-width: 44px;
            min-height: 44px;
        }

        .member-profile-submenu {
            right: 0;
            left: auto;
            min-width: 210px;
            max-width: min(240px, calc(100vw - 1rem));
            box-sizing: border-box;
        }

        .member-profile-submenu a span {
            white-space: nowrap;
        }
}

.back-to-top-btn {
    position: fixed;
    right: 18px;
    bottom: 84px;
    width: 64px;
    height: 64px;
    border: 1px solid color-mix(in srgb, var(--button-bg, var(--bg-blue)) 35%, transparent);
    border-radius: 999px;
    background: var(--button-bg, var(--bg-blue));
    color: var(--button-text, #fff);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 26px color-mix(in srgb, var(--button-bg, var(--bg-blue)) 38%, transparent);
    cursor: pointer;
    z-index: 9998;
    opacity: 0;
    visibility: hidden;
    transform: translateY(8px);
    transition: opacity 0.25s ease, transform 0.25s ease, visibility 0.25s ease, background 0.2s ease, border-color 0.2s ease;
}

.back-to-top-btn i {
    font-size: 1.28rem;
}

.back-to-top-btn.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top-btn:hover {
    background: var(--button-hover-bg, var(--bg-accent));
    border-color: color-mix(in srgb, var(--button-hover-bg, var(--bg-accent)) 40%, transparent);
}

@media (max-width: 640px) {
    .back-to-top-btn {
        width: 54px;
        height: 54px;
        right: 12px;
        bottom: 72px;
    }
}

/* ==========================================================================
 * STYLE-DIET-PHASE2-HEADER-GLOBAL — extrait de style.css (phase 2 diet)
 * ========================================================================== */

/* --- site-header shell --- */
.site-header {
    background: var(--bg-dark);
    color: var(--text-light);
    position: sticky;
    top: 0;
    z-index: 200;
    margin-top: 0;
    box-shadow: 0 10px 28px rgba(0, 0, 0, 0.22);
}


/* --- header layout + barre tendances + drawer --- */
.header-topbar {
    display: grid;
    grid-template-columns: minmax(0, auto) auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 1rem;
    padding: 0.75rem 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    border-bottom: 1px solid rgba(0, 0, 0, 0.25);
    position: relative;
    z-index: 4;
    overflow: visible;
}

.header-left,
.header-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.header-left {
    grid-column: 1;
    justify-content: flex-start;
    min-width: 0;
    overflow: visible;
}

.header-right {
    grid-column: 4;
    justify-content: flex-end;
    overflow: visible;
}

.header-brand {
    grid-column: 2;
    justify-self: start;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.header-livedirect {
    grid-column: 3;
    display: flex;
    justify-content: center;
    align-items: center;
    min-width: 0;
    padding-inline: clamp(0.5rem, 1.5vw, 1.25rem);
}

.menu-toggle,
.search-toggle,
.drawer-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border: 1px solid rgba(255,255,255,0.14);
    border-radius: 50%;
    background: transparent;
    color: var(--text-light);
    font-size: 1rem;
    cursor: pointer;
}

.topbar-menu,
.category-menu,
.drawer-menu {
    display: flex;
    gap: 1rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

.header-right .social-links {
    display: flex;
    gap: 1rem;
    list-style: none;
    margin: 0;
    padding: 0;
}

/* Après display:flex ci-dessus — sinon la cascade réaffiche les icônes sur mobile. */
@media (max-width: 1100px) {
    .site-header .header-topbar .social-links,
    .site-header .header-right .social-links {
        display: none !important;
    }
}

.topbar-menu li,
.category-menu li,
.drawer-menu li {
    margin: 0;
}

/* Liens header : mÃªme palette lisible que la barre Tendances (fond #513628, texte #f7f1ea, pilules) */
.header-topbar .topbar-menu-nav {
    min-width: 0;
    max-width: 100%;
    overflow: visible;
}

.header-topbar .topbar-menu {
    flex-wrap: nowrap;
    overflow: visible;
}

.header-topbar .topbar-menu > li {
    flex: 0 0 auto;
}

.header-topbar .topbar-menu > li > a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    border-radius: 999px;
    padding: 0.45rem 0.8rem;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 600;
    color: #f7f1ea;
    background: rgba(255, 255, 255, 0.08);
    text-decoration: none;
    white-space: nowrap;
    transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.header-topbar .topbar-menu > li > a:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.16);
    transform: translateY(-1px);
}

.topbar-menu > li > a.has-nav-menu-icon,
.header-drawer .drawer-menu > li > a.has-nav-menu-icon {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
}

.topbar-menu .sub-menu li > a.has-nav-menu-icon,
.category-menu .sub-menu li > a.has-nav-menu-icon {
    display: inline-flex;
    align-items: center;
    gap: 0.62rem;
}

.topbar-menu .sub-menu li > a .nav-menu-icon,
.category-menu .sub-menu li > a .nav-menu-icon {
    width: 1rem;
    min-width: 1rem;
    font-size: 0.8rem;
    flex-shrink: 0;
}

.header-drawer .drawer-menu .sub-menu li > a.has-nav-menu-icon {
    display: flex;
    align-items: center;
    gap: 0.48rem;
}

.nav-menu-icon {
    flex-shrink: 0;
    width: 1.05em;
    text-align: center;
    line-height: 1;
    opacity: 0.94;
}

.nav-menu-icon::before {
    line-height: 1;
}

.header-topbar .topbar-menu .nav-menu-icon {
    font-size: 0.82rem;
}

.header-drawer .drawer-menu > li > a .nav-menu-icon {
    width: 1.15rem;
    font-size: 0.92rem;
    opacity: 1;
}

.header-drawer .drawer-menu > li > a.has-nav-menu-icon {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    width: 100%;
    box-sizing: border-box;
    padding: 0.62rem 0.72rem;
    border-radius: 12px;
    text-transform: none;
    letter-spacing: 0;
    font-size: 0.95rem;
    font-weight: 700;
}

.header-drawer .drawer-menu > li.menu-item-has-children > a.has-nav-menu-icon,
.header-drawer .drawer-menu > li.menu-item-has-children > a {
    padding-right: 2.85rem;
}

.header-drawer .drawer-menu .menu-item-has-children {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
    position: relative;
    width: 100%;
}

.header-drawer .drawer-menu .menu-item-has-children > a {
    grid-column: 1 / -1;
    grid-row: 1;
    width: 100%;
    box-sizing: border-box;
}

.header-drawer .drawer-menu .menu-item-has-children > .submenu-toggle {
    grid-column: 2;
    grid-row: 1;
    align-self: center;
    justify-self: end;
    position: relative;
    top: auto;
    right: auto;
    transform: none;
    z-index: 2;
    margin: 0 0.55rem 0 0;
    flex-shrink: 0;
}

.header-drawer .drawer-menu .menu-item-has-children > .sub-menu {
    grid-column: 1 / -1;
    grid-row: 2;
}

.header-drawer .drawer-menu > li > a.has-nav-menu-icon .nav-menu-label {
    line-height: 1.2;
}

.header-drawer .drawer-menu .sub-menu li > a .nav-menu-icon {
    width: 1rem;
    min-width: 1rem;
    font-size: 0.82rem;
    opacity: 0.88;
    margin-right: 0;
}

.header-drawer .drawer-menu .sub-menu li > a.has-nav-menu-icon .nav-menu-label {
    line-height: 1.25;
}

.header-secondary .category-menu > li > a {
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    padding: 0.45rem 0.72rem;
    border-radius: 999px;
    font-size: 0.72rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 600;
    color: #f7f1ea;
    background: rgba(255, 255, 255, 0.14);
    text-decoration: none;
    transition: background-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.header-secondary .category-menu > li > a:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.22);
    transform: translateY(-1px);
}

.header-drawer .drawer-menu > li > a {
    color: #f1f5f9;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-weight: 500;
    transition: color 0.2s ease;
}

.header-drawer .drawer-menu > li > a:hover {
    color: #ffffff;
}

.header-topbar .topbar-menu > li > a:focus-visible,
.header-secondary .category-menu > li > a:focus-visible {
    outline: 2px solid #ffffff;
    outline-offset: 3px;
    border-radius: 4px;
}

.custom-logo-link img,
.logo-mark {
    max-height: 56px;
    width: auto;
}

.header-brand [data-p4g-easter-tap="logo"],
.header-brand .custom-logo,
.header-brand .site-logo-image,
.header-brand .logo-mark {
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    cursor: pointer;
}

/* Fix: prevent double logo (light+dark) rendering */
.custom-logo-link img + img {
    display: none !important;
}

.site-logo-link--switchable img + img,
.site-logo-link--dual img + img {
    display: none !important;
}

/* Hard guard: masquer uniquement les images logo en double (évite de cacher l’img réelle si un lazy-load injecte un nœud avant). */
.header-brand .custom-logo-link img + img,
.header-brand .site-logo-link img + img,
.drawer-brand .custom-logo-link img + img,
.drawer-brand .site-logo-link img + img {
    display: none !important;
}

.header-brand .custom-logo-link,
.drawer-brand .custom-logo-link,
.header-brand .site-logo-link:not(.site-logo-link--switchable),
.drawer-brand .site-logo-link:not(.site-logo-link--switchable) {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    line-height: 0;
    max-width: 100%;
}

.header-brand .custom-logo-link img.custom-logo,
.header-brand .site-logo-link img.custom-logo,
.header-brand .site-logo-link img.site-logo-image,
.drawer-brand .custom-logo-link img.custom-logo,
.drawer-brand .site-logo-link img.site-logo-image {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
    max-height: 48px;
    width: auto;
    height: auto;
    object-fit: contain;
}

/* Ancien markup dual (2 img light/dark) : un seul visible selon le mode */
.site-logo-link--dual .site-logo-image--dark {
    display: none !important;
}

html.theme-dark .site-logo-link--dual .site-logo-image--light,
body.theme-dark .site-logo-link--dual .site-logo-image--light {
    display: none !important;
}

html.theme-dark .site-logo-link--dual .site-logo-image--dark,
body.theme-dark .site-logo-link--dual .site-logo-image--dark {
    display: block !important;
}

.site-logo-link--switchable,
.site-logo-link--dual {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    vertical-align: middle;
    line-height: 0;
    max-width: 100%;
}

.site-logo-link--switchable .site-logo-image--switchable,
.site-logo-link--dual .site-logo-image {
    display: block !important;
    max-height: 56px;
    max-width: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
}

.header-brand .site-logo-link--switchable {
    height: 48px;
    max-width: min(240px, 100%);
}

.header-brand .site-logo-link--switchable .site-logo-image--switchable,
.header-brand .site-logo-link--dual .site-logo-image {
    max-height: 48px;
}

.drawer-brand .site-logo-link--switchable {
    height: 34px;
    max-width: min(200px, 100%);
}

.drawer-brand .site-logo-link--switchable .site-logo-image--switchable,
.header-drawer .drawer-brand .custom-logo,
.header-drawer .drawer-brand .site-logo-image--switchable {
    max-height: 34px;
}

.member-auth-logo .site-logo-image--switchable,
.member-auth-logo .site-logo-image {
    display: block !important;
    max-height: 56px;
    width: auto;
    height: auto;
    object-fit: contain;
}

.logo-mark {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 52px;
    height: 52px;
    border-radius: 14px;
    background: var(--bg-blue);
    font-weight: 700;
}

.logo-text {
    margin-left: 0.85rem;
    font-size: 1.2rem;
    letter-spacing: 0.06em;
}

/* Fond pleine largeur ; contenu alignÃ© comme .hero-fullpage-inner / .site-main (1600px). */
.header-secondary {
    background: var(--bg-blue);
    padding: 0;
    min-width: 0;
    display: block;
    position: relative;
    z-index: 3;
    overflow: visible;
}

.header-secondary-inner {
    max-width: 1600px;
    width: min(100%, 1600px);
    margin: 0 auto;
    padding: 0.75rem 1.5rem;
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: flex-start;
    gap: 0.65rem;
    min-width: 0;
    box-sizing: border-box;
}

.header-tendances-shortcut {
    flex: 0 0 auto;
    flex-shrink: 0;
    white-space: nowrap;
    display: inline-flex;
    align-items: center;
    width: auto;
    max-width: none;
}

.header-secondary .category-menu-nav {
    flex: 1 1 auto;
    min-width: 0;
    width: auto;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: visible;
    -webkit-overflow-scrolling: touch;
}

.header-secondary .category-menu {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    justify-content: flex-start;
    gap: 0.55rem;
    width: max-content;
    min-width: max-content;
}

.header-secondary .category-menu li {
    flex: 0 0 auto;
}

.header-secondary .category-menu a {
    padding: 0.55rem 0.9rem;
    border-radius: 999px;
    background: rgba(255,255,255,0.09);
    transition: background 0.2s ease;
}

.header-secondary .category-menu a:hover {
    background: rgba(255,255,255,0.16);
}

.header-drawer {
    position: fixed;
    inset: 0;
    background: rgba(var(--drawer-overlay-rgb, 7, 21, 35), var(--drawer-overlay-opacity, 0.92));
    z-index: 9999;
    transform: translateX(-100%);
    transition: transform 0.28s ease;
    display: flex;
    justify-content: flex-start;
    pointer-events: none;
}

.header-drawer.is-open {
    transform: translateX(0);
    pointer-events: auto;
}

.drawer-panel {
    width: min(320px, 90vw);
    height: 100%;
    padding: 1.5rem;
    background: var(--bg-dark);
    box-shadow: 24px 0 80px color-mix(in srgb, var(--drawer-shadow-color, #000000) 32%, transparent), 8px 0 28px color-mix(in srgb, var(--drawer-shadow-color, #000000) 18%, transparent);
    overflow-y: auto;
}

.drawer-close {
    margin-bottom: 1.25rem;
}

.drawer-brand {
    margin-bottom: 2rem;
}

.drawer-nav {
    display: grid;
    gap: 1rem;
}

.drawer-menu {
    flex-direction: column;
    gap: 0.85rem;
    list-style: disc inside;
}

.drawer-menu.secondary {
    padding-top: 1.5rem;
    border-top: 1px solid rgba(255,255,255,0.1);
}

.drawer-menu li {
    margin-left: 0.5rem;
}

.drawer-menu li a {
    display: block;
    padding: 0.95rem 1rem;
    background: rgba(255,255,255,0.05);
    border-radius: 14px;
}

.drawer-menu.secondary li a {
    background: transparent;
}

.header-right .social-links a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 34px;
    height: 34px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    color: #f7f1ea;
    font-size: 0.75rem;
}

/* â‰¤ ~27" (1920px) : masquer le menu horizontal du header ; au-dessus, menu horizontal + â˜° peuvent coexister. */
@media (max-width: 1920px) {
    .header-topbar .header-left .topbar-menu-nav,
    .header-topbar .header-left > nav.topbar-menu,
    .header-topbar .header-left nav .topbar-menu {
        display: none !important;
    }
}

@media (min-width: 1921px) {
    .header-topbar .topbar-menu-nav {
        overflow: visible;
    }
}

@media (max-width: 1024px) {
    .header-topbar {
        grid-template-columns: auto 1fr auto;
    }

    .header-left {
        grid-column: 1;
    }

    .header-brand {
        grid-column: 1 / -1;
        justify-self: center;
        position: absolute;
        left: 50%;
        transform: translateX(-50%);
        z-index: 2;
    }

    .header-livedirect {
        display: none !important;
    }

    .header-right {
        grid-column: 3;
    }
}

@media (max-width: 720px) {
    .header-secondary-inner {
        padding: 0.65rem 1rem;
    }

    .header-secondary .category-menu > li {
        display: inline-flex;
    }
}

.category-menu {
    flex-wrap: wrap;
}

/* Barre Â« jeux tendances Â» : une seule ligne, dÃ©filement horizontal si besoin (voir bloc .header-secondary plus bas). */

.category-menu ul {
    margin: 0;
    padding: 0;
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
}

.category-menu li {
    list-style: none;
}

.category-menu a {
    padding: 0.55rem 0.8rem;
    border-radius: 999px;
    background: rgba(255,255,255,0.07);
}


/* --- site-footer visiteur --- */
.site-footer {
    background: var(--footer-bg);
    color: var(--footer-text);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding: 0;
}

.site-footer a {
    color: var(--footer-text);
}

.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem 1rem 1rem;
}

.footer-top {
    display: grid;
    grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr);
    gap: 2rem;
    margin-bottom: 2rem;
}

.footer-brand-col {
    min-width: 0;
}

.footer-brand {
    display: inline-flex;
    align-items: center;
    margin-bottom: 0.9rem;
}

.footer-brand .custom-logo-link,
.footer-brand .site-logo-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 0;
    height: 54px;
    max-width: min(240px, 100%);
}

.footer-brand .custom-logo-link img,
.footer-brand img,
.footer-brand .site-logo-image--switchable {
    max-height: 54px;
    width: auto;
    height: auto;
    object-fit: contain;
    display: block;
}

.footer-links {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin-bottom: 1rem;
}

.footer-links-menu {
    display: flex;
    flex-wrap: wrap;
    gap: 0.8rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.footer-links-menu li {
    margin: 0;
    list-style: none;
}

.footer-links a {
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.72rem;
    font-weight: 700;
    color: #f7f9fc;
}

.footer-links a.has-nav-menu-icon,
.footer-links-menu a.has-nav-menu-icon {
    display: inline-flex;
    align-items: center;
    gap: 0.38rem;
}

.footer-links a.has-nav-menu-icon .nav-menu-icon,
.footer-links-menu a.has-nav-menu-icon .nav-menu-icon {
    width: 0.92em;
    min-width: 0.92em;
    flex-shrink: 0;
}

.footer-description {
    max-width: 760px;
    margin: 0;
    font-size: 0.9rem;
    line-height: 1.75;
    color: #e5eaf5;
}

.footer-social-col h4 {
    margin: 0 0 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    font-size: 0.75rem;
    color: #f7f9fc;
}

.footer-social {
    display: flex;
    gap: 1rem 1.1rem;
    flex-wrap: wrap;
}

.footer-social a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.24);
    color: var(--footer-text);
    transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.footer-social a:hover {
    transform: translateY(-1px);
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.34);
}

.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.16);
    padding-top: 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    font-size: 0.78rem;
    color: #e5eaf5;
}

.footer-bottom p {
    margin: 0;
}

.footer-legal-links {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.footer-legal-links a {
    font-size: 0.76rem;
    color: #f7f9fc;
}

/* --- navigation pro (submenu, mega-menu, drawer) --- */
/* Navigation pro: submenu + mega menu + no bullets */
.topbar-menu ul,
.category-menu,
.category-menu ul,
.drawer-menu,
.drawer-menu ul {
    list-style: none !important;
    margin: 0;
    padding: 0;
}

.category-menu-nav {
    max-width: 100%;
}

.category-menu {
    display: flex;
    align-items: center;
    gap: 0.35rem;
    flex-wrap: wrap;
    position: relative;
}

/* Barre tendances sous le header : une seule ligne (libellÃ© + jeux). */
.header-secondary .category-menu-nav {
    width: auto !important;
    flex: 1 1 auto;
    min-width: 0;
    max-width: 100%;
    overflow-x: auto;
    overflow-y: visible;
}

.header-secondary .category-menu {
    flex-wrap: nowrap;
}

.header-secondary .category-menu > li {
    padding-bottom: 0;
    margin-bottom: 0;
}

.category-menu > li {
    position: relative;
    padding-bottom: 8px;
    margin-bottom: -8px;
}

.topbar-menu > li {
    position: relative;
    padding-bottom: 8px;
    margin-bottom: -8px;
}

.category-menu > li > a {
    display: inline-flex;
    align-items: center;
    min-height: 36px;
    padding: 0.45rem 0.72rem;
    border-radius: 8px;
}

.topbar-menu > li > a {
    display: inline-flex;
    align-items: center;
    min-height: 34px;
}

.topbar-menu .menu-item-has-children > a::after,
.category-menu .menu-item-has-children > a::after {
    content: "";
    width: 7px;
    height: 7px;
    margin-left: 0.45rem;
    border-right: 1.8px solid currentColor;
    border-bottom: 1.8px solid currentColor;
    transform: rotate(45deg) translateY(-1px);
    opacity: 0.8;
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.category-menu .sub-menu {
    display: block;
    position: absolute;
    left: 0;
    top: calc(100% + 4px);
    min-width: 220px;
    background: #0f1d33;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 0.35rem;
    z-index: 60;
    box-shadow: 0 12px 34px rgba(0, 0, 0, 0.22);
    transition: opacity 0.16s ease, transform 0.16s ease;
    opacity: 0;
    transform: translateY(4px);
    visibility: hidden;
    pointer-events: none;
}

.topbar-menu .sub-menu {
    display: block;
    position: absolute;
    left: 0;
    top: calc(100% + 4px);
    min-width: 210px;
    background: #0f1d33;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 0.35rem;
    z-index: 70;
    box-shadow: 0 12px 34px rgba(0, 0, 0, 0.22);
    transition: opacity 0.16s ease, transform 0.16s ease;
    opacity: 0;
    transform: translateY(4px);
    visibility: hidden;
    pointer-events: none;
}

.category-menu .sub-menu::before,
.topbar-menu .sub-menu::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: -10px;
    height: 10px;
}

.category-menu .sub-menu li a {
    display: block;
    padding: 0.5rem 0.62rem;
    border-radius: 7px;
    white-space: nowrap;
}

.topbar-menu .sub-menu li a {
    display: block;
    padding: 0.5rem 0.62rem;
    border-radius: 7px;
    white-space: nowrap;
}

.category-menu li:hover > .sub-menu,
.category-menu li:focus-within > .sub-menu {
    opacity: 1;
    transform: translateY(0);
    visibility: visible;
    pointer-events: auto;
}

.topbar-menu li:hover > .sub-menu,
.topbar-menu li:focus-within > .sub-menu {
    opacity: 1;
    transform: translateY(0);
    visibility: visible;
    pointer-events: auto;
}

.topbar-menu .menu-item-has-children:hover > a::after,
.topbar-menu .menu-item-has-children:focus-within > a::after,
.category-menu .menu-item-has-children:hover > a::after,
.category-menu .menu-item-has-children:focus-within > a::after {
    transform: rotate(225deg) translateY(1px);
    opacity: 1;
}

.category-menu .sub-menu .sub-menu {
    left: 100%;
    top: -2px;
}

/* Add "mega-menu" class on top-level item in WP menu */
.category-menu > li.mega-menu {
    position: static;
}

.category-menu > li.mega-menu > .sub-menu {
    left: 0;
    right: 0;
    top: calc(100% + 6px);
    min-width: 0;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.5rem;
    padding: 0.75rem;
}

.category-menu > li.mega-menu:hover > .sub-menu,
.category-menu > li.mega-menu:focus-within > .sub-menu {
    opacity: 1;
    transform: translateY(0);
    visibility: visible;
    pointer-events: auto;
}

.category-menu > li.mega-menu > .sub-menu > li > a {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.06);
}

.drawer-menu {
    display: grid;
    gap: 0.25rem;
}

.drawer-menu li {
    position: relative;
}

.drawer-menu a {
    display: block;
    padding: 0.55rem 2rem 0.55rem 0.15rem;
}

.drawer-menu .menu-item-has-children {
    display: grid;
    grid-template-columns: 1fr auto;
    grid-template-rows: auto auto;
    width: 100%;
}

.drawer-menu .menu-item-has-children > a {
    grid-column: 1 / -1;
    grid-row: 1;
    width: 100%;
    box-sizing: border-box;
    padding-right: 2.75rem;
}

.drawer-menu .menu-item-has-children > .submenu-toggle {
    grid-column: 2;
    grid-row: 1;
    align-self: center;
    justify-self: end;
    position: relative;
    z-index: 1;
    margin: 0 0.15rem 0 0;
}

.drawer-menu .sub-menu {
    display: none;
    margin-left: 0.6rem;
    border-left: 1px solid rgba(255, 255, 255, 0.14);
    padding-left: 0.6rem;
    grid-column: 1 / -1;
    grid-row: 2;
}

.drawer-menu li.is-open > .sub-menu {
    display: grid;
    gap: 0.15rem;
}

.submenu-toggle {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.05);
    color: #fff;
    cursor: pointer;
}

/* Drawer submenu visual refinement */
.header-drawer .drawer-menu {
    gap: 0.5rem;
}

.header-drawer .drawer-menu > li > a {
    background: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 12px;
    padding: 0.75rem 0.9rem;
}

.header-drawer .drawer-menu .menu-item-has-children > a {
    border-radius: 12px;
}

.header-drawer .submenu-toggle {
    width: 32px;
    height: 32px;
    margin-right: 0;
    border-radius: 10px;
    background: color-mix(in srgb, var(--drawer-text, #ffffff) 10%, transparent);
    border: 1px solid color-mix(in srgb, var(--drawer-text, #ffffff) 18%, transparent);
    font-size: 0.78rem;
}

.header-drawer .drawer-menu .sub-menu {
    margin-left: 0.45rem;
    padding-left: 0.55rem;
    border-left: 2px solid rgba(255, 255, 255, 0.14);
}

.header-drawer .drawer-menu .sub-menu li > a {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 0.62rem 0.75rem;
    font-size: 0.82rem;
}

.header-drawer .drawer-menu li.is-open > .submenu-toggle {
    background: color-mix(in srgb, var(--bg-blue) 28%, transparent);
}

/* Drawer visual style inspired by editorial mockup */
.header-drawer .drawer-panel {
    width: min(370px, 92vw);
    padding: 0.7rem 0.8rem 1.35rem;
    background: var(--drawer-bg, #031327);
}

.header-drawer .drawer-topbar {
    display: grid;
    grid-template-columns: 44px 1fr 44px;
    align-items: center;
    gap: 0.6rem;
    margin-bottom: 0.7rem;
}

.header-drawer .drawer-close,
.header-drawer .drawer-theme-toggle {
    margin: 0;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: 1px solid color-mix(in srgb, var(--drawer-text, #ffffff) 18%, transparent);
    background: color-mix(in srgb, var(--drawer-text, #ffffff) 6%, transparent);
    color: var(--drawer-text, #ecf3ff);
}

.header-drawer .drawer-brand {
    margin: 0;
    display: grid;
    place-items: center;
}

.header-drawer .drawer-brand .custom-logo,
.header-drawer .drawer-brand .site-logo-image--switchable {
    max-height: 34px;
    max-width: 100%;
    width: auto;
    height: auto;
    object-fit: contain;
}

.header-drawer .drawer-search {
    margin-bottom: 0.9rem;
}

.header-drawer .p4g-livedirect-drawer-promo {
    margin: 0 0 0.9rem;
    padding: 0 0 0.85rem;
}

.header-drawer .p4g-livedirect-nav-tab--drawer {
    color: #f7f1ea;
}

.header-drawer .drawer-search-form {
    position: relative;
}

.header-drawer .drawer-search-input {
    width: 100%;
    min-height: 42px;
    border-radius: 9px;
    border: 1px solid rgba(95, 143, 191, 0.22);
    background: #ffffff;
    color: #1f2937;
    padding: 0.55rem 2.4rem 0.55rem 0.75rem;
    font-size: 0.95rem;
}

.header-drawer .drawer-search-input::placeholder {
    color: rgba(31, 41, 55, 0.72);
}

/* Force readable colors when browser autofill applies custom styling. */
.header-drawer .drawer-search-input:-webkit-autofill,
.header-drawer .drawer-search-input:-webkit-autofill:hover,
.header-drawer .drawer-search-input:-webkit-autofill:focus {
    -webkit-text-fill-color: #1f2937;
    box-shadow: 0 0 0 1000px #ffffff inset;
    transition: background-color 9999s ease-out 0s;
}

.header-drawer .drawer-search-submit {
    position: absolute;
    right: 0.3rem;
    top: 50%;
    transform: translateY(-50%);
    border: 0;
    background: transparent;
    color: rgba(236, 243, 255, 0.92);
    width: 30px;
    height: 30px;
}

.header-drawer .drawer-nav {
    gap: 0.48rem;
}

.header-drawer .drawer-menu > li {
    margin-left: 0;
    width: 100%;
}

.header-drawer .drawer-menu > li > a {
    background: transparent;
    border: 0;
    border-radius: 0;
    padding: 0.34rem 0.1rem 0.24rem;
    text-transform: uppercase;
    letter-spacing: 0.01em;
    font-size: 1.02rem;
    font-weight: 800;
    color: var(--drawer-text, #f1f6ff);
}

.header-drawer .drawer-menu .menu-item-has-children > a {
    border-radius: 12px;
}

.header-drawer .drawer-menu .menu-item-has-children > .submenu-toggle {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: color-mix(in srgb, var(--drawer-text, #ffffff) 10%, transparent);
    border: 1px solid color-mix(in srgb, var(--drawer-text, #ffffff) 18%, transparent);
    color: var(--drawer-text, rgba(108, 180, 255, 0.95));
}

.header-drawer .drawer-menu .sub-menu {
    margin-top: 0.08rem;
    margin-left: 0;
    padding-left: 0.72rem;
    border-left: 1px solid rgba(78, 163, 255, 0.35);
}

.header-drawer .drawer-menu .sub-menu li > a {
    background: transparent;
    border: 0;
    border-radius: 0;
    padding: 0.5rem 0.55rem;
    font-size: 0.86rem;
    color: rgba(215, 232, 255, 0.95);
    text-transform: none;
    letter-spacing: 0;
    position: relative;
}

.header-drawer .drawer-menu .sub-menu .menu-item-has-children > a {
    padding-right: 2.5rem;
}

.header-drawer .drawer-menu .sub-menu li > a::before {
    content: "";
    position: absolute;
    left: -0.72rem;
    top: 50%;
    width: 0.58rem;
    height: 1px;
    background: color-mix(in srgb, var(--drawer-shadow-color, #4ea3ff) 48%, transparent);
}

.header-drawer .drawer-menu.secondary {
    padding-top: 0;
    border-top: 0;
}

.header-drawer .drawer-socials {
    margin-top: 1.15rem;
    padding-top: 0.85rem;
    border-top: 1px solid color-mix(in srgb, var(--drawer-shadow-color, #4ea3ff) 24%, transparent);
    display: flex;
    justify-content: center;
    gap: 0.78rem;
}

.header-drawer .drawer-socials a {
    color: rgba(236, 243, 255, 0.9);
    font-size: 1.02rem;
}

/* --- panneau recherche header --- */
/* Search panel + Font Awesome icon integration */
.header-right .social-links a,
.footer-social a {
    font-size: 0.92rem;
}

.search-toggle i,
.header-right .social-links i,
.footer-social i {
    pointer-events: none;
}

.header-search-panel {
    position: fixed;
    inset: 0;
    background: rgba(7, 21, 35, 0.58);
    z-index: 250;
    display: none;
    align-items: flex-start;
    justify-content: center;
    padding: 90px 1rem 1rem;
}

.header-search-panel.is-open {
    display: flex;
}

.header-search-panel-inner {
    width: min(920px, 100%);
    background: #ffffff;
    border: 1px solid rgba(20, 89, 130, 0.18);
    border-radius: 14px;
    box-shadow: 0 24px 60px rgba(8, 14, 29, 0.24);
    padding: 0.8rem;
}

.header-search-form {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 0.6rem;
    align-items: center;
}

.header-search-input {
    width: 100%;
    border: 1px solid rgba(20, 89, 130, 0.23);
    border-radius: 10px;
    min-height: 46px;
    padding: 0 0.9rem;
    font-size: 1rem;
    color: var(--bg-dark);
}

.header-search-input:focus {
    outline: none;
    border-color: rgba(30, 115, 190, 0.66);
    box-shadow: 0 0 0 3px rgba(30, 115, 190, 0.14);
}

.header-search-submit {
    min-height: 46px;
    min-width: 46px;
    border: none;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--bg-blue), var(--bg-accent));
    color: #fff;
    cursor: pointer;
}

.header-search-submit:hover {
    filter: brightness(1.05);
}

@media (max-width: 680px) {
    .header-search-panel {
        padding-top: 72px;
    }

    .header-search-panel-inner {
        border-radius: 12px;
        padding: 0.65rem;
    }

    .header-search-input {
        min-height: 42px;
        font-size: 0.95rem;
    }

    .header-search-submit {
        min-height: 42px;
        min-width: 42px;
    }
}

