
/* ==========================================================
   V20.46.23 · FINAL UNIFIED PUBLIC NAVIGATION
   Loaded AFTER premium + home CSS.
   One header. One mobile drawer. One visual policy.
   ========================================================== */

body[data-theme="visocarte"] .vc-platform-header{
  position:fixed!important;
  top:0!important;
  left:0!important;
  right:0!important;
  width:100%!important;
  z-index:1800!important;
  background:transparent!important;
  border-bottom:1px solid transparent!important;
  box-shadow:none!important;
  transition:background .28s ease,border-color .28s ease,box-shadow .28s ease!important;
}

/* HERO STATE */
body[data-theme="visocarte"] .vc-platform-header:not(.is-scrolled){
  background:transparent!important;
  border-bottom-color:transparent!important;
  box-shadow:none!important;
  backdrop-filter:none!important;
  -webkit-backdrop-filter:none!important;
}
body[data-theme="visocarte"] .vc-platform-header:not(.is-scrolled) .vc-platform-brand-copy{
  display:flex!important;
  flex-direction:column!important;
  min-width:0!important;
}
body[data-theme="visocarte"] .vc-platform-header:not(.is-scrolled) .vc-platform-brand-copy strong{
  color:#fff!important;
}
body[data-theme="visocarte"] .vc-platform-header:not(.is-scrolled) .vc-platform-brand-copy small{
  color:rgba(220,236,249,.82)!important;
}
body[data-theme="visocarte"] .vc-platform-header:not(.is-scrolled) .vc-platform-logo{
  background:rgba(4,29,65,.52)!important;
  border-color:rgba(255,255,255,.14)!important;
  box-shadow:0 8px 24px rgba(0,0,0,.13)!important;
}

/* SCROLLED / WHITE CONTENT STATE */
body[data-theme="visocarte"] .vc-platform-header.is-scrolled{
  background:rgba(255,255,255,.985)!important;
  border-bottom:1px solid #e2e9f0!important;
  box-shadow:0 10px 30px rgba(15,45,76,.09)!important;
  backdrop-filter:saturate(135%) blur(10px)!important;
  -webkit-backdrop-filter:saturate(135%) blur(10px)!important;
}
body[data-theme="visocarte"] .vc-platform-header.is-scrolled .vc-platform-brand-copy{
  display:flex!important;
  flex-direction:column!important;
  min-width:0!important;
}
body[data-theme="visocarte"] .vc-platform-header.is-scrolled .vc-platform-brand-copy strong{
  color:#0a3159!important;
}
body[data-theme="visocarte"] .vc-platform-header.is-scrolled .vc-platform-brand-copy small{
  color:#718294!important;
}
body[data-theme="visocarte"] .vc-platform-header.is-scrolled .vc-platform-logo{
  background:#eef6fc!important;
  border-color:#dae6ef!important;
  box-shadow:none!important;
}

/* Active desktop nav = one soft pill only */
body[data-theme="visocarte"] .vc-platform-menu a.is-active::after{
  display:none!important;
  content:none!important;
}
body[data-theme="visocarte"] .vc-platform-header:not(.is-scrolled) .vc-platform-menu a.is-active{
  background:rgba(255,255,255,.10)!important;
  color:#fff!important;
  box-shadow:inset 0 0 0 1px rgba(255,255,255,.11)!important;
}
body[data-theme="visocarte"] .vc-platform-header.is-scrolled .vc-platform-menu a.is-active{
  background:#eaf5fd!important;
  color:#0a72b9!important;
  box-shadow:inset 0 0 0 1px #d5eaf8!important;
}

/* ==========================================================
   MOBILE
   ========================================================== */
@media(max-width:900px){
  body[data-theme="visocarte"] .vc-platform-nav{
    width:calc(100% - 20px)!important;
    max-width:calc(100% - 20px)!important;
    min-height:70px!important;
    margin-inline:auto!important;
  }

  body[data-theme="visocarte"] .vc-platform-brand{
    display:flex!important;
    align-items:center!important;
    gap:9px!important;
    min-width:0!important;
    max-width:calc(100% - 58px)!important;
  }

  /* IMPORTANT: Home previously hid this at <=390px. Never hide title now. */
  body[data-theme="visocarte"] .vc-platform-brand-copy{
    display:flex!important;
    flex-direction:column!important;
    overflow:hidden!important;
    max-width:180px!important;
  }
  body[data-theme="visocarte"] .vc-platform-brand-copy strong{
    display:block!important;
    font-size:11px!important;
    line-height:1!important;
    letter-spacing:.10em!important;
    white-space:nowrap!important;
    text-transform:uppercase!important;
  }
  body[data-theme="visocarte"] .vc-platform-brand-copy small{
    display:block!important;
    margin-top:4px!important;
    font-size:6.5px!important;
    line-height:1.2!important;
    white-space:nowrap!important;
    overflow:hidden!important;
    text-overflow:ellipsis!important;
  }

  body[data-theme="visocarte"] .vc-platform-logo{
    width:40px!important;
    height:40px!important;
    flex:0 0 40px!important;
    border-radius:13px!important;
  }

  body[data-theme="visocarte"] .vc-platform-mobile-actions{
    display:flex!important;
    align-items:center!important;
    margin-left:auto!important;
    position:relative!important;
    z-index:1810!important;
  }

  body[data-theme="visocarte"] .vc-platform-menu-toggle{
    display:flex!important;
    position:relative!important;
    z-index:1811!important;
    width:42px!important;
    height:42px!important;
    flex:0 0 42px!important;
    border-radius:13px!important;
    border:1px solid rgba(255,255,255,.88)!important;
    background:rgba(255,255,255,.96)!important;
    box-shadow:0 8px 22px rgba(0,0,0,.10)!important;
    pointer-events:auto!important;
  }
  body[data-theme="visocarte"] .vc-platform-menu-toggle span{
    background:#0a82d0!important;
  }
  body[data-theme="visocarte"] .vc-platform-header.is-scrolled .vc-platform-menu-toggle{
    background:#fff!important;
    border-color:#d9e6ef!important;
    box-shadow:0 6px 16px rgba(12,78,123,.06)!important;
  }

  /* One and only mobile drawer: always from RIGHT */
  body[data-theme="visocarte"] .vc-platform-menu{
    display:flex!important;
    position:fixed!important;
    z-index:1820!important;
    top:0!important;
    right:0!important;
    left:auto!important;
    bottom:0!important;
    width:min(90vw,360px)!important;
    height:100dvh!important;
    max-height:100dvh!important;
    padding:18px!important;
    flex-direction:column!important;
    overflow-y:auto!important;
    overflow-x:hidden!important;
    overscroll-behavior:contain!important;
    pointer-events:none!important;
    opacity:1!important;
    visibility:visible!important;
    transform:translateX(105%)!important;
    transition:transform .30s cubic-bezier(.22,.8,.25,1)!important;
    border-radius:24px 0 0 24px!important;
    backdrop-filter:none!important;
    -webkit-backdrop-filter:none!important;
    filter:none!important;
  }
  body[data-theme="visocarte"] .vc-platform-menu.is-open{
    pointer-events:auto!important;
    transform:translateX(0)!important;
  }

  /* Reset ALL Home legacy item animations */
  body[data-theme="visocarte"] .vc-platform-menu a{
    opacity:1!important;
    visibility:visible!important;
    transform:none!important;
    transition:background .18s ease,border-color .18s ease,color .18s ease!important;
    pointer-events:auto!important;
  }

  /* DARK drawer while header is on Hero */
  body[data-theme="visocarte"]:not(.vc55-nav-light) .vc-platform-menu{
    background:linear-gradient(180deg,#03152f 0%,#061f42 70%,#082a52 100%)!important;
    border-left:1px solid rgba(255,255,255,.09)!important;
    box-shadow:-28px 0 80px rgba(0,0,0,.36)!important;
  }

  /* LIGHT drawer only after Hero has ended */
  body[data-theme="visocarte"].vc55-nav-light .vc-platform-menu{
    background:linear-gradient(180deg,#fff 0%,#f8fbfe 76%,#f2f7fb 100%)!important;
    border-left:1px solid #dce7f0!important;
    box-shadow:-24px 0 70px rgba(22,56,88,.17)!important;
  }

  /* Dark item palette */
  body[data-theme="visocarte"]:not(.vc55-nav-light) .vc55-drawer-primary>a,
  body[data-theme="visocarte"]:not(.vc55-nav-light) .vc55-drawer-secondary>a{
    color:#dbeaf7!important;
    background:transparent!important;
  }
  body[data-theme="visocarte"]:not(.vc55-nav-light) .vc55-drawer-primary>a.is-active,
  body[data-theme="visocarte"]:not(.vc55-nav-light) .vc55-drawer-secondary>a.is-active{
    background:linear-gradient(90deg,rgba(15,119,194,.34),rgba(10,80,139,.18))!important;
    color:#fff!important;
    box-shadow:inset 3px 0 #54ceff!important;
  }

  /* Light item palette */
  body[data-theme="visocarte"].vc55-nav-light .vc55-drawer-primary>a,
  body[data-theme="visocarte"].vc55-nav-light .vc55-drawer-secondary>a{
    color:#2c4964!important;
    background:transparent!important;
  }
  body[data-theme="visocarte"].vc55-nav-light .vc55-drawer-primary>a.is-active,
  body[data-theme="visocarte"].vc55-nav-light .vc55-drawer-secondary>a.is-active{
    background:linear-gradient(90deg,#e7f5ff,#f4faff)!important;
    color:#0b6fae!important;
    border-color:#cfe8f8!important;
    box-shadow:inset 3px 0 #159ee4!important;
  }

  /* Ensure footer/promo colors follow drawer mode */
  body[data-theme="visocarte"]:not(.vc55-nav-light) .vc55-drawer-footer{
    background:linear-gradient(180deg,rgba(3,21,47,0),#041a36 22%,#041a36 100%)!important;
  }
  body[data-theme="visocarte"].vc55-nav-light .vc55-drawer-footer{
    background:linear-gradient(180deg,rgba(248,251,254,0),#f8fbfe 22%,#f8fbfe 100%)!important;
  }

  /* Overlay never white */
  body[data-theme="visocarte"] .vc55-menu-overlay{
    background:rgba(2,10,24,.52)!important;
    backdrop-filter:none!important;
    -webkit-backdrop-filter:none!important;
  }
  body[data-theme="visocarte"].vc55-nav-light .vc55-menu-overlay{
    background:rgba(15,37,58,.30)!important;
  }
}

@media(max-width:390px){
  /* Keep VisoCarte name visible on 360px devices */
  body[data-theme="visocarte"] .vc-platform-brand-copy{
    display:flex!important;
    max-width:132px!important;
  }
  body[data-theme="visocarte"] .vc-platform-brand-copy strong{
    display:block!important;
    font-size:10px!important;
  }
  body[data-theme="visocarte"] .vc-platform-brand-copy small{
    display:none!important;
  }
  body[data-theme="visocarte"] .vc-platform-brand{
    max-width:calc(100% - 52px)!important;
  }
}

@media(prefers-reduced-motion:reduce){
  body[data-theme="visocarte"] .vc-platform-menu,
  body[data-theme="visocarte"] .vc-platform-header{
    transition:none!important;
  }
}


/* ==========================================================
   V20.46.24 · CONNECTION CTA RESTORED
   Same backend URL/label logic on desktop and mobile.
   ========================================================== */

.vc-platform-desktop-login{
  display:none;
}

/* Desktop: dedicated Connexion / Dashboard CTA in header */
@media(min-width:901px){
  body[data-theme="visocarte"] .vc-platform-desktop-login{
    display:inline-flex!important;
    align-items:center!important;
    justify-content:center!important;
    gap:8px!important;
    flex:0 0 auto!important;
    min-height:42px!important;
    padding:10px 16px!important;
    margin-left:10px!important;
    border-radius:999px!important;
    text-decoration:none!important;
    font-size:10px!important;
    font-weight:950!important;
    line-height:1!important;
    white-space:nowrap!important;
    transition:
      transform .2s ease,
      background .25s ease,
      color .25s ease,
      box-shadow .25s ease,
      border-color .25s ease!important;
  }

  body[data-theme="visocarte"] .vc-platform-desktop-login svg{
    width:15px!important;
    height:15px!important;
    fill:none!important;
    stroke:currentColor!important;
    stroke-width:2!important;
  }

  /* On Hero */
  body[data-theme="visocarte"] .vc-platform-header:not(.is-scrolled) .vc-platform-desktop-login{
    color:#fff!important;
    background:linear-gradient(180deg,#1bb4fb,#087ce0)!important;
    border:1px solid rgba(255,255,255,.14)!important;
    box-shadow:0 10px 24px rgba(0,126,218,.20)!important;
  }

  /* On white scrolled header */
  body[data-theme="visocarte"] .vc-platform-header.is-scrolled .vc-platform-desktop-login{
    color:#fff!important;
    background:linear-gradient(180deg,#149ee8,#0874c8)!important;
    border:1px solid transparent!important;
    box-shadow:0 8px 20px rgba(8,116,200,.16)!important;
  }

  body[data-theme="visocarte"] .vc-platform-desktop-login:hover{
    transform:translateY(-1px)!important;
    box-shadow:0 12px 26px rgba(8,116,200,.22)!important;
  }

  /* Drawer-only CTA must never occupy desktop navigation */
  body[data-theme="visocarte"] .vc55-drawer-login{
    display:none!important;
  }
}

/* Mobile: keep the existing CTA inside the drawer only */
@media(max-width:900px){
  body[data-theme="visocarte"] .vc-platform-desktop-login{
    display:none!important;
  }

  body[data-theme="visocarte"] .vc55-drawer-login{
    display:flex!important;
  }
}

/* Narrow desktop: reduce spacing before hiding any functional action */
@media(min-width:901px) and (max-width:1120px){
  body[data-theme="visocarte"] .vc-platform-desktop-login{
    padding-inline:12px!important;
    margin-left:6px!important;
    font-size:9px!important;
  }
}
