/* Mamasista — styles partagés (pages produit + grilles + panier) */
:root {
  --bordeaux: #8C2A3A;
  --cherry:   #A8243C;
  --terra:    #C65946;
  --rose:     #B36172;
  --caramel:  #BA6D33;
  --sand:     #DBC3AB;
  --cream:    #F5F0EB;
  --paper:    #efe6da;
  --ink:      #2C2420;
  --ink-soft: #6b5d54;
  --display: 'Cormorant Garamond', Georgia, serif;
  --body: 'Jost', -apple-system, sans-serif;
  --pad-x: clamp(1.4rem, 6vw, 9rem);
  --maxw: 1280px;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: var(--body); color: var(--ink); background: var(--cream);
  line-height: 1.65; font-weight: 300; -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
body::after {
  content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 9999;
  opacity: 0.04; mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}
::selection { background: var(--bordeaux); color: var(--cream); }
a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
h1, h2, h3 { font-family: var(--display); font-weight: 500; line-height: 1.04; }
.eyebrow { font-family: var(--body); font-weight: 400; font-size: 0.72rem; letter-spacing: 0.42em; text-transform: uppercase; color: var(--bordeaux); }
.wrap { max-width: var(--maxw); margin: 0 auto; }

/* ============ NAV ============ */
header.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  display: flex; align-items: center; justify-content: space-between;
  padding: 1rem var(--pad-x); background: rgba(245,240,235,0.9);
  backdrop-filter: blur(14px); box-shadow: 0 1px 0 rgba(44,36,32,0.08);
}
.nav-logo { display: flex; align-items: center; }
.nav-logo img { height: 30px; width: auto; }
.nav-links { display: flex; gap: clamp(1.2rem, 2.4vw, 2.6rem); list-style: none; align-items: center; }
.nav-links a { font-size: 0.78rem; letter-spacing: 0.22em; text-transform: uppercase; font-weight: 400; color: var(--ink); position: relative; padding-block: 4px; }
.nav-links a::after { content: ""; position: absolute; left: 0; bottom: 0; width: 100%; height: 1px; background: var(--bordeaux); transform: scaleX(0); transform-origin: right; transition: transform 0.4s ease; }
.nav-links a:hover::after { transform: scaleX(1); transform-origin: left; }
.nav-actions { display: flex; align-items: center; gap: clamp(0.8rem, 2vw, 1.4rem); position: relative; z-index: 1100; }
.cart-btn { position: relative; background: none; border: none; cursor: pointer; display: flex; align-items: center; gap: 0.55rem; padding: 6px; color: var(--ink); font-family: var(--body); font-size: 0.72rem; letter-spacing: 0.18em; text-transform: uppercase; }
.cart-btn svg { width: 22px; height: 22px; stroke: var(--ink); fill: none; stroke-width: 1.3; stroke-linejoin: round; }
.cart-count { position: absolute; top: -3px; right: -7px; min-width: 17px; height: 17px; padding: 0 4px; background: var(--cherry); color: #fff; border-radius: 9px; font-size: 0.6rem; font-weight: 500; display: flex; align-items: center; justify-content: center; transform: scale(0); transition: transform 0.3s cubic-bezier(0.3,1.5,0.4,1); }
.cart-count.show { transform: scale(1); }
.cart-btn.bump svg { animation: cartbump 0.45s ease; }
@keyframes cartbump { 0%,100% { transform: none; } 30% { transform: scale(1.25) rotate(-8deg); } }
.burger { display: none; flex-direction: column; gap: 5px; background: none; border: none; cursor: pointer; padding: 6px; z-index: 1100; }
.burger span { width: 26px; height: 1.5px; background: var(--ink); transition: transform 0.35s ease, opacity 0.35s ease; }
body.menu-open .burger span:nth-child(1) { transform: translateY(6.5px) rotate(45deg); }
body.menu-open .burger span:nth-child(2) { opacity: 0; }
body.menu-open .burger span:nth-child(3) { transform: translateY(-6.5px) rotate(-45deg); }

/* ============ BUTTONS ============ */
.btn { display: inline-flex; align-items: center; gap: 0.9rem; background: var(--bordeaux); color: var(--cream); padding: 1.05rem 2.2rem; font-size: 0.76rem; letter-spacing: 0.24em; text-transform: uppercase; border-radius: 2px; transition: background 0.4s ease, transform 0.4s ease; border: none; cursor: pointer; font-family: var(--body); }
.btn:hover { background: var(--cherry); transform: translateY(-2px); }
.btn .arr { transition: transform 0.4s ease; }
.btn:hover .arr { transform: translateX(4px); }
.btn.ghost { background: none; color: var(--ink); border: 1px solid rgba(44,36,32,0.3); }
.btn.ghost:hover { background: var(--ink); color: var(--cream); border-color: var(--ink); }

/* ============ PRODUCT DETAIL (PDP) ============ */
.pdp { padding: 7.5rem var(--pad-x) clamp(4rem,9vw,7rem); }
.breadcrumb { font-size: 0.72rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-soft); margin-bottom: 2.4rem; display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.breadcrumb a:hover { color: var(--bordeaux); }
.breadcrumb .sep { opacity: 0.5; }
.pdp-grid { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: clamp(2rem, 5vw, 5rem); align-items: start; }
.gallery { position: sticky; top: 6.5rem; }
.gallery-main { position: relative; border-radius: 3px; overflow: hidden; aspect-ratio: 4 / 5; background: var(--paper); box-shadow: 0 30px 60px -42px rgba(44,36,32,0.5); }
.gallery-main img { width: 100%; height: 100%; object-fit: cover; }
.badge-best { position: absolute; top: 1rem; left: 1rem; background: var(--cherry); color: var(--cream); font-family: var(--body); font-size: 0.56rem; letter-spacing: 0.2em; text-transform: uppercase; padding: 0.3rem 0.7rem; border-radius: 2px; z-index: 2; }
.thumbs { display: flex; gap: 0.7rem; margin-top: 0.8rem; flex-wrap: wrap; }
.thumb { width: 72px; height: 86px; border-radius: 2px; overflow: hidden; cursor: pointer; border: 1px solid rgba(44,36,32,0.15); padding: 0; background: var(--paper); transition: border-color 0.2s ease; }
.thumb[aria-pressed="true"] { border-color: var(--ink); }
.thumb img { width: 100%; height: 100%; object-fit: cover; }

.pdp-info .cat-tag { display: block; margin-bottom: 0.9rem; }
.pdp-title { font-size: clamp(2.6rem, 5.5vw, 4rem); line-height: 1; }
.pdp-price { font-family: var(--display); font-size: 2rem; color: var(--bordeaux); margin-top: 0.7rem; }
.pdp-desc { margin-top: 1.6rem; color: var(--ink-soft); font-size: 1.02rem; line-height: 1.8; max-width: 46ch; }
.pdp-desc p { margin-bottom: 0.9rem; }
.spec { margin-top: 1.8rem; display: flex; flex-direction: column; gap: 0; border-top: 1px solid rgba(44,36,32,0.14); }
.spec .row { display: flex; justify-content: space-between; gap: 1.5rem; padding: 0.85rem 0; border-bottom: 1px solid rgba(44,36,32,0.1); font-size: 0.86rem; }
.spec .row .k { letter-spacing: 0.1em; text-transform: uppercase; font-size: 0.72rem; color: var(--ink-soft); }
.spec .row .v { color: var(--ink); text-align: right; }

.buybox { margin-top: 2rem; }
.field { margin-bottom: 1.5rem; }
.field-label { font-size: 0.66rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--ink-soft); margin-bottom: 0.7rem; display: flex; gap: 0.5rem; align-items: baseline; }
.field-label .sel { color: var(--ink); letter-spacing: 0.06em; text-transform: none; font-size: 0.78rem; }
.sr-colors, .sr-sizes { display: flex; gap: 0.6rem; align-items: center; flex-wrap: wrap; }
.swatch { width: 26px; height: 26px; border-radius: 50%; padding: 0; cursor: pointer; background: var(--c); border: 1px solid rgba(44,36,32,0.2); transition: box-shadow 0.2s ease, transform 0.2s ease; }
.swatch:hover { transform: scale(1.1); }
.swatch[aria-pressed="true"] { box-shadow: 0 0 0 2px var(--cream), 0 0 0 3.5px var(--ink); }
.size-btn { font-family: var(--body); font-size: 0.78rem; letter-spacing: 0.04em; padding: 0.55rem 1rem; border: 1px solid rgba(44,36,32,0.28); background: none; cursor: pointer; color: var(--ink-soft); border-radius: 2px; transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease; }
.size-btn[aria-pressed="true"] { background: var(--ink); color: var(--cream); border-color: var(--ink); }
.buy-actions { display: flex; gap: 1rem; align-items: stretch; flex-wrap: wrap; margin-top: 0.5rem; }
.qty { display: flex; align-items: center; border: 1px solid rgba(44,36,32,0.25); border-radius: 2px; }
.qty button { width: 44px; height: 100%; min-height: 50px; border: none; background: none; cursor: pointer; font-size: 1.2rem; color: var(--ink); transition: background 0.2s ease, color 0.2s ease; }
.qty button:hover { background: var(--ink); color: var(--cream); }
.qty .n { min-width: 2.2ch; text-align: center; font-size: 0.95rem; }
.add-cta { flex: 1; justify-content: center; min-width: 200px; }
.reassurance { margin-top: 1.8rem; display: grid; gap: 0.6rem; }
.reassurance li { list-style: none; display: flex; gap: 0.7rem; align-items: center; font-size: 0.82rem; color: var(--ink-soft); }
.reassurance svg { width: 18px; height: 18px; stroke: var(--bordeaux); fill: none; stroke-width: 1.4; flex-shrink: 0; }

.accordion { margin-top: 2rem; border-top: 1px solid rgba(44,36,32,0.14); }
.accordion details { border-bottom: 1px solid rgba(44,36,32,0.12); }
.accordion summary { cursor: pointer; list-style: none; padding: 1.1rem 0; font-size: 0.78rem; letter-spacing: 0.16em; text-transform: uppercase; display: flex; justify-content: space-between; align-items: center; }
.accordion summary::-webkit-details-marker { display: none; }
.accordion summary::after { content: "+"; font-size: 1.3rem; color: var(--bordeaux); line-height: 1; }
.accordion details[open] summary::after { content: "\2013"; }
.accordion .acc-body { padding: 0 0 1.3rem; color: var(--ink-soft); font-size: 0.92rem; line-height: 1.7; max-width: 52ch; }

/* ============ PRODUCT GRID (homepage + related) ============ */
.cat-block { padding-block: clamp(2.5rem, 5vw, 4rem); border-top: 1px solid rgba(44,36,32,0.13); }
.cat-head2 { display: grid; grid-template-columns: auto 1fr; gap: 1.4rem; align-items: baseline; margin-bottom: 2.4rem; }
.cat-head2 .band-num { font-family: var(--display); font-style: italic; font-size: 1.5rem; color: var(--bordeaux); }
.cat-head2 .band-title { font-size: clamp(2rem, 4.5vw, 3.2rem); }
.cat-head2 .band-sub { color: var(--ink-soft); font-size: 0.95rem; max-width: 46ch; margin-top: 0.4rem; }
.pgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: clamp(1.2rem, 2.5vw, 2rem); }
.pcard { display: flex; flex-direction: column; background: transparent; }
.pcard-media { position: relative; border: none; padding: 0; cursor: pointer; background: var(--paper); border-radius: 3px; overflow: hidden; aspect-ratio: 4 / 4.6; display: block; width: 100%; }
.pcard-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.7s cubic-bezier(0.2,0.7,0.2,1); }
.pcard:hover .pcard-media img { transform: scale(1.05); }
.pcard-body { padding-top: 1rem; display: flex; flex-direction: column; gap: 0.2rem; }
.pcard-name { font-family: var(--display); font-size: 1.5rem; font-weight: 500; line-height: 1; }
.pcard-dim { font-size: 0.74rem; letter-spacing: 0.04em; color: var(--ink-soft); }
.pcard-foot { display: flex; justify-content: space-between; align-items: baseline; margin-top: 0.6rem; gap: 1rem; }
.pcard-price { font-family: var(--display); font-size: 1.3rem; color: var(--bordeaux); }
.pcard-view { font-size: 0.64rem; letter-spacing: 0.16em; text-transform: uppercase; color: var(--ink-soft); transition: color 0.3s ease; }
.pcard:hover .pcard-view { color: var(--bordeaux); }

.related { padding: clamp(3rem,7vw,6rem) var(--pad-x); border-top: 1px solid rgba(44,36,32,0.13); background: var(--paper); }
.related h2 { font-size: clamp(1.8rem, 4vw, 2.8rem); margin-bottom: 2rem; }

/* ============ CART DRAWER ============ */
.cart-overlay { position: fixed; inset: 0; background: rgba(44,36,32,0.45); opacity: 0; visibility: hidden; transition: opacity 0.4s ease, visibility 0.4s ease; z-index: 2000; }
.cart-overlay.open { opacity: 1; visibility: visible; }
.cart-drawer { position: fixed; top: 0; right: 0; height: 100%; width: min(430px, 100vw); background: var(--cream); z-index: 2001; display: flex; flex-direction: column; transform: translateX(100%); transition: transform 0.5s cubic-bezier(0.5,0,0,1); box-shadow: -22px 0 60px -30px rgba(0,0,0,0.5); }
.cart-drawer.open { transform: none; }
.cart-head { display: flex; align-items: center; justify-content: space-between; padding: 1.6rem 1.8rem; border-bottom: 1px solid rgba(44,36,32,0.12); }
.cart-head h3 { font-size: 1.8rem; }
.cart-close { background: none; border: none; cursor: pointer; font-size: 1.7rem; color: var(--ink); line-height: 1; padding: 0 4px; }
.cart-items { flex: 1; overflow-y: auto; padding: 0.4rem 1.8rem; }
.cart-empty { padding: 3.5rem 0; text-align: center; color: var(--ink-soft); font-family: var(--display); font-style: italic; font-size: 1.4rem; }
.ci { display: grid; grid-template-columns: 1fr auto; gap: 0.3rem 1rem; padding: 1.3rem 0; border-bottom: 1px solid rgba(44,36,32,0.1); }
.ci-name { font-family: var(--display); font-size: 1.3rem; color: var(--ink); line-height: 1.1; }
.ci-variant { font-size: 0.68rem; letter-spacing: 0.06em; color: var(--ink-soft); text-transform: uppercase; margin-top: 0.25rem; }
.ci-right { display: flex; flex-direction: column; align-items: flex-end; justify-content: space-between; }
.ci-price { font-family: var(--display); font-size: 1.2rem; color: var(--bordeaux); }
.ci-qty { display: flex; align-items: center; gap: 0.55rem; margin-top: 0.7rem; }
.qbtn { width: 26px; height: 26px; border: 1px solid rgba(44,36,32,0.25); background: none; cursor: pointer; color: var(--ink); border-radius: 2px; font-size: 1rem; line-height: 1; display: flex; align-items: center; justify-content: center; transition: background 0.2s ease, color 0.2s ease; }
.qbtn:hover { background: var(--ink); color: var(--cream); }
.ci-num { min-width: 1.5ch; text-align: center; font-size: 0.92rem; }
.ci-remove { background: none; border: none; cursor: pointer; color: var(--ink-soft); font-size: 0.6rem; letter-spacing: 0.14em; text-transform: uppercase; text-decoration: underline; padding: 0; }
.cart-foot { padding: 1.6rem 1.8rem; border-top: 1px solid rgba(44,36,32,0.14); }
.cart-sub { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 0.4rem; }
.cart-sub .l { font-size: 0.74rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-soft); }
.cart-sub .v { font-family: var(--display); font-size: 1.9rem; color: var(--bordeaux); }
.cart-note { font-size: 0.68rem; color: var(--ink-soft); margin-bottom: 1.1rem; line-height: 1.5; }
  .ship-box { margin-bottom: 1rem; padding-bottom: 1rem; border-bottom: 1px solid rgba(44,36,32,0.1); }
  .ship-lab { display: block; font-size: 0.74rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-soft); margin-bottom: 0.5rem; }
  .ship-sel { width: 100%; padding: 0.6rem 0.7rem; font-family: var(--body); font-size: 0.9rem; color: var(--ink); background: #fff; border: 1px solid rgba(44,36,32,0.22); border-radius: 4px; }
  .ship-sel:focus-visible { outline: 2px solid var(--bordeaux); outline-offset: 1px; }
  .ship-modes { display: flex; flex-direction: column; gap: 0.4rem; margin-top: 0.7rem; }
  .ship-modes label { display: flex; align-items: center; gap: 0.45rem; font-size: 0.85rem; cursor: pointer; }
  .ship-modes input { accent-color: var(--bordeaux); }
  .ship-hint { font-size: 0.72rem; color: var(--bordeaux); }
  .cart-ship { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 0.5rem; font-size: 0.85rem; color: var(--ink-soft); }
  .cart-ship .v { color: var(--ink); }
  .cart-total { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 0.6rem; padding-top: 0.6rem; border-top: 1px solid rgba(44,36,32,0.14); }
  .cart-total .l { font-size: 0.74rem; letter-spacing: 0.18em; text-transform: uppercase; color: var(--ink-soft); }
  .cart-total .v { font-family: var(--display); font-size: 1.9rem; color: var(--bordeaux); }
  /* Redéfinit volontairement la règle .cart-sub .v écrite plus haut : le
     sous-total cesse d'être le chiffre dominant, c'est le total qui le devient. */
  .cart-sub .v { font-size: 1.15rem; color: var(--ink); }
.checkout-btn { width: 100%; justify-content: center; }
.checkout-btn:disabled { opacity: 0.35; cursor: not-allowed; transform: none; }
.toast { position: fixed; bottom: 1.5rem; left: 50%; transform: translate(-50%, 160%); background: var(--ink); color: var(--cream); padding: 0.9rem 1.5rem; border-radius: 3px; font-size: 0.7rem; letter-spacing: 0.16em; text-transform: uppercase; z-index: 3000; transition: transform 0.45s cubic-bezier(0.3,1.3,0.4,1); display: flex; align-items: center; gap: 0.6rem; max-width: calc(100vw - 2rem); }
.toast.show { transform: translate(-50%, 0); }
.toast svg { stroke: var(--rose); flex-shrink: 0; }

/* ============ FOOTER ============ */
footer { background: var(--bordeaux); color: var(--cream); padding: clamp(4rem, 9vw, 7rem) var(--pad-x) 2.5rem; }
.foot-top { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2.5rem; padding-bottom: 3.5rem; border-bottom: 1px solid rgba(245,240,235,0.2); }
.foot-brand { font-family: var(--display); font-size: clamp(3rem, 7vw, 5rem); color: var(--cream); letter-spacing: 0.06em; line-height: 1; }
.foot-brand + p { color: #eed8cf; margin-top: 1rem; max-width: 30ch; font-size: 0.92rem; }
.foot-col h4 { font-family: var(--body); font-size: 0.7rem; letter-spacing: 0.26em; text-transform: uppercase; color: #e7c3bc; margin-bottom: 1.2rem; font-weight: 400; }
.foot-col a, .foot-col p { display: block; color: #f1ded7; font-size: 0.95rem; padding-block: 0.35rem; transition: color 0.3s ease; }
.foot-col a:hover { color: #fff; }
.foot-bottom { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 1rem; padding-top: 2rem; font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase; color: #d9aaa2; }

/* ============ MOBILE ============ */
@media (max-width: 900px) {
  .burger { display: flex; }
  .nav-links { position: fixed; inset: 0; background: var(--cream); flex-direction: column; justify-content: center; gap: 2rem; transform: translateX(100%); transition: transform 0.5s cubic-bezier(0.5,0,0,1); }
  body.menu-open .nav-links { transform: translateX(0); }
  .nav-links a { font-size: 1.1rem; }
  .cart-label { display: none; }
  .pdp-grid { grid-template-columns: 1fr; }
  .gallery { position: static; }
  .foot-top { grid-template-columns: 1fr; gap: 2rem; }
}
