/* ============================================================
   NAVIGATION PANEL – Dijon Actualités
   Basé sur le CSS extrait de franceinfo.fr
   ============================================================ */

/* --- Panel container --- */
.navigation-panel {
    --outline-offset: -2px;
    --baseIndex: var(--z-index-sticky-nav);
    background-color: #000;
    display: block;
    left: 0;
    overflow: hidden;
    position: fixed;
    transform: translateX(-100%);
    transition: transform .5s cubic-bezier(.645, .045, .355, 1);
    width: 100vw;
    z-index: var(--baseIndex);
}

@media screen and (max-width: 1199px) {
    .navigation-panel {
        height: calc(100dvh - 60px);
        top: 60px;
    }
}

@media screen and (min-width: 880px) {
    .navigation-panel {
        max-width: 375px;
    }
}

@media screen and (min-width: 1200px) {
    .navigation-panel {
        height: 100dvh;
        top: 0;
    }
}

.navigation-panel--opened,
.navigation-panel.is-open {
    transform: translateX(0);
}

/* --- Overlay --- */
.navigation-panel__overlay {
    background-color: var(--g-color, #ba1d41);
    bottom: 0;
    display: block;
    left: 0;
    opacity: 0;
    pointer-events: none;
    position: fixed;
    right: 0;
    transition: opacity .5s cubic-bezier(.645, .045, .355, 1);
    width: 100vw;
    z-index: var(--z-index-sticky-nav, 10);
}

@media screen and (max-width: 1199px) {
    .navigation-panel__overlay {
        height: calc(100vh - 60px);
        top: 60px;
    }
}

@media screen and (min-width: 1200px) {
    .navigation-panel__overlay {
        height: 100vh;
        top: 0;
    }
}

.navigation-panel__overlay--visible,
.navigation-panel__overlay.is-active {
    opacity: .25;
    pointer-events: auto;
}

/* --- Mainpanel & Subpanel (panneaux coulissants) --- */
.navigation-panel__mainpanel,
.navigation-panel__subpanel {
    background-color: #000;
    height: 100%;
    overflow: hidden auto;
    padding-bottom: 24px;
    position: absolute;
    top: 0;
    width: 100vw;
    scrollbar-width: none;
    -ms-overflow-style: none;
    transition: transform .5s cubic-bezier(.645, .045, .355, 1);
}

.navigation-panel__mainpanel::-webkit-scrollbar,
.navigation-panel__subpanel::-webkit-scrollbar {
    display: none;
}

@media screen and (min-width: 880px) {
    .navigation-panel__mainpanel,
    .navigation-panel__subpanel {
        max-width: 375px;
    }
}

@media screen and (min-width: 1200px) {
    .navigation-panel__mainpanel,
    .navigation-panel__subpanel {
        height: calc(100% - 57px);
        top: 57px;
    }
}

.navigation-panel__mainpanel--moved,
.navigation-panel__subpanel--moved {
    transform: translateX(-100%);
}

.navigation-panel__mainpanel {
    left: 0;
}

.navigation-panel__subpanel {
    left: 100%;
}

.navigation-panel__subpanel.is-open {
    transform: translateX(-100%);
}

/* --- Top bar (logo + close) - visible seulement sur large --- */
@media screen and (max-width: 1199px) {
    .navigation-panel__top {
        display: none;
        visibility: hidden;
    }
}

@media screen and (min-width: 1200px) {
    .navigation-panel__top {
        background: transparent;
        display: flex;
        height: 56px;
        margin-bottom: 1px;
        position: relative;
        z-index: var(--baseIndex);
        align-items: center;
        justify-content: space-between;
        padding: 20px 24px;
    }

    .navigation-panel__top::before {
        background: #000;
        border-bottom: 1px solid #414141;
        content: "";
        display: block;
        height: calc(100% + 1px);
        left: 50%;
        margin-left: -50vw;
        margin-right: -50vw;
        position: absolute;
        right: 50%;
        top: 0;
        width: 100vw;
        z-index: -1;
    }

    .navigation-panel__top-close {
        display: flex;
        height: 32px;
        width: 32px;
        align-items: center;
        justify-content: center;
        background-color: transparent;
        border: none;
        border-radius: 32px;
        color: #f8f8f8;
        cursor: pointer;
    }
}

.navigation-panel__top-logo {
    height: 32px;
    width: auto;
}

/* --- Search --- */
.navigation-panel__search {
    padding: 16px 24px;
}

/* --- Back button --- */
.navigation-panel__back {
    display: flex;
    position: sticky;
    top: 0;
    width: 100%;
    z-index: 11;
    align-items: center;
    background-color: #424242;
    border: none;
    border-bottom: 1px solid #414141;
    color: #ddd;
    cursor: pointer;
    font-family: var(--font-family);
    font-size: 1.6rem;
    font-weight: 400;
    gap: 8px;
    line-height: 135%;
    padding: 12px 24px;
    transition-duration: .3s;
    transition-property: background-color, color;
    transition-timing-function: cubic-bezier(.645, .045, .355, 1);
}

.navigation-panel__back-text {
    flex: 1;
    margin-right: 20px;
    text-align: center;
}

.navigation-panel__back:active,
.navigation-panel__back:hover {
    background-color: #5c5c5c;
    color: #f8f8f8;
}

.navigation-panel__back-icon {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
}

/* --- Taxo link container --- */
.navigation-panel__taxo-link-container {
    margin: 16px 24px;
}

/* --- List --- */
.navigation-panel__list {
    list-style: none;
    position: relative;
    z-index: 1;
}

/* --- Separator --- */
.navigation-panel__separator {
    background: transparent;
    margin: 0 16px;
    padding: 24px 0 12px;
    position: relative;
    z-index: 1;
}

.navigation-panel__separator::before {
    background: transparent;
    border-top: 1px solid #414141;
    content: "";
    display: block;
    height: 100%;
    left: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    position: absolute;
    right: 50%;
    top: 0;
    width: 100vw;
    z-index: -1;
}

.navigation-panel__separator-content {
    display: flex;
    font-family: var(--font-family);
    font-weight: 700;
    max-width: 100%;
    width: fit-content;
    align-items: center;
    background-color: #000;
    color: #b9b9b9;
    font-size: 1.4rem;
    gap: 4px;
    line-height: 125%;
    padding: 0 8px;
}

.navigation-panel__separator::before {
    top: 33px;
}

.navigation-panel__separator--no-text {
    padding: 16px 0;
}

.navigation-panel__separator--no-text::before {
    top: 17px;
}

@media screen and (min-width: 1200px) {
    .navigation-panel__separator.navigation-panel__separator--hidden-on-large {
        display: none;
        visibility: hidden;
    }
}

/* --- Newsletter CTA --- */
.navigation-panel__newsletter {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    background-color: #414141;
    border-radius: 8px;
    gap: 16px;
    margin: 16px 24px 0;
    padding: 24px;
}

.navigation-panel__newsletter-text {
    color: #f8f8f8;
    font-family: var(--font-family);
    font-size: 1.6rem;
    font-weight: 400;
}

/* ============================================================
   PANEL ITEM
   ============================================================ */
.panel-item {
    --panel-item-bg-accent-color: var(--g-color, #ba1d41);
    --panel-item-icon-accent-color: var(--panel-item-bg-accent-color);
}

.panel-item__content {
    display: flex;
    position: relative;
    width: 100%;
    align-items: flex-start;
    background-color: #000;
    border: none;
    color: #f8f8f8;
    cursor: pointer;
    font-family: var(--font-family);
    font-size: 1.6rem;
    font-weight: 400;
    gap: 8px;
    line-height: 135%;
    padding: 12px 24px;
    text-align: left;
    text-decoration: none;
    transition: background-color .5s cubic-bezier(.645, .045, .355, 1);
}

/* Accent bar on hover (left side) */
.panel-item__content::before {
    background-color: var(--panel-item-bg-accent-color);
    content: "";
    height: 100%;
    left: 0;
    position: absolute;
    top: 0;
    transition: width .5s cubic-bezier(.645, .045, .355, 1);
    width: 0;
}

@media screen and (min-width: 1200px) {
    .panel-item__content:active,
    .panel-item__content:hover {
        background-color: #424242;
    }

    .panel-item__content:active::before,
    .panel-item__content:hover::before {
        width: 8px;
    }
}

.navigation-panel__rubrics-links .panel-item__content:hover {
    background-color: #fff;
    color: #000;
}

.navigation-panel__group-links .panel-item__content:hover,
.navigation-panel__group-links .panel-item__content:focus-visible,
.navigation-panel__group-links .panel-item__content:active {
    background-color: #fff;
    color: #000;
}

/* Style blanc/noir/pastille rouge pour Services et Mon espace */
#panel-services .panel-item__content,
#panel-account .panel-item__content {
    background-color: #fff;
    color: #000;
}

#panel-services .panel-item__content::before,
#panel-account .panel-item__content::before {
    width: 8px;
}

.panel-item__label {
    flex: 1;
}

.panel-item__icon {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
}

.panel-item__icon--right {
    margin-left: 16px;
}

/* Active : accent bar affiché */
.panel-item--active .panel-item__content {
    background-color: #fff;
    color: #000;
}

.panel-item--active .panel-item__content::before {
    width: 8px;
}

/* Underline variant */
.panel-item--underline .panel-item__content {
    text-decoration: underline;
}

/* Accent icon color (for hot tags / currently) */
.panel-item--icon-with-accent .panel-item__icon {
    color: var(--panel-item-icon-accent-color);
}

/* ============================================================
   BODY LOCK quand le menu est ouvert
   ============================================================ */
body.menu-open,
html.menu-open {
    overflow: hidden !important;
    height: 100%;
}

html.scrollbar-gutter-stable {
    scrollbar-gutter: stable;
}
