/* OUTSIIDE THE BOXX — design tokens imposés */
:root {
  --bg: #0D0D0F;
  --surface-1: #16161A;
  --surface-2: #1E1E23;
  --text: #F3F1EC;
  --muted: #8C8C96;
  --accent: #FF7A2C;
  --wa: #25D366;
  --grad: linear-gradient(90deg, #FFE24B, #FF7A2C, #FF3D8B, #8A5CFF, #2EA0FF);
  --font-display: "Bricolage Grotesque", sans-serif;
  --font-body: "Inter", sans-serif;
  --font-mono: "Space Mono", monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }
img { max-width: 100%; display: block; }
.display { font-family: var(--font-display); font-weight: 800; }
.mono { font-family: var(--font-mono); }
.muted { color: var(--muted); }
.small { font-size: 0.8rem; }
.label { font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.12em; color: var(--muted); }

:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 4px;
}

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}

.grad-text {
  background: var(--grad);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

/* hairline gradient 3px top de page */
.hairline { height: 3px; background: var(--grad); }

/* ---------- header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; justify-content: space-between;
  padding: 0.7rem clamp(1rem, 4vw, 2.5rem);
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--surface-2);
}

.logo { display: flex; align-items: center; gap: 0.7rem; text-decoration: none; }

.logo-ring {
  display: grid; place-items: center;
  width: 46px; height: 46px; border-radius: 50%;
  background: conic-gradient(#FFE24B, #FF7A2C, #FF3D8B, #8A5CFF, #2EA0FF, #FFE24B);
  padding: 3px;
}

.logo-core {
  display: grid; place-items: center;
  width: 100%; height: 100%; border-radius: 50%;
  background: var(--bg);
  font-family: var(--font-display); font-weight: 800; font-size: 0.78rem;
  letter-spacing: 0.03em;
}

.logo-word {
  font-family: var(--font-display); font-weight: 800;
  font-size: 0.72rem; line-height: 1.15; letter-spacing: 0.06em;
}

.header-actions { display: flex; gap: 0.5rem; }

.lang-btn, .cart-btn {
  font-size: 0.78rem; padding: 0.5rem 0.8rem;
  background: var(--surface-1); color: var(--text);
  border: 1px solid var(--surface-2); border-radius: 999px;
  cursor: pointer; text-decoration: none;
}
.lang-btn:hover, .cart-btn:hover { border-color: var(--accent); }

.cart-count {
  display: inline-grid; place-items: center;
  min-width: 1.35em; height: 1.35em; margin-left: 0.25em;
  border-radius: 999px; background: var(--accent); color: #0D0D0F;
  font-weight: 700; font-size: 0.72rem; padding: 0 0.25em;
}

/* ---------- ticker ---------- */
.ticker {
  overflow: hidden; white-space: nowrap;
  border-bottom: 1px solid var(--surface-2);
  background: var(--surface-1);
  font-family: var(--font-mono); font-size: 0.72rem;
  padding: 0.45rem 0; color: var(--muted);
}
.ticker-track { display: inline-block; animation: ticker 28s linear infinite; }
@keyframes ticker { to { transform: translateX(-50%); } }

@media (prefers-reduced-motion: reduce) {
  .ticker-track { animation: none; }
  * { transition: none !important; }
}

/* ---------- hero ---------- */
.hero { padding: clamp(2.5rem, 8vw, 6rem) clamp(1rem, 4vw, 2.5rem) 1.5rem; }
.hero-title {
  font-size: clamp(3.2rem, 14vw, 9rem);
  line-height: 0.9; letter-spacing: -0.02em; text-transform: uppercase;
}
.hero-sub { margin-top: 1rem; color: var(--muted); max-width: 40ch; }

/* ---------- filters ---------- */
.filters {
  display: flex; flex-wrap: wrap; gap: 0.5rem;
  padding: 0.5rem clamp(1rem, 4vw, 2.5rem) 1.5rem;
}
.chip {
  font-size: 0.78rem; padding: 0.45rem 0.9rem;
  border: 1px solid var(--surface-2); border-radius: 999px;
  background: var(--surface-1); color: var(--muted);
  text-decoration: none; cursor: pointer;
}
.chip:hover { color: var(--text); border-color: var(--accent); }
.chip.is-active { color: #0D0D0F; background: var(--accent); border-color: var(--accent); }
.chip-danger:hover { border-color: #FF3D8B; color: #FF3D8B; }

/* ---------- grid produits ---------- */
.grid {
  display: grid; grid-template-columns: repeat(2, 1fr);
  gap: 0.8rem; padding: 0 clamp(1rem, 4vw, 2.5rem) 3rem;
}
@media (min-width: 780px) { .grid { grid-template-columns: repeat(3, 1fr); gap: 1.2rem; } }

.card {
  background: var(--surface-1);
  border: 1px solid var(--surface-2); border-radius: 14px;
  overflow: hidden; display: flex; flex-direction: column;
}

.card-media { position: relative; display: block; aspect-ratio: 4/5; background: var(--surface-2); }
.card-media img { width: 100%; height: 100%; object-fit: cover; }

.sku {
  position: absolute; top: 0.6rem; left: 0.6rem;
  font-size: 0.62rem; padding: 0.25rem 0.5rem;
  background: rgba(13, 13, 15, 0.82); color: var(--text);
  border: 1px solid var(--surface-2); border-radius: 6px;
  letter-spacing: 0.08em;
}
.sku-inline {
  font-size: 0.68rem; padding: 0.1rem 0.35rem;
  background: var(--surface-2); border-radius: 5px; letter-spacing: 0.06em;
}

.card-body { display: flex; flex-direction: column; gap: 0.55rem; padding: 0.8rem; }
.card-name { font-size: 0.9rem; font-weight: 600; }
.card-name a { text-decoration: none; }
.card-name a:hover { color: var(--accent); }
.card-price { color: var(--accent); font-size: 0.9rem; }
.den { color: var(--muted); font-size: 0.82em; }

/* ---------- tailles ---------- */
.size-row { display: flex; flex-wrap: wrap; gap: 0.35rem; }
.size-btn {
  min-width: 2.2rem; padding: 0.35rem 0.5rem;
  font-size: 0.75rem;
  background: var(--surface-2); color: var(--text);
  border: 1px solid transparent; border-radius: 7px; cursor: pointer;
}
.size-btn:hover:not(:disabled) { border-color: var(--muted); }
.size-btn[aria-pressed="true"] { background: var(--accent); color: #0D0D0F; font-weight: 700; }
.size-btn:disabled { color: var(--muted); text-decoration: line-through; cursor: not-allowed; opacity: 0.55; }
.size-row-lg .size-btn { min-width: 3rem; padding: 0.6rem 0.8rem; font-size: 0.9rem; }

/* ---------- boutons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  font-family: var(--font-body); font-weight: 600; font-size: 0.85rem;
  padding: 0.65rem 1rem; border: none; border-radius: 9px;
  cursor: pointer; text-decoration: none; text-align: center;
  transition: transform 0.12s ease, filter 0.12s ease;
}
.btn:hover { filter: brightness(1.08); }
.btn:active { transform: scale(0.98); }
.btn-add { background: var(--accent); color: #0D0D0F; }
.btn-wa { background: var(--wa); color: #06281a; }
.btn-lg { padding: 0.9rem 1.6rem; font-size: 1rem; border-radius: 12px; }
.btn.shake { animation: shake 0.3s; }
@keyframes shake { 25% { transform: translateX(-4px); } 75% { transform: translateX(4px); } }

/* ---------- fiche produit ---------- */
.product-page {
  display: grid; gap: 1.5rem;
  padding: 1.5rem clamp(1rem, 4vw, 2.5rem) 3rem;
}
@media (min-width: 780px) { .product-page { grid-template-columns: 1fr 1fr; gap: 3rem; } }
.product-media { position: relative; border-radius: 16px; overflow: hidden; background: var(--surface-1); }
.product-info { display: flex; flex-direction: column; gap: 0.9rem; }
.product-title { font-size: clamp(1.7rem, 5vw, 2.6rem); line-height: 1.05; }
.product-price { font-size: 1.4rem; color: var(--accent); }

/* ---------- drawer panier ---------- */
.drawer-backdrop {
  position: fixed; inset: 0; z-index: 50;
  background: rgba(0, 0, 0, 0.55);
}
.cart-drawer {
  position: fixed; top: 0; right: 0; bottom: 0; z-index: 51;
  width: min(420px, 92vw);
  background: var(--surface-1);
  border-left: 1px solid var(--surface-2);
  display: flex; flex-direction: column;
  transform: translateX(0);
}
@media (prefers-reduced-motion: no-preference) {
  .cart-drawer { animation: slide-in 0.22s ease; }
  @keyframes slide-in { from { transform: translateX(100%); } }
}

.drawer-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 1.1rem 1.2rem; border-bottom: 1px solid var(--surface-2);
}
.drawer-head h2 { font-size: 1.4rem; }
.drawer-close {
  background: none; border: none; color: var(--muted);
  font-size: 1.8rem; line-height: 1; cursor: pointer; padding: 0.2rem 0.5rem;
}
.drawer-close:hover { color: var(--text); }

.drawer-body { flex: 1; overflow-y: auto; padding: 1rem 1.2rem; }
.cart-line {
  display: grid; grid-template-columns: 54px 1fr auto;
  gap: 0.7rem; align-items: center;
  padding: 0.6rem 0; border-bottom: 1px solid var(--surface-2);
}
.cart-line img { width: 54px; height: 66px; object-fit: cover; border-radius: 8px; }
.cart-line-name { font-size: 0.85rem; font-weight: 600; }
.cart-line-meta { font-size: 0.72rem; color: var(--muted); font-family: var(--font-mono); }
.cart-line-price { font-family: var(--font-mono); font-size: 0.82rem; }
.cart-line-remove {
  background: none; border: none; color: var(--muted);
  font-size: 0.72rem; font-family: var(--font-mono);
  cursor: pointer; text-decoration: underline; padding: 0.15rem 0;
}
.cart-line-remove:hover { color: #FF3D8B; }

.drawer-foot {
  padding: 1rem 1.2rem 1.3rem; border-top: 1px solid var(--surface-2);
  display: flex; flex-direction: column; gap: 0.7rem;
}
.drawer-total { display: flex; justify-content: space-between; font-size: 0.95rem; }

/* ---------- checkout / formulaires ---------- */
.checkout {
  max-width: 620px; margin: 0 auto;
  padding: 2rem clamp(1rem, 4vw, 2.5rem) 4rem;
  display: flex; flex-direction: column; gap: 1.4rem;
}
.checkout h1 { font-size: clamp(2rem, 7vw, 3rem); }

.checkout-recap {
  background: var(--surface-1); border: 1px solid var(--surface-2);
  border-radius: 14px; padding: 1.1rem;
}
.recap-list { list-style: none; display: flex; flex-direction: column; gap: 0.5rem; margin: 0.7rem 0; }
.recap-list li { display: flex; gap: 0.5rem; align-items: baseline; justify-content: space-between; flex-wrap: wrap; }
.recap-total { border-top: 1px solid var(--surface-2); padding-top: 0.7rem; }

.checkout-form { display: flex; flex-direction: column; gap: 1rem; }
.checkout-form label { display: flex; flex-direction: column; gap: 0.35rem; font-size: 0.85rem; font-weight: 500; }
.checkout-form input, .checkout-form textarea, .checkout-form select {
  background: var(--surface-1); color: var(--text);
  border: 1px solid var(--surface-2); border-radius: 9px;
  padding: 0.7rem 0.85rem; font-family: var(--font-body); font-size: 0.95rem;
}
.checkout-form input:focus, .checkout-form textarea:focus, .checkout-form select:focus {
  outline: 2px solid var(--accent); outline-offset: 0;
  border-color: var(--accent);
}
.inline-input { width: 4.5rem; padding: 0.3rem 0.5rem; }
.check-label { flex-direction: row !important; align-items: center; gap: 0.5rem !important; }
.stock-fieldset { border: 1px solid var(--surface-2); border-radius: 9px; padding: 0.9rem; }
.stock-grid { display: flex; gap: 0.8rem; flex-wrap: wrap; margin-top: 0.6rem; }
.stock-grid label { font-size: 0.78rem; }
.stock-grid input { width: 4.2rem; }

.form-error {
  background: rgba(255, 61, 139, 0.12); color: #FF3D8B;
  border: 1px solid rgba(255, 61, 139, 0.4);
  border-radius: 9px; padding: 0.7rem 0.9rem; font-size: 0.85rem;
}

.order-done { text-align: center; align-items: center; }
.order-done .checkout-recap { text-align: left; width: 100%; }

/* ---------- admin ---------- */
.admin { padding: 1.8rem clamp(1rem, 4vw, 2.5rem) 4rem; }
.admin-head { display: flex; flex-wrap: wrap; gap: 1rem; align-items: center; justify-content: space-between; margin-bottom: 1.4rem; }
.admin-nav { display: flex; gap: 0.4rem; flex-wrap: wrap; }
.table-wrap { overflow-x: auto; border: 1px solid var(--surface-2); border-radius: 12px; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 0.83rem; background: var(--surface-1); }
.admin-table th, .admin-table td { text-align: left; padding: 0.65rem 0.8rem; border-bottom: 1px solid var(--surface-2); vertical-align: top; }
.admin-table th { font-family: var(--font-mono); font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--muted); }
.row-inactive { opacity: 0.45; }
.row-actions { display: flex; gap: 0.3rem; flex-wrap: wrap; }
.inline-form { display: inline; }
.status-form { display: flex; gap: 0.3rem; align-items: center; }
.status-form select { background: var(--surface-2); color: var(--text); border: 1px solid var(--surface-2); border-radius: 7px; padding: 0.35rem 0.5rem; font-size: 0.75rem; }
.status-pending { color: var(--accent); }
.status-delivered { color: var(--wa); }

/* ---------- footer ---------- */
.site-footer {
  border-top: 1px solid var(--surface-2);
  padding: 2rem clamp(1rem, 4vw, 2.5rem) 2.5rem;
  display: flex; flex-direction: column; gap: 0.4rem;
  font-size: 0.8rem;
}

/* fix: l attribut hidden doit toujours gagner sur display:flex */
[hidden] { display: none !important; }
