/* Bouton hamburger — mobile uniquement */
.header-menu-btn {
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    display: none;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    flex-shrink: 0;
    transition: opacity 0.2s ease;
}

.header-menu-btn:hover,
.header-menu-btn:active {
    opacity: 0.7;
}

.header-menu-btn img {
    width: 24px;
    height: 24px;
    display: block;
}

/* Style Paramètres + animation latérale depuis la droite (Figma) */
.header-menu-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    display: flex;
    align-items: stretch;
    justify-content: flex-end;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
    margin: 0;
    padding: 0;
}

.header-menu-overlay.active {
    opacity: 1;
    visibility: visible;
}

.header-menu-container {
    --header-top-offset: max(var(--browser-chrome-top, 0px), env(safe-area-inset-top, 0px), 56px, calc(env(safe-area-inset-top, 0px) + 56px));
    background: linear-gradient(80deg, #A330FD 0%, #06F 100%);
    width: min(100%, 393px);
    max-width: 100%;
    height: 100vh;
    max-height: 100vh;
    height: 100dvh;
    max-height: 100dvh;
    box-shadow: -8px 0 40px rgba(0, 23, 48, 0.12);
    transform: translateX(100%);
    transition: transform 350ms cubic-bezier(0.22, 1, 0.36, 1);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    position: relative;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

.header-menu-overlay.active .header-menu-container,
.header-menu-container.is-open {
    transform: translateX(0);
}

body.header-menu-open {
    overflow: hidden;
    margin: 0;
    padding: 0;
}

.header-menu-header-top {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 120px;
    min-height: calc(120px + var(--header-top-offset));
    padding: calc(var(--header-top-offset) + 12px) 20px 0;
    box-sizing: border-box;
    display: grid;
    grid-template-columns: 24px 1fr 24px;
    align-items: start;
    align-content: start;
    margin: 0;
    z-index: 2;
    flex-shrink: 0;
}

.header-menu-back {
    position: static;
    grid-column: 1;
    grid-row: 1;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    transition: opacity 0.2s ease;
    flex-shrink: 0;
}

.header-menu-back:hover {
    opacity: 0.8;
}

.header-menu-title {
    grid-column: 2;
    grid-row: 1;
    font-family: 'Quicksand', sans-serif;
    font-size: 24px;
    font-weight: 700;
    color: white;
    margin: 0;
    padding: 0;
    line-height: 24px;
    height: 24px;
    text-align: center;
}

.header-menu-body {
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    min-height: 0;
    margin-top: calc(120px + var(--header-top-offset, env(safe-area-inset-top, 0px)));
    background: white;
    border-radius: 24px 24px 0 0;
    overflow: hidden;
}

.header-menu-content {
    padding: 24px 20px 16px;
    overflow-y: auto;
    overflow-x: hidden;
    flex: 1 1 auto;
    min-height: 0;
    -webkit-overflow-scrolling: touch;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-content: flex-start;
    gap: 32px;
    background: white;
}

.header-menu-section {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 100%;
    flex-shrink: 0;
}

.header-menu-section-title {
    font-family: 'Roboto', sans-serif;
    font-size: 14px;
    font-weight: 500;
    color: #32568f;
    margin: 0;
    line-height: 21px;
    letter-spacing: 0;
}

.header-menu-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.header-menu-list-support .header-menu-item {
    gap: 8px;
}

.header-menu-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0;
    text-decoration: none;
    background: none;
    border: none;
    transition: opacity 0.2s ease;
    cursor: pointer;
    width: 100%;
    box-sizing: border-box;
    min-height: 24px;
}

.header-menu-item:hover,
.header-menu-item:active,
.header-menu-item:focus {
    opacity: 0.8;
    text-decoration: none;
    outline: none;
}

.header-menu-item-button {
    background: none;
    border: none;
    text-align: left;
    font-family: inherit;
    width: 100%;
}

.header-menu-item-icon {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-menu-item-icon img {
    width: 24px;
    height: 24px;
    display: block;
    object-fit: contain;
}

.header-menu-item-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex: 1;
    min-width: 0;
}

.header-menu-item-text {
    font-family: 'Roboto', sans-serif;
    font-size: 16px;
    font-weight: 500;
    color: #1d3253;
    line-height: 24px;
    letter-spacing: 0;
    flex: 1;
    min-width: 0;
}

.header-menu-item-arrow {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-menu-item-arrow svg {
    width: 24px;
    height: 24px;
    display: block;
}

.header-menu-item-arrow path {
    stroke: #1d3253;
}

.header-menu-footer {
    flex-shrink: 0;
    padding: 0 20px calc(32px + env(safe-area-inset-bottom, 0px));
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: white;
}

.header-menu-footer-btn {
    display: block;
    width: 100%;
    max-width: 100%;
    min-width: 0;
    box-sizing: border-box;
    padding: 12px 24px;
    background: white;
    border: 1px solid #EFEFEF;
    border-radius: 24px;
    color: #1D3253;
    font-family: 'Roboto', sans-serif;
    font-size: 16px;
    font-weight: 600;
    line-height: 24px;
    text-decoration: none;
    text-align: center;
    transition: background-color 0.2s ease, border-color 0.2s ease;
    box-shadow: 0px 1px 2px rgba(10, 13, 18, 0.05);
    margin: 0;
}

.header-menu-footer-btn--primary {
    background: #1D3253;
    border-color: #1D3253;
    color: #fff;
}

.header-menu-footer-btn--primary:hover,
.header-menu-footer-btn--primary:active {
    background-color: #152847;
    border-color: #152847;
    color: #fff;
}

@media screen and (min-width: 1025px) {
    header#headerPage #headerHolder .header-logo-row .header-menu-btn,
    header#headerPage #headerHolder .header-logo-row .header-logo-row-side,
    header#headerPage #headerHolder .header-logo-row .header-logo-row-actions {
        display: none !important;
    }
}

@media screen and (max-width: 1024px) {
    .header-menu-btn.pc-hidden {
        display: flex !important;
        width: 24px !important;
        max-width: 24px !important;
        visibility: visible !important;
    }
}

@media screen and (min-width: 1025px) {
    .header-menu-btn,
    .header-menu-overlay {
        display: none !important;
    }
}
