/**
 * HAFSOIT BEAUTY — Couche premium (noir / or / luxe)
 * S’applique après les feuilles existantes — ne remplace pas la logique SPA.
 */

/* ——— Fond & typographie globale ——— */
html.hb-premium-ready {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html.hb-premium-ready { scroll-behavior: auto; }
}

body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

::selection {
  background: rgba(155, 124, 55, 0.22);
  color: var(--text);
}

/* ——— Boutons système (or) ——— */
.btn-or,
.btn-primary {
  position: relative;
  overflow: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 32px;
  border-radius: var(--radius-pill);
  font-family: 'Poppins', sans-serif;
  font-weight: 600;
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.22);
  cursor: pointer;
  transition:
    transform var(--duration-fast) var(--ease-luxe),
    box-shadow var(--duration-med) var(--ease-luxe),
    background var(--duration-med) var(--ease-luxe),
    color var(--duration-fast) ease;
}

.btn-or,
.promo-cta {
  background: var(--gold-luxe);
  color: #fffef8;
  box-shadow: var(--shadow-lift), inset 0 1px 0 rgba(255, 255, 255, 0.28);
}

.btn-primary {
  background: linear-gradient(135deg, var(--luxe-dark) 0%, #2a241c 100%);
  color: #f5efe4;
  border-color: rgba(201, 169, 98, 0.35);
  box-shadow: 0 14px 36px rgba(15, 14, 12, 0.2);
}

.btn-or:hover,
.btn-or:focus-visible,
.btn-primary:hover,
.btn-primary:focus-visible,
.promo-cta:hover,
.promo-cta:focus-visible {
  transform: translateY(-2px);
  box-shadow: 0 22px 48px rgba(155, 124, 55, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}

.btn-or:active,
.btn-primary:active {
  transform: translateY(0);
}

.hb-cart-pulse {
  animation: hbCartPulse 0.65s var(--ease-luxe);
}

@keyframes hbCartPulse {
  0%, 100% { transform: scale(1); }
  40% { transform: scale(1.22); }
}

.hb-link-tap {
  opacity: 0.72;
}

/* ——— Accueil compact ——— */
.hb-page--home .flag-banner {
  display: none;
}

.hb-page--home .hb-home-block {
  padding-top: clamp(28px, 4vh, 44px);
  padding-bottom: clamp(24px, 3.5vh, 36px);
}

.hb-page--home .categories-section {
  padding-top: clamp(20px, 3vh, 32px);
}

.hb-home-about-teaser {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 clamp(16px, 4vw, 40px) clamp(32px, 5vh, 48px);
}

.hb-home-about-teaser__inner {
  text-align: center;
  padding: clamp(28px, 4vw, 40px) clamp(20px, 3vw, 32px);
  background: var(--glass-light);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-md);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.hb-home-about-teaser__eyebrow {
  margin: 0 0 10px;
  font-family: 'Poppins', sans-serif;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--accent);
}

.hb-home-about-teaser h2 {
  margin: 0 0 12px;
  font-family: 'Cormorant Garamond', serif;
  font-size: clamp(1.5rem, 3vw, 2rem);
  font-weight: 500;
  color: var(--text);
  line-height: 1.2;
}

.hb-home-about-teaser__desc {
  margin: 0 auto 20px;
  max-width: 52ch;
  font-size: 0.92rem;
  line-height: 1.65;
  color: var(--text-muted);
}

.hb-about-block {
  padding-top: clamp(40px, 6vh, 56px);
  padding-bottom: clamp(40px, 6vh, 64px);
}

body.dark .hb-home-about-teaser__inner {
  background: rgba(42, 38, 33, 0.75);
}

/* ——— Bandeau réassurance ——— */
.hb-trust-strip {
  max-width: 1200px;
  margin: 0 auto;
  padding: var(--space-md) clamp(16px, 4vw, 40px) var(--space-sm);
}

.hb-trust-strip__list {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: clamp(10px, 2vw, 20px);
  list-style: none;
  margin: 0;
  padding: 0;
}

.hb-trust-strip__list li {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 6px;
  padding: 14px 10px;
  font-family: 'Poppins', sans-serif;
  font-size: 0.68rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-muted);
  background: var(--glass-light);
  border: 1px solid var(--glass-border);
  border-radius: var(--radius-sm);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition:
    border-color var(--duration-fast) ease,
    transform var(--duration-fast) var(--ease-luxe),
    box-shadow var(--duration-med) var(--ease-luxe);
}

.hb-trust-icon {
  font-size: 0.85rem;
  color: var(--accent);
  line-height: 1;
}

.hb-trust-strip__list li:hover {
  border-color: rgba(155, 124, 55, 0.35);
  transform: translateY(-2px);
  box-shadow: var(--shadow-soft);
}

@media (max-width: 720px) {
  .hb-trust-strip__list {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ——— Header logo éditorial (sans cadre) ——— */
.logo-header {
  gap: clamp(10px, 1.5vw, 16px);
}

.logo-header .logo-image {
  background: none !important;
  border: none !important;
  border-radius: 0 !important;
  padding: 0 !important;
  height: clamp(38px, 5vw, 52px);
  max-width: min(108px, 26vw);
  object-fit: contain;
  object-position: left center;
  filter: drop-shadow(0 3px 12px rgba(26, 21, 19, 0.07));
  transition:
    height var(--duration-fast) var(--ease-luxe),
    filter var(--duration-med) var(--ease-luxe),
    opacity var(--duration-fast) ease;
}

.logo-header:hover .logo-image,
.logo-header:focus-visible .logo-image {
  filter: drop-shadow(0 6px 20px rgba(155, 124, 55, 0.18));
}

.logo-header .logo-wordmark {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 3px;
  min-width: 0;
}

.logo-header .logo-name__brand {
  display: block;
  font-family: 'Cormorant Garamond', serif;
  font-weight: 500;
  font-size: clamp(1rem, 2vw, 1.28rem);
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--text);
  line-height: 1;
  white-space: nowrap;
}

.logo-header .logo-name__sub {
  display: block;
  font-family: 'Poppins', sans-serif;
  font-size: 0.5rem;
  font-weight: 600;
  letter-spacing: 0.42em;
  text-transform: uppercase;
  color: var(--accent);
  line-height: 1;
  white-space: nowrap;
}

/* Anciennes classes logo-name / tagline (fallback) */
.logo-header .logo-name {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 500;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--text);
}

.logo-header .tagline {
  display: none;
}

body.dark .logo-header .logo-image {
  background: none !important;
  border: none !important;
  filter: drop-shadow(0 4px 16px rgba(0, 0, 0, 0.35));
}

body.dark .logo-header .logo-name__brand {
  color: var(--text);
}

@media (min-width: 921px) {
  .logo-header .logo-image {
    height: 48px;
    max-width: 88px;
  }

  .logo-header .logo-name__brand {
    font-size: 1.22rem;
    letter-spacing: 0.36em;
  }
}

@media (max-width: 420px) {
  .logo-header .logo-wordmark {
    display: none;
  }

  .logo-header .logo-image {
    height: 44px;
    max-width: 120px;
  }
}

/* ——— Header premium ——— */
header.hb-header-sticky {
  transition:
    padding var(--duration-fast) var(--ease-luxe),
    background var(--duration-med) ease,
    box-shadow var(--duration-med) ease,
    border-color var(--duration-med) ease;
}

header.hb-header-sticky.scrolled {
  padding: 6px 0;
  background: var(--glass-light);
  border-bottom-color: var(--glass-border);
  box-shadow: var(--shadow-soft);
}

header.scrolled .nav-container {
  min-height: var(--header-height-compact);
}

header.scrolled .logo-header .logo-image {
  height: clamp(36px, 5vw, 44px);
  max-width: 80px;
}

.nav-links a.is-route-active {
  color: var(--accent);
  font-weight: 700;
}

.nav-links a.is-route-active::after {
  height: 2px;
  background: var(--gold-luxe);
}

.icon-btn,
.cart-icon-btn,
.cart-btn {
  transition:
    transform var(--duration-fast) var(--ease-luxe),
    box-shadow var(--duration-med) var(--ease-luxe),
    background var(--duration-fast) ease;
}

.icon-btn:hover,
.cart-icon-btn:hover {
  transform: translateY(-1px) scale(1.02);
}

/* ——— Ticker & sections ——— */
.ticker {
  border-block: 1px solid var(--border);
  background: rgba(255, 252, 247, 0.6);
}

.ticker-content span {
  letter-spacing: 0.14em;
  font-size: 0.7rem;
  text-transform: uppercase;
}

.section-title {
  margin-bottom: clamp(36px, 5vw, 52px);
}

.section-title h2 {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 500;
  letter-spacing: 0.04em;
  line-height: 1.15;
}

.section-title p {
  margin-top: 10px;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
}

.section-title .ornament {
  color: var(--accent);
  opacity: 0.85;
}

/* ——— Catégories ——— */
.category-card {
  transition:
    transform var(--duration-med) var(--ease-luxe),
    box-shadow var(--duration-med) var(--ease-luxe);
}

.category-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-card);
}

.category-card:focus-visible {
  outline: 2px solid var(--accent-soft);
  outline-offset: 4px;
}

/* ——— Cartes produits ——— */
#produits .product-card-shell:hover,
.products--home .product-card-shell:hover {
  transform: translateY(-6px) scale(1.01);
}

#produits .product-card-shell:hover::before,
.products--home .product-card-shell:hover::before {
  opacity: 1;
}

.product-info h3,
.product-card .product-name {
  font-family: 'Cormorant Garamond', serif;
  letter-spacing: 0.02em;
}

.product-price,
.product-card .price {
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.06em;
}

.add-to-cart,
.product-cart-overlay .add-to-cart {
  letter-spacing: 0.14em;
  font-size: 0.68rem;
  border-radius: var(--radius-pill);
}

/* ——— Transitions SPA ——— */
.hb-page.is-active {
  transition:
    opacity 0.42s var(--ease-luxe),
    transform 0.42s var(--ease-luxe);
}

.hb-app.is-transitioning .hb-page.is-active {
  opacity: 0.92;
  transform: translateY(6px);
}

/* ——— Panier tiroir ——— */
.cart-drawer {
  border-left: 1px solid var(--glass-border);
  box-shadow: -24px 0 80px rgba(15, 14, 12, 0.12);
}

.cart-drawer-header h2 {
  font-family: 'Cormorant Garamond', serif;
  letter-spacing: 0.06em;
}

/* ——— Footer ——— */
footer {
  padding: clamp(48px, 8vw, 72px) clamp(16px, 4vw, 24px) 28px;
  border-top: 1px solid rgba(201, 169, 98, 0.12);
}

.footer-col h3 {
  font-family: 'Cormorant Garamond', serif;
  font-weight: 500;
  font-size: 1.25rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.footer-col a {
  transition: color var(--duration-fast) ease, opacity var(--duration-fast) ease;
}

.footer-bottom {
  letter-spacing: 0.08em;
  font-size: 0.75rem;
  text-transform: uppercase;
}

/* ——— Modales ——— */
.modal {
  border-radius: var(--radius-lg);
  border: 1px solid var(--glass-border);
  box-shadow: 0 32px 80px rgba(15, 14, 12, 0.18);
}

.modal-overlay {
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}

/* ——— Page produit ——— */
.hb-product-page {
  animation: hbPremiumFadeIn 0.55s var(--ease-luxe) both;
}

/* Ne pas hériter de l’animation « modal fermé » sur le conteneur fiche */
.product-page-content .product-modal--page {
  animation: none;
}

.product-page-content .product-modal--page .product-modal-add {
  background: linear-gradient(135deg, var(--luxe-dark) 0%, #2a241c 100%);
}

.product-page-content .product-modal--page .product-modal-add.added {
  background: var(--gold-luxe);
}

@keyframes hbPremiumFadeIn {
  from {
    opacity: 0;
    transform: translateY(12px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.hb-back-link {
  transition: gap var(--duration-fast) ease, color var(--duration-fast) ease;
}

.hb-back-link:hover {
  gap: 12px;
}

/* ——— Contact & formulaires ——— */
.hb-contact-hero,
.contact-card,
.order-form {
  border-radius: var(--radius-md);
}

input:focus-visible,
select:focus-visible,
textarea:focus-visible,
button:focus-visible,
a:focus-visible {
  outline: 2px solid rgba(155, 124, 55, 0.55);
  outline-offset: 3px;
}

/* ——— Mobile haut de gamme ——— */
@media (max-width: 920px) {
  header.nav-open .nav-links-wrapper {
    background: var(--glass-light);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-card);
  }

  .nav-links a {
    padding: 12px 0;
    font-size: 0.78rem;
  }

  .btn-or,
  .btn-primary {
    min-height: 48px;
    width: 100%;
    max-width: 320px;
  }

  .hb-home-cta .btn-or {
    width: auto;
    max-width: none;
  }
}

/* ——— Filtres boutique ——— */
.filter-btn {
  border-radius: var(--radius-pill);
  letter-spacing: 0.1em;
  transition:
    background var(--duration-fast) ease,
    color var(--duration-fast) ease,
    box-shadow var(--duration-med) var(--ease-luxe),
    transform var(--duration-fast) var(--ease-luxe);
}

.filter-btn.active {
  box-shadow: 0 8px 24px rgba(155, 124, 55, 0.18);
}

.filter-btn:hover:not(.active) {
  transform: translateY(-1px);
}

/* ——— Performance perçue ——— */
.hero-sultana,
.categories-section,
#produits {
  contain: layout style;
}

.product-card img {
  content-visibility: auto;
}

/* ——— Dark mode ——— */
body.dark .hb-trust-strip__list li {
  background: rgba(42, 38, 33, 0.75);
  border-color: rgba(201, 169, 98, 0.15);
}

body.dark header.scrolled {
  background: rgba(20, 18, 16, 0.92);
}

body.dark .ticker {
  background: rgba(30, 27, 23, 0.5);
}

/* ——— Reduced motion ——— */
@media (prefers-reduced-motion: reduce) {
  .hb-product-page,
  .hb-page.is-active,
  .category-card,
  .hb-trust-strip__list li,
  .btn-or,
  .btn-primary {
    animation: none !important;
    transition: none !important;
    transform: none !important;
  }
}
