/* 02_base_layout.css - Header fixe, navigation desktop, barre supérieure & burger */

/* ROCK-SOLID FIXED SLIM HEADER */
.jdb-fixed-header-wrapper {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
  z-index: 1000 !important;
}

.jdb-topbar {
  background-color: #2D2421 !important;
  color: #EFE4DC !important;
  padding: 6px 16px !important;
  text-align: center !important;
  font-size: 0.76rem !important;
  font-weight: 700 !important;
  letter-spacing: 1.5px !important;
  box-sizing: border-box !important;
}

.jdb-topbar p {
  color: #EFE4DC !important;
  margin: 0 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  gap: 6px !important;
}

  .jdb-main-header {
    background: rgba(255, 255, 255, 0.98) !important;
    backdrop-filter: blur(12px) !important;
    -webkit-backdrop-filter: blur(12px) !important;
    border-bottom: 1px solid #EFE4DC !important;
    padding: 5px 0 !important;
    width: 100% !important;
    transition: all 0.2s ease !important;
    box-sizing: border-box !important;
  }

  .jdb-header-inner {
    width: 100%;
    max-width: 100%;
    padding: 5px clamp(16px, 4vw, 60px);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    box-sizing: border-box;
  }

  .jdb-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    cursor: pointer;
  }

  .jdb-brand-logo {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    object-fit: cover;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
  }

  .jdb-brand-name {
    font-family: 'Cormorant Garamond', Georgia, serif;
    font-size: 1.55rem;
    font-weight: 700;
    color: #2D2421;
    line-height: 1;
  }

  .jdb-desktop-nav {
    display: flex;
    align-items: center;
    gap: 24px;
  }

  .jdb-nav-link {
    font-size: 1.02rem;
    font-weight: 600;
    color: #5A4D47;
    text-decoration: none;
    padding: 6px 0;
    position: relative;
    transition: color 0.2s ease;
    cursor: pointer;
  }

  .jdb-nav-link:hover,
  .jdb-nav-link.active {
    color: #C26D53 !important;
  }

  .jdb-nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0px;
    left: 0;
    right: 0;
    height: 2px;
    background-color: #C26D53;
    border-radius: 2px;
  }

  .jdb-desktop-actions {
    display: flex;
    align-items: center;
    gap: 12px;
  }







  /* DIRECT CART LINK WITH NUMERIC BADGE */
  .jdb-cart-btn {
    font-size: 0.98rem !important;
    font-weight: 600 !important;
    color: #2D2421 !important;
    text-decoration: none !important;
    display: inline-flex !important;
    align-items: center !important;
    gap: 8px !important;
    padding: 6px 14px !important;
    border-radius: 50px !important;
    background: #FDF9F5 !important;
    border: 1px solid #EFE4DC !important;
    transition: all 0.2s ease !important;
    cursor: pointer !important;
  }

  .jdb-cart-btn:hover,
  .jdb-cart-btn.active {
    background: #FFFFFF !important;
    color: #C26D53 !important;
    border-color: #C26D53 !important;
  }

  .jdb-cart-icon-box {
    position: relative !important;
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
  }

  .jdb-cart-num {
    position: absolute !important;
    top: -8px !important;
    right: -10px !important;
    background-color: #C26D53 !important;
    color: #FFFFFF !important;
    font-size: 0.65rem !important;
    font-weight: 700 !important;
    min-width: 17px !important;
    height: 17px !important;
    border-radius: 50% !important;
    display: none;
    align-items: center !important;
    justify-content: center !important;
    padding: 0 3px !important;
    line-height: 1 !important;
    box-sizing: border-box !important;
    box-shadow: 0 2px 5px rgba(194, 109, 83, 0.4) !important;
    border: 1.5px solid #FFFFFF !important;
    font-family: 'Plus Jakarta Sans', sans-serif !important;
  }

  .jdb-cart-btn {
    font-size: 0.88rem;
    font-weight: 600;
    color: #2D2421;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border-radius: 50px;
    background: #FDF9F5;
    border: 1px solid #EFE4DC;
    transition: all 0.2s ease;
  }

  .jdb-cart-btn:hover,
  .jdb-cart-btn.active {
    background: #FFFFFF;
    color: #C26D53;
    border-color: #C26D53;
  }

  .jdb-btn-shop {
    background: #C26D53;
    color: #FFFFFF !important;
    text-decoration: none;
    font-size: 0.98rem;
    font-weight: 600;
    padding: 7px 18px;
    border-radius: 50px;
    transition: all 0.22s cubic-bezier(0.25, 1, 0.5, 1);
    box-shadow: 0 3px 10px rgba(194, 109, 83, 0.25);
    cursor: pointer;
  }

  .jdb-btn-shop:hover {
    background: #a8563e;
    transform: translateY(-2px) scale(1.015);
    box-shadow: 0 6px 16px rgba(194, 109, 83, 0.35);
  }

  /* ANIMATIONS SOBRES & LÉGÈRES AU SURVOL DES BOUTONS D'ACTION */
  .wp-block-button__link,
  .wp-element-button {
    display: inline-flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: transform 0.22s cubic-bezier(0.25, 1, 0.5, 1), box-shadow 0.22s cubic-bezier(0.25, 1, 0.5, 1), background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease !important;
    box-shadow: 0 4px 12px rgba(45, 36, 33, 0.08) !important;
    cursor: pointer !important;
  }

  .wp-block-button:not(.is-style-outline) .wp-block-button__link:hover,
  .wp-element-button:not(.is-style-outline):hover {
    background-color: #a8563e !important;
    transform: translateY(-2px) scale(1.015) !important;
    box-shadow: 0 8px 22px rgba(194, 109, 83, 0.32) !important;
  }

  .wp-block-button.is-style-outline .wp-block-button__link:hover,
  .wp-element-button.is-style-outline:hover {
    background-color: #FDF4EE !important;
    border-color: #a8563e !important;
    color: #a8563e !important;
    transform: translateY(-2px) scale(1.015) !important;
    box-shadow: 0 8px 20px rgba(45, 36, 33, 0.12) !important;
  }

  .jdb-burger-btn {
    display: none;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 6px;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    width: 36px;
    height: 36px;
    border-radius: 8px;
  }

  .jdb-burger-bar {
    width: 22px;
    height: 2px;
    background-color: #2D2421;
    border-radius: 2px;
    transition: all 0.3s ease;
  }

  .jdb-burger-btn.open .jdb-burger-bar:nth-child(1) {
    transform: translateY(6px) rotate(45deg);
  }

  .jdb-burger-btn.open .jdb-burger-bar:nth-child(2) {
    opacity: 0;
  }

  .jdb-burger-btn.open .jdb-burger-bar:nth-child(3) {
    transform: translateY(-6px) rotate(-45deg);
  }


  /* 5. Mobile Drawer Menu */
  .jdb-mobile-menu {
    position: fixed;
    top: 0;
    right: 0;
    width: 85%;
    max-width: 360px;
    height: 100vh;
    background: #FDF9F5;
    box-shadow: -10px 0 30px rgba(45, 36, 33, 0.2);
    z-index: 1000000;
    display: flex;
    flex-direction: column;
    padding: 30px 24px;
    box-sizing: border-box;
    overflow-y: auto;
    transform: translateX(105%);
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    visibility: hidden;
  }

  .jdb-mobile-menu.open {
    transform: translateX(0);
    visibility: visible;
  }

  .jdb-mobile-overlay {
    position: fixed;
    inset: 0;
    background: rgba(45, 36, 33, 0.5);
    backdrop-filter: blur(3px);
    z-index: 999999;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
  }

  .jdb-mobile-overlay.open {
    display: block;
    opacity: 1;
  }

  .jdb-mobile-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 20px;
    border-bottom: 1px solid #EFE4DC;
    margin-bottom: 24px;
  }

  .jdb-mobile-close {
    background: none;
    border: 1px solid #EFE4DC;
    border-radius: 50%;
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    color: #5A4D47;
    cursor: pointer;
    transition: all 0.2s ease;
  }

  .jdb-mobile-close:hover {
    background: #2D2421;
    color: #ffffff;
  }

  .jdb-mobile-nav {
    display: flex;
    flex-direction: column;
    gap: 14px;
  }

  .jdb-mobile-link {
    font-size: 1.05rem;
    font-weight: 600;
    color: #2D2421;
    text-decoration: none;
    padding: 10px 14px;
    border-radius: 12px;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 10px;
  }

  .jdb-mobile-link:hover,
  .jdb-mobile-link.active {
    background: #FFFFFF !important;
    color: #C26D53 !important;
    font-weight: 700;
  }

  .jdb-mobile-footer {
    margin-top: auto;
    padding-top: 24px;
    border-top: 1px solid #EFE4DC;
    display: flex;
    flex-direction: column;
    gap: 14px;
  }

  @media (max-width: 1100px) {
    .jdb-desktop-nav {
      display: none;
    }

    .jdb-desktop-actions .jdb-btn-shop {
      display: none;
    }

    .jdb-burger-btn {
      display: flex;
    }

    .jdb-brand-name {
      font-size: 1.35rem;
    }

    .jdb-brand-logo {
      width: 34px;
      height: 34px;
    }
  }
