:root {
  --noir: #111;
  --gris: #6b6b6b;
  --gris-clair: #a8a8a8;
  --ligne: #e6e6e6;
  --fond: #fff;
  --fond-doux: #f7f7f5;
  --titre: 'Josefin Sans', 'Helvetica Neue', Arial, sans-serif;
  --texte: 'Montserrat', 'Helvetica Neue', Arial, sans-serif;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--fond); color: var(--noir);
  font-family: var(--texte); font-weight: 300; font-size: 15px; line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; display: block; }
button, input, textarea { font: inherit; color: inherit; }
h1, h2, h3 { font-family: var(--titre); font-weight: 300; letter-spacing: .14em; text-transform: uppercase; margin: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* En-tête */
.top {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; justify-content: space-between;
  padding: 12px 16px; background: rgba(255,255,255,.94); backdrop-filter: blur(8px); border-bottom: 1px solid var(--ligne);
}
.brand { display: flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; font-family: var(--titre); letter-spacing: .16em; text-transform: uppercase; font-size: 11px; white-space: nowrap; }
@media (min-width: 720px) { .brand { font-size: 13px; } }
.cart-btn {
  border: 1px solid var(--noir); background: none; padding: 8px 14px; cursor: pointer;
  font-family: var(--titre); letter-spacing: .16em; text-transform: uppercase; font-size: 12px; display: flex; gap: 8px; align-items: center;
}
.badge { background: var(--noir); color: #fff; min-width: 20px; height: 20px; border-radius: 10px; font-size: 11px; display: inline-grid; place-items: center; padding: 0 5px; letter-spacing: 0; }
.cart-btn.bump { animation: bump .35s ease; }
@keyframes bump { 50% { transform: scale(1.08); } }

/* Héro */
.hero { text-align: center; padding: 64px 16px 56px; max-width: 760px; margin: 0 auto; }
.hero-logo { margin: 0 auto 36px; width: 180px; height: auto; }
.hero h1 { font-size: clamp(26px, 7vw, 44px); font-weight: 200; letter-spacing: .18em; line-height: 1.25; }
.hero-sub { color: var(--gris); letter-spacing: .12em; text-transform: uppercase; font-size: 12px; margin: 16px 0 36px; }
.hero-intro { max-width: 520px; margin: -12px auto 36px; font-size: 14px; color: var(--gris); line-height: 1.7; }
.hero-prices { list-style: none; padding: 0; margin: 0 0 40px; display: grid; gap: 14px; }
.hero-prices li { display: flex; flex-direction: column; gap: 2px; }
.hero-prices strong { font-family: var(--titre); font-weight: 400; letter-spacing: .2em; text-transform: uppercase; font-size: 12px; }
.hero-prices span { color: var(--gris); font-size: 14px; }

.btn {
  display: inline-block; background: var(--noir); color: #fff; border: 1px solid var(--noir); padding: 14px 28px;
  font-family: var(--titre); letter-spacing: .2em; text-transform: uppercase; font-size: 12px; text-decoration: none; cursor: pointer;
  transition: background .2s, color .2s;
}
.btn:hover { background: #fff; color: var(--noir); }
.btn:disabled { opacity: .35; cursor: not-allowed; background: var(--noir); color: #fff; }
.btn-outline { background: none; color: var(--noir); }
.btn-outline:hover { background: var(--noir); color: #fff; }
.btn-full { width: 100%; }
.link-btn { background: none; border: 0; color: var(--gris); cursor: pointer; padding: 10px 0 0; font-size: 13px; width: 100%; }

/* Catalogue */
.catalogue { padding: 0 16px 64px; max-width: 1200px; margin: 0 auto; scroll-margin-top: 60px; }
.toolbar { background: #fff; padding: 14px 0 10px; border-bottom: 1px solid var(--ligne); margin-bottom: 28px; }
@media (min-width: 720px) { .toolbar { position: sticky; top: 57px; z-index: 10; } }
.search input {
  width: 100%; border: 0; border-bottom: 1px solid var(--noir); padding: 10px 0; font-size: 15px; outline: none; background: transparent; border-radius: 0;
}
.search input::placeholder { color: var(--gris-clair); }
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 12px 0 0; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; border: 1px solid var(--ligne); background: #fff; padding: 6px 14px; border-radius: 999px; cursor: pointer;
  font-size: 12px; letter-spacing: .08em; white-space: nowrap; transition: all .15s;
}
.chip[aria-pressed="true"] { background: var(--noir); color: #fff; border-color: var(--noir); }
.chips-label { flex: none; align-self: center; font-family: var(--titre); font-size: 10px; letter-spacing: .18em; text-transform: uppercase; color: var(--gris); padding-right: 4px; }
.card-famille { display: inline-block; align-self: flex-start; margin: 2px 0 4px; padding: 1px 8px; border: 1px solid var(--ligne); border-radius: 999px; font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: var(--gris); }
.count { margin: 10px 0 0; color: var(--gris); font-size: 12px; letter-spacing: .06em; }

.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 32px 14px; }
@media (min-width: 720px) { .grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 48px 28px; } }
@media (min-width: 1040px) { .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }

.card { display: flex; flex-direction: column; }
.card-img { position: relative; background: #fff; aspect-ratio: 1; overflow: hidden; }
.card-img img { width: 100%; height: 100%; object-fit: contain; transition: transform .5s ease; }
.card:hover .card-img img { transform: scale(1.04); }
.tag {
  position: absolute; bottom: 8px; left: 8px; z-index: 1; background: #fff; border: 1px solid var(--noir); padding: 2px 8px;
  font-size: 10px; letter-spacing: .14em; text-transform: uppercase; font-family: var(--titre);
}
.tag.out { background: var(--noir); color: #fff; }
.insp-badge {
  position: absolute; top: 8px; right: 8px; max-width: 64%; z-index: 1;
  background: rgba(255,255,255,.94); padding: 6px 9px 7px; text-align: right;
  display: flex; flex-direction: column; align-items: flex-end; line-height: 1.15;
  box-shadow: 0 1px 6px rgba(0,0,0,.08);
}
.insp-de { font-family: var(--texte); font-size: 8px; font-weight: 500; letter-spacing: .2em; text-transform: uppercase; color: var(--gris); }
.insp-marque { font-family: var(--titre); font-weight: 600; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; margin-top: 3px; overflow-wrap: anywhere; }
.insp-modele { font-family: var(--texte); font-weight: 600; font-size: 11px; margin-top: 1px; overflow-wrap: anywhere; }
@media (min-width: 720px) {
  .insp-badge { top: 12px; right: 12px; padding: 8px 12px 9px; }
  .insp-de { font-size: 9px; }
  .insp-marque { font-size: 14px; }
  .insp-modele { font-size: 13px; }
}
.card-body { padding-top: 12px; display: flex; flex-direction: column; gap: 3px; flex: 1; }
.card-meta { color: var(--gris); font-size: 10px; letter-spacing: .16em; text-transform: uppercase; }
.card-title { font-family: var(--titre); font-weight: 300; font-size: 20px; letter-spacing: .1em; text-transform: uppercase; }
.card-insp { font-size: 13px; line-height: 1.4; }
.card-insp b { font-weight: 500; letter-spacing: .06em; text-transform: uppercase; font-size: 11px; display: block; }
.card-chogan { color: var(--gris); font-size: 12px; font-style: italic; }
.card-buy { margin-top: auto; padding-top: 12px; display: flex; flex-direction: column; gap: 8px; }
.formats { display: flex; gap: 6px; }
.fmt {
  flex: 1; border: 1px solid var(--ligne); background: #fff; padding: 6px 4px; cursor: pointer; font-size: 12px; line-height: 1.3;
}
.fmt span { display: block; color: var(--gris); font-size: 11px; }
.fmt[aria-pressed="true"] { border-color: var(--noir); box-shadow: inset 0 0 0 1px var(--noir); }
.fmt[aria-pressed="true"] span { color: var(--noir); }
.add {
  border: 1px solid var(--noir); background: var(--noir); color: #fff; padding: 10px; cursor: pointer;
  font-family: var(--titre); letter-spacing: .18em; text-transform: uppercase; font-size: 11px; transition: all .2s;
}
.add:hover { background: #fff; color: var(--noir); }
.add:disabled { background: #fff; color: var(--gris-clair); border-color: var(--ligne); cursor: not-allowed; }
.empty { text-align: center; color: var(--gris); padding: 40px 0; }

/* Comment commander */
.how { background: var(--fond-doux); padding: 64px 16px; text-align: center; }
.how h2 { font-size: 20px; margin-bottom: 40px; }
.how ol { list-style: none; padding: 0; margin: 0 auto; max-width: 960px; display: grid; gap: 36px; }
@media (min-width: 720px) { .how ol { grid-template-columns: repeat(3, 1fr); } }
.how li span { font-family: var(--titre); font-weight: 200; font-size: 32px; }
.how h3 { font-size: 14px; margin: 8px 0; }
.how p { margin: 0 auto; max-width: 280px; color: var(--gris); font-size: 14px; }

/* Pied de page */
.foot { padding: 56px 16px 40px; text-align: center; border-top: 1px solid var(--ligne); }
.foot img { margin: 0 auto 16px; height: auto; }
.foot-name { font-family: var(--titre); letter-spacing: .18em; text-transform: uppercase; margin: 0 0 12px; }
.contact { list-style: none; padding: 0; margin: 0 0 24px; color: var(--gris); font-size: 14px; }
.contact a { color: inherit; }
.small { color: var(--gris-clair); font-size: 11px; max-width: 560px; margin: 0 auto; }
.todo { border-bottom: 1px dashed #c33; color: #a22; }

/* Panier (tiroir) */
.overlay { position: fixed; inset: 0; background: rgba(0,0,0,.35); z-index: 30; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(440px, 100%); background: #fff; z-index: 40;
  display: flex; flex-direction: column; transform: translateX(100%); visibility: hidden; transition: transform .3s ease, visibility 0s .3s;
}
.drawer.open { transform: none; visibility: visible; transition: transform .3s ease; box-shadow: -10px 0 40px rgba(0,0,0,.08); }
.drawer-head { display: flex; justify-content: space-between; align-items: center; padding: 18px 20px; border-bottom: 1px solid var(--ligne); }
.drawer-head h2 { font-size: 15px; }
.icon-btn { background: none; border: 0; font-size: 28px; line-height: 1; cursor: pointer; padding: 0 4px; font-weight: 200; }
.drawer-body { flex: 1; overflow-y: auto; padding: 8px 20px 20px; }
.drawer-foot { border-top: 1px solid var(--ligne); padding: 16px 20px 20px; }
.total { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 12px; }
.total span { font-family: var(--titre); letter-spacing: .18em; text-transform: uppercase; font-size: 12px; }
.total strong { font-weight: 500; font-size: 18px; }

.lines { list-style: none; margin: 0; padding: 0; }
.line { display: grid; grid-template-columns: 64px 1fr auto; gap: 12px; padding: 14px 0; border-bottom: 1px solid var(--ligne); align-items: center; }
.line img { width: 64px; height: 64px; object-fit: contain; }
.line-name { font-size: 13px; line-height: 1.35; }
.line-name small { display: block; color: var(--gris); font-size: 11px; }
.qty { display: flex; align-items: center; gap: 6px; margin-top: 6px; }
.qty button { width: 26px; height: 26px; border: 1px solid var(--ligne); background: #fff; cursor: pointer; }
.line-price { text-align: right; font-size: 13px; font-weight: 500; }
.remove { display: block; margin-top: 6px; border: 0; background: none; color: var(--gris); font-size: 11px; cursor: pointer; text-decoration: underline; padding: 0; }

/* Formulaire */
fieldset { border: 0; padding: 0; margin: 18px 0 6px; }
legend { font-family: var(--titre); letter-spacing: .18em; text-transform: uppercase; font-size: 12px; margin-bottom: 8px; padding: 0; }
#stepForm > label, fieldset > label { display: block; font-size: 12px; color: var(--gris); margin: 10px 0; }
#stepForm input:not([type=radio]), #stepForm textarea {
  display: block; width: 100%; margin-top: 4px; border: 1px solid var(--ligne); padding: 10px 12px; font-size: 15px; color: var(--noir); border-radius: 0; background: #fff;
}
#stepForm input:focus, #stepForm textarea:focus { outline: none; border-color: var(--noir); }
#stepForm .invalid { border-color: #b33 !important; }
.radios { display: grid; gap: 8px; }
.radio { display: flex; gap: 12px; align-items: flex-start; border: 1px solid var(--ligne); padding: 12px; cursor: pointer; font-size: 14px; color: var(--noir); }
.radio:has(input:checked) { border-color: var(--noir); }
.radio:has(input:disabled) { opacity: .45; cursor: not-allowed; }
.radio input { margin-top: 4px; accent-color: var(--noir); }
.radio strong { font-weight: 500; display: block; }
.radio em { font-style: normal; color: var(--gris); font-size: 12px; }
.hint { color: var(--gris); font-size: 12px; margin: 8px 0 0; }
.error { color: #a22; font-size: 13px; margin-top: 12px; }
.hp { position: absolute !important; left: -9999px; }
.done-icon { margin: 40px auto 16px; }
.done-title { text-align: center; font-size: 22px; margin-bottom: 12px; }
#stepDone p { text-align: center; color: var(--gris); }

.toast {
  position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 40px); opacity: 0; background: var(--noir); color: #fff;
  padding: 12px 20px; font-size: 13px; letter-spacing: .04em; z-index: 50; transition: all .3s; pointer-events: none; max-width: calc(100% - 32px);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

/* Pages simples (merci, paiement test) */
.page { max-width: 520px; margin: 0 auto; padding: 72px 16px; text-align: center; }
.page h1 { font-size: 24px; margin: 24px 0 16px; }
.page p { color: var(--gris); }
.page .btn { margin-top: 24px; }
.test-banner { background: #fff4d6; color: #6b5200; padding: 8px 16px; font-size: 12px; text-align: center; }
