/* Commande subdomain — header/footer overrides on top of main-site csshead2026 + Tailwind */

.logo-zone {
  background: #f9fafb;
  border-bottom: 1px solid #e5e7eb;
}

/* Layer 1 — top padding reduced 50% (desktop bar only) */
.hdr-level-1-inner {
  padding-top: calc(0.5rem * 0.5);
  padding-bottom: calc(0.5rem * 0.6);
}

/* Bandeau rouge — carrousel de messages */
.hdr-tagline-carousel {
  min-height: 1.35em;
  overflow: hidden;
}
.hdr-tagline-text {
  display: inline-block;
  transition: opacity 0.35s ease;
}
.hdr-tagline-text.is-fading {
  opacity: 0;
}
.hdr-tagline-text a {
  color: inherit;
  text-decoration: none;
}
.hdr-tagline-text a:hover {
  text-decoration: underline;
}

/* Layer 2 — top padding reduced 50% above search bar; bottom unchanged */
.logo-zone-inner {
  padding-top: calc(1rem * 0.5);
  padding-bottom: calc(1rem * 0.35);
}
@media (min-width: 1024px) {
  .logo-zone-inner {
    padding-top: calc(1.5rem * 0.5);
    padding-bottom: calc(1.5rem * 0.35);
  }
}
@media (max-width: 1023px) {
  .logo-zone > .max-w-7xl {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
  }
}

/* Mobile / tablet compact bar — logo stays centered */
.hdr-compact-bar {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  margin-bottom: 0.5rem;
}
@media (min-width: 1024px) {
  .hdr-compact-bar,
  .hdr-mobile-search {
    display: none;
  }
}
.hdr-compact-bar__start { justify-self: start; }
.hdr-compact-bar__logo  { justify-self: center; padding: 0; }
.hdr-compact-bar__logo img,
.hdr-compact-logo {
  height: 2.75rem;
  max-width: 15rem;
  width: auto;
  object-fit: contain;
}
.hdr-compact-bar__end   { justify-self: end; display: flex; align-items: center; gap: 0; }

/* Heart + profile + cart — grouped spacing */
.hdr-boutique-icons,
.hdr-commande-icons,
.hdr-nav-icons {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
@media (max-width: 1023px) {
  .hdr-boutique-icons,
  .hdr-commande-icons,
  .hdr-nav-icons { gap: 1px; }
}
@media (max-width: 767px) {
  .hdr-compact-bar .hdr-action-icon {
    width: 36px;
    height: 36px;
    font-size: 1.1rem;
  }
  .logo-zone-inner > .lg\:hidden.relative {
    margin-top: 0.125rem;
  }
}

/* Petits téléphones seulement (ex. S23, iPhone mini/SE) — logo un peu plus petit + marges latérales */
@media (max-width: 389px) {
  .logo-zone > .max-w-7xl {
    padding-left: 0.875rem;
    padding-right: 0.875rem;
  }
  .hdr-compact-bar {
    column-gap: 0.375rem;
    padding-inline: 0.125rem;
  }
  .hdr-compact-bar__start #mobile-menu-btn {
    padding: 0.375rem;
    margin-left: 0.125rem;
  }
  .hdr-compact-bar__end {
    padding-right: 0.125rem;
  }
  .hdr-compact-bar__logo img,
  .hdr-compact-logo {
    height: 2.5625rem;  /* 41px */
    max-width: 12rem;   /* 192px */
  }
}

/* Cart badge */
.hdr-cart-wrap { position: relative; display: inline-flex; }
.hdr-cart-badge {
  position: absolute;
  top: -4px;
  right: -6px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  background: #d90429;
  color: #fff;
  font-size: 10px;
  font-weight: 800;
  line-height: 18px;
  text-align: center;
  border-radius: 9999px;
  border: 2px solid #fff;
  pointer-events: none;
}
.hdr-cart-badge.is-hidden { display: none; }

.hdr-action-icon.is-favoris-active,
.hdr-action-icon.is-favoris-active i {
    color: #d90429;
}

/* Account dropdown */
.hdr-account-wrap { position: relative; }
.hdr-account-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-radius: 9999px;
  color: #444;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
  border: none;
  background: transparent;
  text-decoration: none;
}
.hdr-account-btn:hover { background: #f3f4f6; color: #d90429; }
.hdr-account-icon { position: relative; font-size: 1.35rem; line-height: 1; }
.hdr-account-dot {
  position: absolute;
  top: -1px;
  right: -1px;
  width: 9px;
  height: 9px;
  background: #d90429;
  border: 2px solid #fff;
  border-radius: 50%;
}
.hdr-account-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 220px;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 12px;
  box-shadow: 0 12px 40px rgba(0,0,0,0.12);
  padding: 8px 0;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  transition: opacity 0.18s, transform 0.18s, visibility 0.18s;
  z-index: 60;
}
.hdr-account-wrap.open .hdr-account-menu,
.hdr-account-wrap:hover .hdr-account-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.hdr-account-menu a {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 18px;
  color: #1b1b1b;
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transition: background 0.12s, color 0.12s;
}
.hdr-account-menu a:hover { background: #fff5f5; color: #d90429; }
.hdr-account-menu .menu-sep { height: 1px; background: #f0f0f0; margin: 6px 0; }
.hdr-account-menu a.text-danger { color: #d90429; }

.hdr-action-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  color: #444;
  font-size: 1.2rem;
  transition: background 0.15s, color 0.15s;
  text-decoration: none;
}
.hdr-action-icon:hover { background: #f3f4f6; color: #d90429; }

.hdr-profile-toggle {
  border: none;
  background: transparent;
  cursor: pointer;
}
.hdr-profile-toggle.is-open { color: #d90429; background: #fff5f5; }

/* Mobile profile drawer — compact, no scroll */
.mobile-profile-drawer { transition: transform 300ms cubic-bezier(0, 0, 0.2, 1); }
.mobile-profile-nav {
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
}
.mobile-profile-section {
  padding: 10px 24px 4px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #888;
}
.mobile-profile-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 24px;
  font-size: 16px;
  font-weight: 600;
  color: #333;
  text-decoration: none;
  transition: background 0.12s, color 0.12s;
}
.mobile-profile-link i {
  width: 20px;
  font-size: 17px;
  color: #d90429;
  text-align: center;
  flex-shrink: 0;
}
.mobile-profile-link:hover,
.mobile-profile-link:focus { background: #f9fafb; color: #d90429; }
.mobile-profile-link--danger { color: #d90429; }
.mobile-profile-link--danger i { color: #d90429; }
.mobile-profile-sep {
  height: 1px;
  background: #ebebeb;
  margin: 6px 16px;
}

/* Page content area */
.site-main { flex: 1; }

/* Desktop nav — single row: links | search | compte/panier */
@media (min-width: 1024px) {
  .hdr-desktop-nav-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: nowrap;
  }
  .hdr-desktop-nav-links {
    display: flex;
    flex-wrap: nowrap;
    align-items: center;
    gap: 1.1rem;
    flex-shrink: 0;
    list-style: none;
    margin: 0;
    padding: 0;
  }
  .hdr-desktop-nav-links li {
    margin: 0;
    padding: 0;
  }
  .hdr-nav-link {
    display: inline-block;
    padding: 0.5rem 0.15rem;
    border-bottom: 2px solid transparent;
    font-family: 'Inter', sans-serif;
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    text-decoration: none;
    color: #333333;
    transition: color 0.2s ease, border-color 0.2s ease;
    white-space: nowrap;
  }
  .hdr-nav-link:hover {
    color: #d90429;
    border-bottom-color: #d90429;
  }
  .hdr-nav-link.is-active {
    color: #d90429;
    border-bottom-color: #d90429;
  }
  .hdr-desktop-nav-tools {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex: 1 1 auto;
    min-width: 0;
    justify-content: flex-end;
  }
  .hdr-desktop-nav-tools #search-input-container {
    flex: 1 1 auto;
    max-width: 28rem;
    min-width: 12rem;
  }
  .hdr-desktop-nav-tools .hdr-boutique-icons,
  .hdr-desktop-nav-tools .hdr-commande-icons,
  .hdr-desktop-nav-tools .hdr-nav-icons {
    flex-shrink: 0;
  }
  #desktop-search-results,
  #mobile-search-results {
    min-width: min(32rem, calc(100vw - 2rem));
    width: max(100%, 20rem);
    z-index: 60;
    scrollbar-width: thin;
    scrollbar-color: #d90429 #f1f1f1;
  }
  .hdr-search-result-title {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    word-break: break-word;
  }
  .hdr-search-result-price {
    font-variant-numeric: tabular-nums;
  }
  header #desktop-search-input {
    padding-right: 2.75rem;
  }
  header #desktop-search-input.has-spinner {
    padding-right: 3.5rem;
  }
  header #desktop-search-form button[type="submit"] {
    width: 2.25rem;
    height: 2.25rem;
    padding: 0;
  }
  header #desktop-input-spinner {
    right: 2.6rem;
  }
}

header.sticky #desktop-search-input,
header.sticky #mobile-search-input,
header.sticky .hdr-account-btn {
  font-family: 'Inter', sans-serif;
}

/* Toast — sous l’icône panier (header) */
.toast-conteneur {
  position: fixed;
  top: calc(var(--header-total-h, 72px) + 8px);
  right: 20px;
  bottom: auto;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: flex-end;
  max-width: min(94vw, 480px);
}
