/* ==========================================================================
   LCM Diffusion — feuille de style principale
   Design system : tokens, base, composants, pages
   ========================================================================== */

@font-face {
  font-family: "Manrope";
  src: url("../fonts/manrope-latin.woff2") format("woff2");
  font-weight: 400 800;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("../fonts/inter-latin.woff2") format("woff2");
  font-weight: 400 700;
  font-display: swap;
}

:root {
  --navy: #0b1440;
  --navy-2: #131d5a;
  --blue: #2f36d0;
  --blue-600: #262cb3;
  --blue-700: #1e2390;
  --blue-100: #e4e6fb;
  --blue-50: #f1f2fd;
  --accent: #ff6b2c;
  --accent-600: #ea5a1c;
  --accent-50: #fff1ea;
  --ink: #0f1326;
  --ink-2: #3a4160;
  --muted: #6b7290;
  --line: #e4e7f0;
  --line-2: #cfd4e3;
  --bg: #f5f6fa;
  --card: #ffffff;
  --ok: #1f9d55;
  --err: #d43d3d;
  --radius: 16px;
  --radius-s: 10px;
  --shadow-s: 0 1px 2px rgba(15, 19, 38, .05), 0 1px 6px rgba(15, 19, 38, .04);
  --shadow: 0 6px 24px rgba(15, 19, 38, .08), 0 2px 6px rgba(15, 19, 38, .05);
  --shadow-l: 0 24px 60px rgba(11, 20, 64, .18);
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-h: "Manrope", "Inter", system-ui, sans-serif;
  --wrap: 1240px;
  --gutter: clamp(16px, 4vw, 40px);
  --header-h: 72px;
}

/* --- Base ---------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
body.no-scroll { overflow: hidden; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
h1, h2, h3, h4 { font-family: var(--font-h); line-height: 1.15; margin: 0 0 .5em; letter-spacing: -.01em; color: var(--ink); }
h1 { font-size: clamp(30px, 4.6vw, 52px); font-weight: 800; }
h2 { font-size: clamp(24px, 3.2vw, 36px); font-weight: 800; }
h3 { font-size: clamp(18px, 2vw, 22px); font-weight: 700; }
p { margin: 0 0 1em; }
button { font: inherit; cursor: pointer; }
input, select, textarea { font: inherit; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--navy); color: #fff; padding: 10px 14px; border-radius: 8px; z-index: 1000; }
.skip:focus { left: 8px; }

.wrap { width: min(100% - 2 * var(--gutter), var(--wrap)); margin-inline: auto; }
.section { padding: clamp(48px, 7vw, 96px) 0; }
.section--tight { padding: clamp(32px, 5vw, 64px) 0; }
.section--alt { background: #fff; }
.section-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: clamp(24px, 3vw, 40px); }
.section-head p { color: var(--muted); max-width: 60ch; margin: 0; }
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--blue); margin-bottom: 12px; }
.eyebrow::before { content: ""; width: 22px; height: 3px; background: var(--accent); border-radius: 2px; }

/* --- Buttons ------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 14px 22px; border-radius: 999px; border: 1.5px solid transparent;
  font-weight: 600; font-size: 15px; line-height: 1; white-space: nowrap;
  transition: transform .15s ease, box-shadow .15s ease, background .15s ease, color .15s ease;
  text-decoration: none !important;
}
.btn svg { width: 18px; height: 18px; flex: none; }
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--accent); color: #fff; box-shadow: 0 6px 18px rgba(255, 107, 44, .28); }
.btn--primary:hover { background: var(--accent-600); box-shadow: 0 8px 22px rgba(255, 107, 44, .38); transform: translateY(-1px); }
.btn--navy { background: var(--navy); color: #fff; }
.btn--navy:hover { background: var(--navy-2); transform: translateY(-1px); }
.btn--blue { background: var(--blue); color: #fff; }
.btn--blue:hover { background: var(--blue-600); }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--line-2); }
.btn--ghost:hover { border-color: var(--ink); }
.btn--light { background: #fff; color: var(--navy); }
.btn--light:hover { background: var(--blue-50); }
.btn--outline-light { background: transparent; color: #fff; border-color: rgba(255,255,255,.4); }
.btn--outline-light:hover { border-color: #fff; background: rgba(255,255,255,.08); }
.btn--sm { padding: 10px 16px; font-size: 14px; }
.btn--xs { padding: 8px 12px; font-size: 13px; }
.btn--block { width: 100%; }
.btn[disabled] { opacity: .5; pointer-events: none; }

/* icônes : taille par défaut, surchargée par les règles spécifiques */
.ic { width: 1.1em; height: 1.1em; flex: none; vertical-align: -.2em; }

/* --- Header -------------------------------------------------------------- */
.header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255, 255, 255, .86);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--line);
}
.header__in { display: flex; align-items: center; gap: 16px; height: var(--header-h); }
.brand { display: inline-flex; align-items: center; gap: 12px; color: var(--ink); text-decoration: none !important; flex: none; }
.brand img { height: 48px; width: auto; }
.brand__name { font-family: var(--font-h); font-weight: 800; font-size: 19px; letter-spacing: -.02em; line-height: 1; }
.brand__name small { display: block; font-family: var(--font); font-weight: 500; font-size: 11.5px; color: var(--muted); letter-spacing: .04em; text-transform: uppercase; margin-top: 4px; }
.nav { display: flex; align-items: center; gap: 4px; margin-left: 8px; }
.nav a { padding: 10px 14px; border-radius: 10px; font-weight: 600; font-size: 15px; color: var(--ink-2); text-decoration: none !important; white-space: nowrap; }
.nav a:hover, .nav a[aria-current="page"] { background: var(--blue-50); color: var(--blue); }
.header__search { flex: 1; max-width: 420px; min-width: 200px; margin-left: auto; }
@media (max-width: 1240px) { .icon-btn--phone .label { display: none; } }
.header__actions { display: flex; align-items: center; gap: 10px; }
.icon-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 44px; min-width: 44px; padding: 0 12px; border-radius: 12px; border: 1.5px solid var(--line);
  background: #fff; color: var(--ink); font-weight: 600; font-size: 14px; position: relative;
}
.icon-btn:hover { border-color: var(--ink); }
.icon-btn .label { white-space: nowrap; }
.icon-btn svg { width: 20px; height: 20px; }
.badge { position: absolute; top: -6px; right: -6px; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--accent); color: #fff; font-size: 11.5px; font-weight: 700; display: none; align-items: center; justify-content: center; }
.badge.is-on { display: inline-flex; }
.burger { display: none; }
@media (max-width: 1023px) {
  .nav { display: none; }
  .burger { display: inline-flex; }
  .header__search { display: none; }
  .icon-btn .label { display: none; }
}
/* mobile menu */
.mnav { position: fixed; inset: var(--header-h) 0 0 0; z-index: 90; background: #fff; padding: 20px var(--gutter); display: none; overflow: auto; }
.mnav.is-open { display: block; }
.mnav a { display: block; padding: 14px 8px; border-bottom: 1px solid var(--line); font-weight: 600; font-size: 17px; color: var(--ink); text-decoration: none !important; }
.mnav .mnav__cats { margin-top: 20px; }
.mnav .mnav__cats a { font-weight: 500; font-size: 15px; padding: 11px 8px; color: var(--ink-2); }

/* --- Search box ---------------------------------------------------------- */
.search { position: relative; }
.search__field {
  display: flex; align-items: center; gap: 10px; height: 46px; padding: 0 8px 0 16px;
  border-radius: 999px; background: #fff; border: 1.5px solid var(--line-2);
  transition: border-color .15s, box-shadow .15s;
}
.search__field:focus-within { border-color: var(--blue); box-shadow: 0 0 0 4px var(--blue-100); }
.search__field svg { width: 20px; height: 20px; color: var(--muted); flex: none; }
.search__field input { flex: 1; min-width: 0; border: 0; background: transparent; height: 100%; font-size: 15px; outline: none; color: var(--ink); }
.search__field input::placeholder { color: var(--muted); }
.search__kbd { font-size: 11px; color: var(--muted); border: 1px solid var(--line-2); border-radius: 6px; padding: 2px 6px; font-family: var(--font); }
.search--hero .search__field { height: 60px; padding-left: 22px; box-shadow: var(--shadow); border-color: transparent; }
.search--hero .search__field input { font-size: 17px; }
.search--hero .search__field .btn { height: 44px; }
.search__results {
  position: absolute; left: 0; right: 0; top: calc(100% + 8px); z-index: 60;
  background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-l);
  max-height: min(70vh, 520px); overflow: auto; display: none; padding: 6px;
}
.search__results.is-open { display: block; }
.sr-item { display: grid; grid-template-columns: 56px 1fr auto; gap: 12px; align-items: center; padding: 8px 10px; border-radius: 10px; color: var(--ink); text-decoration: none !important; cursor: pointer; }
.sr-item:hover, .sr-item.is-active { background: var(--blue-50); }
.sr-item img { width: 56px; height: 56px; object-fit: cover; border-radius: 8px; background: #fff; border: 1px solid var(--line); }
.sr-item__name { font-weight: 600; font-size: 14.5px; line-height: 1.3; }
.sr-item__meta { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
.sr-item__meta b { color: var(--blue); font-weight: 600; }
.sr-item__cat { font-size: 12px; color: var(--muted); white-space: nowrap; }
.sr-empty, .sr-more { padding: 14px; color: var(--muted); font-size: 14px; text-align: center; }
.sr-more a { font-weight: 600; }
.sr-group { padding: 10px 12px 4px; font-size: 11.5px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
mark { background: #fff3c4; color: inherit; border-radius: 3px; padding: 0 1px; }

/* --- Hero ---------------------------------------------------------------- */
.hero {
  position: relative; overflow: hidden; color: #fff;
  background: radial-gradient(1200px 600px at 80% -10%, #3a43ff 0%, transparent 60%), linear-gradient(160deg, var(--navy) 0%, #0d1a66 55%, #1d24a8 100%);
}
.hero::after { content: ""; position: absolute; inset: 0; background: url("../img/grid.svg") center/56px 56px; opacity: .08; pointer-events: none; }
.hero__in { position: relative; z-index: 1; display: grid; grid-template-columns: 1.15fr .85fr; gap: 48px; align-items: center; padding: clamp(56px, 8vw, 110px) 0 clamp(48px, 6vw, 80px); }
.hero h1 { color: #fff; margin-bottom: 18px; }
.hero h1 em { font-style: normal; color: #ffb38a; }
.hero p.lead { font-size: clamp(16px, 1.6vw, 19px); color: rgba(255,255,255,.82); max-width: 56ch; margin-bottom: 28px; }
.hero__pill { display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px; border-radius: 999px; background: rgba(255,255,255,.12); border: 1px solid rgba(255,255,255,.18); font-size: 13px; font-weight: 600; margin-bottom: 22px; }
.hero__pill i { width: 8px; height: 8px; border-radius: 50%; background: #5cf07d; box-shadow: 0 0 0 4px rgba(92,240,125,.25); }
.hero__search { margin: 8px 0 22px; max-width: 640px; }
.hero__quick { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; font-size: 13.5px; color: rgba(255,255,255,.7); }
.hero__quick a { color: #fff; background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.16); padding: 6px 12px; border-radius: 999px; text-decoration: none !important; font-weight: 500; }
.hero__quick a:hover { background: rgba(255,255,255,.2); }
.hero__visual { position: relative; }
.hero__card { background: #fff; color: var(--ink); border-radius: 20px; padding: 22px; box-shadow: var(--shadow-l); }
.hero__card h3 { margin-bottom: 4px; }
.hero__card p { color: var(--muted); font-size: 14px; }
.hero__stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-top: 16px; }
.stat { background: var(--blue-50); border-radius: 12px; padding: 14px 12px; text-align: center; }
.stat b { display: block; font-family: var(--font-h); font-size: 26px; font-weight: 800; color: var(--blue); letter-spacing: -.02em; }
.stat span { font-size: 12.5px; color: var(--ink-2); font-weight: 500; }
.hero__logo { position: absolute; right: -10px; top: -46px; width: 120px; filter: drop-shadow(0 10px 20px rgba(0,0,0,.25)); }
@media (max-width: 900px) {
  .hero__in { grid-template-columns: 1fr; gap: 28px; }
  .hero__visual { display: none; }
}

/* --- Category tiles ------------------------------------------------------ */
.cats { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.cat {
  position: relative; display: flex; flex-direction: column; gap: 12px; padding: 20px; min-height: 150px;
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); color: var(--ink); text-decoration: none !important;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.cat:hover { transform: translateY(-3px); box-shadow: var(--shadow); border-color: var(--blue-100); }
.cat__icon { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; background: var(--blue-50); color: var(--blue); }
.cat__icon svg { width: 24px; height: 24px; }
.cat__num { position: absolute; right: 16px; top: 16px; font-family: var(--font-h); font-weight: 800; font-size: 13px; color: var(--line-2); }
.cat h3 { font-size: 16.5px; margin: 0; }
.cat p { margin: 0; font-size: 13.5px; color: var(--muted); line-height: 1.45; }
.cat__count { margin-top: auto; font-size: 12.5px; font-weight: 600; color: var(--blue); }
.cat__count::after { content: " →"; }

/* --- Steps / features ---------------------------------------------------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.step { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; position: relative; }
.step__n { font-family: var(--font-h); font-weight: 800; font-size: 40px; color: var(--blue-100); line-height: 1; margin-bottom: 10px; }
.step h3 { margin-bottom: 6px; }
.step p { margin: 0; color: var(--muted); font-size: 14.5px; }
.features { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.feature { display: flex; gap: 14px; align-items: flex-start; }
.feature__icon { flex: none; width: 42px; height: 42px; border-radius: 12px; background: var(--accent-50); color: var(--accent-600); display: grid; place-items: center; }
.feature__icon svg { width: 22px; height: 22px; }
.feature h3 { font-size: 16px; margin-bottom: 4px; }
.feature p { margin: 0; font-size: 14px; color: var(--muted); }
@media (max-width: 900px) { .steps, .features { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .steps, .features { grid-template-columns: 1fr; } }

/* --- About / split ------------------------------------------------------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(28px, 5vw, 64px); align-items: center; }
.split__img { border-radius: 20px; overflow: hidden; box-shadow: var(--shadow); aspect-ratio: 4/3; }
.split__img img { width: 100%; height: 100%; object-fit: cover; }
.split ul { padding-left: 0; list-style: none; margin: 18px 0 24px; display: grid; gap: 10px; }
.split li { display: flex; gap: 10px; align-items: flex-start; font-size: 15px; }
.split li svg { width: 20px; height: 20px; color: var(--ok); flex: none; margin-top: 2px; }
@media (max-width: 800px) { .split { grid-template-columns: 1fr; } }

/* --- CTA band ------------------------------------------------------------ */
.cta { background: linear-gradient(120deg, var(--navy), var(--blue)); color: #fff; border-radius: 24px; padding: clamp(28px, 5vw, 56px); display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.cta h2 { color: #fff; margin-bottom: 6px; }
.cta p { margin: 0; color: rgba(255,255,255,.8); }
.cta__actions { display: flex; gap: 12px; flex-wrap: wrap; }

/* --- Catalogue layout ---------------------------------------------------- */
.page-head { padding: clamp(28px, 4vw, 48px) 0 clamp(18px, 3vw, 28px); }
.crumbs { display: flex; flex-wrap: wrap; gap: 6px; font-size: 13px; color: var(--muted); margin-bottom: 12px; }
.crumbs a { color: var(--muted); }
.crumbs span::before { content: "/"; margin-right: 6px; color: var(--line-2); }
.page-head p.lead { color: var(--ink-2); max-width: 70ch; font-size: 16px; }
.catalog { display: grid; grid-template-columns: 260px 1fr; gap: 32px; align-items: start; padding-bottom: 80px; }
.side { position: sticky; top: calc(var(--header-h) + 16px); max-height: calc(100vh - var(--header-h) - 32px); overflow: auto; }
.side__title { font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); margin: 0 0 10px 12px; }
.side a { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 10px; font-size: 14px; color: var(--ink-2); text-decoration: none !important; }
.side a:hover { background: #fff; color: var(--ink); }
.side a[aria-current="page"] { background: var(--blue); color: #fff; font-weight: 600; }
.side a svg { width: 18px; height: 18px; flex: none; opacity: .7; }
.side a .n { margin-left: auto; font-size: 12px; opacity: .7; }
.toolbar { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.toolbar .search { flex: 1; min-width: 240px; }
.toolbar__count { font-size: 14px; color: var(--muted); }
.mobile-cats { display: none; margin-bottom: 16px; }
.mobile-cats select { width: 100%; height: 46px; border-radius: 12px; border: 1.5px solid var(--line-2); padding: 0 12px; background: #fff; }
@media (max-width: 900px) {
  .catalog { grid-template-columns: 1fr; }
  .side { display: none; }
  .mobile-cats { display: block; }
}

/* --- Product cards ------------------------------------------------------- */
.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 16px; }
.card {
  display: flex; flex-direction: column; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden;
  transition: transform .18s ease, box-shadow .18s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow); }
.card__img { position: relative; aspect-ratio: 4/3; background: #fff; border-bottom: 1px solid var(--line); overflow: hidden; cursor: zoom-in; }
.card__img img { width: 100%; height: 100%; object-fit: cover; object-position: center; }
.card__page { position: absolute; left: 10px; bottom: 10px; font-size: 11.5px; font-weight: 600; background: rgba(11,20,64,.82); color: #fff; padding: 4px 8px; border-radius: 999px; }
.card__body { padding: 14px 14px 12px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.card__cat { font-size: 11.5px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--blue); }
.card h3 { font-size: 15.5px; margin: 0; line-height: 1.3; }
.card h3 a { color: var(--ink); }
.card__desc { font-size: 13px; color: var(--muted); margin: 0; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.refs { display: flex; flex-wrap: wrap; gap: 6px; }
.ref { display: inline-flex; align-items: center; font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 12px; font-weight: 600; color: var(--ink-2); background: var(--bg); border: 1px solid var(--line); border-radius: 6px; padding: 3px 7px; }
.ref--more { color: var(--muted); background: transparent; }
.card__foot { margin-top: auto; display: flex; gap: 8px; padding-top: 6px; }
.card__foot .btn { flex: 1; }
.card.is-hidden { display: none; }

/* --- Product page -------------------------------------------------------- */
.product { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, .95fr); gap: clamp(24px, 4vw, 56px); align-items: start; padding-bottom: 72px; }
.product__media { position: sticky; top: calc(var(--header-h) + 16px); }
.product__img { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; cursor: zoom-in; }
.product__img img { width: 100%; }
.product__media-actions { display: flex; gap: 10px; margin-top: 12px; flex-wrap: wrap; }
.product h1 { font-size: clamp(26px, 3vw, 36px); }
.product__desc { color: var(--ink-2); font-size: 16px; white-space: pre-line; }
.spec-list { margin: 18px 0; padding: 0; list-style: none; display: grid; gap: 6px; font-size: 14.5px; color: var(--ink-2); }
.spec-list li { padding-left: 18px; position: relative; }
.spec-list li::before { content: ""; position: absolute; left: 0; top: 10px; width: 8px; height: 2px; background: var(--accent); }
.reftable { width: 100%; border-collapse: collapse; margin: 16px 0 8px; background: #fff; border: 1px solid var(--line); border-radius: 12px; overflow: hidden; }
.reftable th, .reftable td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); font-size: 14px; vertical-align: middle; }
.reftable th { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); background: var(--bg); }
.reftable tr:last-child td { border-bottom: 0; }
.reftable .ref { font-size: 13px; }
.reftable td:last-child { text-align: right; white-space: nowrap; }
.qty { display: inline-flex; align-items: center; border: 1.5px solid var(--line-2); border-radius: 999px; overflow: hidden; height: 36px; }
.qty button { width: 34px; height: 100%; border: 0; background: #fff; font-size: 18px; color: var(--ink-2); }
.qty button:hover { background: var(--blue-50); color: var(--blue); }
.qty input { width: 44px; height: 100%; border: 0; text-align: center; font-weight: 600; -moz-appearance: textfield; }
.qty input::-webkit-outer-spin-button, .qty input::-webkit-inner-spin-button { -webkit-appearance: none; }
.product__actions { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 18px; }
.note { background: var(--blue-50); border: 1px solid var(--blue-100); border-radius: 12px; padding: 14px 16px; font-size: 14px; color: var(--ink-2); }
.note b { color: var(--blue); }
.related { margin-top: 56px; }
@media (max-width: 900px) { .product { grid-template-columns: 1fr; } .product__media { position: static; } }

/* --- Drawer (demande de devis) ------------------------------------------- */
.overlay { position: fixed; inset: 0; background: rgba(11,20,64,.55); backdrop-filter: blur(2px); z-index: 200; opacity: 0; pointer-events: none; transition: opacity .2s; }
.overlay.is-open { opacity: 1; pointer-events: auto; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(440px, 100%); background: #fff; z-index: 210;
  transform: translateX(100%); transition: transform .28s cubic-bezier(.2,.8,.2,1); display: flex; flex-direction: column; box-shadow: var(--shadow-l);
}
.drawer.is-open { transform: none; }
.drawer__head { display: flex; align-items: center; justify-content: space-between; padding: 18px 20px; border-bottom: 1px solid var(--line); }
.drawer__head h2 { font-size: 20px; margin: 0; }
.drawer__body { flex: 1; overflow: auto; padding: 12px 20px; }
.drawer__foot { padding: 16px 20px; border-top: 1px solid var(--line); background: var(--bg); display: grid; gap: 10px; }
.drawer__empty { text-align: center; color: var(--muted); padding: 48px 12px; }
.drawer__empty svg { width: 48px; height: 48px; color: var(--line-2); margin: 0 auto 12px; }
.line { display: grid; grid-template-columns: 1fr auto; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--line); align-items: center; }
.line__name { font-weight: 600; font-size: 14px; line-height: 1.3; }
.line__ref { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 12.5px; color: var(--blue); margin-top: 2px; }
.line__rm { background: none; border: 0; color: var(--muted); font-size: 12.5px; padding: 4px 0; text-decoration: underline; text-underline-offset: 2px; }
.line__rm:hover { color: var(--err); }
.close { width: 40px; height: 40px; border-radius: 10px; border: 0; background: var(--bg); display: grid; place-items: center; }
.close:hover { background: var(--line); }
.close svg { width: 20px; height: 20px; }

/* --- Modal / lightbox ---------------------------------------------------- */
.modal { position: fixed; inset: 0; z-index: 220; display: none; align-items: center; justify-content: center; padding: 16px; }
.modal.is-open { display: flex; }
.modal__box { background: #fff; border-radius: 18px; max-width: 980px; width: 100%; max-height: 92vh; overflow: auto; position: relative; box-shadow: var(--shadow-l); }
.modal__box .close { position: absolute; right: 12px; top: 12px; z-index: 2; }
.lightbox__img { display: block; width: 100%; height: auto; }
.lightbox__bar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); font-size: 14px; }
.lightbox__bar b { font-family: var(--font-h); }
.lightbox__nav { display: flex; gap: 8px; }

/* --- Toast --------------------------------------------------------------- */
.toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 20px); background: var(--navy); color: #fff; padding: 12px 18px; border-radius: 12px; font-size: 14px; font-weight: 500; z-index: 300; opacity: 0; pointer-events: none; transition: opacity .2s, transform .2s; display: flex; gap: 12px; align-items: center; box-shadow: var(--shadow-l); }
.toast.is-on { opacity: 1; transform: translate(-50%, 0); pointer-events: auto; }
.toast a { color: #ffb38a; font-weight: 600; }

/* --- Forms --------------------------------------------------------------- */
.form { display: grid; gap: 16px; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.field label { display: block; font-size: 13.5px; font-weight: 600; margin-bottom: 6px; color: var(--ink-2); }
.field input, .field textarea, .field select {
  width: 100%; height: 48px; padding: 0 14px; border: 1.5px solid var(--line-2); border-radius: 12px; background: #fff; color: var(--ink);
  transition: border-color .15s, box-shadow .15s;
}
.field textarea { height: auto; min-height: 120px; padding: 12px 14px; resize: vertical; }
.field input:focus, .field textarea:focus, .field select:focus { border-color: var(--blue); box-shadow: 0 0 0 4px var(--blue-100); outline: none; }
.field .hint { font-size: 12.5px; color: var(--muted); margin-top: 6px; }
.check { display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; color: var(--ink-2); }
.check input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--blue); }
.hp { position: absolute; left: -9999px; }
.form__status { display: none; padding: 14px 16px; border-radius: 12px; font-size: 14px; }
.form__status.ok { display: block; background: #e8f7ee; color: #14663a; border: 1px solid #bfe8cf; }
.form__status.err { display: block; background: #fdecec; color: #8f2424; border: 1px solid #f5c6c6; }
@media (max-width: 600px) { .form__row { grid-template-columns: 1fr; } }

/* --- Devis page ---------------------------------------------------------- */
.devis { display: grid; grid-template-columns: minmax(0, 1fr) 400px; gap: 32px; align-items: start; padding-bottom: 80px; }
.panel { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(18px, 3vw, 28px); }
.panel h2 { font-size: 20px; margin-bottom: 14px; }
.devis__list .line { grid-template-columns: 1fr auto auto; }
.devis__add { display: flex; gap: 8px; margin-top: 14px; }
.devis__add input { flex: 1; height: 44px; border: 1.5px solid var(--line-2); border-radius: 10px; padding: 0 12px; }
.devis__summary { position: sticky; top: calc(var(--header-h) + 16px); }
@media (max-width: 900px) { .devis { grid-template-columns: 1fr; } .devis__summary { position: static; } }

/* --- Contact ------------------------------------------------------------- */
.contact { display: grid; grid-template-columns: 1fr 1fr; gap: 32px; padding-bottom: 80px; align-items: start; }
.contact__info { display: grid; gap: 18px; }
.info { display: flex; gap: 14px; align-items: flex-start; }
.info__icon { width: 42px; height: 42px; border-radius: 12px; background: var(--blue-50); color: var(--blue); display: grid; place-items: center; flex: none; }
.info__icon svg { width: 20px; height: 20px; }
.info b { display: block; font-size: 14px; margin-bottom: 2px; }
.info a, .info span { font-size: 15px; }
.map { border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); aspect-ratio: 16/10; background: var(--line); }
.map iframe { width: 100%; height: 100%; border: 0; }
.hours { width: 100%; border-collapse: collapse; font-size: 14px; }
.hours td { padding: 6px 0; border-bottom: 1px solid var(--line); }
.hours td:last-child { text-align: right; font-weight: 600; }
@media (max-width: 800px) { .contact { grid-template-columns: 1fr; } }

/* --- Flipbook ------------------------------------------------------------ */
.flip { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; aspect-ratio: 16/10; margin-bottom: 24px; }
.flip iframe { width: 100%; height: 100%; border: 0; }
.pages-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 12px; }
.pages-grid a { display: block; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #fff; }
.pages-grid a:hover { box-shadow: var(--shadow); }
.pages-grid span { display: block; text-align: center; font-size: 12px; padding: 6px; color: var(--muted); }

/* --- Prose (mentions légales) ------------------------------------------- */
.prose { max-width: 76ch; padding-bottom: 80px; }
.prose h2 { font-size: 22px; margin-top: 36px; }
.prose p, .prose li { color: var(--ink-2); font-size: 15.5px; }

/* --- Footer -------------------------------------------------------------- */
.footer { background: var(--navy); color: rgba(255,255,255,.78); padding: 56px 0 24px; margin-top: auto; }
.footer__grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1fr; gap: 32px; margin-bottom: 40px; }
.footer h4 { color: #fff; font-size: 14px; letter-spacing: .06em; text-transform: uppercase; margin-bottom: 14px; }
.footer a { color: rgba(255,255,255,.78); }
.footer a:hover { color: #fff; }
.footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; font-size: 14.5px; }
.footer__brand img { height: 64px; margin-bottom: 12px; background: #fff; border-radius: 12px; padding: 6px; }
.footer__brand p { font-size: 14px; max-width: 34ch; }
.footer__brand li { display: flex; align-items: flex-start; gap: 10px; }
.footer__brand li svg { width: 16px; height: 16px; flex: none; margin-top: 3px; opacity: .8; }
.footer__bottom { border-top: 1px solid rgba(255,255,255,.12); padding-top: 20px; display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 13px; color: rgba(255,255,255,.55); }
@media (max-width: 900px) { .footer__grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer__grid { grid-template-columns: 1fr; } }

/* --- Mobile bottom bar --------------------------------------------------- */
.mbar { display: none; position: fixed; left: 0; right: 0; bottom: 0; z-index: 80; background: #fff; border-top: 1px solid var(--line); padding: 10px var(--gutter); gap: 10px; padding-bottom: calc(10px + env(safe-area-inset-bottom)); }
.mbar .btn { flex: 1; }
@media (max-width: 900px) { .mbar { display: flex; } body { padding-bottom: 76px; } .toast { bottom: 88px; } }

/* --- Utilities ----------------------------------------------------------- */
.muted { color: var(--muted); }
.mt-0 { margin-top: 0; } .mb-0 { margin-bottom: 0; }
.text-center { text-align: center; }
.stack { display: grid; gap: 12px; }
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .5s ease, transform .5s ease; }
.reveal.is-in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; animation: none !important; scroll-behavior: auto !important; } .reveal { opacity: 1; transform: none; } }

/* ==========================================================================
   Galerie produits, filtres, configurateur (v2 — sans fascicule)
   ========================================================================== */
.page-head--tight { padding-bottom: 8px; }
.gallery { display: grid; grid-template-columns: 272px minmax(0, 1fr); gap: 28px; align-items: start; padding-bottom: 80px; }
.filters { position: sticky; top: calc(var(--header-h) + 16px); max-height: calc(100vh - var(--header-h) - 32px); overflow: auto; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; scrollbar-width: thin; }
.filters__head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.filters__head h2 { font-size: 16px; margin: 0; display: inline-flex; align-items: center; gap: 8px; }
.filters__head h2 svg { width: 18px; height: 18px; color: var(--blue); }
.fgroup { border-top: 1px solid var(--line); padding: 12px 0; }
.fgroup:first-of-type { border-top: 0; }
.fgroup__title { font-size: 13px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-2); cursor: pointer; list-style: none; display: flex; justify-content: space-between; align-items: center; margin-bottom: 8px; }
.fgroup__title::-webkit-details-marker { display: none; }
details .fgroup__title::after { content: "+"; font-size: 16px; color: var(--muted); }
details[open] .fgroup__title::after { content: "−"; }
.fgroup__body { display: grid; gap: 2px; max-height: 300px; overflow: auto; scrollbar-width: thin; }
.fcheck { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 8px; font-size: 14px; cursor: pointer; }
.fcheck:hover { background: var(--bg); }
.fcheck input { width: 16px; height: 16px; accent-color: var(--blue); flex: none; }
.fcheck span { flex: 1; }
.fcheck em { font-style: normal; font-size: 12px; color: var(--muted); }
.fhint { font-size: 13px; color: var(--muted); margin: 0; padding: 4px 8px; }
.search__field--sm { height: 42px; border-radius: 10px; }
.filters__toggle { display: none; }
.filters__close { display: none; margin-top: 16px; }
.toolbar__chips { display: flex; flex-wrap: wrap; gap: 6px; flex: 1; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 6px 10px; border-radius: 999px; border: 1px solid var(--blue-100); background: var(--blue-50); color: var(--blue); font-size: 13px; font-weight: 600; }
.chip:hover { background: var(--blue-100); }
.toolbar__sort { margin-left: auto; font-size: 13.5px; color: var(--muted); display: inline-flex; align-items: center; gap: 8px; }
.toolbar__sort select { height: 38px; border-radius: 10px; border: 1.5px solid var(--line-2); background: #fff; padding: 0 10px; color: var(--ink); }
.empty { background: #fff; border: 1px dashed var(--line-2); border-radius: var(--radius); padding: 32px; text-align: center; color: var(--muted); }
@media (max-width: 900px) {
  .gallery { grid-template-columns: 1fr; }
  .filters { position: fixed; inset: 0 auto 0 0; width: min(360px, 92%); max-height: none; border-radius: 0; z-index: 210; transform: translateX(-100%); transition: transform .25s; }
  .filters.is-open { transform: none; }
  .filters__toggle { display: inline-flex; }
  .filters__close { display: block; }
  .toolbar__sort { margin-left: 0; }
}
.card__cat i { font-style: normal; color: var(--line-2); margin: 0 2px; }
.card__var { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-2); font-weight: 500; }
.card__var svg { width: 16px; height: 16px; color: var(--blue); }
.card__foot { align-items: center; justify-content: space-between; }
.card__foot .btn { flex: none; }
.card__img--ph img, .product__img--ph img { object-fit: cover; }
.product__badges { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: 999px; background: var(--navy); color: #fff; font-size: 13px; font-weight: 600; text-decoration: none !important; }
.pill svg { width: 15px; height: 15px; }
.pill--soft { background: var(--blue-50); color: var(--blue); border: 1px solid var(--blue-100); }
.configurator { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.configurator__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; }
.configurator__out { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-top: 14px; padding-top: 14px; border-top: 1px dashed var(--line-2); }
.configurator__ref { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 20px; font-weight: 700; color: var(--blue); }
.reftable__wrap { max-height: 520px; overflow: auto; border-radius: 12px; border: 1px solid var(--line); scrollbar-width: thin; }
.reftable__wrap .reftable { border: 0; margin: 0; }
.reftable thead th { position: sticky; top: 0; z-index: 1; }
.mnav__cats strong { display: block; padding: 12px 8px 4px; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; }
.btn.is-added { background: var(--ok); }

/* --- Méga-menu (desktop) --------------------------------------------------- */
.nav__item { position: relative; }
.nav__item.is-open::after { content: ""; position: absolute; left: -20px; right: -20px; top: 100%; height: 24px; }
.nav__link { display: inline-flex; align-items: center; gap: 4px; }
.nav__link .chev { width: 16px; height: 16px; transition: transform .2s; }
.nav__link[aria-expanded="true"] { background: var(--blue-50); color: var(--blue); }
.nav__link[aria-expanded="true"] .chev { transform: rotate(180deg); }
.mega { position: absolute; left: 0; right: 0; top: 100%; max-height: calc(100vh - var(--header-h)); overflow: auto; background: #fff; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); box-shadow: var(--shadow-l); z-index: 99; display: none; }
.mega.is-open { display: block; animation: megaIn .18s ease-out; }
@keyframes megaIn { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }
.mega__in { display: grid; grid-template-columns: minmax(0, 2fr) minmax(0, 1.5fr); gap: 0 28px; padding: 22px var(--gutter) 22px; align-items: start; }
/* familles : bloc autonome (2 colonnes x 2 groupes) dont la hauteur ne depend pas du volet de droite */
.mega__fams { display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: auto auto; grid-auto-flow: column; gap: 18px 28px; align-content: start; }
.mega__group { display: flex; flex-direction: column; gap: 2px; }
/* volets : tous empiles dans la meme cellule -> hauteur constante, aucun saut de mise en page au survol */
.mega__panes { display: grid; border-left: 1px solid var(--line); padding-left: 28px; max-height: calc(100vh - var(--header-h) - 110px); overflow-y: auto; scrollbar-width: thin; }
.mega__pane { grid-area: 1 / 1; visibility: hidden; opacity: 0; transition: opacity .18s ease-out; }
.mega__pane.is-on { visibility: visible; opacity: 1; }
.mega__gtitle { display: block; padding: 0 10px 6px; font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.mega__fam { display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: 10px; color: var(--ink); text-decoration: none !important; font-weight: 600; font-size: 14px; line-height: 1.25; }
.mega__fam svg { width: 20px; height: 20px; color: var(--blue); flex: none; }
.mega__fam span { flex: 1; min-width: 0; }
.mega__fam em { font-style: normal; font-size: 12px; font-weight: 500; color: var(--muted); }
.mega__fam .arrow { width: 14px; height: 14px; opacity: 0; transition: opacity .15s, transform .15s; transform: translateX(-4px); }
.mega__fam:hover, .mega__fam.is-on, .mega__fam:focus-visible { background: var(--blue-50); color: var(--blue); }
.mega__fam.is-on .arrow { opacity: 1; transform: none; }
.mega__head { display: flex; gap: 14px; align-items: flex-start; }
.mega__icon { width: 48px; height: 48px; border-radius: 12px; background: var(--navy); color: #fff; display: grid; place-items: center; flex: none; }
.mega__icon svg { width: 24px; height: 24px; }
.mega__head h3 { margin: 2px 0 4px; font-size: 20px; }
.mega__head h3 a { color: var(--ink); text-decoration: none !important; }
.mega__head h3 a:hover { color: var(--blue); }
.mega__head p { margin: 0; color: var(--ink-2); font-size: 14px; }
.mega__label { display: block; margin: 18px 0 8px; font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.mega__types { display: flex; flex-wrap: wrap; gap: 8px; }
.mega__types a { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 999px; border: 1px solid var(--line); background: #fff; font-size: 13.5px; font-weight: 600; color: var(--ink); text-decoration: none !important; }
.mega__types a em { font-style: normal; font-size: 12px; font-weight: 500; color: var(--muted); }
.mega__types a:hover { border-color: var(--blue); color: var(--blue); background: var(--blue-50); }
.mega__prods { display: grid; grid-template-columns: 1fr; gap: 8px; }
.mega__prod { display: flex; align-items: center; gap: 12px; padding: 6px 10px 6px 6px; border-radius: 10px; border: 1px solid var(--line); color: var(--ink); text-decoration: none !important; font-size: 13px; font-weight: 600; line-height: 1.3; }
.mega__prod img { width: 52px; height: 40px; object-fit: cover; border-radius: 6px; background: var(--bg); flex: none; }
.mega__prod span { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.mega__prod:hover { border-color: var(--blue); color: var(--blue); }
.mega__cta { margin-top: 18px; }
.mega__foot { border-top: 1px solid var(--line); background: var(--bg); }
.mega__foot .wrap { display: flex; flex-wrap: wrap; gap: 8px 28px; padding-top: 10px; padding-bottom: 10px; font-size: 13.5px; }
.mega__foot a { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; color: var(--ink-2); text-decoration: none !important; }
.mega__foot a:hover { color: var(--blue); }
.mega__foot svg { width: 16px; height: 16px; }
@media (max-width: 1023px) { .mega { display: none !important; } }

/* accordéons familles → types (menu mobile) */
.mnav__fam { border-bottom: 1px solid var(--line); }
.mnav__fam summary { display: flex; align-items: center; gap: 10px; padding: 12px 8px; font-weight: 600; font-size: 15px; color: var(--ink); cursor: pointer; list-style: none; }
.mnav__fam summary::-webkit-details-marker { display: none; }
.mnav__fam summary > svg:first-child { width: 20px; height: 20px; color: var(--blue); flex: none; }
.mnav__fam summary span { flex: 1; }
.mnav__fam summary em { font-style: normal; font-size: 12px; color: var(--muted); font-weight: 500; }
.mnav__fam summary .chev { width: 18px; height: 18px; color: var(--muted); transition: transform .2s; }
.mnav__fam[open] summary { color: var(--blue); }
.mnav__fam[open] summary .chev { transform: rotate(180deg); }
.mnav__sub { display: flex; flex-direction: column; padding: 0 8px 10px 38px; }
.mnav .mnav__sub a { border: 0; padding: 8px 0; font-size: 14.5px; font-weight: 500; color: var(--ink-2); }
.mnav .mnav__sub a em { font-style: normal; color: var(--muted); font-size: 12.5px; }
.mnav .mnav__sub a.mnav__all { font-weight: 700; color: var(--blue); }
