/* Modern Header Styles for MycvTop */

/* ===== GLOBAL HEADER VARIABLES ===== */
:root{
  /* approximate height of the sticky free-shipping topbar */
  --topbar-sticky-offset: 86px;

  /* logo height that scales smoothly across devices */
  --header-logo-height: clamp(44px, 5vw, 64px);
}

/* Smaller screens often wrap the free-shipping text -> slightly taller */
@media (max-width: 640px){
  :root{ --topbar-sticky-offset: 104px; }
}


/* ===== MODERN HEADER ===== */
.site-header {
    position: relative;
    z-index: 9990;
    background: rgba(255, 255, 255, 0.95); /* Modern white frosted glass */
    backdrop-filter: blur(16px) saturate(180%);
    -webkit-backdrop-filter: blur(16px) saturate(180%);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    box-shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.03);
}

.nav-wrap {
    max-width: 1280px;
    margin: 0 auto;
    padding: 12px 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.brand{
    display:flex;
    align-items:center;
    gap:10px;
    text-decoration:none;
    transition: transform 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
.brand:hover {
    transform: scale(1.02);
}
.brand img {
    height: var(--header-logo-height);
    width: auto;
    max-width: 190px;
    object-fit: contain;
    display: block;
}

.main-nav {
    display: flex;
    align-items: center;
    gap: 12px;
}

.nav-link {
    color: var(--g-ink, #111827); /* Dark premium text */
    text-decoration: none;
    font-weight: 700;
    font-size: 15px;
    padding: 10px 18px;
    border-radius: 12px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
    cursor: pointer;
}

.nav-link:hover,
.nav-dd-toggle:hover {
    background: rgba(0, 0, 0, 0.04);
    color: var(--g-green-600, #d97706);
    transform: translateY(-1px);
}

.nav-link.active {
    background: rgba(245, 158, 11, 0.1);
    color: var(--g-green-600, #d97706);
    box-shadow: inset 0 0 0 1px rgba(245, 158, 11, 0.2);
}

/* Dropdown Desktop */
.nav-dropdown {
    position: relative;
}

.nav-dd-toggle {
    border: none;
    background: transparent;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--g-ink, #111827);
    font-family: inherit;
    font-weight: 700;
    font-size: 15px;
    padding: 10px 18px;
    border-radius: 12px;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
}

.chev {
    transition: transform 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    opacity: 0.8;
    display: inline-block;
    font-size: 16px;
    color: inherit;
}

.nav-dropdown.active .chev {
    transform: rotate(180deg);
}

.nav-dd-menu {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    width: min(560px, 92vw);
    background: #ffffff;
    border-radius: 20px;
    box-shadow: 0 20px 40px -10px rgba(0,0,0,0.1), 0 10px 20px -5px rgba(0,0,0,0.05);
    border: 1px solid rgba(0,0,0,0.05);
    padding: 16px;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px) scale(0.98);
    transform-origin: top right;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 10000;
}

.nav-dropdown.active .nav-dd-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.cat-item {
    display: flex;
    align-items: center;
    gap: 14px;
    text-decoration: none;
    color: var(--g-ink, #111827);
    padding: 14px 16px;
    border-radius: 16px;
    font-weight: 700;
    font-size: 15px;
    background: #f9fafb;
    border: 1px solid rgba(0,0,0,0.02);
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.cat-item:hover {
    background: #fff;
    transform: translateY(-2px);
    border-color: rgba(245, 158, 11, 0.3);
    box-shadow: 0 10px 20px -5px rgba(245, 158, 11, 0.15);
    color: var(--g-green-600, #d97706);
}

.cat-ic {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(245, 158, 11, 0.1);
    color: var(--g-green-600, #d97706);
    font-weight: 900;
    flex-shrink: 0;
    border: 1px solid rgba(245, 158, 11, 0.2);
    transition: all 0.2s ease;
}

.cat-item:hover .cat-ic {
    background: var(--g-green-500, #f59e0b);
    color: #fff;
    transform: scale(1.05);
}

.cat-ic img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 10px;
}

.cat-ic svg {
    display: block;
    padding: 6px;
    border-radius: 14px;
    background: rgba(255,255,255,0.10);
    border: 1px solid rgba(255,255,255,0.18);
}

/* WhatsApp Button - Code exact fourni */
.whatsapp-btn {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    background: #fff;
    color: #25D366;
    padding: 12px 24px;
    border-radius: 30px;
    text-decoration: none;
    font-weight: bold;
    font-size: 16px;
    border: 2px solid #25D366;
    transition: all .3s;
    box-shadow: 0 4px 6px rgba(0,0,0,.1);
    direction: rtl;
    margin-left: 10px;
    white-space: nowrap;
}

.whatsapp-btn:hover {
    background: #25D366;
    color: #fff;
    box-shadow: 0 6px 12px rgba(37,211,102,.3);
    transform: translateY(-2px);
}

.whatsapp-btn svg {
    width: 24px;
    height: 24px;
}

/* Cart Icon */
.cart-icon-btn {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: rgba(255,255,255,0.15);
    border-radius: 10px;
    transition: all 0.15s ease;
    margin-left: 8px;
    color: white;
    text-decoration: none;
}

.cart-icon-btn:hover {
    background: rgba(255,255,255,0.25);
    transform: translateY(-2px);
}

.cart-icon-btn svg {
    stroke: white;
    width: 20px;
    height: 20px;
}

.cart-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #dc3545;
    color: white;
    font-size: 11px;
    font-weight: 800;
    min-width: 20px;
    height: 20px;
    border-radius: 10px;
    display: none; /* Caché par défaut, affiché via JavaScript */
    align-items: center;
    justify-content: center;
    padding: 0 5px;
    box-shadow: 0 2px 8px rgba(220, 53, 69, 0.4);
    z-index: 10;
    animation: badgePulse 0.3s ease;
}

@keyframes badgePulse {
    0% { transform: scale(0); }
    50% { transform: scale(1.2); }
    100% { transform: scale(1); }
}

.cart-badge:not([style*="display: none"]):not([style*="display:none"]) {
    display: flex !important;
}

/* Mobile Burger */
.burger {
    display: none;
    border: 1px solid rgba(255,255,255,0.18);
    background: rgba(255,255,255,0.10);
    color: #fff;
    border-radius: 12px;
    padding: 10px 14px;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.burger:hover {
    background: rgba(255,255,255,0.18);
}

/* Mobile Panel */
.mobile-panel {
    display: none;
    padding: 10px 16px 16px;
    border-top: 1px solid rgba(255,255,255,0.15);
    background: linear-gradient(90deg, #525252, #404040);
}

.mobile-panel a,
.mobile-panel button {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    text-decoration: none;
    color: #ffffff;
    font-weight: 850;
    font-size: 15px;
    padding: 14px 16px;
    border-radius: 12px;
    background: rgba(255,255,255,0.15);
    border: 2px solid rgba(255,255,255,0.20);
    margin-top: 8px;
    cursor: pointer;
    transition: all 0.15s ease;
    text-align: right;
}

.mobile-panel a:hover,
.mobile-panel button:hover {
    background: rgba(255,255,255,0.25);
    border-color: rgba(255,255,255,0.35);
}

.m-dd {
    text-align: right;
}

.m-dd span {
    transition: transform 0.18s ease;
    display: inline-block;
    font-size: 16px;
}

.m-dd-menu {
    display: none;
    margin-top: 6px;
    padding-right: 10px;
}

.m-dd-menu a {
    background: rgba(255,255,255,0.12);
    font-weight: 750;
    font-size: 14px;
    border-color: rgba(255,255,255,0.15);
}

/* Responsive */
@media (max-width: 900px) {
    .main-nav {
        display: none;
    }
    .burger {
        display: block;
    padding: 6px;
    border-radius: 14px;
    background: rgba(255,255,255,0.10);
    border: 1px solid rgba(255,255,255,0.18);
    }
    .mobile-panel.show {
        display: block;
        padding: 10px 16px 16px;
        border-radius: 0;
        background: linear-gradient(90deg, #525252, #404040);
        border: none;
        border-top: 1px solid rgba(255,255,255,0.15);
    }

    .brand img {
        height: clamp(36px, 8vw, 52px);
        max-width: 140px;
    }
    
    /* WhatsApp button responsive */
    .whatsapp-btn {
        padding: 10px 18px;
        font-size: 14px;
        gap: 8px;
    }
    
    .whatsapp-btn svg {
        width: 20px;
        height: 20px;
    }
}

@media (max-width: 480px) {
    .nav-wrap {
        padding: 12px 14px;
    }
    
    .brand{
    display:flex;
    align-items:center;
    gap:10px;
    text-decoration:none;
}
.brand img {
        height: 96px;
}
    
    .mobile-panel a,
    .mobile-panel button {
        font-size: 14px;
        padding: 12px 14px;
    }
    
    /* WhatsApp button mobile */
    .whatsapp-btn {
        padding: 8px 14px;
        font-size: 13px;
        gap: 6px;
        margin-left: 6px;
    }
    
    .whatsapp-btn svg {
        width: 18px;
        height: 18px;
    }
}


/* ===== TOP BAR (Free shipping + WhatsApp) ===== */
.topbar-free-shipping{
    position: relative;
    z-index: 9995;
    background: linear-gradient(90deg, rgba(10, 80, 45, 0.95), rgba(20, 140, 85, 0.95));
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255,255,255,0.18);
}

.topbar-free-shipping .topbar-inner{
    max-width: 1200px;
    margin: 0 auto;
    padding: 10px 16px;
    display:flex;
    align-items:center;
    justify-content:space-between;
    gap:12px;
}

.free-ship-card{
    flex: 1 1 auto;
    min-width: 240px;
    display:flex;
    align-items:flex-start;
    gap:10px;
    padding: 10px 12px;
    border-radius: 16px;
    background: rgba(255,255,255,0.14);
    box-shadow: 0 10px 30px rgba(0,0,0,0.12);
    position: relative;
    overflow:hidden;
}

.free-ship-card::after{
    content:"";
    position:absolute;
    inset:-60% -40%;
    background: radial-gradient(circle at 30% 40%, rgba(255,255,255,0.18), transparent 55%);
    transform: rotate(10deg);
    animation: topbarGlow 4.2s ease-in-out infinite;
    pointer-events:none;
}

.free-ship-icon{font-size:18px; line-height:1; margin-top:2px;}
.free-ship-content{display:flex; flex-direction:column; gap:8px; width:100%;}
.free-ship-line{display:flex; flex-wrap:wrap; align-items:baseline; gap:8px; color:#fff;}
.free-ship-title{font-weight:800; font-size:13px; opacity:0.95;}
.free-ship-amount{font-weight:900; font-size:15px;}
.free-ship-badge{
    margin-inline-start:auto;
    padding:4px 10px;
    border-radius:999px;
    background: rgba(0,0,0,0.18);
    border: 1px solid rgba(255,255,255,0.18);
    font-weight:800;
    font-size:12px;
    white-space:nowrap;
}
.free-ship-sub{color:rgba(255,255,255,0.9); font-size:12px; font-weight:700;}

.free-ship-progress{
    width:100%;
    height:10px;
    border-radius:999px;
    background: rgba(255,255,255,0.18);
    overflow:hidden;
}
.free-ship-progress-bar{
    height:100%;
    width:0%;
    border-radius:999px;
    background: linear-gradient(90deg, rgba(255,255,255,0.85), rgba(255,255,255,0.35));
    animation: progressShimmer 1.8s linear infinite;
    transform-origin: right;
}

.whatsapp-banner-cta{
    flex: 0 0 auto;
    display:flex;
    align-items:center;
    gap:10px;
    padding: 10px 14px;
    border-radius: 16px;
    background: linear-gradient(90deg, #eab308, #facc15);
    color:#422006;
    text-decoration:none;
    font-weight:900;
    box-shadow: 0 12px 28px rgba(0,0,0,0.18);
    border: 1px solid rgba(255,255,255,0.25);
    transition: transform .15s ease, filter .15s ease;
    white-space:nowrap;
}
.whatsapp-banner-cta:hover{transform: translateY(-1px); filter: brightness(1.02);}
.whatsapp-banner-cta:active{transform: translateY(0px) scale(0.99);}
.whatsapp-banner-cta .wa-ico{
    width:30px; height:30px;
    display:flex; align-items:center; justify-content:center;
    border-radius: 12px;
    background: rgba(255,255,255,0.25);
}
.whatsapp-banner-cta .wa-text{font-size:13px;}

@media (max-width: 820px){
    .topbar-free-shipping .topbar-inner{flex-direction:column; align-items:stretch;}
    .whatsapp-banner-cta{justify-content:center;}
    .free-ship-badge{margin-inline-start:0;}
}



/* === TOPBAR STACK (Delivery + WhatsApp) === */
.topbar-stack{
  position: relative;
  z-index: 9996;
  width: 100%;
}

/* =============================================
   BARRE LIVRAISON — Minimaliste & jaune
   ============================================= */
.tb-ship {
  position: sticky;
  top: 0;
  z-index: 9999;
  width: 100%;
  background: #eab308;
  border-bottom: 1px solid #ca8a04;
  box-shadow: 0 2px 8px rgba(202,138,4,0.2);
}

.tb-ship-inner {
  max-width: 720px;
  margin: 0 auto;
  padding: 8px 20px;
  display: flex;
  align-items: center;
  gap: 10px;
}

.tb-ship-icon {
  font-size: 16px;
  flex-shrink: 0;
}

.tb-ship-text {
  color: #422006;
  font-weight: 700;
  font-size: 13px;
  flex-shrink: 0;
  white-space: nowrap;
}

.tb-ship-track {
  flex: 1;
  height: 6px;
  border-radius: 999px;
  background: rgba(66,32,6,0.18);
  overflow: hidden;
  min-width: 60px;
}

.tb-ship-fill {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: #422006;
  transition: width 0.45s ease;
}

.tb-ship-badge {
  flex-shrink: 0;
  font-size: 12px;
  font-weight: 900;
  color: #fff;
  background: #422006;
  padding: 2px 10px;
  border-radius: 999px;
  white-space: nowrap;
}

@media (max-width: 480px) {
  .tb-ship-inner { padding: 8px 14px; gap: 8px; }
  .tb-ship-text { font-size: 12px; }
}

/* =============================================
   BOUTON WHATSAPP DANS LE HEADER
   ============================================= */
.header-wa-btn {
  flex-shrink: 0;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 14px;
  border-radius: 12px;
  background: #25D366;
  color: #fff;
  font-weight: 800;
  font-size: 13px;
  text-decoration: none;
  white-space: nowrap;
  transition: all 0.15s ease;
  margin-inline-start: 8px;
  box-shadow: 0 4px 14px rgba(37,211,102,0.35);
}

.header-wa-btn:hover {
  background: #1ebe5d;
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(37,211,102,0.45);
}

.header-wa-svg { display: block; flex-shrink: 0; }
.header-wa-label { display: block; }

@media (max-width: 900px) {
  .header-wa-label { display: none; }
  .header-wa-btn { padding: 8px; border-radius: 10px; gap: 0; }
}
@media (max-width: 480px) {
  .header-wa-btn { width: 36px; height: 36px; margin-inline-start: 5px; }
}


/* Extra tuning: keep logo balanced with the top banner on very small screens */
@media (max-width: 420px){
  :root{ --header-logo-height: 44px; }
  .brand img{ max-width: 160px; }
}


/* ===== TEXT LOGO (replaces image logo) ===== */
.brand .brand-text{
  display: inline-flex;
  align-items: baseline;
  gap: 2px;
  font-weight: 950;
  letter-spacing: -0.6px;
  line-height: 1;
  text-decoration: none;
  font-size: clamp(22px, 2.8vw, 32px);
  color: #ffffff;
  white-space: nowrap;
}

.brand .brand-text .bt-my,
.brand .brand-text .bt-top{
  color: rgba(214, 255, 230, 0.95); /* soft mint */
}

.brand .brand-text .bt-cv{
  color: #ffffff;
}

.brand .brand-text .bt-dot{
  font-size: 0.72em;
  margin-left: 2px;
  color: rgba(255,255,255,0.75);
  letter-spacing: 0;
}

/* logo texte statique (pas d'animation) */
.brand .brand-text span{
  display: inline-block;
}

/* mobile sizing harmony */
@media (max-width: 640px){
  .brand .brand-text{ font-size: 22px; }
}
@media (max-width: 480px){
  .brand .brand-text{ font-size: 20px; }
}
