/* Kit boutique Tamonlink — styles communs (les couleurs viennent de theme.css) */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; display: flex; flex-direction: column;
  background: var(--bg); color: var(--text); font: 16px/1.6 var(--font); -webkit-font-smoothing: antialiased;
}
main { flex: 1; }
img { max-width: 100%; display: block; }
a { color: inherit; text-underline-offset: 0.2em; }
h1, h2, h3 { font-family: var(--font-title); font-weight: 600; line-height: 1.15; margin: 0; }
p { margin: 0; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 2px; }
.wrap { width: 100%; max-width: 72rem; margin-inline: auto; padding-inline: clamp(1rem, 4vw, 2rem); }

/* Boutons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  font: 600 1rem/1 var(--font); padding: 0.95rem 1.4rem; border-radius: 999px; border: 1px solid transparent;
  cursor: pointer; text-decoration: none; transition: filter .15s, background-color .15s;
}
.btn:disabled { opacity: 0.55; cursor: not-allowed; }
.btn-primary { background: var(--brand); color: var(--brand-ink); }
.btn-primary:not(:disabled):hover { filter: brightness(1.08); }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--text); }
.btn.wide { width: 100%; }
.link { background: none; border: 0; padding: 0; color: var(--muted); text-decoration: underline; cursor: pointer; font: inherit; font-size: 0.85rem; }
.icon-btn { width: 2.4rem; height: 2.4rem; border-radius: 50%; border: 0; background: transparent; font-size: 1.1rem; cursor: pointer; color: var(--muted); }
.icon-btn:hover { background: var(--bg); }

/* En-tête */
#site-header { position: sticky; top: 0; z-index: 10; background: color-mix(in srgb, var(--bg) 94%, transparent); border-bottom: 1px solid var(--line); }
.bar { display: flex; align-items: center; justify-content: space-between; min-height: 4rem; gap: 1rem; }
.brand { font: 600 1.35rem/1.1 var(--font-title); text-decoration: none; }
.cart-btn {
  display: inline-flex; align-items: center; gap: 0.5rem; padding: 0.55rem 0.9rem; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface); color: var(--text); font: 600 0.95rem/1 var(--font); cursor: pointer;
}
.cart-btn svg { width: 1.2rem; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linejoin: round; }
.cart-count { min-width: 1.4rem; height: 1.4rem; padding: 0 0.35rem; border-radius: 999px; background: var(--brand); color: var(--brand-ink); font-size: 0.78rem; display: grid; place-items: center; }
.cart-count[hidden] { display: none; }
.demo-banner { text-align: center; font-size: 0.82rem; padding: 0.35rem 1rem; background: var(--accent); color: #fff; }

/* Accueil */
.intro { padding-block: clamp(2.5rem, 7vw, 4.5rem) 1.5rem; text-align: center; }
.intro h1 { font-size: clamp(2rem, 5vw, 3rem); }
.intro p { color: var(--muted); margin-top: 0.7rem; font-size: 1.1rem; }
#filters { display: grid; gap: 0.8rem; justify-items: center; margin-top: 1.5rem; }
.chips { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; gap: 0.5rem; }
.chips.sizes > span { color: var(--muted); font-size: 0.9rem; margin-right: 0.2rem; }
.chip.small { padding: 0.3rem 0.75rem; font-size: 0.85rem; min-width: 2.4rem; text-align: center; }
.chip { padding: 0.45rem 1rem; border-radius: 999px; border: 1px solid var(--line); text-decoration: none; font-size: 0.92rem; background: var(--surface); }
.chip.on { background: var(--text); color: var(--bg); border-color: var(--text); }
#notice { margin-bottom: 1rem; }
#products { list-style: none; margin: 0; padding: 1rem 0 4rem; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(15rem, 100%), 1fr)); gap: clamp(1rem, 3vw, 2rem); }
@media (max-width: 520px) { #products { grid-template-columns: repeat(2, 1fr); gap: 1rem 0.8rem; } }
.card { display: grid; gap: 0.3rem; text-decoration: none; }
.card .pic { position: relative; display: block; aspect-ratio: 1; border-radius: var(--radius); overflow: hidden; background: var(--surface); margin-bottom: 0.5rem; }
.card img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s; }
.card:hover img { transform: scale(1.04); }
.card.sold img { filter: grayscale(0.6); opacity: 0.7; }
.card .name { font-weight: 600; line-height: 1.3; }
.card .meta { color: var(--muted); font-size: 0.85rem; line-height: 1.35; }
.card .meta:empty { display: none; }
.card .price { color: var(--text); font-weight: 600; }
.badge { position: absolute; top: 0.7rem; left: 0.7rem; padding: 0.3rem 0.65rem; border-radius: 999px; font-size: 0.78rem; font-weight: 600; background: var(--surface); }
.badge.out { background: var(--text); color: var(--bg); }
.badge.low { background: var(--warn); color: #fff; }
.badge.unique { background: var(--accent); color: #fff; }

/* Fiche produit */
.crumbs { padding-block: 1.5rem; font-size: 0.9rem; color: var(--muted); }
.product { display: grid; grid-template-columns: 1.1fr 1fr; gap: clamp(1.5rem, 5vw, 4rem); padding-bottom: 4rem; align-items: start; }
@media (max-width: 800px) { .product { grid-template-columns: 1fr; } }
.main-pic { position: relative; aspect-ratio: 1; border-radius: var(--radius); overflow: hidden; background: var(--surface); }
.main-pic img { width: 100%; height: 100%; object-fit: cover; }
.thumbs { display: flex; gap: 0.6rem; margin-top: 0.8rem; }
.thumbs button { width: 4.5rem; aspect-ratio: 1; padding: 0; border-radius: 10px; overflow: hidden; border: 2px solid transparent; cursor: pointer; background: var(--surface); }
.thumbs button.on { border-color: var(--brand); }
.thumbs img { width: 100%; height: 100%; object-fit: cover; }
.info h1 { font-size: clamp(1.8rem, 4vw, 2.5rem); }
.price.big { font-size: 1.5rem; margin-top: 0.6rem; }
.kicker { color: var(--accent); font-weight: 700; font-size: 0.85rem; letter-spacing: 0.04em; text-transform: uppercase; margin-bottom: 0.4rem; }
.details { display: flex; flex-wrap: wrap; gap: 0.4rem; margin-top: 0.9rem; }
.details span { padding: 0.25rem 0.7rem; border-radius: 999px; background: var(--surface); border: 1px solid var(--line); font-size: 0.88rem; }
.opts { border: 0; padding: 0; margin: 1.5rem 0 0; display: flex; flex-wrap: wrap; gap: 0.5rem; }
.opts legend { padding: 0; margin-bottom: 0.6rem; font-size: 0.95rem; color: var(--muted); }
.opts legend b { color: var(--text); }
.opt {
  min-width: 3rem; height: 2.8rem; padding: 0 0.9rem; border-radius: 10px; border: 1px solid var(--line);
  background: var(--surface); color: var(--text); font: 600 0.95rem/1 var(--font); cursor: pointer;
}
.opt.on, .swatch.on { border-color: var(--text); box-shadow: inset 0 0 0 1px var(--text); }
.swatch {
  display: inline-flex; align-items: center; gap: 0.5rem; height: 2.8rem; padding: 0 0.9rem 0 0.5rem;
  border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--text); font: 500 0.92rem/1 var(--font); cursor: pointer;
}
.swatch i { width: 1.6rem; height: 1.6rem; border-radius: 50%; border: 1px solid rgba(0,0,0,.15); }
/* Choix indisponible : barré mais cliquable (pour changer l'autre option) */
.opt[data-out], .swatch[data-out] { color: var(--muted); background: repeating-linear-gradient(135deg, transparent 0 6px, color-mix(in srgb, var(--line) 70%, transparent) 6px 7px), var(--surface); text-decoration: line-through; }
.desc { color: var(--muted); margin-top: 1.2rem; display: grid; gap: 0.7rem; }
.buy { display: flex; flex-wrap: wrap; gap: 0.8rem; margin-top: 2rem; }
.stepper { display: inline-flex; align-items: center; border: 1px solid var(--line); border-radius: 999px; background: var(--surface); }
.stepper button { width: 2.8rem; height: 2.8rem; border: 0; background: none; font-size: 1.2rem; cursor: pointer; color: var(--text); border-radius: 50%; }
.stepper button:disabled { opacity: 0.3; cursor: not-allowed; }
.stepper output { min-width: 1.8rem; text-align: center; font-weight: 600; }
.stepper.small { justify-self: start; margin-top: 0.2rem; }
.stepper.small button { width: 2rem; height: 2rem; font-size: 1rem; }
.hint { color: var(--warn); font-size: 0.9rem; margin-top: 0.8rem; }
.alert { padding: 0.8rem 1rem; border-radius: 10px; background: color-mix(in srgb, var(--warn) 12%, var(--surface)); color: var(--warn); font-size: 0.95rem; margin-top: 1rem; }
.empty { color: var(--muted); padding: 2rem 0; }

/* Panier */
.drawer {
  margin: 0 0 0 auto; height: 100%; max-height: 100%; width: min(26rem, 100%); padding: 0; border: 0;
  display: none; flex-direction: column; background: var(--surface); color: var(--text);
}
.drawer[open] { display: flex; animation: slide .25s ease-out; }
.drawer::backdrop { background: rgba(20, 15, 10, 0.45); }
@keyframes slide { from { transform: translateX(100%); } }
@media (prefers-reduced-motion: reduce) { .drawer[open] { animation: none; } }
.drawer-head { display: flex; align-items: center; justify-content: space-between; padding: 1rem 1.2rem; border-bottom: 1px solid var(--line); }
.drawer-head h2 { font-size: 1.3rem; }
.drawer-body { flex: 1; overflow-y: auto; padding: 0.4rem 1.2rem; }
.drawer-foot { padding: 1rem 1.2rem 1.4rem; border-top: 1px solid var(--line); display: grid; gap: 0.8rem; }
.line { display: grid; grid-template-columns: 4rem 1fr auto; gap: 0.9rem; padding: 1rem 0; border-bottom: 1px solid var(--line); align-items: center; }
.line img { width: 4rem; height: 4rem; object-fit: cover; border-radius: 10px; background: var(--bg); }
.line-info { display: grid; gap: 0.25rem; font-size: 0.95rem; }
.line-info a { text-decoration: none; font-weight: 600; }
.line-info span { color: var(--muted); font-size: 0.88rem; }
.line-info .variant { color: var(--text); font-size: 0.85rem; }
.line-end { display: grid; justify-items: end; gap: 0.4rem; }
.totals { margin: 0; display: grid; gap: 0.35rem; }
.totals div { display: flex; justify-content: space-between; }
.totals dt { color: var(--muted); }
.totals dd { margin: 0; }
.totals .grand { font-weight: 700; font-size: 1.1rem; padding-top: 0.4rem; border-top: 1px solid var(--line); }
.totals .grand dt { color: var(--text); }
.drawer-foot .hint { margin: 0; color: var(--accent); }
.secure { text-align: center; color: var(--muted); font-size: 0.82rem; }

/* Merci, pages de texte */
.thanks { text-align: center; padding-block: clamp(3rem, 10vw, 6rem); display: grid; justify-items: center; gap: 1rem; }
.thanks .check { width: 4rem; height: 4rem; border-radius: 50%; display: grid; place-items: center; background: var(--ok); color: #fff; font-size: 2rem; }
.thanks h1 { font-size: clamp(1.8rem, 5vw, 2.6rem); }
.thanks p { color: var(--muted); max-width: 32rem; }
.legal { max-width: 46rem; padding-block: 3rem 4rem; }
.legal h1 { font-size: clamp(1.8rem, 4vw, 2.4rem); margin-bottom: 1.5rem; }
.legal h2 { font-size: 1.25rem; margin: 2rem 0 0.6rem; }
.legal p, .legal li { color: var(--text); }
.legal p + p { margin-top: 0.7rem; }
.legal mark { background: #fff1b8; padding: 0 0.2em; }
.legal .box { border: 1px solid var(--line); background: var(--surface); padding: 1rem 1.2rem; border-radius: 10px; margin-top: 1rem; }

/* Pied de page */
#site-footer { border-top: 1px solid var(--line); padding-block: 2rem; font-size: 0.9rem; color: var(--muted); }
.foot { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; }
.foot nav { display: flex; flex-wrap: wrap; gap: 0.4rem 1.2rem; }

.demo-banner a { color: inherit; font-weight: 700; }
.copyright { margin-top: 1.2rem; font-size: 0.8rem; color: var(--muted); }
