/* ---------
   GLOBAL THEME
--------- */
:root {
  --bg-page:#f8f9fb;
  --bg-card:#ffffff;
  --bg-header:#ffffff;
  --bg-spot:#f1f3f8;

  --text-dark:#1a1d29;
  --text-mid:#5b6275;
  --text-light:#8c94ab;

  --blue:#2a6ef5;
  --blue-soft:rgba(42,110,245,.08);
  --gold-start:#ffd666;
  --gold-end:#f0b90b;
  --gold-text:#3a2d00;

  --border:#dce1ef;
  --border-soft:#e6e9f4;

  --radius-lg:20px;
  --radius-md:14px;
  --shadow-card:0 16px 40px rgba(16,24,40,.08);
  --shadow-hover:0 22px 50px rgba(16,24,40,.12);
  --transition-fast:.18s ease;
}

* {
  box-sizing:border-box;
}

html, body {
  margin:0;
  padding:0;
  background:var(--bg-page);
  color:var(--text-dark);
  font:16px/1.45 system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,"Helvetica Neue",Arial,"Noto Sans",sans-serif;
}

img {
  max-width:100%;
  display:block;
}

.container {
  max-width:1200px;
  margin:0 auto;
  padding:0 20px;
}

h1,h2,h3,h4,h5 {
  color:var(--text-dark);
  font-weight:600;
  margin:0;
}

.muted {
  color:var(--text-mid);
  font-size:.9rem;
}

.row {
  display:flex;
  gap:12px;
  align-items:center;
}
.row.end {
  justify-content:flex-end;
}

/* Buttons */
.btn {
  appearance:none;
  border:1px solid var(--border);
  background:#fff;
  color:var(--text-dark);
  padding:10px 14px;
  border-radius:12px;
  cursor:pointer;
  box-shadow:0 2px 4px rgba(0,0,0,.03);
  font-weight:500;
  line-height:1.2;
  transition:transform var(--transition-fast), box-shadow var(--transition-fast);
}
.btn:hover {
  transform:translateY(-1px);
  box-shadow:var(--shadow-hover);
}
.btn.primary {
  background:linear-gradient(180deg,var(--gold-start) 0%,var(--gold-end) 100%);
  color:var(--gold-text);
  font-weight:600;
  border:none;
  box-shadow:0 8px 24px rgba(240,185,11,.4);
}
.btn.ghost {
  background:transparent;
  border:1px solid var(--border);
  color:var(--text-dark);
}

/* Utility classes */
.section-title{
  font-size:1.25rem;
  font-weight:600;
  color:var(--text-dark);
  margin:0 0 1rem 0;
}

/* ------------------------
   BANNER 1: SPOT BAR
------------------------- */
.spot-bar {
  background:var(--bg-spot);
  border-bottom:1px solid var(--border);
  font-size:.8rem;
  color:var(--text-dark);
}
.spot-inner {
  display:flex;
  flex-wrap:wrap;
  align-items:center;
  justify-content:space-between;
  min-height:40px;
  gap:12px;
  font-weight:500;
}
.spot-item {
  display:flex;
  align-items:center;
  gap:8px;
  line-height:1.2;
  white-space:nowrap;
  font-feature-settings:"tnum";
}
.spot-item .metal {
  font-weight:600;
  color:var(--text-dark);
}
.spot-item .spot-price {
  color:var(--text-dark);
}
.spot-item .spot-change {
  font-size:.75rem;
  font-weight:600;
  padding:2px 6px;
  border-radius:999px;
  line-height:1.2;
}
.spot-change.up {
  color:#0a7f3b;
  background:rgba(18,184,134,.12);
}
.spot-change.down {
  color:#b91c1c;
  background:rgba(220,38,38,.12);
}
.charts-link {
  margin-left:auto;
  font-size:.8rem;
  color:var(--blue);
  text-decoration:none;
  font-weight:600;
}
.charts-link:hover {
  text-decoration:underline;
}

/* ------------------------
   BANNER 2: UTILITY HEADER
------------------------- */
.utility-header {
  background:var(--bg-header);
  border-bottom:1px solid var(--border);
  box-shadow:0 8px 30px rgba(16,24,40,.06);
}
.utility-inner {
  display:grid;
  grid-template-columns:auto 1fr auto;
  align-items:center;
  gap:16px;
  min-height:80px;
}

/* Brand block */
.brand-block {
  display:flex;
  align-items:center;
  gap:12px;
  color:var(--text-dark);
  text-decoration:none;
  min-width:0;
}
.brand-logo {
  width:40px;
  height:40px;
  border-radius:12px;
  background:radial-gradient(circle at 30% 30%,var(--gold-start) 0%,var(--gold-end) 60%);
  box-shadow:0 10px 24px rgba(240,185,11,.4);
  object-fit:cover;
}
.brand-text {
  display:flex;
  flex-direction:column;
}
.brand-name {
  font-weight:700;
  font-size:1rem;
  color:var(--text-dark);
  line-height:1.2;
}
.brand-tagline {
  font-size:.8rem;
  color:var(--text-mid);
  line-height:1.2;
}

/* Search block */
.search-block {
  display:flex;
  align-items:center;
  position:relative;
  max-width:600px;
  width:100%;
  margin:0 auto;
}
.search-input {
  width:100%;
  border:1px solid var(--border);
  background:#fff;
  border-radius:var(--radius-md);
  padding:10px 40px 10px 12px;
  line-height:1.2;
  font-size:.9rem;
  color:var(--text-dark);
  box-shadow:0 2px 4px rgba(0,0,0,.03);
}
.search-input:focus {
  outline:2px solid var(--blue-soft);
  outline-offset:1px;
}
.search-btn {
  position:absolute;
  right:6px;
  top:50%;
  transform:translateY(-50%);
  background:var(--blue);
  color:#fff;
  border:none;
  border-radius:10px;
  width:32px;
  height:32px;
  display:grid;
  place-items:center;
  cursor:pointer;
  box-shadow:0 10px 20px rgba(42,110,245,.4);
}
.search-btn svg {
  width:18px;
  height:18px;
  fill:#fff;
}

/* User block */
.user-block {
  display:flex;
  align-items:center;
  gap:16px;
}
.user-link,
.cart-link {
  display:flex;
  align-items:center;
  gap:8px;
  text-decoration:none;
  color:var(--text-dark);
  font-size:.8rem;
  font-weight:600;
  line-height:1.2;
  position:relative;
}
.user-link svg,
.cart-link svg {
  width:22px;
  height:22px;
  fill:var(--text-dark);
}
.cart-count-bubble {
  min-width:20px;
  height:20px;
  border-radius:999px;
  background:linear-gradient(180deg,var(--gold-start) 0%,var(--gold-end) 100%);
  color:var(--gold-text);
  font-weight:700;
  font-size:.7rem;
  line-height:20px;
  text-align:center;
  box-shadow:0 6px 16px rgba(240,185,11,.4);
}
.cart-label {
  display:none;
}
@media(min-width:500px){
  .cart-label { display:inline; }
}

/* ------------------------
   BANNER 3: HERO CAROUSEL
------------------------- */
.hero-carousel {
  position:relative;
  margin-top:24px;
  margin-bottom:32px;
  overflow:hidden;
}
.carousel-track {
  display:flex;
  transition:transform var(--transition-fast);
  will-change:transform;
}
.carousel-slide {
  min-width:100%;
  position:relative;
  background-size:cover;
  background-position:center;
  background-repeat:no-repeat;
  text-decoration:none;
  color:var(--text-dark);
  padding:48px 20px;
  display:flex;
  align-items:flex-end;
}
.carousel-slide::before {
  /* dynamic background from inline style */
  content:"";
  position:absolute;
  inset:0;
  background-image:var(--bg);
  background-size:cover;
  background-position:center;
  background-repeat:no-repeat;
  filter:brightness(.8);
}
.carousel-content {
  position:relative;
  max-width:480px;
  background:rgba(255,255,255,.9);
  backdrop-filter:blur(6px);
  border-radius:var(--radius-lg);
  padding:20px 24px;
  box-shadow:var(--shadow-card);
  border:1px solid var(--border-soft);
}
.carousel-eyebrow {
  font-size:.75rem;
  font-weight:600;
  color:var(--blue);
  background:var(--blue-soft);
  border-radius:999px;
  padding:4px 8px;
  display:inline-block;
  line-height:1.2;
  margin-bottom:8px;
}
.carousel-eyebrow.sale {
  color:var(--gold-text);
  background:linear-gradient(180deg,var(--gold-start) 0%,var(--gold-end) 100%);
  box-shadow:0 8px 20px rgba(240,185,11,.4);
}
.carousel-headline {
  font-size:1.4rem;
  line-height:1.2;
  font-weight:600;
  color:var(--text-dark);
  margin:0 0 .5rem 0;
}
.carousel-text {
  font-size:.9rem;
  color:var(--text-mid);
  line-height:1.4;
  margin:0 0 1rem 0;
}

.carousel-arrow {
  position:absolute;
  top:50%;
  transform:translateY(-50%);
  width:32px;
  height:32px;
  border:none;
  background:#fff;
  border-radius:10px;
  box-shadow:0 10px 24px rgba(16,24,40,.2);
  color:var(--text-dark);
  font-size:20px;
  line-height:32px;
  text-align:center;
  cursor:pointer;
  font-weight:600;
}
.carousel-arrow.left { left:16px; }
.carousel-arrow.right { right:16px; }

.carousel-dots {
  display:flex;
  justify-content:center;
  gap:8px;
  margin-top:12px;
}
.carousel-dot {
  width:8px;
  height:8px;
  border-radius:999px;
  background:var(--border);
  cursor:pointer;
}
.carousel-dot.active {
  background:var(--blue);
  box-shadow:0 6px 16px rgba(42,110,245,.4);
}

/* ------------------------
   BANNER 4: CATEGORY GRID
------------------------- */
.category-grid {
  margin-bottom:48px;
}
.cat-grid {
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(min(240px,100%),1fr));
  gap:20px;
}
.cat-card {
  background:var(--bg-card);
  border:1px solid var(--border);
  border-radius:var(--radius-lg);
  box-shadow:var(--shadow-card);
  text-decoration:none;
  color:var(--text-dark);
  overflow:hidden;
  display:flex;
  flex-direction:column;
  transition:box-shadow var(--transition-fast), transform var(--transition-fast);
}
.cat-card:hover {
  box-shadow:var(--shadow-hover);
  transform:translateY(-2px);
}
.cat-thumb {
  background-image:var(--img);
  background-size:cover;
  background-position:center;
  background-repeat:no-repeat;
  height:140px;
}
.cat-info {
  padding:16px 16px 20px;
  display:flex;
  flex-direction:column;
  gap:4px;
}
.cat-name {
  font-weight:600;
  font-size:1rem;
  line-height:1.3;
  color:var(--text-dark);
}
.cat-desc {
  font-size:.8rem;
  line-height:1.3;
  color:var(--text-mid);
}

/* ------------------------
   FOOTER
------------------------- */
.site-footer {
  border-top:1px solid var(--border);
  background:#fff;
  color:var(--text-dark);
  padding:32px 0;
  box-shadow:0 -8px 24px rgba(16,24,40,.04);
  font-size:.85rem;
}
.footer-inner {
  display:grid;
  gap:24px;
}
@media(min-width:800px){
  .footer-inner {
    grid-template-columns:1fr 1fr 1fr;
  }
}
.footer-col {
  display:flex;
  flex-direction:column;
  gap:12px;
}
.footer-brand {
  font-weight:700;
  font-size:1rem;
  color:var(--text-dark);
}
.footer-copy {
  color:var(--text-mid);
  line-height:1.4;
  font-size:.85rem;
}
.footer-links,
.footer-legal {
  display:flex;
  flex-direction:column;
  gap:6px;
}
.footer-links a,
.footer-legal a {
  color:var(--text-dark);
  text-decoration:none;
  font-weight:500;
  font-size:.85rem;
}
.footer-links a:hover,
.footer-legal a:hover {
  color:var(--blue);
  text-decoration:underline;
}
.footer-note {
  color:var(--text-light);
  font-size:.8rem;
}

/* ------------------------
   CART DRAWER
------------------------- */
.cart {
  position:fixed;
  top:0;
  right:0;
  width:360px;
  max-width:90vw;
  height:100vh;
  background:#fff;
  border-left:1px solid var(--border);
  transform:translateX(100%);
  transition:.3s transform ease;
  z-index:400;
  display:flex;
  flex-direction:column;
  box-shadow:-20px 0 40px rgba(16,24,40,.18);
  border-top-left-radius:var(--radius-lg);
  border-bottom-left-radius:var(--radius-lg);
}
.cart.open {
  transform:translateX(0);
}
.cart-header {
  display:flex;
  justify-content:space-between;
  align-items:center;
  padding:16px;
  border-bottom:1px solid var(--border);
}
.icon-btn {
  background:transparent;
  border:none;
  color:var(--text-mid);
  font-size:28px;
  cursor:pointer;
  line-height:1;
}
.cart-items {
  padding:14px;
  overflow:auto;
  flex:1;
  display:grid;
  gap:10px;
}
.cart-item {
  display:grid;
  grid-template-columns:60px 1fr auto;
  gap:10px;
  align-items:center;
  border:1px solid var(--border);
  border-radius:var(--radius-md);
  padding:10px;
  background:#fff;
  box-shadow:0 8px 20px rgba(16,24,40,.06);
}
.cart-item img {
  width:60px;
  height:60px;
  object-fit:cover;
  border-radius:10px;
  background:#f2f4fa;
  border:1px solid var(--border);
}
.product-name {
  font-weight:600;
  font-size:.9rem;
  color:var(--text-dark);
  margin:0 0 .25rem;
}
.product-meta {
  color:var(--text-mid);
  font-size:.8rem;
  line-height:1.3;
}
.qty {
  display:flex;
  gap:6px;
  align-items:center;
}
.qty input {
  width:56px;
  background:#fff;
  border:1px solid var(--border);
  border-radius:10px;
  padding:6px;
  color:var(--text-dark);
  text-align:center;
  font-size:.8rem;
}
.cart-footer {
  border-top:1px solid var(--border);
  padding:14px;
  display:grid;
  gap:12px;
  background:#fff;
  border-bottom-left-radius:var(--radius-lg);
}
.totals {
  display:grid;
  gap:6px;
  font-size:.9rem;
  color:var(--text-dark);
}
.totals .hr {
  height:1px;
  background:var(--border);
  margin:6px 0;
}

/* ------------------------
   CHECKOUT MODAL
------------------------- */
.checkout {
  border:none;
  padding:0;
  background:transparent;
}
.checkout-inner {
  max-width:560px;
  width:90vw;
  background:#fff;
  border:1px solid var(--border);
  border-radius:var(--radius-lg);
  padding:20px;
  margin:auto;
  box-shadow:0 20px 60px rgba(16,24,40,.3);
}
.steps {
  display:grid;
  gap:6px;
  margin:0 0 1rem;
  padding:0;
  list-style:none;
}
.steps li {
  background:#fff;
  border:1px solid var(--border);
  border-radius:var(--radius-md);
  padding:8px 10px;
  font-size:.85rem;
  line-height:1.3;
  color:var(--text-dark);
  font-weight:500;
}

/* ------------------------
   RESPONSIVE TWEAKS
------------------------- */
@media(max-width:900px){
  .utility-inner {
    grid-template-columns:1fr auto;
    grid-template-areas:
      "brand user"
      "search search";
  }
  .brand-block { grid-area:brand; }
  .user-block { grid-area:user; justify-self:end; }
  .search-block { grid-area:search; width:100%; max-width:100%; }
}

@media(max-width:600px){
  .carousel-content {
    max-width:100%;
  }
  .carousel-headline {
    font-size:1.2rem;
  }
  .carousel-text {
    font-size:.85rem;
  }
}

/* Voile léger pour que le texte reste lisible */
.carousel-slide::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(15,23,42,0.65), rgba(15,23,42,0.15));
}

.carousel-content {
  position: relative;
  max-width: 420px;
  z-index: 1;
}

.hero-carousel .carousel-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  border: none;
  background: rgba(15,23,42,0.75);
  color: #fff;
  width: 40px;
  height: 40px;
  border-radius: 999px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.hero-carousel .carousel-arrow.left {
  left: max(16px, calc((100% - 1200px)/2 + 8px));
}

.hero-carousel .carousel-arrow.right {
  right: max(16px, calc((100% - 1200px)/2 + 8px));
}

.hero-carousel .carousel-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 12px;
}

.hero-carousel .carousel-dots .dot,
.hero-carousel .carousel-dots button {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  border: none;
  background: #cbd5f5;
  cursor: pointer;
}

.hero-carousel .carousel-dots .dot.active,
.hero-carousel .carousel-dots button.active {
  width: 18px;
  background: #0f172a;
}

/* Responsive */
@media (max-width: 768px) {
  .carousel-slide {
    padding: 24px 16px;
  }

  .hero-carousel .carousel-arrow.left {
    left: 12px;
  }
  .hero-carousel .carousel-arrow.right {
    right: 12px;
  }
}

/* === CATEGORY GRID 3 + 3 === */
.category-grid {
  padding: 32px 0 48px;
}

.category-grid .cat-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr)); /* 3 colonnes */
  gap: 24px;
}

/* Cartes confortables */
.cat-card {
  display: flex;
  flex-direction: column;
  border-radius: 18px;
  overflow: hidden;
  background: #ffffff;
  box-shadow: 0 10px 30px rgba(15,23,42,0.08);
  text-decoration: none;
  color: inherit;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.cat-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 16px 40px rgba(15,23,42,0.14);
}

.cat-thumb {
  background-image: var(--img, none);
  background-size: cover;
  background-position: center;
  aspect-ratio: 4 / 3;
}

.cat-info {
  padding: 14px 16px 16px;
}

.cat-name {
  font-weight: 600;
  margin-bottom: 4px;
}

.cat-desc {
  font-size: 0.9rem;
  color: #6b7280;
}

/* Responsive : 2 colonnes sur écran moyen, 1 sur mobile */
@media (max-width: 900px) {
  .category-grid .cat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 600px) {
  .category-grid .cat-grid {
    grid-template-columns: 1fr;
  }
}

/* === HERO CAROUSEL : FULL-WIDTH BAND SIMPLE === */
.hero-carousel {
  width: 100%;
  padding: 24px 0 32px;
  background: linear-gradient(135deg, #f5f7fb, #ffffff);
}


/* On centre simplement les points, sans toucher aux slides */
.hero-carousel .carousel-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 8px;
}

/* Force un comportement de slider propre */
.hero-carousel {
  position: relative;
  overflow: hidden;          /* coupe ce qui dépasse */
}

.hero-carousel .carousel-track {
  display: flex;             /* ruban horizontal */
  transition: transform 0.4s ease;
}

.carousel-slide {
  flex: 0 0 100%;            /* chaque slide = 100% de largeur visible */
  box-sizing: border-box;
}

