/* ============================================================
   SalvaNutri — Override CSS (Point 1 : Réorganiser le header)
   ============================================================
   Fichier injecté dans la home via <link> ajouté à l'index.html.
   Persistance : tant que ce fichier reste déployé sur Cloudflare,
   les changements sont visibles sur la boutique en ligne.
   ============================================================ */

/* === 1. Header — Réduction de 5 barres à 3 barres === */

/* Cache la 2e barre (Douala + quick links + Livraison 24-48h) */
header > div:nth-child(2) { display: none !important; }

/* Cache la 4e barre mobile vide */
header > div:nth-child(4) { display: none !important; }

/* Réduit la barre promo h-9 → h-8 + layout 3 zones */
header > div:nth-child(1) {
  height: 36px !important;
  font-size: 12px !important;
  display: flex !important;
  align-items: center !important;
}
header > div:nth-child(1) > div {
  justify-content: space-between !important;
  display: flex !important;
  align-items: center !important;
  gap: 16px !important;
}
header > div:nth-child(1) > div > div:first-child {
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1 1 50%;
}

/* Masque le tagline "100% Authentique..." (doublon avec barre promo + badge hero) */
header > div:nth-child(3) p.text-emerald-600 {
  display: none !important;
}

/* === 2. Compteur panier === */
.sn-cart-badge {
  position: absolute;
  top: -4px;
  right: -6px;
  min-width: 18px;
  height: 18px;
  padding: 0 5px;
  background: #ef4444;
  color: #fff;
  font-size: 10px;
  font-weight: 700;
  border-radius: 9px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(239,68,68,0.5);
  line-height: 1;
}

/* === 3. Hero overlay pour lisibilité texte blanc === */
.sn-hero-overlay {
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(90deg, rgba(0,0,0,0.55) 0%, rgba(0,0,0,0.25) 35%, rgba(0,0,0,0) 60%);
  z-index: 1;
  border-radius: inherit;
}

/* === 4. Douala + quick links dans la barre promo === */
#sn-douala-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 10px;
  background: rgba(255,255,255,0.18);
  border-radius: 12px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
  color: #fff;
}
#sn-quick-links {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  white-space: nowrap;
}
#sn-quick-links a {
  color: rgba(255,255,255,0.92) !important;
  font-size: 11px;
  text-decoration: none;
  opacity: 0.92;
  transition: opacity 0.15s;
}
#sn-quick-links a:hover { opacity: 1; text-decoration: underline; }
#sn-currency-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  background: rgba(255,255,255,0.18);
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
  color: #fff;
}

/* === 5. Masquer la recherche dupliquée du quiz (celle dans le sidebar) === */
/* La recherche du header suffit ; celle du quiz parasite le hero */
/* Pour l'instant, on garde la recherche du quiz car elle est liée au widget interactif */

/* === 6. Bug des produits en rupture affichés "En stock" sur la home === */
/* Ajout d'un style pour bien marquer les ruptures (sera géré en JS) */
.sn-product-out-of-stock .sn-add-to-cart-disabled {
  background: #94a3b8 !important;
  cursor: not-allowed !important;
  opacity: 0.6;
}
.sn-stock-label-out {
  color: #dc2626 !important;
  font-weight: 600;
}
.sn-stock-label-out::before {
  content: "Rupture de stock";
}

/* === 7. Currency admin — baseCurrency warning === */
/* The settings tab dropdown lets the user pick any baseCurrency, but the API
   forces XAF (because all rates are XAF-based). We add a visual warning below
   the dropdown to inform the user their selection won't be saved. */
.sn-base-currency-warning {
  margin-top: 6px;
  padding: 6px 10px;
  background: #fef3c7;
  border: 1px solid #f59e0b;
  border-radius: 6px;
  font-size: 11px;
  color: #92400e;
  font-weight: 500;
  line-height: 1.4;
}
.sn-base-currency-warning::before {
  content: "⚠️ ";
}
