/* ============================================
   CASA BARBAGIA — Design System 2026
   ============================================ */

/* ---- VARIABLES ---- */
:root {
  /* Couleurs */
  --sand:       #FAF6EE;
  --sand-dark:  #F0E8D8;
  --sienna:     #7A3B1E;
  --sienna-light: #9B4D28;
  --sienna-dark:  #5C2A12;
  --gold:       #C8963E;
  --gold-light: #E0B060;
  --olive:      #5C6B3A;
  --olive-light:#7A8F4E;
  --text:       #2C2016;
  --text-soft:  #6B5744;
  --text-muted: #A08878;
  --white:      #FFFFFF;
  --border:     rgba(122, 59, 30, 0.12);
  --shadow:     rgba(44, 32, 22, 0.10);

  /* Typographie */
  --font-serif: 'Cormorant Garamond', Georgia, serif;
  --font-sans:  'Inter', system-ui, sans-serif;

  /* Espacements */
  --gap-xs:  8px;
  --gap-sm:  16px;
  --gap-md:  24px;
  --gap-lg:  48px;
  --gap-xl:  80px;
  --gap-2xl: 120px;

  /* Rayons */
  --radius-sm: 8px;
  --radius-md: 16px;
  --radius-lg: 24px;
  --radius-xl: 40px;

  /* Transitions */
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --duration: 0.4s;

  /* Conteneur */
  --container: 1240px;
}

/* ---- RESET ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font-sans);
  background: var(--sand);
  color: var(--text);
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
ul, ol { list-style: none; }

/* ---- CONTENEUR ---- */
.container {
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 var(--gap-md);
}

/* ---- TYPOGRAPHIE ---- */
h1, h2, h3, h4 {
  font-family: var(--font-serif);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.01em;
}
h1 { font-size: clamp(2.4rem, 5vw, 4rem); }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.8rem); }
h3 { font-size: clamp(1.3rem, 2.5vw, 1.8rem); }
h4 { font-size: 1.2rem; }

.eyebrow {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: var(--gap-sm);
  display: block;
}

/* ---- BOUTONS ---- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--gap-xs);
  padding: 14px 28px;
  border-radius: var(--radius-xl);
  font-family: var(--font-sans);
  font-size: 0.9rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  transition: all var(--duration) var(--ease);
  white-space: nowrap;
}
.btn-primary {
  background: var(--sienna);
  color: var(--white);
  box-shadow: 0 4px 20px rgba(122, 59, 30, 0.25);
}
.btn-primary:hover {
  background: var(--sienna-light);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(122, 59, 30, 0.35);
}
.btn-secondary {
  background: transparent;
  color: var(--sienna);
  border: 2px solid var(--sienna);
}
.btn-secondary:hover {
  background: var(--sienna);
  color: var(--white);
  transform: translateY(-2px);
}
.btn-gold {
  background: var(--gold);
  color: var(--white);
  box-shadow: 0 4px 20px rgba(200, 150, 62, 0.3);
}
.btn-gold:hover {
  background: var(--gold-light);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(200, 150, 62, 0.4);
}
.btn-white {
  background: var(--white);
  color: var(--sienna);
}
.btn-white:hover {
  background: var(--sand);
  transform: translateY(-2px);
}
.btn-lg { padding: 18px 36px; font-size: 1rem; }
.btn-sm { padding: 10px 20px; font-size: 0.82rem; }

/* ---- SECTIONS ---- */
.section { padding: var(--gap-xl) 0; }
.section-alt { background: var(--sand-dark); }
.section-dark { background: var(--sienna); color: var(--white); }
.section-header { text-align: center; max-width: 680px; margin: 0 auto var(--gap-lg); }
.section-header p { color: var(--text-soft); margin-top: var(--gap-sm); font-size: 1.05rem; }

/* ---- BANNER ---- */
.site-banner {
  background: var(--sienna);
  color: var(--white);
  text-align: center;
  padding: 10px var(--gap-md);
  font-size: 0.85rem;
  font-weight: 500;
  letter-spacing: 0.02em;
}

/* ---- HEADER ---- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(250, 246, 238, 0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  transition: box-shadow 0.3s ease;
}
.site-header.scrolled {
  box-shadow: 0 4px 20px var(--shadow);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  gap: var(--gap-md);
}
.logo {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--sienna);
  letter-spacing: -0.02em;
  flex-shrink: 0;
}
.logo span { color: var(--gold); }

/* Navigation */
.nav-links {
  display: flex;
  align-items: center;
  gap: var(--gap-md);
}
.nav-links a {
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--text-soft);
  transition: color 0.25s;
  position: relative;
}
.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -3px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--sienna);
  transition: width 0.3s var(--ease);
  border-radius: 2px;
}
.nav-links a:hover { color: var(--sienna); }
.nav-links a:hover::after { width: 100%; }

/* Header actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: var(--gap-sm);
}

/* Sélecteur de langue */
.lang-selector {
  display: flex;
  align-items: center;
  gap: 6px;
  position: relative;
}
.lang-btn {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-soft);
  transition: all 0.2s;
  border: 1px solid var(--border);
  background: transparent;
}
.lang-btn:hover, .lang-btn.active {
  background: var(--sienna);
  color: var(--white);
  border-color: var(--sienna);
}
.lang-flag { font-size: 1rem; line-height: 1; }

/* Icône panier */
.cart-btn {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: var(--radius-sm);
  color: var(--sienna);
  transition: all 0.25s;
  border: 1px solid var(--border);
}
.cart-btn:hover { background: var(--sienna); color: var(--white); border-color: var(--sienna); }
.cart-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  background: var(--gold);
  color: var(--white);
  font-size: 0.68rem;
  font-weight: 700;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: scale(0);
  transition: all 0.25s var(--ease);
}
.cart-badge.visible { opacity: 1; transform: scale(1); }

/* Sélecteur de langue mobile (dans le menu burger) */
.lang-selector-mobile {
  display: none;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding-top: var(--gap-sm);
  margin-top: var(--gap-xs);
  border-top: 1px solid var(--border);
  width: 100%;
}

/* Menu burger mobile */
.burger {
  display: none;
  flex-direction: column;
  gap: 5px;
  width: 28px;
  padding: 4px;
}
.burger span {
  display: block;
  height: 2px;
  background: var(--sienna);
  border-radius: 2px;
  transition: all 0.3s;
}

/* ---- PRODUCT CARDS ---- */
.products-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: var(--gap-md);
}
.product-card {
  background: var(--white);
  border-radius: var(--radius-md);
  overflow: hidden;
  border: 1px solid var(--border);
  transition: all var(--duration) var(--ease);
  display: flex;
  flex-direction: column;
}
.product-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 20px 50px var(--shadow);
  border-color: transparent;
}
.product-card-img {
  aspect-ratio: 4/3;
  overflow: hidden;
  background: var(--sand-dark);
  position: relative;
}
.product-card-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s var(--ease);
}
.product-card:hover .product-card-img img { transform: scale(1.06); }
.product-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: var(--sienna);
  color: var(--white);
  font-size: 0.68rem;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: var(--radius-xl);
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.product-badge.gold { background: var(--gold); }
.product-card-body {
  padding: var(--gap-md);
  flex: 1;
  display: flex;
  flex-direction: column;
}
.product-card-cat {
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--gold);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: 6px;
}
.product-card-name {
  font-family: var(--font-serif);
  font-size: 1.25rem;
  color: var(--text);
  margin-bottom: 4px;
}
.product-card-sub {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: var(--gap-sm);
  flex: 1;
}
.product-card-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: auto;
}
.product-price {
  font-family: var(--font-serif);
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--sienna);
}
.product-price-weight {
  font-size: 0.75rem;
  color: var(--text-muted);
  font-family: var(--font-sans);
  font-weight: 400;
  margin-left: 4px;
}
.add-to-cart {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--sienna);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.25s var(--ease);
  flex-shrink: 0;
}
.add-to-cart:hover {
  background: var(--gold);
  transform: scale(1.1) rotate(5deg);
}

/* ---- REVEAL ANIMATION ---- */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* ---- FOOTER ---- */
.site-footer {
  background: var(--text);
  color: rgba(255,255,255,0.75);
  padding: var(--gap-xl) 0 var(--gap-lg);
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr;
  gap: var(--gap-xl);
  margin-bottom: var(--gap-lg);
}
.footer-brand .logo { color: var(--white); margin-bottom: var(--gap-sm); }
.footer-brand p { font-size: 0.88rem; line-height: 1.7; max-width: 280px; }
.footer-col h4 {
  font-family: var(--font-sans);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--white);
  margin-bottom: var(--gap-sm);
}
.footer-col ul { display: flex; flex-direction: column; gap: 10px; }
.footer-col ul a { font-size: 0.88rem; transition: color 0.2s; }
.footer-col ul a:hover { color: var(--gold); }
.footer-bottom {
  border-top: 1px solid rgba(255,255,255,0.1);
  padding-top: var(--gap-md);
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.8rem;
}

/* ---- UTILITAIRES ---- */
.text-center { text-align: center; }
.text-sienna { color: var(--sienna); }
.text-gold { color: var(--gold); }
.mt-sm { margin-top: var(--gap-sm); }
.mt-md { margin-top: var(--gap-md); }
.mt-lg { margin-top: var(--gap-lg); }
.flex { display: flex; }
.flex-center { display: flex; align-items: center; justify-content: center; }
.gap-sm { gap: var(--gap-sm); }
.gap-md { gap: var(--gap-md); }

/* ---- RESPONSIVE ---- */
@media (max-width: 1024px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 768px) {
  :root { --gap-xl: 56px; --gap-2xl: 80px; }
  .header-inner { gap: var(--gap-sm); }
  .lang-selector { display: none; }
  .nav-links { display: none; }
  .burger { display: flex; }
  .nav-links.open {
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    background: var(--sand);
    padding: var(--gap-md);
    gap: var(--gap-md);
    border-bottom: 1px solid var(--border);
    z-index: 99;
  }
  .nav-links.open .lang-selector-mobile { display: flex; }
  .products-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1fr; gap: var(--gap-lg); }
  .footer-bottom { flex-direction: column; gap: var(--gap-sm); text-align: center; }
}
@media (max-width: 480px) {
  .products-grid { grid-template-columns: 1fr; }
  .lang-btn span:not(.lang-flag) { display: none; }
}
