/* =========================
   NAVBAR (premium, white-dominant)
   Keep dimensions intact
========================= */
:root{
    --acc: #4cc3bd;
    --bg0: #e3f5f4;
    --bg1: #f7fbfb;
    --text: #0f172a;
    --muted: #64748b;
    --card: rgba(255,255,255,.72);
    --stroke: rgba(15, 23, 42, .08);
    --shadow: 0 18px 50px rgba(15, 23, 42, .10);
    --shadow2: 0 10px 30px rgba(15, 23, 42, .10);
    --radius: 18px;
    --kpi-waiting: #dea322;
    --kpi-planned: #3d8aee;
    --kpi-received:#17bb89;
    --kpi-refund:  #d95554;
}
.nav-bar{
    position: relative;
    display:flex;
    justify-content: space-between;
    align-items:center;
    height: 75px;                 /* NE BOUGE PAS */
    padding-right: 20px;          /* NE BOUGE PAS */
    border-bottom: 1px solid rgba(15,23,42,.08);
    background: rgba(255,255,255,.88);   /* plus blanc */
    backdrop-filter: blur(12px);
    z-index: 99;
}

.app-shell{
    display: flex;
    flex-direction: column;
    flex: 1 1 auto;
    width: 100%;
    min-width: 0;
    max-height: 100%;

}

#app-shell-frame{
    display: block;
    flex: 1 1 auto;
    width: 100%;
    min-width: 0;
}

/* petite lueur très légère (pas dominante) */
.nav-bar::before{
    content:"";
    position:absolute;
    inset:0;
    pointer-events:none;
    background:
            radial-gradient(700px 180px at 18% -40px, rgba(76,195,189,.10), transparent 60%),
            linear-gradient(180deg, rgba(255,255,255,.85), rgba(255,255,255,.65));
    opacity: .9;
}

/* underline slider = accent teal (au lieu de rouge agressif) */
.slider-container{
    position: relative;
    bottom: 0;
    left: 0;
    width: 100%;
}

.slider-bar{
    position: absolute;
    height: 2px;
    background: linear-gradient(90deg, var(--acc, #4cc3bd), rgba(76,195,189,.25));
    transition: all .25s ease;
    border-radius: 999px;
}


/* Left title area */
.title-page{
    display: flex;
    align-items: center;
    gap: 14px;
    position: relative;
    margin-left:25px ;
    font-size: 1.0rem;
    line-height: 1.2;
    height: 100%;
    min-width: 0;
    overflow: hidden;
    color: #0f172a;
    font-weight: 600;
    --page-title-size: 34px;
    --page-title-max-width: min(52vw, 920px);
    --page-title-letter-spacing: -0.04em;

}
.title-page h1{
    background: linear-gradient(90deg, #0f172a, #2b2d42);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
    margin: 0;
    will-change: transform, opacity, filter;
}

#pageTitle{
    display: inline-flex;
    align-items: baseline;
    flex: 0 1 auto;
    min-width: 0;
    max-width: var(--page-title-max-width);
    font-size: var(--page-title-size);
    line-height: 1.05;
    letter-spacing: var(--page-title-letter-spacing);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

#pageTitleText{
    display: inline-block;
    min-width: 0;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

#pageTitleCursor{
    display:inline-block;
    flex: 0 0 auto;
    margin-left:6px;
    animation: blink .8s steps(1) infinite;
}

@keyframes blink{
    50%{ opacity:0; }
}



.logo_link{
    display:flex;
    align-items:center;
    gap: 10px;
}

.logo_transparent{
    width: 200px;              /* NE BOUGE PAS */
    position: relative;
    z-index: 1000000;
}

.logo-dashboard{
    width: 32px;               /* NE BOUGE PAS */
    margin-right: 10px;        /* NE BOUGE PAS */
}

/* Right widgets */
.nav-widget{
    display:flex;
    align-items:center;
    gap: 12px;
    position: relative;
    z-index: 1;
}

/* ---------- Search (optional widget) ---------- */
.nav-search{
    display:flex;
    align-items:center;
    gap: 10px;
    height: 42px;
    padding: 0 12px;
    border-radius: 999px;
    background: rgba(255,255,255,.82);
    border: 1px solid rgba(15,23,42,.08);
    box-shadow: 0 10px 22px -16px rgba(0,0,0,.35);
    transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease;
}

.nav-search i{ color: rgba(15,23,42,.45); }

.nav-search input{
    border: 0;
    outline: 0;
    background: transparent;
    min-width: 260px;
    font-weight: 650;
    color: rgba(15,23,42,.86);
}

.nav-search input::placeholder{ color: rgba(15,23,42,.40); }

.nav-search:focus-within{
    border-color: rgba(76,195,189,.55);
    box-shadow: 0 18px 38px -24px rgba(76,195,189,.55);
    transform: translateY(-1px);
}

/* ---------- Plan badge ---------- */
.plan-badge{
    display:inline-flex;
    align-items:center;
    gap: 8px;
    height: 42px;
    padding: 0 12px;
    border-radius: 12px;
    border: 1px solid rgba(15, 23, 42, 0.1);
    background: rgba(255, 255, 255, 0.9);
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 800;
    font-size: 12px;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: #2f3a55;
    box-shadow: 0 8px 16px rgba(15, 23, 42, 0.08);
    transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease;
}

.plan-dot{
    width: 18px;
    height: 18px;
    border-radius: 999px;
    background: var(--acc, #4cc3bd);
    box-shadow: inset 0 0 0 4px rgba(255, 255, 255, 0.75), 0 0 0 1px rgba(15, 23, 42, 0.06);
    flex: 0 0 18px;
}

.plan-badge:hover{
    transform: translateY(-1px);
    border-color: rgba(15, 23, 42, 0.2);
    box-shadow: 0 10px 20px rgba(15, 23, 42, 0.1);
}

/* ---------- CTA button small ---------- */
.nav-btn{
    height: 42px;
    padding: 0 12px;
    border-radius: 12px;
    border: 1px solid rgba(15, 23, 42, 0.1);
    background: rgba(255, 255, 255, 0.9);
    font-family: 'Plus Jakarta Sans', sans-serif;
    font-weight: 800;
    cursor:pointer;
    display:inline-flex;
    align-items:center;
    gap: 8px;
    color: #2f3a55;
    text-decoration: none;
    box-shadow: 0 8px 16px rgba(15, 23, 42, 0.08);
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}

.nav-btn::after{
    content: none;
}

.nav-btn-icon{
    width: 22px;
    height: 22px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #2f3a55;
    background: rgba(15, 23, 42, 0.06);
    flex: 0 0 22px;
}

.nav-btn-icon svg{
    width: 12px;
    height: 12px;
}

.nav-btn-link{
    color: #2f3a55;
    font-size: 0.8rem;
    font-weight: 700;
    text-decoration: none;
}

.nav-btn:hover{
    transform: translateY(-1px);
    border-color: rgba(15, 23, 42, 0.2);
    box-shadow: 0 10px 20px rgba(15, 23, 42, 0.1);
}

/* arrow */
.arrow-menu-container{
    display:flex;
    align-items:center;
    justify-content:center;
    width: 26px;
    height: 26px;
    border-radius: 999px;
    background: rgba(15,23,42,.04);
    border: 1px solid rgba(15,23,42,.06);
}

.arrow-menu{
    width: 14px;
    height: 14px;
    transition: transform .18s ease;
    opacity: .78;
}

.navbar-right-content.connected.is-open .arrow-menu{
    transform: rotate(180deg);
}

/* Dropdown */
.dropdown-menu{
    position:absolute;
    right: 0;
    top: calc(100% + 10px);
    min-width: 260px;
    border-radius: 16px;
    border: 1px solid rgba(15,23,42,.10);
    background: rgba(255,255,255,.92);
    backdrop-filter: blur(14px);
    box-shadow: 0 30px 80px rgba(15,23,42,.18);
    overflow:hidden;
    display:none;
}

.dropdown-menu.is-open{ display:block; }

.dropdown-item{
    display:flex;
    align-items:center;
    gap: 10px;
    padding: 10px 12px;
    cursor:pointer;
    color: rgba(15,23,42,.82);
    text-decoration:none;
    font-weight: 750;
    transition: background .15s ease;
}

.dropdown-item:hover{
    background: rgba(76,195,189,.08);
}

.mobile-sidebar-toggle{
    display: none;
    align-items: center;
    gap: 10px;
    height: 42px;
    padding: 0 14px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.92);
    color: #0f172a;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.08);
    cursor: pointer;
}

.mobile-sidebar-toggle__icon{
    display: inline-flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    width: 18px;
    height: 18px;
}

.mobile-sidebar-toggle__icon span{
    display: block;
    width: 18px;
    height: 2px;
    border-radius: 999px;
    background: currentColor;
    transition: transform .2s ease, opacity .2s ease;
}

.mobile-sidebar-toggle__label{
    font-size: 13px;
    font-weight: 800;
    letter-spacing: .02em;
}

.mobile-sidebar-toggle.is-open .mobile-sidebar-toggle__icon span:nth-child(1){
    transform: translateY(6px) rotate(45deg);
}

.mobile-sidebar-toggle.is-open .mobile-sidebar-toggle__icon span:nth-child(2){
    opacity: 0;
}

.mobile-sidebar-toggle.is-open .mobile-sidebar-toggle__icon span:nth-child(3){
    transform: translateY(-6px) rotate(-45deg);
}

@media (max-width: 1720px){
    .title-page{
        --page-title-size: 32px;
        --page-title-max-width: min(49vw, 840px);
    }
}

@media (max-width: 1600px){
    .title-page{
        --page-title-size: 31px;
        --page-title-max-width: min(47vw, 780px);
    }
}

@media (max-width: 1536px){
    .title-page{
        --page-title-size: 30px;
        --page-title-max-width: min(45vw, 730px);
    }
}

@media (max-width: 1440px){
    .title-page{
        --page-title-size: 28px;
        --page-title-max-width: min(42vw, 650px);
    }
}

@media (max-width: 1366px){
    .title-page{
        --page-title-size: 26px;
        --page-title-max-width: min(39vw, 570px);
    }
}

@media (max-width: 1280px){
    .title-page{
        --page-title-size: 24px;
        --page-title-max-width: min(36vw, 500px);
    }
}

@media (max-width: 1180px){
    .title-page{
        --page-title-size: 22px;
        --page-title-max-width: min(33vw, 430px);
    }
}

@media (max-width: 1100px){
    .title-page{
        --page-title-size: 21px;
        --page-title-max-width: min(31vw, 390px);
    }
}

@media (max-width: 1024px){
    .title-page{
        --page-title-size: 20px;
        --page-title-max-width: min(29vw, 350px);
    }
}

@media (max-width: 960px){
    .title-page{
        --page-title-size: 19px;
        --page-title-max-width: min(27vw, 320px);
    }
}

@media (max-width: 900px){
    .title-page{
        --page-title-size: 18px;
        --page-title-max-width: min(25vw, 290px);
    }
}

@media (max-width: 840px){
    .title-page{
        --page-title-size: 17px;
        --page-title-max-width: min(23vw, 250px);
    }
}

@media (max-width: 780px){
    .nav-bar{
        position: sticky;
        top: 0;
        gap: 10px;
        height: 64px;
        padding: 0 12px;
        z-index: 1008;
    }

    .title-page{
        flex: 1 1 auto;
        min-width: 0;
        gap: 10px;
        margin-left: 0;
    }

    .title-page h1{
        max-width: 100%;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
    }

    .title-page{
        --page-title-size: 18px;
        --page-title-max-width: min(46vw, 300px);
        --page-title-letter-spacing: -0.02em;
    }

    .mobile-sidebar-toggle{
        display: inline-flex;
        flex: 0 0 auto;
    }

    .nav-widget{
        gap: 8px;
        flex: 0 0 auto;
    }

    .nav-widget .search-bar,
    .nav-widget .plan-badge,
    .nav-widget .nav-btn-ia,
    .nav-widget .nav-btn-ia-metrics,
    .nav-widget .nav-btn-link{
        display: none;
    }

    .nav-bar .connected{
        min-width: auto;
        gap: 6px;
        border-radius: 16px;
    }

    .nav-bar .connected p{
        display: none;
    }

    .nav-bar .connected .profil-img{
        margin: 0;
    }

    .nav-bar .connected .arrow-menu-container{
        width: 30px;
        height: 30px;
        margin-right: 0;
    }

    .nav-bar .dropdown-menu{
        top: calc(100% + 8px);
        width: min(280px, calc(100vw - 16px));
        max-width: calc(100vw - 16px);
    }
}

@media (max-width: 680px){
    .title-page{
        --page-title-size: 17px;
        --page-title-max-width: min(44vw, 250px);
    }
}

@media (max-width: 480px){
    .mobile-sidebar-toggle{
        padding: 0 12px;
    }

    .mobile-sidebar-toggle__label{
        display: none;
    }

    .title-page{
        --page-title-size: 16px;
        --page-title-max-width: min(40vw, 190px);
    }
}
