:root {
  --ink: #121827;
  --muted: #657086;
  --line: #dce2eb;
  --soft: #f5f7fb;
  --blue: #1557ff;
  --pink: #f02a78;
  --violet: #7c3aed;
  --orange: #ff7a1a;
  --radius: 18px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: #fff; font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; }
button, input, select { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; text-decoration: none; }

.promo { padding: 9px 20px; background: var(--ink); color: #fff; text-align: center; font-size: .78rem; letter-spacing: .04em; }
.site-header { height: 88px; padding: 0 clamp(18px, 4vw, 64px); display: flex; align-items: center; gap: 36px; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 30; background: rgba(255,255,255,.96); backdrop-filter: blur(12px); }
.brand { display: inline-flex; align-items: center; flex: none; }
.brand-logo { display: block; width: 158px; height: 76px; object-fit: contain; }
.brand.mini { font-size: 1.35rem; }
.footer-logo { width: 150px; height: 86px; }
.main-nav { display: flex; gap: 28px; margin-left: auto; font-weight: 700; font-size: .92rem; }
.main-nav a { padding: 12px 0; border-bottom: 2px solid transparent; }
.main-nav a:hover { border-color: var(--blue); }
.cart-button { border: 0; border-radius: 999px; background: var(--ink); color: #fff; padding: 11px 17px; cursor: pointer; font-weight: 800; }
.cart-button span { display: inline-grid; place-items: center; min-width: 24px; height: 24px; margin-left: 8px; border-radius: 50%; background: var(--pink); }

.customizer { min-height: calc(100vh - 109px); display: grid; grid-template-columns: minmax(220px, .75fr) minmax(390px, 1.45fr) minmax(320px, .9fr); }
.product-rail, .controls { padding: clamp(28px, 4vw, 54px); }
.product-rail { border-right: 1px solid var(--line); position: relative; overflow: hidden; }
.product-rail::before { content: ""; position: absolute; width: 8px; height: 150px; right: -1px; top: 60px; background: linear-gradient(var(--blue) 0 25%, var(--pink) 25% 50%, var(--violet) 50% 75%, var(--orange) 75%); }
.eyebrow { margin: 0 0 10px; text-transform: uppercase; font-size: .76rem; letter-spacing: .13em; font-weight: 900; color: var(--blue); }
h1 { max-width: 430px; margin: 0; font-size: clamp(2.3rem, 4vw, 4.9rem); line-height: .95; letter-spacing: -.065em; }
.intro { margin: 24px 0 38px; color: var(--muted); line-height: 1.6; }
.product-list { display: grid; gap: 11px; }
.product-choice { width: 100%; display: flex; gap: 15px; padding: 15px 16px; border: 1px solid var(--line); border-radius: 14px; background: #fff; color: var(--ink); text-align: left; cursor: pointer; transition: border-color .18s ease, box-shadow .18s ease, transform .18s ease; }
.product-choice:hover { border-color: var(--blue); transform: translateX(2px); }
.product-choice.active { border: 2px solid var(--ink); box-shadow: 6px 6px 0 var(--blue); }
.product-index { font-weight: 950; color: var(--pink); }
.product-choice strong, .product-choice small { display: block; }
.product-choice small { margin-top: 5px; color: var(--muted); }

.preview-column { min-width: 0; padding: 22px clamp(18px, 3vw, 42px) 28px; background: var(--soft); display: flex; flex-direction: column; }
.preview-topline { display: flex; align-items: center; justify-content: space-between; min-height: 42px; color: var(--muted); font-weight: 700; font-size: .85rem; }
.text-button { border: 0; background: transparent; color: var(--blue); cursor: pointer; font-weight: 800; }
.product-stage { flex: 1; min-height: 520px; max-height: 720px; display: grid; place-items: center; position: relative; overflow: hidden; background: #fff; border: 1px solid var(--line); border-radius: 26px; box-shadow: 0 22px 60px rgba(40,54,84,.09); }
.stage-accent { position: absolute; border-radius: 999px; transform: rotate(-24deg); opacity: .94; }
.accent-blue { width: 140px; height: 18px; left: -28px; top: 17%; background: var(--blue); }
.accent-pink { width: 170px; height: 12px; right: -45px; bottom: 13%; background: var(--pink); }
.product-visual { width: min(88%, 610px); max-height: 90%; display: grid; place-items: center; user-select: none; pointer-events: none; transition: filter .25s ease; background-image: none; background-repeat: no-repeat; }
.product-visual:not(.product-tshirt) { width: min(86%, 560px); aspect-ratio: 1; background-image: url("assets/products-customizable-v1.png"); background-size: 200% 200%; }
.product-bottle { background-position: 0 0; }
.product-cap { background-position: 100% 0; }
.product-mug { background-position: 0 100%; }
.product-pouch { background-position: 100% 100%; }
.shirt-image { width: 100%; max-height: 100%; object-fit: contain; }
.print-zone { position: absolute; left: 50%; top: 46%; transform: translate(-50%, -50%); width: min(25%, 170px); aspect-ratio: .78; border: 1px dashed rgba(21,87,255,.4); display: flex; align-items: center; justify-content: center; cursor: grab; touch-action: none; }
.print-zone:active { cursor: grabbing; }
.design-image { position: absolute; inset: 8px; width: calc(100% - 16px); height: calc(100% - 16px); object-fit: contain; pointer-events: none; }
.design-text { position: relative; z-index: 2; width: 150%; padding: 5px; text-align: center; font-weight: 950; font-size: 30px; line-height: 1; overflow-wrap: anywhere; text-shadow: 0 1px 0 rgba(255,255,255,.5); }
.drag-tip { text-align: center; color: var(--muted); font-size: .82rem; margin: 14px 0 0; }

.controls { border-left: 1px solid var(--line); overflow-y: auto; }
.step { display: flex; align-items: flex-start; gap: 14px; margin-bottom: 22px; }
.step.compact { margin-bottom: 16px; }
.step-number { flex: none; display: grid; place-items: center; width: 31px; height: 31px; border-radius: 50%; background: var(--blue); color: #fff; font-weight: 900; }
.step h2 { font-size: 1.1rem; margin: 2px 0 3px; }
.step p { margin: 0; color: var(--muted); font-size: .84rem; }
.side-selector { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 16px; padding: 5px; border: 1px solid var(--line); border-radius: 14px; background: var(--soft); }
.side-option { border: 0; border-radius: 10px; padding: 11px 12px; background: transparent; color: var(--muted); font-weight: 850; cursor: pointer; }
.side-option.selected { background: var(--ink); color: #fff; box-shadow: 0 5px 14px rgba(18,24,39,.16); }
.upload-button { display: flex; align-items: center; justify-content: center; gap: 9px; padding: 14px; border: 2px dashed var(--blue); border-radius: 14px; color: var(--blue); background: #f7f9ff; font-weight: 850; cursor: pointer; }
.upload-button:hover { background: #edf2ff; }
.file-note { min-height: 20px; margin: 8px 0 20px; color: var(--muted); font-size: .75rem; }
.image-size-block { margin-bottom: 20px; padding: 14px; border: 1px solid var(--line); border-radius: 14px; background: var(--soft); }
.image-size-row { margin-top: 0 !important; }
.dimension-input { margin-top: 8px; display: grid; grid-template-columns: 1fr auto; align-items: center; overflow: hidden; border: 1px solid var(--line); border-radius: 11px; background: #fff; }
.dimension-input:focus-within { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(21,87,255,.12); }
.dimension-input input { width: 100%; min-width: 0; padding: 12px 8px 12px 13px; border: 0; outline: 0; color: var(--ink); background: transparent; font-weight: 800; }
.dimension-input span { padding: 0 12px 0 5px; color: var(--muted); font-size: .76rem; font-weight: 800; }
.size-note { margin: 10px 0 0; color: var(--blue); font-size: .74rem; line-height: 1.4; font-weight: 800; }
.field-label { display: block; margin: 0 0 8px; font-size: .8rem; color: var(--muted); font-weight: 850; }
.text-input, select { width: 100%; border: 1px solid var(--line); border-radius: 11px; padding: 12px 13px; color: var(--ink); background: #fff; outline: none; }
.text-input:focus, select:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(21,87,255,.12); }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: 18px; }
.swatches { display: flex; gap: 9px; }
.swatch { width: 27px; height: 27px; padding: 0; border: 2px solid #fff; outline: 1px solid var(--line); border-radius: 50%; background: var(--swatch); cursor: pointer; }
.swatch.selected { outline: 3px solid var(--ink); outline-offset: 2px; }
.swatches.large { flex-wrap: wrap; gap: 11px; }
.swatches.large .swatch { width: 34px; height: 34px; position: relative; }
.swatches.large .swatch.selected::after { content: "✓"; position: absolute; inset: 0; display: grid; place-items: center; color: #fff; font-size: .8rem; font-weight: 950; text-shadow: 0 1px 3px rgba(0,0,0,.7); }
.swatches.large .swatch[data-name="Blanc"].selected::after,
.swatches.large .swatch[data-name="Jaune"].selected::after { color: var(--ink); text-shadow: none; }
.range { width: 100%; accent-color: var(--blue); }
.divider { height: 1px; background: var(--line); margin: 24px 0; }
.select-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 18px; }
.select-row label { font-size: .8rem; color: var(--muted); font-weight: 850; }
.select-row select { margin-top: 8px; color: var(--ink); font-weight: 700; }
.price-line { display: flex; align-items: center; justify-content: space-between; margin: 24px 0 14px; }
.price-line span { color: var(--muted); font-weight: 700; }
.price-line strong { font-size: 1.35rem; }
.primary-button { width: 100%; border: 0; border-radius: 12px; padding: 15px 18px; background: var(--blue); color: #fff; font-weight: 900; cursor: pointer; box-shadow: 0 8px 20px rgba(21,87,255,.23); }
.primary-button:hover { background: #0848e7; transform: translateY(-1px); }
.reassurance, .cart-footer p { margin: 12px 0 0; color: var(--muted); font-size: .75rem; line-height: 1.45; text-align: center; }

.creations { padding: 90px clamp(20px, 6vw, 90px); }
.section-heading { display: flex; justify-content: space-between; align-items: end; gap: 40px; margin-bottom: 35px; }
.section-heading h2, .contact-strip h2 { margin: 0; font-size: clamp(2rem, 4vw, 3.7rem); line-height: 1; letter-spacing: -.05em; }
.section-heading > p { max-width: 330px; color: var(--muted); line-height: 1.6; }
.catalog-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; }
.catalog-card { min-height: 220px; padding: 24px; border: 1px solid var(--line); border-top: 8px solid var(--card-color); border-radius: 16px; display: flex; flex-direction: column; justify-content: flex-end; background: #fff; color: var(--ink); text-align: left; box-shadow: 0 10px 28px rgba(40,54,84,.06); cursor: pointer; transition: transform .18s ease, box-shadow .18s ease; }
.catalog-card:hover { transform: translateY(-4px); box-shadow: 0 16px 34px rgba(40,54,84,.12); }
.catalog-card.blue { --card-color: var(--blue); }
.catalog-card.pink { --card-color: var(--pink); }
.catalog-card.violet { --card-color: var(--violet); }
.catalog-card.orange { --card-color: var(--orange); }
.catalog-card span { margin-bottom: auto; color: var(--muted); text-transform: uppercase; font-size: .72rem; letter-spacing: .11em; font-weight: 850; }
.catalog-card h3 { font-size: 1.25rem; margin: 0; }
.catalog-card p { margin: 8px 0 0; font-size: 1.5rem; font-weight: 950; }
.catalog-card small { margin-top: 18px; color: var(--blue); font-weight: 900; }

.realisations { padding: 90px clamp(20px, 6vw, 90px); background: var(--soft); }
.realisations-heading { align-items: end; }
.realisations-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.realisation-card { min-width: 0; padding: 0; border: 0; border-radius: 18px; position: relative; overflow: hidden; background: #fff; box-shadow: 0 12px 32px rgba(40,54,84,.1); cursor: zoom-in; aspect-ratio: 4 / 5; }
.realisation-card img { width: 100%; height: 100%; display: block; object-fit: cover; transition: transform .28s ease; }
.realisation-card span { position: absolute; left: 12px; right: 12px; bottom: 12px; padding: 10px 12px; border-radius: 11px; background: rgba(18,24,39,.84); color: #fff; font-size: .82rem; font-weight: 850; text-align: left; backdrop-filter: blur(8px); }
.realisation-card:hover img { transform: scale(1.035); }
.realisation-card:focus-visible { outline: 3px solid var(--blue); outline-offset: 4px; }

.gallery-lightbox { position: fixed; inset: 0; z-index: 120; padding: 70px 20px 24px; display: grid; place-items: center; background: rgba(9,13,24,.92); backdrop-filter: blur(10px); }
.gallery-lightbox[hidden] { display: none; }
.gallery-lightbox figure { max-width: min(1000px, 94vw); max-height: calc(100dvh - 100px); margin: 0; display: grid; justify-items: center; gap: 13px; }
.gallery-lightbox img { display: block; max-width: 100%; max-height: calc(100dvh - 145px); border-radius: 16px; object-fit: contain; box-shadow: 0 24px 70px rgba(0,0,0,.45); }
.gallery-lightbox figcaption { color: #fff; font-weight: 800; text-align: center; }
.gallery-lightbox-close { position: fixed; top: 18px; right: 20px; width: 44px; height: 44px; border: 1px solid rgba(255,255,255,.35); border-radius: 50%; background: rgba(255,255,255,.12); color: #fff; font-size: 1.8rem; line-height: 1; cursor: pointer; }
.contact-strip { margin: 0 clamp(20px, 6vw, 90px); padding: 50px; border-radius: 24px; background: var(--ink); color: #fff; display: flex; align-items: center; justify-content: space-between; gap: 30px; }
.contact-strip .eyebrow { color: #82a4ff; }
.contact-strip a { padding: 14px 18px; border: 1px solid rgba(255,255,255,.35); border-radius: 12px; font-weight: 800; }
footer { padding: 48px clamp(20px, 6vw, 90px); display: flex; justify-content: space-between; align-items: center; color: var(--muted); font-size: .85rem; }

.drawer-backdrop { position: fixed; inset: 0; z-index: 60; background: rgba(18,24,39,.38); backdrop-filter: blur(3px); }
.cart-drawer { position: fixed; top: 0; right: 0; z-index: 70; width: min(440px, 100%); height: 100dvh; padding: 28px; background: #fff; box-shadow: -22px 0 60px rgba(18,24,39,.18); display: flex; flex-direction: column; transform: translateX(105%); transition: transform .25s ease; }
.cart-drawer.open { transform: translateX(0); }
.drawer-header { display: flex; justify-content: space-between; align-items: start; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.drawer-header h2 { margin: 0; font-size: 2rem; }
.close-button { width: 39px; height: 39px; border: 1px solid var(--line); background: #fff; border-radius: 50%; font-size: 1.6rem; cursor: pointer; }
.cart-items { display: grid; gap: 12px; padding: 20px 0; overflow-y: auto; }
.cart-item { padding: 16px; border: 1px solid var(--line); border-radius: 14px; display: grid; grid-template-columns: 1fr auto; gap: 7px; }
.cart-item h3 { margin: 0; font-size: 1rem; }
.cart-item p { grid-column: 1 / -1; margin: 0; color: var(--muted); font-size: .8rem; }
.remove-item { border: 0; background: transparent; color: #d21e42; cursor: pointer; }
.empty-cart { margin: auto; color: var(--muted); text-align: center; }
.cart-footer { margin-top: auto; padding-top: 20px; border-top: 1px solid var(--line); }
.cart-footer .price-line { margin-top: 0; }
.toast { position: fixed; left: 50%; bottom: 26px; z-index: 100; transform: translate(-50%, 30px); padding: 12px 18px; border-radius: 999px; background: var(--ink); color: #fff; font-weight: 750; opacity: 0; pointer-events: none; transition: .22s ease; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 1100px) {
  .customizer { grid-template-columns: 230px 1fr; }
  .controls { grid-column: 1 / -1; border-left: 0; border-top: 1px solid var(--line); display: grid; grid-template-columns: 1fr 1fr; gap: 0 28px; }
  .controls .divider, .controls .price-line, .controls .primary-button, .controls .reassurance { grid-column: 1 / -1; }
  .catalog-grid { grid-template-columns: repeat(2, 1fr); }
  .realisations-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
  .promo { font-size: .69rem; }
  .site-header { height: 74px; padding: 0 15px; gap: 12px; }
  .brand-logo { width: 120px; height: 64px; }
  .main-nav { display: none; }
  .cart-button { margin-left: auto; }
  .customizer { display: flex; flex-direction: column; }
  .product-rail { padding: 30px 20px; border-right: 0; }
  .product-rail h1 { font-size: 3rem; max-width: 330px; }
  .product-rail .intro { margin: 18px 0 26px; }
  .preview-column { padding: 16px; }
  .product-stage { min-height: 430px; }
  .print-zone { width: 27%; }
  .controls { padding: 30px 20px; display: block; }
  .field-row { grid-template-columns: 1.25fr .75fr; }
  .section-heading, .contact-strip, footer { align-items: flex-start; flex-direction: column; }
  .creations { padding: 62px 20px; }
  .realisations { padding: 62px 20px; }
  .section-heading { margin-bottom: 24px; }
  .catalog-grid { grid-template-columns: 1fr 1fr; }
  .realisations-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
  .catalog-card { min-height: 180px; }
  .contact-strip { margin: 0 20px; padding: 32px 24px; }
  footer { padding: 38px 20px; gap: 8px; }
}

@media (max-width: 440px) {
  .catalog-grid { grid-template-columns: 1fr; }
  .field-row { grid-template-columns: 1fr; }
  .realisation-card span { left: 8px; right: 8px; bottom: 8px; padding: 8px 9px; font-size: .76rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
