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

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

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

/* Overlay menu plein écran */
.header-menu-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    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: 100%;
    height: 100vh;
    max-height: 100vh;
    box-shadow: 0px 0px 40px rgba(0, 23, 48, 0.08);
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    position: relative;
    margin: 0;
    padding: 0;
}

.header-menu-overlay.active .header-menu-container {
    transform: translateY(0);
}

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

.header-menu-header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 120px;
    min-height: calc(120px + var(--header-top-offset));
    padding-top: var(--header-top-offset);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 2;
}

.header-menu-back {
    position: absolute;
    left: 20px;
    top: calc(var(--header-top-offset, env(safe-area-inset-top, 0px)) + 48px);
    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;
}

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

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

.header-menu-content {
    padding: 24px 20px 32px;
    overflow-y: auto;
    flex: 1;
    margin-top: calc(120px + var(--header-top-offset, env(safe-area-inset-top, 0px)));
    display: flex;
    flex-direction: column;
    gap: 32px;
    background: white;
    border-radius: 24px 24px 0 0;
}

.header-menu-section {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

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

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

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

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

.header-menu-item-button {
    text-align: left;
    font-family: inherit;
}

.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 {
    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;
}

.header-menu-item-arrow {
    flex-shrink: 0;
    width: 24px;
    height: 24px;
}

.header-menu-footer {
    padding: 0 20px 32px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: white;
}

.header-menu-footer-btn {
    display: block;
    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);
    width: 100%;
    margin-top: 8px;
}

.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 (max-width: 1024px) {
    .header-menu-btn.pc-hidden {
        display: flex !important;
        visibility: visible !important;
    }
}

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