:root {
  --bg: #FAF8F5;
  --text: #1A1A1A;
  --text-muted: #6B6B6B;
  --border: rgba(0,47,108,0.1);
  --border-light: rgba(0,47,108,0.06);
  --bleu: #002F6C;
  --rouge: #CE1126;
  --or: #C9A84C;
  --white: #FFFFFF;
  --overlay: rgba(0,47,108,0.4);
}

html { scroll-behavior: smooth; }

body {
  background-color: var(--bg);
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  -webkit-font-smoothing: antialiased;
}

/* ===== HEADER ===== */
#main-header {
  background: rgba(0,47,108,0.92);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255,255,255,0.08);
  transition: background 0.3s ease, box-shadow 0.3s ease;
}
#main-header.scrolled {
  background: rgba(0,47,108,0.98);
  box-shadow: 0 4px 16px rgba(0,47,108,0.15);
}

/* ===== HERO ===== */
#hero-section {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: flex-end;
  padding-bottom: 6rem;
}
#hero-section img {
  object-position: center 20%;
}
#hero-section .hero-overlay {
  background: linear-gradient(to top, rgba(0,47,108,0.75) 0%, rgba(0,47,108,0.35) 45%, rgba(0,47,108,0.1) 100%);
}

/* ===== FILIGRANE TRICOLORE SUBTIL ===== */
body::before {
  content: '';
  position: fixed;
  top: 0; right: 0; bottom: 0; left: 0;
  pointer-events: none;
  z-index: 0;
  opacity: 0.015;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='300' height='300' viewBox='0 0 300 300'%3E%3Crect x='50' y='20' width='40' height='50' rx='2' fill='%23002F6C'/%3E%3Crect x='130' y='60' width='30' height='30' rx='2' fill='%23CE1126'/%3E%3Crect x='210' y='30' width='25' height='60' rx='2' fill='%23C9A84C'/%3E%3Crect x='80' y='130' width='80' height='20' rx='2' fill='%23002F6C'/%3E%3Crect x='180' y='150' width='15' height='50' rx='2' fill='%23CE1126'/%3E%3Crect x='60' y='200' width='50' height='50' rx='2' fill='%23C9A84C'/%3E%3C/svg%3E");
  background-size: 300px 300px;
}
body > * { position: relative; z-index: 1; }

/* ===== CATEGORIES ===== */
#category-filters {
  max-height: none;
  overflow-y: visible;
}
.category-btn {
  border: 1px solid var(--border);
  background: transparent;
  color: var(--text-muted);
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 8px 18px;
  border-radius: 0;
  transition: all 0.25s ease;
  font-weight: 500;
  font-family: 'DM Sans', sans-serif;
}
.category-btn:hover {
  border-color: var(--bleu);
  color: var(--bleu);
}
.category-btn.active {
  background: var(--bleu);
  color: var(--white);
  border-color: var(--bleu);
}

/* ===== PRODUCT CARD ===== */
.product-card {
  display: block;
  text-decoration: none;
  color: inherit;
  transition: transform 0.35s cubic-bezier(0.25,0.46,0.45,0.94);
}
.product-card:hover {
  transform: translateY(-6px);
}
.product-card .card-img-wrap {
  position: relative;
  overflow: hidden;
  background: #F1F0EE;
  aspect-ratio: 3/4;
}
.product-card .card-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.6s cubic-bezier(0.25,0.46,0.45,0.94);
}
.product-card:hover .card-img {
  transform: scale(1.06);
}
.product-card .card-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(255,255,255,0.92);
  color: var(--bleu);
  font-size: 9px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  padding: 5px 12px;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  gap: 5px;
}
.product-card .card-badge::before {
  content: '';
  display: inline-block;
  width: 14px;
  height: 9px;
  background: linear-gradient(to right, var(--bleu) 33%, var(--white) 33%, var(--white) 66%, var(--rouge) 66%);
  flex-shrink: 0;
}
.product-card .card-info {
  padding-top: 14px;
}
.product-card .card-title {
  font-family: 'Cormorant Garamond', serif;
  font-size: 17px;
  font-weight: 500;
  color: var(--text);
  line-height: 1.3;
  margin-bottom: 4px;
}
.product-card .card-price {
  font-size: 14px;
  font-weight: 600;
  color: var(--or);
  letter-spacing: 0.02em;
}

/* ===== CART DRAWER ===== */
#cart-drawer {
  transform: translateX(100%);
  transition: transform 0.35s cubic-bezier(0.25,0.46,0.45,0.94);
}
#cart-drawer.open {
  transform: translateX(0);
}
#cart-overlay {
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.3s ease, visibility 0.3s ease;
}
#cart-overlay.active {
  opacity: 1;
  visibility: visible;
}

/* ===== STOCK ===== */
.stock-badge.in-stock { color: #15803d; }
.stock-badge.out { color: var(--rouge); }
.stock-badge.untracked { color: var(--or); }

/* ===== PRODUCT PAGE ===== */
.thumb-btn {
  border: 1px solid var(--border);
  transition: border-color 0.2s;
}
.thumb-btn.active {
  border-color: var(--bleu);
  box-shadow: 0 0 0 2px var(--bleu);
}

/* ===== FOOTER ===== */
.site-footer {
  background: var(--bleu);
  color: rgba(255,255,255,0.65);
}
.site-footer a { color: rgba(255,255,255,0.65); }
.site-footer a:hover { color: var(--white); }
.site-footer .text-text { color: var(--white); }
.site-footer .text-text-muted { color: rgba(255,255,255,0.6); }
.site-footer .border-border { border-color: rgba(255,255,255,0.1); }

/* ===== ANIMATIONS ===== */
@keyframes revealUp {
  from { opacity: 0; transform: translateY(30px); }
  to { opacity: 1; transform: translateY(0); }
}
.reveal {
  animation: revealUp 0.7s cubic-bezier(0.25,0.46,0.45,0.94) forwards;
}

/* ===== REDUCED MOTION ===== */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ===== CTAs ===== */
.btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--bleu);
  color: var(--white);
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 14px 36px;
  border: none;
  transition: background 0.25s ease, letter-spacing 0.25s ease;
  text-decoration: none;
}
.btn-primary:hover {
  background: var(--rouge);
  letter-spacing: 0.14em;
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  padding: 14px 36px;
  border: 1px solid var(--text);
  transition: all 0.25s ease;
  text-decoration: none;
}
.btn-secondary:hover {
  background: var(--text);
  color: var(--white);
}

/* ===== PAGE TRANSITIONS ===== */
.page-content {
  animation: revealUp 0.5s ease;
}

/* ===== MOBILE MENU ===== */
#mobile-menu.open {
  display: flex;
  flex-direction: column;
}
.mobile-link {
  display: block;
  padding: 14px 0;
  color: rgba(255,255,255,0.7);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-bottom: 1px solid rgba(255,255,255,0.1);
  transition: color 0.2s ease;
}
.mobile-link:last-child { border-bottom: none; }
.mobile-link:hover, .mobile-link.active { color: #fff; }
