/* ==========================================================
   4C2 PRÉPA — NAVBAR V2
   Classes volontairement isolées pour éviter les conflits
   avec les anciennes classes .u2-* du projet.
   ========================================================== */

.c2p-navbar,
.c2p-navbar * {
    box-sizing: border-box;
}

.c2p-navbar {
    position: sticky;
    top: 0;
    z-index: 5000;
    width: 100%;
    background: rgba(255, 255, 255, .97);
    border-bottom: 1px solid #dce7e4;
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
}

.c2p-navbar__inner {
    width: min(1380px, calc(100% - 40px));
    min-height: 76px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    align-items: center;
    gap: 22px;
}

.c2p-navbar__brand {
    min-width: 0;
    display: inline-flex;
    align-items: center;
    justify-self: start;
    color: #10211f;
    text-decoration: none;
}

.c2p-navbar__logo {
    display: block;
    width: auto;
    max-width: 165px;
    max-height: 52px;
    object-fit: contain;
}

.c2p-navbar__logo-placeholder {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    white-space: nowrap;
    font-family: Manrope, Inter, Arial, sans-serif;
    line-height: 1;
}

.c2p-navbar__logo-placeholder span {
    display: grid;
    place-items: center;
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: #0f766e;
    color: #fff;
    font-size: 13px;
    font-weight: 900;
}

.c2p-navbar__logo-placeholder strong {
    color: #10211f;
    font-size: 19px;
    font-weight: 900;
    letter-spacing: -.04em;
}

.c2p-navbar__nav {
    min-width: 0;
    height: 76px;
    display: flex;
    align-items: stretch;
    justify-content: center;
    gap: 3px;
}

.c2p-navbar__link {
    position: relative;
    min-height: 44px;
    align-self: center;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 7px;
    padding: 0 14px;
    border: 0;
    border-radius: 10px;
    background: transparent;
    color: #243b38;
    font: 800 14px/1 Inter, Arial, sans-serif;
    white-space: nowrap;
    text-decoration: none;
    cursor: pointer;
    transition: background-color .16s ease, color .16s ease, transform .16s ease;
}

.c2p-navbar__link:hover,
.c2p-navbar__link:focus-visible,
.c2p-navbar__link.is-active {
    background: #0f766e;
    color: #fff;
}

.c2p-navbar__link:focus-visible {
    outline: 3px solid rgba(15, 118, 110, .22);
    outline-offset: 2px;
}

.c2p-navbar__dropdown {
    position: relative;
    display: flex;
    align-items: center;
}

.c2p-navbar__dropdown-toggle i {
    font-size: 10px;
    transition: transform .16s ease;
}

.c2p-navbar__dropdown.is-open .c2p-navbar__dropdown-toggle i {
    transform: rotate(180deg);
}

.c2p-navbar__dropdown-menu {
    position: absolute;
    top: calc(100% - 5px);
    left: 50%;
    width: 285px;
    padding: 8px;
    transform: translate(-50%, 8px);
    border: 1px solid #dce7e4;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 18px 45px rgba(16, 47, 44, .15);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .15s ease, transform .15s ease, visibility .15s ease;
}

.c2p-navbar__dropdown.is-open .c2p-navbar__dropdown-menu,
.c2p-navbar__dropdown:hover .c2p-navbar__dropdown-menu {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translate(-50%, 0);
}

.c2p-navbar__dropdown-menu a {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 42px;
    padding: 0 11px;
    border-radius: 9px;
    color: #29423f;
    font: 700 13px/1.25 Inter, Arial, sans-serif;
    text-decoration: none;
}

.c2p-navbar__dropdown-menu a:hover,
.c2p-navbar__dropdown-menu a:focus-visible {
    background: #e7f4f1;
    color: #0f766e;
    outline: none;
}

.c2p-navbar__dropdown-menu .c2p-navbar__dropdown-all {
    margin-top: 4px;
    border-top: 1px solid #dce7e4;
    border-radius: 0 0 9px 9px;
    color: #0f766e;
}

.c2p-navbar__actions {
    display: flex;
    align-items: center;
    gap: 9px;
    justify-self: end;
}

.c2p-icon-button {
    position: relative;
    width: 45px;
    height: 45px;
    display: inline-grid;
    place-items: center;
    padding: 0;
    border: 1px solid #dce7e4;
    border-radius: 12px;
    background: #fff;
    color: #0f766e;
    font-size: 19px;
    cursor: pointer;
    transition: background-color .16s ease, border-color .16s ease, color .16s ease;
}

.c2p-icon-button:hover,
.c2p-icon-button:focus-visible {
    border-color: #9fcfc6;
    background: #e7f4f1;
    color: #0f766e;
    outline: none;
}

.c2p-notification__badge {
    position: absolute;
    top: -6px;
    right: -5px;
    min-width: 18px;
    height: 18px;
    display: grid;
    place-items: center;
    padding: 0 4px;
    border: 2px solid #fff;
    border-radius: 999px;
    background: #e83b4f;
    color: #fff;
    font: 900 9px/1 Inter, Arial, sans-serif;
}

.c2p-navbar__account {
    min-height: 45px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 0 12px 0 7px;
    border: 1px solid #dce7e4;
    border-radius: 12px;
    background: #fff;
    color: #0f766e;
    font: 800 13px/1 Inter, Arial, sans-serif;
    text-decoration: none;
    white-space: nowrap;
}

.c2p-navbar__account:hover,
.c2p-navbar__account:focus-visible {
    background: #e7f4f1;
    border-color: #9fcfc6;
    outline: none;
}

.c2p-navbar__account-icon {
    width: 31px;
    height: 31px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    background: #e7f4f1;
    font-size: 15px;
}

.c2p-navbar__mobile-toggle,
.c2p-navbar__mobile-notification {
    display: none;
}

/* Notifications desktop */
.c2p-notification {
    position: relative;
}

.c2p-notification__panel {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    width: min(390px, calc(100vw - 32px));
    overflow: hidden;
    border: 1px solid #dce7e4;
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 20px 50px rgba(16, 47, 44, .17);
}

.c2p-notification__panel[hidden] {
    display: none;
}

.c2p-notification__panel-head {
    min-height: 64px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 12px 15px;
    border-bottom: 1px solid #dce7e4;
}

.c2p-notification__panel-head div {
    display: grid;
    gap: 2px;
}

.c2p-notification__panel-head span {
    color: #0f766e;
    font: 900 9px/1 Inter, Arial, sans-serif;
    letter-spacing: .12em;
}

.c2p-notification__panel-head strong {
    color: #10211f;
    font: 900 17px/1.15 Manrope, Inter, Arial, sans-serif;
}

.c2p-notification__panel-head button {
    width: 32px;
    height: 32px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #60716e;
    cursor: pointer;
}

.c2p-notification__panel-head button:hover {
    background: #e7f4f1;
    color: #0f766e;
}

.c2p-notification__list {
    display: grid;
}

.c2p-notification__item {
    display: grid;
    grid-template-columns: 38px minmax(0, 1fr) 15px;
    align-items: center;
    gap: 11px;
    padding: 13px 15px;
    color: inherit;
    text-decoration: none;
    border-bottom: 1px solid #eef3f1;
}

.c2p-notification__item:last-child {
    border-bottom: 0;
}

.c2p-notification__item:hover {
    background: #f5faf8;
}

.c2p-notification__item-icon {
    width: 38px;
    height: 38px;
    display: grid;
    place-items: center;
    border-radius: 10px;
    background: #e7f4f1;
    color: #0f766e;
}

.c2p-notification__item-content {
    min-width: 0;
    display: grid;
    gap: 3px;
}

.c2p-notification__item-content strong {
    overflow: hidden;
    color: #10211f;
    font: 800 13px/1.3 Inter, Arial, sans-serif;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.c2p-notification__item-content small {
    color: #60716e;
    font: 500 11px/1.45 Inter, Arial, sans-serif;
}

.c2p-notification__item-arrow {
    color: #8aa09c;
    font-size: 12px;
}

/* Mobile drawer */
.c2p-mobile-drawer,
.c2p-notification-modal {
    position: fixed;
    inset: 0;
    z-index: 6000;
    visibility: hidden;
    pointer-events: none;
}

.c2p-mobile-drawer.is-open,
.c2p-notification-modal.is-open {
    visibility: visible;
    pointer-events: auto;
}

.c2p-mobile-drawer__backdrop,
.c2p-notification-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(8, 29, 27, .52);
    opacity: 0;
    transition: opacity .18s ease;
}

.c2p-mobile-drawer.is-open .c2p-mobile-drawer__backdrop,
.c2p-notification-modal.is-open .c2p-notification-modal__backdrop {
    opacity: 1;
}

.c2p-mobile-drawer__panel {
    position: absolute;
    top: 0;
    left: 0;
    width: min(342px, 88vw);
    height: 100%;
    overflow-y: auto;
    padding: 24px 18px;
    background: #fff;
    box-shadow: 18px 0 45px rgba(0, 0, 0, .15);
    transform: translateX(-102%);
    transition: transform .2s ease;
}

.c2p-mobile-drawer.is-open .c2p-mobile-drawer__panel {
    transform: translateX(0);
}

.c2p-mobile-drawer__head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 0 3px 16px;
    border-bottom: 1px solid #dce7e4;
}

.c2p-mobile-drawer__head > div {
    display: grid;
    gap: 2px;
}

.c2p-mobile-drawer__kicker {
    color: #0f766e;
    font: 900 9px/1 Inter, Arial, sans-serif;
    letter-spacing: .12em;
}

.c2p-mobile-drawer__head strong {
    color: #10211f;
    font: 900 20px/1.1 Manrope, Inter, Arial, sans-serif;
}

.c2p-mobile-drawer__close {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border: 0;
    border-radius: 8px;
    background: transparent;
    color: #193532;
    cursor: pointer;
    font-size: 16px;
}

.c2p-mobile-drawer__close:hover {
    background: #e7f4f1;
    color: #0f766e;
}

.c2p-mobile-drawer__links {
    display: grid;
    gap: 3px;
    padding-top: 13px;
}

.c2p-mobile-drawer__link {
    width: 100%;
    min-height: 45px;
    display: grid;
    grid-template-columns: 30px minmax(0, 1fr) 15px;
    align-items: center;
    gap: 9px;
    padding: 0 10px;
    border: 0;
    border-radius: 9px;
    background: transparent;
    color: #203a36;
    text-align: left;
    text-decoration: none;
    font: 800 13px/1.2 Inter, Arial, sans-serif;
    cursor: pointer;
}

.c2p-mobile-drawer__link:hover,
.c2p-mobile-drawer__link:focus-visible,
.c2p-mobile-drawer__link.is-active {
    background: #0f766e;
    color: #fff;
    outline: none;
}

.c2p-mobile-drawer__link > i:first-child {
    width: 30px;
    height: 30px;
    display: grid;
    place-items: center;
    color: #0f766e;
    font-size: 16px;
}

.c2p-mobile-drawer__link:hover > i:first-child,
.c2p-mobile-drawer__link:focus-visible > i:first-child,
.c2p-mobile-drawer__link.is-active > i:first-child {
    color: #fff;
}

.c2p-mobile-drawer__link > i:last-child {
    color: #89a09c;
    font-size: 11px;
}

.c2p-mobile-drawer__link:hover > i:last-child,
.c2p-mobile-drawer__link:focus-visible > i:last-child,
.c2p-mobile-drawer__link.is-active > i:last-child {
    color: rgba(255,255,255,.8);
}

.c2p-mobile-drawer__methodology {
    display: grid;
}

.c2p-mobile-drawer__methodology-toggle {
    appearance: none;
    font: inherit;
}

.c2p-mobile-drawer__subnav {
    margin: 2px 0 3px 39px;
    padding-left: 10px;
    border-left: 1px solid #cfe1dd;
    display: grid;
    gap: 1px;
}

.c2p-mobile-drawer__subnav[hidden] {
    display: none;
}

.c2p-mobile-drawer__subnav a {
    min-height: 31px;
    display: flex;
    align-items: center;
    padding: 0 9px;
    border-radius: 7px;
    color: #536864;
    font: 700 11px/1.2 Inter, Arial, sans-serif;
    text-decoration: none;
}

.c2p-mobile-drawer__subnav a:hover,
.c2p-mobile-drawer__subnav a:focus-visible {
    background: #e7f4f1;
    color: #0f766e;
    outline: none;
}

/* Mobile notification modal */
.c2p-notification-modal__panel {
    position: absolute;
    top: 70px;
    left: 14px;
    right: 14px;
    max-height: calc(100vh - 100px);
    overflow-y: auto;
    border: 1px solid #dce7e4;
    border-radius: 17px;
    background: #fff;
    box-shadow: 0 20px 55px rgba(0, 0, 0, .22);
    transform: translateY(-8px);
    opacity: 0;
    transition: transform .18s ease, opacity .18s ease;
}

.c2p-notification-modal.is-open .c2p-notification-modal__panel {
    transform: translateY(0);
    opacity: 1;
}

@media (max-width: 1180px) and (min-width: 901px) {
    .c2p-navbar__inner {
        width: calc(100% - 24px);
        gap: 10px;
    }

    .c2p-navbar__link {
        padding: 0 7px;
        font-size: 12px;
    }

    .c2p-navbar__account {
        padding-right: 9px;
        font-size: 11px;
    }
}

@media (max-width: 900px) {
    .c2p-navbar__inner {
        width: calc(100% - 24px);
        min-height: 64px;
        display: grid;
        grid-template-columns: 42px minmax(0, 1fr) 42px;
        gap: 8px;
    }

    .c2p-navbar__brand {
        grid-column: 2;
        grid-row: 1;
        justify-self: center;
    }

    .c2p-navbar__logo {
        max-width: 145px;
        max-height: 43px;
    }

    .c2p-navbar__logo-placeholder span {
        width: 38px;
        height: 38px;
        border-radius: 10px;
        font-size: 11px;
    }

    .c2p-navbar__logo-placeholder strong {
        font-size: 16px;
    }

    .c2p-navbar__nav,
    .c2p-navbar__actions {
        display: none;
    }

    .c2p-navbar__mobile-toggle,
    .c2p-navbar__mobile-notification {
        display: grid;
        place-items: center;
    }

    .c2p-navbar__mobile-toggle {
        grid-column: 1;
        grid-row: 1;
        width: 40px;
        height: 40px;
        padding: 0;
        border: 0;
        border-radius: 9px;
        background: transparent;
        color: #163632;
        font-size: 23px;
        cursor: pointer;
    }

    .c2p-navbar__mobile-toggle:hover,
    .c2p-navbar__mobile-toggle:focus-visible {
        background: #e7f4f1;
        color: #0f766e;
        outline: none;
    }

    .c2p-navbar__mobile-notification {
        grid-column: 3;
        grid-row: 1;
        justify-self: end;
    }

    .c2p-navbar__mobile-notification .c2p-icon-button {
        width: 40px;
        height: 40px;
        border: 0;
        background: transparent;
    }

    .c2p-mobile-drawer__panel {
        width: min(320px, 86vw);
        padding: 21px 16px;
    }

    .c2p-mobile-drawer__head {
        padding-bottom: 13px;
    }

    .c2p-mobile-drawer__links {
        padding-top: 10px;
        gap: 2px;
    }

    .c2p-mobile-drawer__link {
        min-height: 42px;
        grid-template-columns: 27px minmax(0, 1fr) 14px;
        gap: 8px;
        padding: 0 8px;
        font-size: 12.5px;
    }

    .c2p-mobile-drawer__link > i:first-child {
        width: 27px;
        height: 27px;
        font-size: 15px;
    }

    .c2p-mobile-drawer__subnav {
        margin-left: 35px;
    }
}

@media (max-width: 420px) {
    .c2p-navbar__inner {
        width: calc(100% - 16px);
        grid-template-columns: 38px minmax(0, 1fr) 38px;
    }

    .c2p-navbar__logo-placeholder strong {
        font-size: 15px;
    }

    .c2p-mobile-drawer__panel {
        width: min(304px, 84vw);
        padding-left: 14px;
        padding-right: 14px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .c2p-navbar__link,
    .c2p-navbar__dropdown-menu,
    .c2p-mobile-drawer__backdrop,
    .c2p-mobile-drawer__panel,
    .c2p-notification-modal__backdrop,
    .c2p-notification-modal__panel {
        transition: none;
    }
}
