/* ============================================================================
   Abracada brick — identité « notice de montage »
   Fond papier, traits noirs, cotes, étapes numérotées, jaune brique en accent.
   ========================================================================== */
:root {
  --paper: #f7f5ef;
  --paper-dim: #edeae0;
  --ink: #111110;
  --ink-soft: #4d4b44;
  --graphite: #8a867b;
  --hairline: #cfcbbd;
  --yellow: #ffd500;
  --red: #d3202a;
  --on-yellow: #111110;
  --font-display: 'Space Grotesk', sans-serif;
  --font-body: 'IBM Plex Sans', sans-serif;
  --font-mono: 'IBM Plex Mono', monospace;
  --radius: 0.35rem;
  --line: 2px solid var(--ink);
}
html.dark {
  --paper: #121211;
  --paper-dim: #1b1b19;
  --ink: #f2efe6;
  --ink-soft: #bab6a9;
  --graphite: #7d796d;
  --hairline: #34332e;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--paper); color: var(--ink); font-family: var(--font-body); line-height: 1.6; -webkit-font-smoothing: antialiased; transition: background-color .3s ease, color .3s ease; }
a { color: inherit; }
img { max-width: 100%; display: block; }
h1, h2, h3 { font-family: var(--font-display); line-height: 1.1; margin: 0; }
p { margin: 0 0 1rem; }
.mono { font-family: var(--font-mono); }
.muted { color: var(--ink-soft); }
.small { font-size: 0.8rem; }
.wrap { max-width: 72rem; margin: 0 auto; padding: 0 1.5rem; }
.page-narrow { max-width: 46rem; }
.skip-link { position: absolute; left: -999px; top: 0; background: var(--yellow); color: var(--on-yellow); padding: 0.5rem 1rem; z-index: 100; }
.skip-link:focus { left: 0.5rem; top: 0.5rem; }
:focus-visible { outline: 3px solid var(--yellow); outline-offset: 2px; }

/* Plaque de tenons en fond (rappel des briques) */
.studs-bg { position: relative; isolation: isolate; }
.studs-bg::before { content: ""; position: absolute; inset: 0; z-index: -1; background-image: radial-gradient(circle, var(--hairline) 0 7px, transparent 8px); background-size: 44px 44px; background-position: 14px 14px; -webkit-mask-image: linear-gradient(to left, #000 0%, rgba(0,0,0,.55) 35%, transparent 62%); mask-image: linear-gradient(to left, #000 0%, rgba(0,0,0,.55) 35%, transparent 62%); }
@media (max-width: 899px) { .studs-bg::before { -webkit-mask-image: linear-gradient(to bottom, transparent 0%, transparent 55%, #000 100%); mask-image: linear-gradient(to bottom, transparent 0%, transparent 55%, #000 100%); } }

/* ---- Boutons ---- */
.btn { display: inline-flex; align-items: center; gap: 0.5rem; border-radius: var(--radius); font-family: var(--font-display); font-size: 0.95rem; font-weight: 600; cursor: pointer; border: var(--line); padding: 0.7rem 1.3rem; text-decoration: none; line-height: 1.2; transition: transform .15s ease, background-color .2s ease, color .2s ease; }
.btn:hover { transform: translate(-2px, -2px); box-shadow: 3px 3px 0 var(--ink); }
.btn-primary { background: var(--yellow); color: var(--on-yellow); border-color: #111110; }
html.dark .btn-primary { border-color: var(--yellow); }
html.dark .btn-primary:hover { box-shadow: 3px 3px 0 var(--yellow); }
.btn-ghost { background: none; color: var(--ink); }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; min-width: 2.25rem; height: 2.25rem; padding: 0 0.4rem; border-radius: var(--radius); border: 1px solid var(--ink); background: none; color: var(--ink); cursor: pointer; text-decoration: none; font-family: var(--font-mono); font-size: 0.72rem; font-weight: 600; }
.icon-btn:hover { background: var(--yellow); color: var(--on-yellow); border-color: #111110; }
.icon-moon { display: none; }
html.dark .icon-sun { display: none; }
html.dark .icon-moon { display: block; }
.menu-btn { display: none; }

/* ---- En-tête ---- */
.site-header { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--paper) 92%, transparent); backdrop-filter: blur(8px); border-bottom: var(--line); }
.header-inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding-top: 0.7rem; padding-bottom: 0.7rem; }
.brand { display: inline-flex; flex-shrink: 0; }
.logo { height: 2.3rem; width: auto; }
.logo-dark { display: none; }
html.dark .logo-light { display: none; }
html.dark .logo-dark { display: block; }
.main-nav { display: flex; gap: 1.75rem; margin-left: auto; }
.main-nav a { font-family: var(--font-mono); font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.04em; text-decoration: none; color: var(--ink-soft); padding: 0.3rem 0; border-bottom: 2px solid transparent; }
.main-nav a:hover { color: var(--ink); border-bottom-color: var(--yellow); }
.main-nav a[aria-current] { color: var(--ink); border-bottom-color: var(--ink); }
.nav-num { color: var(--graphite); margin-right: 0.4rem; }
.header-actions { display: flex; gap: 0.5rem; align-items: center; }
@media (max-width: 820px) {
  .menu-btn { display: inline-flex; }
  .logo { height: 2rem; }
  .main-nav { display: none; position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; gap: 0; background: var(--paper); border-bottom: var(--line); padding: 0.5rem 1.5rem 1rem; margin: 0; }
  .site-header.menu-open .main-nav { display: flex; }
  .main-nav a { padding: 0.8rem 0; border-bottom: 1px solid var(--hairline); font-size: 0.9rem; }
}

/* ---- Pastille d'étape et étiquettes de figure ---- */
.step-box { display: inline-flex; align-items: center; justify-content: center; min-width: 1.6rem; height: 1.6rem; padding: 0 0.3rem; background: var(--yellow); color: var(--on-yellow); border: 2px solid #111110; font-family: var(--font-display); font-weight: 700; font-size: 0.85rem; margin-right: 0.5rem; border-radius: 3px; }
.eyebrow { display: flex; align-items: center; font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-soft); margin: 0 0 1.25rem; }
.fig-label { position: absolute; top: 0; left: 0; z-index: 2; background: var(--ink); color: var(--paper); font-size: 0.65rem; padding: 0.2rem 0.55rem; letter-spacing: 0.06em; text-transform: uppercase; }

/* ---- Accueil ---- */
.hero { border-bottom: var(--line); padding: 4.5rem 0 5rem; }
.hero-grid { display: grid; gap: 3rem; align-items: center; }
@media (min-width: 900px) { .hero-grid { grid-template-columns: 1.05fr 1fr; gap: 4rem; } }
.hero-title { font-size: clamp(2.4rem, 6vw, 4.4rem); font-weight: 700; letter-spacing: -0.02em; margin-bottom: 1.5rem; max-width: 14ch; }
.hero-text { font-size: 1.1rem; max-width: 34rem; color: var(--ink-soft); }
.hero-cta { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.75rem; }
.figure { position: relative; display: block; border: var(--line); background: var(--paper); text-decoration: none; padding: 2.2rem 0.9rem 0.9rem; box-shadow: 8px 8px 0 var(--yellow); }
.figure img { width: 100%; aspect-ratio: 4/3; object-fit: cover; background: var(--paper-dim); transition: transform .5s ease; }
.figure { overflow: hidden; }
@media (hover: hover) { a.figure:hover img { transform: scale(1.03); } }
.figure-draw { color: var(--ink); padding-bottom: 1.5rem; }
.brick-draw { width: 100%; height: auto; }
.dim-draw { stroke-dasharray: none; opacity: .8; }
.hero .figure { max-width: 34rem; margin-left: auto; margin-right: auto; }

.sec-title { font-size: clamp(1.6rem, 3vw, 2.3rem); font-weight: 700; display: flex; align-items: center; gap: 0.9rem; margin-bottom: 2.5rem; }
.sec-num { display: inline-flex; align-items: center; justify-content: center; width: 2.1rem; height: 2.1rem; border: var(--line); font-size: 0.85rem; font-weight: 500; flex-shrink: 0; }

.steps { padding: 5rem 0; border-bottom: var(--line); }
.steps-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 2rem; }
@media (min-width: 760px) { .steps-list { grid-template-columns: repeat(3, 1fr); } }
.step { position: relative; border: var(--line); padding: 1.5rem 1.5rem 1.6rem; background: var(--paper); }
.step-big { display: block; font-family: var(--font-display); font-weight: 700; font-size: 4.5rem; line-height: .9; margin-bottom: 1rem; -webkit-text-stroke: 2px var(--ink); color: transparent; }
.step h3 { font-size: 1.25rem; margin-bottom: 0.5rem; }
.step p { margin: 0; }
@media (min-width: 760px) { .step:not(:last-child)::after { content: "→"; position: absolute; right: -1.6rem; top: 50%; transform: translateY(-50%); font-family: var(--font-mono); font-size: 1.2rem; background: var(--paper); z-index: 2; width: 1.2rem; text-align: center; } }

.featured { padding: 5rem 0; border-bottom: var(--line); }
.section-link { margin: 2.5rem 0 0; }
.cta-band { background: var(--yellow); color: var(--on-yellow); border-bottom: var(--line); padding: 3rem 0; }
.cta-inner { display: flex; flex-wrap: wrap; gap: 1.5rem; align-items: center; justify-content: space-between; }
.cta-text { font-family: var(--font-display); font-size: clamp(1.4rem, 3vw, 2rem); font-weight: 700; margin: 0; }
.cta-band .btn-primary { background: #111110; color: #fff; border-color: #111110; }
html.dark .cta-band .btn-primary:hover { box-shadow: 3px 3px 0 #111110; }

/* ---- Pages intérieures ---- */
.page-head { border-bottom: var(--line); padding: 4rem 0 3.5rem; }
.page-title { font-size: clamp(2.2rem, 5vw, 3.6rem); font-weight: 700; letter-spacing: -0.02em; }
.lead { font-size: 1.1rem; color: var(--ink-soft); max-width: 40rem; margin: 1.25rem 0 0; }
.page-body { padding: 3.5rem 0 5rem; }
.prose p { font-size: 1.05rem; line-height: 1.8; color: var(--ink-soft); }
.terms-note { max-width: 42rem; margin-top: 2.5rem; line-height: 1.6; }
.terms-note a { text-decoration: underline; text-underline-offset: 2px; }
.notfound { padding: 4rem 1.5rem; }

/* ---- Grille et cartes de kits ---- */
.kit-grid { display: grid; gap: 2rem; grid-template-columns: repeat(auto-fill, minmax(17rem, 1fr)); }
.kit-card { display: flex; flex-direction: column; border: var(--line); background: var(--paper); text-decoration: none; color: inherit; transition: transform .2s ease, box-shadow .2s ease; }
a.kit-card:hover { transform: translate(-3px, -3px); box-shadow: 6px 6px 0 var(--yellow); }
.kit-fig { position: relative; aspect-ratio: 4/3; border-bottom: var(--line); background: var(--paper-dim); overflow: hidden; }
.kit-fig img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform .5s ease; }
@media (hover: hover) { a.kit-card:hover .kit-fig img { transform: scale(1.05); } }
.kit-fig-empty { position: absolute; inset: 0; background-image: radial-gradient(circle, var(--hairline) 0 7px, transparent 8px); background-size: 44px 44px; }
.badge { position: absolute; z-index: 2; font-family: var(--font-mono); font-size: 0.65rem; text-transform: uppercase; letter-spacing: 0.04em; padding: 0.25rem 0.6rem; border: 2px solid #111110; border-radius: 3px; }
.badge-limited { right: 0.6rem; bottom: 0.6rem; background: var(--yellow); color: var(--on-yellow); }
.badge-sold { right: 0.6rem; top: 0.6rem; background: var(--red); color: #fff; }
.kit-body { padding: 1.25rem; display: flex; flex-direction: column; gap: 0.6rem; flex: 1; }
.kit-title { font-size: 1.25rem; }
.kit-desc { font-size: 0.9rem; color: var(--ink-soft); margin: 0; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.kit-foot { margin-top: auto; padding-top: 0.75rem; display: flex; flex-wrap: wrap; align-items: baseline; justify-content: space-between; gap: 0.5rem 0.75rem; border-top: 1px dashed var(--graphite); }
.kit-price { font-family: var(--font-display); font-weight: 700; font-size: 1.35rem; }
.kit-status { font-size: 0.7rem; text-transform: uppercase; color: var(--graphite); }
.kit-more { font-size: 0.72rem; text-transform: uppercase; margin-left: auto; color: var(--ink-soft); }
a.kit-card:hover .kit-more { color: var(--ink); text-decoration: underline; text-decoration-color: var(--yellow); text-decoration-thickness: 3px; }

/* ---- Fiche d'un kit ---- */
.shop-product { padding-top: 2rem; padding-bottom: 5rem; }
.shop-back { display: inline-block; color: var(--ink-soft); text-decoration: none; margin-bottom: 1.5rem; }
.shop-back:hover { color: var(--ink); text-decoration: underline; }
.shop-product-grid { display: grid; gap: 2rem; grid-template-columns: 1fr; align-items: start; }
@media (min-width: 900px) {
  .shop-product-grid { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 3rem; }
  .shop-product-info { position: sticky; top: 5.5rem; }
}
.shop-gallery-stage { position: relative; display: flex; align-items: center; justify-content: center; border: var(--line); overflow: hidden; background: var(--paper-dim); aspect-ratio: 4/3; margin-bottom: 1rem; box-shadow: 8px 8px 0 var(--yellow); }
.shop-gallery-empty { background-image: radial-gradient(circle, var(--hairline) 0 7px, transparent 8px); background-size: 44px 44px; }
.shop-gallery-open { display: block; width: 100%; height: 100%; padding: 0; border: 0; background: none; cursor: zoom-in; }
.shop-gallery-main { width: 100%; height: 100%; object-fit: contain; display: block; transition: transform .4s ease, opacity .2s; }
@media (hover: hover) { .shop-gallery-stage:hover .shop-gallery-main { transform: scale(1.035); } }
.shop-gallery-stage.is-loading .shop-gallery-main { opacity: .35; }
.shop-gallery-stage.is-loading::after { content: ""; position: absolute; top: 50%; left: 50%; width: 2rem; height: 2rem; margin: -1rem 0 0 -1rem; border: 3px solid var(--hairline); border-top-color: var(--ink); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.dialog-gallery-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 2.5rem; height: 2.5rem; border: var(--line); background: var(--paper); color: var(--ink); font-size: 1.4rem; line-height: 1; cursor: pointer; z-index: 3; border-radius: var(--radius); }
.dialog-gallery-nav:hover { background: var(--yellow); color: var(--on-yellow); }
.dialog-gallery-prev { left: 0.6rem; }
.dialog-gallery-next { right: 0.6rem; }
.dialog-thumbs { display: flex; flex-wrap: wrap; gap: 0.6rem; margin-top: 1.75rem; }
.dialog-thumb { width: 4.5rem; height: 4.5rem; padding: 0; border: 2px solid var(--hairline); background: var(--paper-dim); cursor: pointer; overflow: hidden; border-radius: 3px; }
.dialog-thumb img { width: 100%; height: 100%; object-fit: cover; }
.dialog-thumb:hover { border-color: var(--ink); }
.dialog-thumb.active { border-color: var(--ink); box-shadow: 3px 3px 0 var(--yellow); }

.shop-product-title { font-size: clamp(1.9rem, 3.6vw, 2.8rem); font-weight: 700; letter-spacing: -0.01em; }
.shop-product-lead { font-size: 1.05rem; color: var(--ink-soft); margin: 1rem 0 0; }
.shop-buybox { border: var(--line); padding: 1.25rem 1.5rem; margin-top: 1.75rem; background: var(--paper); }
.shop-product-price { font-family: var(--font-display); font-weight: 700; font-size: 2.2rem; margin: 0 0 1rem; }
.shop-card-status { font-family: var(--font-mono); font-size: 0.78rem; text-transform: uppercase; color: var(--graphite); margin: 0; }
.shop-buy-btn { width: 100%; justify-content: center; padding: 0.9rem 1.25rem; font-size: 1.05rem; }
.shop-terms { margin: 1rem 0 0; line-height: 1.55; }
.shop-terms a { text-decoration: underline; text-underline-offset: 2px; }
.shop-admin-hint { border: 1px dashed var(--red); padding: 0.5rem 0.75rem; margin: 0.75rem 0 0; color: var(--red); line-height: 1.5; }
.shop-specs { display: grid; grid-template-columns: repeat(auto-fit, minmax(8rem, 1fr)); gap: 1rem; margin: 1.5rem 0 0; }
.shop-specs > div { border: 1px solid var(--ink); padding: 0.6rem 0.8rem; position: relative; }
.shop-specs dt { font-family: var(--font-mono); font-size: 0.68rem; text-transform: uppercase; color: var(--graphite); }
.shop-specs dd { margin: 0.2rem 0 0; font-family: var(--font-display); font-weight: 600; font-size: 1.05rem; }
.shop-share-btn { margin-top: 1.5rem; }
.shop-product-detail { display: grid; gap: 2.5rem; grid-template-columns: 1fr; border-top: var(--line); margin-top: 3.5rem; padding-top: 2.5rem; }
@media (min-width: 800px) { .shop-product-detail { grid-template-columns: 1.6fr 1fr; gap: 3.5rem; } }
.shop-h2 { font-family: var(--font-mono); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.06em; font-weight: 500; margin: 0 0 1rem; display: flex; align-items: center; gap: 0.6rem; }
.shop-h2::before { content: ""; width: 0.9rem; height: 0.9rem; background: var(--yellow); border: 2px solid #111110; border-radius: 2px; }
.shop-longdesc { font-size: 1rem; line-height: 1.8; color: var(--ink-soft); white-space: pre-line; margin: 0; max-width: 42rem; }
.shop-included { margin: 0; padding: 0; list-style: none; counter-reset: part; }
.shop-included li { counter-increment: part; padding: 0.55rem 0 0.55rem 2.2rem; border-bottom: 1px dashed var(--graphite); position: relative; font-size: 0.95rem; }
.shop-included li::before { content: counter(part); position: absolute; left: 0; top: 0.6rem; width: 1.4rem; height: 1.4rem; display: flex; align-items: center; justify-content: center; border: 2px solid var(--ink); font-family: var(--font-mono); font-size: 0.7rem; border-radius: 3px; }
.shop-others { border-top: var(--line); margin-top: 4rem; padding-top: 2.5rem; }
.shop-lightbox { position: fixed; inset: 0; z-index: 70; background: color-mix(in srgb, var(--paper) 96%, transparent); display: flex; align-items: center; justify-content: center; padding: 3.5rem 1rem 1.5rem; }
.shop-lightbox[hidden] { display: none; }
.shop-lightbox-img { max-width: 100%; max-height: 100%; object-fit: contain; }
.shop-lightbox .dialog-gallery-nav { position: fixed; }
.dialog-close { position: fixed; top: 1rem; right: 1.25rem; width: 2.5rem; height: 2.5rem; border: var(--line); background: var(--paper); color: var(--ink); cursor: pointer; z-index: 72; border-radius: var(--radius); }
.dialog-close:hover { background: var(--yellow); color: var(--on-yellow); }

/* ---- FAQ ---- */
.faq-item { border: var(--line); margin-bottom: 1rem; background: var(--paper); }
.faq-item summary { cursor: pointer; padding: 1rem 1.25rem; font-family: var(--font-display); font-weight: 600; font-size: 1.05rem; list-style: none; display: flex; gap: 0.9rem; align-items: baseline; }
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after { content: "+"; margin-left: auto; font-family: var(--font-mono); font-size: 1.3rem; }
.faq-item[open] summary::after { content: "−"; }
.faq-item[open] summary { background: var(--yellow); color: var(--on-yellow); }
.faq-num { color: var(--graphite); font-size: 0.8rem; }
.faq-item[open] .faq-num { color: var(--on-yellow); }
.faq-item p { padding: 1rem 1.25rem 0.25rem; margin: 0; color: var(--ink-soft); }
.faq-item p:last-child { padding-bottom: 1.25rem; }

/* ---- Contact ---- */
.contact-form { display: flex; flex-direction: column; gap: 0.4rem; margin-bottom: 1.5rem; }
.contact-form label { font-family: var(--font-mono); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; margin-top: 0.8rem; }
.contact-form input, .contact-form textarea { font: inherit; padding: 0.75rem 0.9rem; border: var(--line); border-radius: var(--radius); background: var(--paper); color: var(--ink); }
.contact-form input:focus, .contact-form textarea:focus { outline: 3px solid var(--yellow); outline-offset: 0; }
.contact-form button { align-self: flex-start; margin-top: 1.2rem; }
.hp { position: absolute; left: -5000px; }
.form-status { margin: 0.8rem 0 0; font-weight: 600; }
.form-status.ok { color: #1c7a3a; }
.form-status.err { color: var(--red); }

/* ---- CGV ---- */
.legal h2 { font-size: 1.25rem; margin: 2.2rem 0 0.8rem; }
.legal p { color: var(--ink-soft); line-height: 1.75; }
.legal-form { border: 1px dashed var(--ink); padding: 1rem 1.25rem; }
.legal-form p { margin: 0 0 0.5rem; }

/* ---- Pied de page ---- */
.site-footer { border-top: var(--line); background: var(--paper-dim); padding: 2.5rem 0 2rem; }
.footer-grid { display: grid; gap: 1.75rem; }
@media (min-width: 800px) { .footer-grid { grid-template-columns: 1fr 1fr auto; align-items: start; } }
.footer-logo { height: 2.4rem; }
.footer-links { display: flex; flex-wrap: wrap; gap: 0.5rem 1.5rem; }
.footer-links a { font-family: var(--font-mono); font-size: 0.78rem; text-transform: uppercase; text-decoration: none; color: var(--ink-soft); }
.footer-links a:hover { color: var(--ink); text-decoration: underline; text-decoration-color: var(--yellow); text-decoration-thickness: 3px; }
.footer-seller { margin: 0; line-height: 1.6; text-align: left; }
@media (min-width: 800px) { .footer-seller { text-align: right; } }
.footer-seller a { text-decoration: underline; }
.disclaimer { margin: 1.75rem 0 0; padding-top: 1.25rem; border-top: 1px dashed var(--graphite); }

/* ---- Apparition au scroll ---- */
[data-reveal] { opacity: 0; transform: translateY(16px); transition: opacity .6s ease, transform .6s ease; }
[data-reveal].is-visible { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; } [data-reveal] { opacity: 1; transform: none; } html { scroll-behavior: auto; } }

@media (max-width: 640px) {
  .hero { padding: 2.5rem 0 3rem; }
  .steps, .featured { padding: 3rem 0; }
  .page-head { padding: 2.5rem 0 2rem; }
  .page-body { padding: 2rem 0 3rem; }
  .figure, .shop-gallery-stage { box-shadow: 5px 5px 0 var(--yellow); }
}

/* ---- Comparateur avant / après ---- */
.compare { padding: 2.2rem 0.9rem 0.9rem; }
.compare-stage { position: relative; aspect-ratio: 16/9; overflow: hidden; background: var(--paper-dim); touch-action: pan-y; }
.compare-img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.compare-before { clip-path: inset(0 calc(100% - var(--pos)) 0 0); }
.compare-handle { position: absolute; top: 0; bottom: 0; left: var(--pos); width: 0; border-left: 3px solid #111110; box-shadow: 0 0 0 1.5px #fff; pointer-events: none; }
.compare-handle::after { content: "↔"; position: absolute; top: 50%; left: 0; transform: translate(-50%, -50%); width: 2.6rem; height: 2.6rem; border-radius: 50%; background: var(--yellow); border: 3px solid #111110; color: #111110; display: flex; align-items: center; justify-content: center; font-family: var(--font-display); font-weight: 700; font-size: 1.1rem; }
.compare-range { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: ew-resize; }
.compare-range:focus-visible + * , .compare-stage:focus-within .compare-handle::after { outline: 3px solid var(--ink); outline-offset: 3px; }
.compare-tag { position: absolute; bottom: 0.6rem; z-index: 2; font-size: 0.65rem; text-transform: uppercase; letter-spacing: 0.06em; padding: 0.2rem 0.55rem; border: 2px solid #111110; background: var(--paper); color: #111110; pointer-events: none; }
.compare-tag-l { left: 0.6rem; }
.compare-tag-r { right: 0.6rem; background: var(--yellow); }
.compare-tabs { display: flex; gap: 0.4rem; margin-bottom: 0.6rem; }
.compare-tab { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.06em; padding: 0.35rem 0.9rem; border: 2px solid var(--ink); background: none; color: var(--ink); cursor: pointer; border-radius: 3px; }
.compare-tab:hover { background: var(--paper-dim); }
.compare-tab.active { background: var(--yellow); color: var(--on-yellow); border-color: #111110; }
.compare-tabs + .compare-stage { margin-top: 0; }

/* Notices en téléchargement libre */
.shop-manual { border: var(--line); padding: 1.1rem 1.4rem; margin-top: 1.25rem; background: var(--paper); }
.shop-manual .shop-h2 { margin-top: 0; }
.manual-btn { display: flex; justify-content: space-between; gap: 1rem; margin-top: .6rem; text-align: left; }
.manual-row { border-top: var(--line); padding: 1.25rem 0; position: relative; }
.manual-row .fig-label { position: static; display: block; margin-bottom: .3rem; }
.manual-row-title { margin: 0 0 .4rem; font-size: 1.3rem; }

/* Portrait mosaïque */
.portrait .drop { display: block; border: 2px dashed var(--ink); padding: 2rem 1rem; text-align: center; background: var(--paper); cursor: pointer; transition: box-shadow .15s; }
.portrait .drop.over, .portrait .drop:hover { box-shadow: 6px 6px 0 var(--yellow); }
.portrait .drop input { display: none; }
.portrait .drop strong { background: var(--yellow); padding: 0 .3rem; }
.portrait .stage { display: none; margin-top: 1.5rem; }
.portrait .stage.on { display: block; }
.portrait .grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 1.25rem; }
@media (max-width: 760px) { .portrait .grid2 { grid-template-columns: 1fr; } }
.pcard { border: var(--line); background: var(--paper); padding: 1rem; }
.pcard .shop-h2 { margin: 0 0 .6rem; font-size: 1rem; }
.portrait canvas { width: 100%; height: auto; display: block; background: #000; }
#srcCanvas { cursor: grab; touch-action: none; }
#srcCanvas.drag { cursor: grabbing; }
.portrait .controls { margin-top: 1.25rem; display: grid; grid-template-columns: repeat(auto-fit, minmax(14rem, 1fr)); gap: 1rem 1.5rem; }
.ctl label { display: flex; justify-content: space-between; font-size: .85rem; margin-bottom: .3rem; font-family: var(--font-mono); }
.ctl label.check { justify-content: flex-start; align-items: center; gap: .5rem; margin-bottom: .4rem; font-family: inherit; font-size: .95rem; }
.ctl input[type=range] { width: 100%; accent-color: var(--ink); }
.ctl select { width: 100%; font: inherit; padding: .35rem; border: 2px solid var(--ink); background: var(--paper); color: var(--ink); }
.portrait .counts { display: flex; flex-wrap: wrap; gap: .75rem; margin-top: 1.25rem; }
.count { display: flex; align-items: center; gap: .5rem; border: 1px solid var(--ink); padding: .4rem .7rem; font-size: .9rem; background: var(--paper); }
.sw { width: 16px; height: 16px; border-radius: 50%; border: 1px solid #555; display: inline-block; }
.portrait-buy { max-width: 34rem; margin-top: 1.5rem; }
.plan-view { margin-top: 1rem; overflow-x: auto; }
.plan-canvas { max-width: 100%; height: auto; border: var(--line); background: #fff; }

.compare-square { max-width: 34rem; margin: 0 auto 2rem; }
.compare-square .compare-stage { aspect-ratio: 1/1; }

.card-ba { position: absolute; inset: 0; }
.card-ba img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.card-ba-before { clip-path: inset(0 50% 0 0); animation: card-ba-wipe 6s ease-in-out infinite; }
.card-ba::after { content: ""; position: absolute; top: 0; bottom: 0; left: 50%; border-left: 3px solid #111110; box-shadow: 0 0 0 1.5px #fff; animation: card-ba-line 6s ease-in-out infinite; }
@keyframes card-ba-wipe { 0%, 8% { clip-path: inset(0 100% 0 0); } 42%, 58% { clip-path: inset(0 0 0 0); } 92%, 100% { clip-path: inset(0 100% 0 0); } }
@keyframes card-ba-line { 0%, 8% { left: 0; } 42%, 58% { left: 100%; } 92%, 100% { left: 0; } }
@media (prefers-reduced-motion: reduce) { .card-ba-before { animation: none; clip-path: inset(0 50% 0 0); } .card-ba::after { animation: none; left: 50%; } }

.compare-range, .compare-handle::after { display: none; }
.compare-stage { touch-action: auto; }

.card-ba-overlay { pointer-events: none; z-index: 1; }
.card-ba-overlay[hidden] { display: none; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.card-ba-before { position: absolute; inset: 0; overflow: hidden; }
.card-ba-before img { transform-origin: 50% 50%; }
.shop-gallery-stage.has-ba .shop-gallery-main { object-fit: cover; }
@media (hover: hover) { .shop-gallery-stage.has-ba:hover .shop-gallery-main { transform: none; } }

.card-ba:not(.ba-ready) .card-ba-before { animation: none; clip-path: inset(0 100% 0 0); }
.card-ba:not(.ba-ready)::after { animation: none; left: 0; opacity: 0; }

/* Titre animé de l'accueil (briques qui se reconstruisent) */
.hero-title-bricks { max-width: none; }
.hb-canvas { display: none; width: min(100%, 560px); height: auto; aspect-ratio: 100 / 22; margin-left: -0.5%; }
.hb-on .hb-canvas { display: block; }
.hb-on .hb-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hb-fixed { display: block; margin-top: 0.2em; }
