:root {
  --ink: #13233d;
  --muted: #647087;
  --paper: #f7f4ee;
  --white: #ffffff;
  --line: #dfe4ea;
  --accent: #e96832;
  --accent-dark: #c84e20;
  --soft-blue: #e8eef5;
  --shadow: 0 16px 40px rgba(19, 35, 61, .09);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--paper);
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; background: var(--paper); }
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select { font: inherit; }
button { cursor: pointer; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 20;
  min-height: 76px;
  padding: 0 5vw;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  background: rgba(247, 244, 238, .94);
  border-bottom: 1px solid rgba(19, 35, 61, .1);
  backdrop-filter: blur(14px);
}

.brand { font-weight: 900; letter-spacing: .12em; font-size: 1.18rem; white-space: nowrap; }
.brand span { color: var(--accent); }
.site-header nav { display: flex; align-items: center; gap: clamp(14px, 3vw, 34px); font-size: .93rem; font-weight: 700; }
.site-header nav > a { padding: 10px 0; border-bottom: 2px solid transparent; }
.site-header nav > a:hover, .site-header nav > a.active { color: var(--accent-dark); border-color: var(--accent); }
.cart-count { display: inline-grid; place-items: center; min-width: 24px; height: 24px; margin-left: 5px; padding: 0 7px; border-radius: 999px; color: #fff; background: var(--ink); font-size: .76rem; }

.hero { min-height: 560px; padding: clamp(70px, 10vw, 130px) 8vw; display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(260px, .65fr); align-items: center; gap: 7vw; color: white; background: radial-gradient(circle at 82% 20%, rgba(233,104,50,.42), transparent 24%), linear-gradient(125deg, #101f37 0%, #1c3758 70%, #244b73 100%); }
.hero-copy { max-width: 760px; }
.eyebrow { margin: 0 0 14px; color: var(--accent); font-size: .78rem; font-weight: 900; letter-spacing: .17em; text-transform: uppercase; }
.hero h1 { max-width: 730px; margin: 0; font-size: clamp(2.8rem, 6.4vw, 6.5rem); line-height: .98; letter-spacing: -.055em; }
.hero-copy > p:not(.eyebrow) { max-width: 620px; margin: 28px 0 34px; color: #d9e2ee; font-size: clamp(1rem, 1.8vw, 1.24rem); line-height: 1.7; }
.hero-panel { width: min(100%, 340px); aspect-ratio: 1; margin-left: auto; display: grid; place-content: center; text-align: center; border: 1px solid rgba(255,255,255,.26); border-radius: 50%; background: rgba(255,255,255,.07); box-shadow: 0 0 0 24px rgba(255,255,255,.025); }
.hero-panel span { font-size: clamp(4rem, 8vw, 7rem); font-weight: 900; line-height: 1; }
.hero-panel p { margin: 8px 0 0; color: #d9e2ee; }

.button { min-height: 46px; padding: 0 20px; border: 1px solid transparent; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; font-weight: 800; transition: transform .18s ease, background .18s ease, border-color .18s ease; }
.button:hover { transform: translateY(-1px); }
.button.primary { color: white; background: var(--accent); }
.button.primary:hover { background: var(--accent-dark); }
.button.secondary { color: var(--ink); border-color: var(--line); background: white; }
.button.secondary:hover { border-color: var(--ink); }
.button.full { width: 100%; }
.button:disabled { cursor: not-allowed; color: #8390a2; background: #dfe4ea; border-color: #dfe4ea; transform: none; }

.catalogue, .page-shell { width: min(1440px, 90vw); margin: 0 auto; padding: 80px 0 100px; }
.page-shell { min-height: calc(100vh - 250px); }
.page-shell.narrow { width: min(900px, 90vw); }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 30px; }
.section-heading h2, .page-heading h1 { margin: 0; font-size: clamp(2.2rem, 5vw, 4.5rem); letter-spacing: -.045em; }
.page-heading { margin-bottom: 38px; }
.page-heading > p:last-child { max-width: 700px; color: var(--muted); line-height: 1.7; }
.result-count { color: var(--muted); font-weight: 700; }

.filters { margin: 36px 0; padding: 20px; display: grid; grid-template-columns: minmax(240px, 2fr) minmax(190px, 1fr) auto; align-items: end; gap: 16px; border: 1px solid var(--line); border-radius: 12px; background: rgba(255,255,255,.74); }
.filters label { display: grid; gap: 8px; color: var(--muted); font-size: .82rem; font-weight: 800; }
input, select { width: 100%; min-height: 46px; padding: 0 14px; color: var(--ink); border: 1px solid var(--line); border-radius: 8px; outline: none; background: white; }
input:focus, select:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(233,104,50,.13); }

.product-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 22px; }
.product-card { min-width: 0; overflow: hidden; display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 12px; background: white; box-shadow: 0 5px 20px rgba(19,35,61,.045); transition: transform .2s ease, box-shadow .2s ease; }
.product-card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.product-image { position: relative; aspect-ratio: 1; overflow: hidden; background: #f1f3f4; }
.product-image img { width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; transition: transform .25s ease; }
.product-card:hover .product-image img { transform: scale(1.025); }
.type-badge { position: absolute; top: 12px; left: 12px; padding: 6px 9px; border-radius: 5px; color: var(--ink); background: rgba(255,255,255,.91); box-shadow: 0 2px 8px rgba(19,35,61,.08); font-size: .69rem; font-weight: 900; text-transform: uppercase; }
.product-info { flex: 1; padding: 18px; display: flex; flex-direction: column; }
.product-ean { margin: 0 0 9px; color: var(--muted); font-size: .71rem; letter-spacing: .06em; }
.product-title { margin: 0; font-size: .98rem; line-height: 1.45; }
.product-title a:hover { color: var(--accent-dark); }
.compatibility { margin: 11px 0; color: var(--muted); font-size: .8rem; }
.product-actions { margin-top: auto; padding-top: 18px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.price { font-size: 1.24rem; font-weight: 900; white-space: nowrap; }
.icon-button { width: 42px; height: 42px; border: 0; border-radius: 50%; display: grid; place-items: center; color: white; background: var(--ink); font-size: 1.25rem; font-weight: 500; }
.icon-button:hover { background: var(--accent); }
.empty-state, .loading { padding: 70px 20px; text-align: center; color: var(--muted); border: 1px dashed #bac3cf; border-radius: 12px; background: rgba(255,255,255,.5); }
.empty-state h3 { margin-top: 0; color: var(--ink); }

.back-link { color: var(--muted); font-weight: 800; }
.back-link:hover { color: var(--accent-dark); }
.product-detail { margin-top: 38px; }
.detail-grid { display: grid; grid-template-columns: minmax(300px, 1fr) minmax(330px, 1fr); gap: clamp(36px, 7vw, 90px); align-items: center; }
.detail-image { aspect-ratio: 1; padding: 30px; display: grid; place-items: center; border: 1px solid var(--line); border-radius: 16px; background: white; }
.detail-image img { width: 100%; height: 100%; object-fit: contain; mix-blend-mode: multiply; }
.detail-copy h1 { margin: 10px 0 20px; font-size: clamp(2rem, 4vw, 3.7rem); line-height: 1.08; letter-spacing: -.045em; }
.detail-copy .price { margin: 22px 0; font-size: 2rem; }
.detail-meta { padding: 18px 0; display: grid; gap: 10px; color: var(--muted); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.buy-row { margin-top: 24px; display: flex; align-items: end; gap: 14px; }
.quantity-field { max-width: 110px; display: grid; gap: 7px; color: var(--muted); font-size: .8rem; font-weight: 800; }
.quantity-field input { text-align: center; }
.detail-note { color: var(--muted); font-size: .82rem; line-height: 1.5; }

.cart-layout { display: grid; grid-template-columns: minmax(0, 1.8fr) minmax(280px, .8fr); gap: 28px; align-items: start; }
.cart-items { display: grid; gap: 14px; }
.cart-item { padding: 14px; display: grid; grid-template-columns: 100px minmax(0, 1fr) auto; align-items: center; gap: 18px; border: 1px solid var(--line); border-radius: 12px; background: white; }
.cart-item img { width: 100px; height: 100px; object-fit: contain; border-radius: 8px; background: #f2f3f4; mix-blend-mode: multiply; }
.cart-item h2 { margin: 0 0 8px; font-size: .98rem; line-height: 1.4; }
.cart-item-meta { color: var(--muted); font-size: .78rem; }
.cart-item-controls { min-width: 150px; display: grid; justify-items: end; gap: 10px; }
.qty-controls { display: flex; align-items: center; border: 1px solid var(--line); border-radius: 7px; overflow: hidden; }
.qty-controls button { width: 34px; height: 34px; border: 0; color: var(--ink); background: #f3f5f7; font-size: 1rem; }
.qty-controls span { min-width: 34px; text-align: center; font-weight: 800; }
.remove-button, .clear-button { padding: 0; border: 0; color: var(--muted); background: transparent; font-size: .79rem; text-decoration: underline; }
.remove-button:hover, .clear-button:hover { color: #b52b2b; }
.cart-summary { position: sticky; top: 100px; padding: 26px; border-radius: 12px; color: white; background: var(--ink); box-shadow: var(--shadow); }
.cart-summary h2 { margin-top: 0; }
.summary-line { padding: 14px 0; display: flex; justify-content: space-between; gap: 20px; border-top: 1px solid rgba(255,255,255,.16); }
.summary-line.total { font-size: 1.25rem; font-weight: 900; }
.cart-summary .button { margin-top: 14px; }
.cart-summary-note { color: #cbd5e2; font-size: .76rem; line-height: 1.5; }
.cart-footer-action { margin-top: 18px; display: flex; justify-content: space-between; align-items: center; gap: 20px; }

.checkout-overlay { position: fixed; inset: 0; z-index: 100; padding: 28px; overflow-y: auto; display: grid; place-items: center; background: rgba(8,18,32,.76); backdrop-filter: blur(7px); }
.checkout-panel { width: min(1050px, 100%); max-height: calc(100vh - 56px); overflow-y: auto; border-radius: 16px; background: var(--paper); box-shadow: 0 28px 90px rgba(0,0,0,.32); }
.checkout-header { padding: 25px 30px; display: flex; align-items: start; justify-content: space-between; gap: 24px; color: white; background: var(--ink); }
.checkout-header h2 { margin: 0; font-size: clamp(1.6rem, 4vw, 2.6rem); letter-spacing: -.035em; }
.checkout-header .eyebrow { margin-bottom: 7px; }
.checkout-close { width: 42px; height: 42px; flex: 0 0 auto; border: 1px solid rgba(255,255,255,.3); border-radius: 50%; color: white; background: transparent; font-size: 1.7rem; line-height: 1; }
.checkout-close:hover { background: rgba(255,255,255,.12); }
.demo-banner { margin: 24px 30px 0; padding: 14px 16px; color: #704516; border-left: 4px solid var(--accent); background: #fff2e6; line-height: 1.55; }
.checkout-grid { padding: 30px; display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(280px, .75fr); gap: 30px; align-items: start; }
.checkout-form { display: grid; gap: 17px; }
.checkout-form h3, .checkout-order h3 { margin: 0 0 4px; font-size: 1.2rem; }
.checkout-form label { display: grid; gap: 7px; color: var(--muted); font-size: .8rem; font-weight: 800; }
.checkout-form-row { display: grid; grid-template-columns: .7fr 1.3fr; gap: 14px; }
.checkout-legal { margin: 0; color: var(--muted); font-size: .75rem; line-height: 1.55; }
.checkout-order { padding: 24px; border-radius: 12px; color: white; background: var(--ink); }
.checkout-order ul { margin: 18px 0; padding: 0; display: grid; gap: 14px; list-style: none; }
.checkout-order li { padding-bottom: 12px; display: flex; justify-content: space-between; gap: 16px; border-bottom: 1px solid rgba(255,255,255,.14); font-size: .78rem; line-height: 1.45; }
.checkout-order li span { color: #d6deea; }
.checkout-order li strong { white-space: nowrap; }
.checkout-total { padding-top: 16px; display: flex; justify-content: space-between; gap: 20px; font-size: 1.14rem; font-weight: 900; }
.checkout-order > p { color: #cbd5e2; font-size: .75rem; }
.checkout-confirmation { max-width: 680px; margin: 0 auto; padding: clamp(50px, 8vw, 100px) 32px; text-align: center; }
.confirmation-mark { width: 70px; height: 70px; margin: 0 auto 24px; display: grid; place-items: center; border-radius: 50%; color: white; background: #237a51; font-size: 2rem; font-weight: 900; }
.checkout-confirmation h2 { margin: 0; font-size: clamp(2rem, 5vw, 4rem); letter-spacing: -.045em; }
.checkout-confirmation > p:not(.eyebrow) { color: var(--muted); line-height: 1.7; }
.checkout-confirmation dl { max-width: 480px; margin: 28px auto; border-top: 1px solid var(--line); }
.checkout-confirmation dl div { padding: 14px 0; display: flex; justify-content: space-between; gap: 20px; border-bottom: 1px solid var(--line); }
.checkout-confirmation dt { color: var(--muted); }
.checkout-confirmation dd { margin: 0; font-weight: 900; }

.info-card { padding: clamp(24px, 5vw, 54px); border: 1px solid var(--line); border-radius: 14px; background: white; box-shadow: 0 8px 28px rgba(19,35,61,.05); }
.info-card h2 { margin-top: 32px; }
.info-card h2:first-child { margin-top: 0; }
.prose { line-height: 1.75; }
.prose p { color: #435068; }
.notice { padding: 15px 17px; color: #7a4b1a !important; border-left: 4px solid var(--accent); background: #fff3e9; }

.site-footer { padding: 56px 5vw; display: grid; grid-template-columns: 1fr auto; gap: 26px 60px; color: #cbd5e2; background: #0d192b; }
.footer-brand { color: white; }
.site-footer p { max-width: 560px; line-height: 1.6; }
.footer-links { display: flex; flex-wrap: wrap; gap: 18px 26px; font-weight: 700; }
.footer-links a:hover { color: white; }
.fine-print { grid-column: 1 / -1; margin: 18px 0 0; padding-top: 22px; border-top: 1px solid rgba(255,255,255,.12); font-size: .76rem; }
.site-footer.compact { padding-top: 36px; padding-bottom: 36px; align-items: center; }

@media (max-width: 1050px) {
  .product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .hero { grid-template-columns: 1fr .45fr; }
  .hero-panel { aspect-ratio: auto; height: 250px; border-radius: 50%; }
}

@media (max-width: 780px) {
  .site-header { min-height: 68px; padding: 0 4vw; }
  .site-header nav { gap: 15px; font-size: .82rem; }
  .site-header nav > a:not(.cart-link):not(.active) { display: none; }
  .hero { min-height: auto; padding: 74px 7vw; grid-template-columns: 1fr; }
  .hero-panel { display: none; }
  .filters { grid-template-columns: 1fr; }
  .filters .button { width: 100%; }
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
  .detail-grid, .cart-layout { grid-template-columns: 1fr; }
  .cart-summary { position: static; }
  .checkout-grid { grid-template-columns: 1fr; }
  .site-footer { grid-template-columns: 1fr; }
  .fine-print { grid-column: auto; }
}

@media (max-width: 520px) {
  .catalogue, .page-shell { width: min(94vw, 1440px); padding-top: 52px; }
  .brand { font-size: 1rem; }
  .site-header nav { gap: 11px; }
  .cart-link { font-size: 0; }
  .cart-link::before { content: "Panier"; font-size: .82rem; }
  .cart-count { font-size: .72rem; }
  .hero h1 { font-size: 2.75rem; }
  .section-heading { align-items: start; flex-direction: column; gap: 8px; }
  .product-grid { grid-template-columns: 1fr; }
  .product-card { display: grid; grid-template-columns: 42% 58%; }
  .product-info { padding: 14px; }
  .product-title { font-size: .9rem; }
  .compatibility { margin: 7px 0; }
  .product-actions { padding-top: 9px; }
  .cart-item { grid-template-columns: 78px 1fr; align-items: start; }
  .cart-item img { width: 78px; height: 78px; }
  .cart-item-controls { grid-column: 1 / -1; width: 100%; grid-template-columns: 1fr auto auto; align-items: center; justify-items: start; }
  .buy-row { align-items: stretch; flex-direction: column; }
  .quantity-field { max-width: none; }
  .checkout-overlay { padding: 0; place-items: stretch; }
  .checkout-panel { min-height: 100vh; max-height: none; border-radius: 0; }
  .checkout-header, .checkout-grid { padding: 22px 18px; }
  .demo-banner { margin: 18px 18px 0; }
  .checkout-form-row { grid-template-columns: 1fr; }
  .site-footer { padding: 42px 5vw; }
}
