/* ============================================================
   HMH FIRE CONTROL — site_v2 · dark premium product page
   ============================================================ */
:root {
  --bg: #0a0a0d;
  --bg2: #111117;
  --ink: #f4f2ee;
  --muted: #9b98a3;
  --accent: #3da5ff;
  --accent2: #7cf0ff;
  --glass: rgba(255, 255, 255, 0.055);
  --glass-brd: rgba(255, 255, 255, 0.12);
  --wa: #25d366;
  --radius: 22px;
  --font-d: "Archivo", system-ui, sans-serif;
  --font-b: "Space Grotesk", system-ui, sans-serif;
  --nav-h: 76px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-b);
  font-size: 17px;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--accent); color: #0a0a0d; }

/* ---------- fond : halo + grain ---------- */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -2;
  background:
    radial-gradient(900px 620px at 78% 12%, rgba(61,165,255, 0.16), transparent 60%),
    radial-gradient(700px 500px at 8% 78%, rgba(124,240,255, 0.07), transparent 60%),
    var(--bg);
}
.grain {
  position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: .5;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 0.05 0'/%3E%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  display: flex; align-items: center; gap: 28px;
  height: var(--nav-h);
  padding: 0 clamp(18px, 4vw, 56px);
  background: rgba(10, 10, 13, 0.72);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255,255,255,.07);
}
.nav__brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); font-family: var(--font-d); font-weight: 900; font-size: 19px; letter-spacing: .02em; }
.nav__brand em { font-style: normal; display: block; font-size: 10px; letter-spacing: .32em; color: var(--accent); font-weight: 700; }
.nav__logo { height: 40px; width: 40px; object-fit: contain; border-radius: 10px; background: rgba(255,255,255,.06); }
.nav__links { display: flex; gap: 26px; margin-left: auto; }
.nav__links a { color: var(--muted); text-decoration: none; font-size: 15px; font-weight: 500; transition: color .2s; }
.nav__links a:hover, .nav__links a:focus-visible { color: var(--ink); }

/* ---------- boutons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 14px 28px; border-radius: 999px;
  font-family: var(--font-d); font-weight: 700; font-size: 15px; letter-spacing: .02em;
  text-decoration: none; border: 1px solid transparent; cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease, background .18s ease;
  min-height: 48px;
}
.btn:active { transform: scale(.97); }
.btn--accent {
  background: linear-gradient(120deg, var(--accent), var(--accent2));
  color: #0a0a0d;
  box-shadow: 0 8px 30px rgba(61,165,255, .35);
}
.btn--accent:hover, .btn--accent:focus-visible { box-shadow: 0 10px 40px rgba(61,165,255, .55); transform: translateY(-2px); }
.btn--ghost { border-color: var(--glass-brd); color: var(--ink); background: var(--glass); }
.btn--ghost:hover, .btn--ghost:focus-visible { background: rgba(255,255,255,.12); }
.btn--wa { background: rgba(37, 211, 102, .14); border-color: rgba(37, 211, 102, .4); color: #7deea6; }
.btn--mail { background: rgba(61, 165, 255, .12); border-color: rgba(61, 165, 255, .4); color: #8cc8ff; }
.btn--mail:hover, .btn--mail:focus-visible { background: rgba(61, 165, 255, .24); }
.form__ok { margin: 10px 0 0; color: #8cc8ff; font-weight: 600; }
.btn--wa:hover, .btn--wa:focus-visible { background: rgba(37, 211, 102, .24); }

/* ---------- hero ---------- */
/* piste de défilement : le hero reste épinglé pendant que l'extincteur s'éclate */
.hero-track { height: 260vh; height: 260svh; position: relative; }
.hero {
  position: sticky; top: var(--nav-h);
  height: calc(100vh - var(--nav-h));
  height: calc(100svh - var(--nav-h));
  min-height: calc(100vh - var(--nav-h));
  min-height: calc(100svh - var(--nav-h));
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  align-items: center;
  gap: clamp(24px, 4vw, 60px);
  padding: clamp(24px, 5vw, 72px) clamp(18px, 4vw, 56px);
}
.eyebrow {
  font-family: var(--font-d); font-size: 12px; font-weight: 700;
  letter-spacing: .34em; text-transform: uppercase; color: var(--accent);
  margin-bottom: 18px;
}
.hero h1 {
  font-family: var(--font-d);
  font-size: clamp(38px, min(6vw, 10.5vh), 88px);
  font-weight: 900; line-height: .95; letter-spacing: -.02em;
  margin-bottom: 26px;
}
.accent {
  background: linear-gradient(100deg, var(--accent), var(--accent2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
/* le dégradé doit être peint sur chaque mot : les enveloppes inline-block de l'animation coupent le clip du parent */
.accent .word-reveal__inner {
  background: linear-gradient(100deg, var(--accent), var(--accent2));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.lede { max-width: 52ch; color: var(--muted); font-size: clamp(16px, 1.6vw, 19px); margin-bottom: 34px; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; margin-bottom: 44px; }
.hero__meta { display: flex; flex-wrap: wrap; gap: clamp(20px, 4vw, 48px); }
.hero__meta dt { font-size: 11px; letter-spacing: .22em; text-transform: uppercase; color: var(--muted); }
.hero__meta dd { font-family: var(--font-d); font-weight: 700; font-size: 16px; }

/* scène 3D */
.hero__stage { position: relative; aspect-ratio: 1 / 1; max-height: 78vh; width: 100%; }
#ext3d { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.hero__fallback { display: none; width: 100%; height: 100%; object-fit: contain; }
.hero__hud {
  position: absolute; left: 0; right: 0; bottom: 6px;
  display: flex; justify-content: space-between; align-items: baseline;
  font-family: var(--font-d); pointer-events: none;
}
.hud__count { font-size: 15px; font-weight: 700; color: var(--ink); background: var(--glass); border: 1px solid var(--glass-brd); padding: 6px 14px; border-radius: 999px; backdrop-filter: blur(8px); }
.hud__hint { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }

/* ---------- marquee ---------- */
.marquee { overflow: hidden; border-block: 1px solid rgba(255,255,255,.08); padding: 14px 0; background: rgba(61,165,255,.05); }
.marquee__track { display: flex; white-space: nowrap; animation: marquee 26s linear infinite; font-family: var(--font-d); font-weight: 700; font-size: 15px; letter-spacing: .18em; color: rgba(255,255,255,.5); }
@keyframes marquee { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) { .marquee__track { animation: none; } }

/* ---------- sections ---------- */
.section { padding: clamp(72px, 10vw, 140px) clamp(18px, 4vw, 56px); max-width: 1280px; margin: 0 auto; }
.section h2 { font-family: var(--font-d); font-size: clamp(32px, 4.6vw, 58px); font-weight: 900; line-height: 1.02; letter-spacing: -.015em; margin-bottom: 18px; }
.section__lede { color: var(--muted); max-width: 62ch; margin-bottom: 48px; }

/* ---------- cartes verre ---------- */
.grid { display: grid; gap: 22px; }
.grid--products { grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); }
.card {
  background: var(--glass);
  border: 1px solid var(--glass-brd);
  border-radius: var(--radius);
  padding: clamp(22px, 2.6vw, 34px);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: 0 20px 60px rgba(0,0,0,.45);
  transition: transform .25s ease, border-color .25s ease;
}
.card:hover { transform: translateY(-4px); border-color: rgba(124,240,255, .35); }
.card h3 { font-family: var(--font-d); font-size: 22px; font-weight: 700; margin-bottom: 4px; }
.card h3 small { color: var(--muted); font-weight: 400; font-size: 15px; }
.card__tag { font-size: 13px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); margin-bottom: 20px; }
.card--accent { border-color: rgba(61,165,255, .45); background: linear-gradient(160deg, rgba(61,165,255,.12), var(--glass) 55%); }

/* ---------- tableaux prix ---------- */
.prices { width: 100%; border-collapse: collapse; font-size: 15px; }
.prices th { text-align: left; font-size: 11px; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); padding: 8px 4px; border-bottom: 1px solid var(--glass-brd); }
.prices th:last-child, .prices td:last-child { text-align: right; }
.prices th:nth-child(2), .prices td:nth-child(2) { text-align: right; }
.prices td { padding: 9px 4px; border-bottom: 1px solid rgba(255,255,255,.06); font-variant-numeric: tabular-nums; }
.prices td:last-child { font-weight: 700; color: var(--accent2); }
.prices tr:last-child td { border-bottom: 0; }
.prices td:nth-child(2)::after, .prices td:last-child::after { content: " DA"; font-size: 11px; color: var(--muted); font-weight: 400; }
.note { color: var(--muted); font-size: 14px; margin-top: 26px; }

/* ---------- étapes service ---------- */
.grid--steps { grid-template-columns: repeat(auto-fit, minmax(290px, 1fr)); margin-bottom: 48px; }
@media (min-width: 1200px) { #service .grid--steps { grid-template-columns: repeat(3, 1fr); padding-right: 120px; } }
.step { border-top: 2px solid var(--accent); padding-top: 20px; }
.step__num { font-family: var(--font-d); font-size: 13px; font-weight: 700; letter-spacing: .24em; color: var(--accent); }
.step h3 { font-family: var(--font-d); font-size: 21px; margin: 8px 0; }
.step p { color: var(--muted); font-size: 15px; }

.cta-band {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 20px;
  padding: clamp(24px, 3vw, 40px);
  border-radius: var(--radius);
  background: linear-gradient(110deg, rgba(61,165,255,.16), rgba(124,240,255,.06));
  border: 1px solid rgba(124,240,255, .3);
  font-size: 19px;
}

/* ---------- formulaire ---------- */
.form {
  background: var(--glass); border: 1px solid var(--glass-brd); border-radius: var(--radius);
  padding: clamp(24px, 3.4vw, 48px); backdrop-filter: blur(16px);
  display: grid; gap: 22px; max-width: 820px;
}
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.form label { display: grid; gap: 8px; font-family: var(--font-d); font-size: 13px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); }
.form input, .form select, .form textarea {
  font: inherit; font-family: var(--font-b); font-size: 16px; color: var(--ink);
  background: rgba(0,0,0,.35); border: 1px solid var(--glass-brd); border-radius: 12px;
  padding: 14px 16px; width: 100%;
}
.form input:focus, .form select:focus, .form textarea:focus { outline: 2px solid var(--accent); outline-offset: 1px; border-color: transparent; }
.form option { background: var(--bg2); }
.form__note { font-size: 14px; color: var(--accent2); }
.form__actions { display: flex; flex-wrap: wrap; gap: 14px; }
.form button { border: 0; }

/* ---------- contact ---------- */
.grid--contact { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.card--contact h3 { margin-bottom: 14px; color: var(--accent2); }
.card--contact p { margin-bottom: 14px; }
.card--contact a { color: var(--ink); text-decoration: none; font-weight: 600; border-bottom: 1px solid rgba(124,240,255,.5); }
.card--contact a:hover { color: var(--accent2); }
.card--contact .btn { border-bottom: 0; }

/* ---------- footer ---------- */
.footer {
  border-top: 1px solid rgba(255,255,255,.08);
  padding: 34px clamp(18px, 4vw, 56px);
  display: flex; flex-wrap: wrap; gap: 14px; justify-content: space-between;
  color: var(--muted); font-size: 14px;
}
.footer a { color: var(--ink); text-decoration: none; font-weight: 600; }

/* ---------- FAB WhatsApp ---------- */
.wa-fab {
  position: fixed; right: 22px; bottom: 22px; z-index: 60;
  width: 58px; height: 58px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--wa); color: #062d16;
  box-shadow: 0 10px 30px rgba(37, 211, 102, .4);
  transition: transform .2s ease;
}
.wa-fab:hover, .wa-fab:focus-visible { transform: scale(1.08); }

/* ---------- word reveal ---------- */
.word-reveal { overflow: hidden; display: inline-block; vertical-align: bottom; }
.word-reveal__inner { display: inline-block; transform: translateY(110%); transition: transform .6s cubic-bezier(.16,1,.3,1); }
.word-reveal.is-in .word-reveal__inner { transform: translateY(0); }
@media (prefers-reduced-motion: reduce) { .word-reveal__inner { transform: none; transition: none; } }

/* ---------- reveal (sections/cards) ---------- */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .7s ease, transform .7s cubic-bezier(.16,1,.3,1); }
.reveal.is-in { opacity: 1; transform: none; }
.reveal-stagger .reveal { transition-delay: calc(var(--i, 0) * 80ms); }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }

/* ---------- hero scroll captions ---------- */
.hero__captions { position: absolute; left: 0; bottom: 56px; z-index: 3; pointer-events: none; }
.hero__caption {
  position: absolute; left: 0; bottom: 0;
  font-family: var(--font-d); font-size: 11px; font-weight: 700;
  letter-spacing: .24em; text-transform: uppercase; color: var(--accent);
  opacity: 0; transition: opacity .35s ease;
  white-space: nowrap;
}
.hero__caption.is-active { opacity: 1; }
@media (max-width: 900px) { .hero__captions { bottom: 44px; } }

/* ---------- 3D part labels ---------- */
.hero__labels { position: absolute; inset: 0; z-index: 4; pointer-events: none; }
.hero__label {
  position: absolute; transform: translate(-50%, -50%);
  font-family: var(--font-d); font-size: 11px; font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase; color: var(--ink);
  background: rgba(10,10,13,.75); border: 1px solid var(--glass-brd);
  padding: 4px 10px; border-radius: 6px; backdrop-filter: blur(6px);
  white-space: nowrap; opacity: 0; transition: opacity .3s ease;
}
.hero__label.is-visible { opacity: 1; }
.hero__label::after {
  content: ''; position: absolute; left: 50%; top: 100%;
  width: 1px; height: 28px; background: var(--accent); opacity: .6;
  transform: translateX(-50%);
}
@media (max-width: 700px) { .hero__labels { display: none; } }

/* ---------- chiffres de confiance ---------- */
.stats__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(20px, 4vw, 56px); margin-top: 12px; }
.stat { border-top: 2px solid var(--accent); padding-top: 18px; }
.stat__num {
  display: block; font-family: var(--font-d); font-weight: 900; line-height: 1; letter-spacing: -.02em;
  font-size: clamp(44px, 7vw, 92px);
  background: linear-gradient(100deg, var(--accent), var(--accent2)); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.stat__label { display: block; margin-top: 12px; font-size: 12px; letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }
@media (max-width: 620px) { .stats__grid { grid-template-columns: 1fr; } }

/* ---------- scène 3D plein écran (suit le défilement) ---------- */
body.scene-fixed #ext3d { position: fixed; inset: 0; width: 100%; height: 100%; z-index: 1; pointer-events: none; display: block; }
body.scene-fixed main, body.scene-fixed footer { position: relative; z-index: 2; }
body.scene-fixed > .hero__labels { position: fixed; inset: 0; z-index: 4; }
@media (max-width: 900px) { body.scene-fixed #ext3d { z-index: 3; } } /* mobile : au-dessus du texte, atténué quand il est rangé */

/* ---------- état sans WebGL ---------- */
.no3d #ext3d, .no3d .hud__hint { display: none; }
.no3d .hero__fallback { display: block; }

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .hero-track { height: auto; }
  .hero { position: static; height: auto; grid-template-columns: 1fr; min-height: 0; padding-top: 0; align-items: start; }
  .hero__stage { order: -1; max-height: 42vh; max-height: 42svh; position: sticky; top: var(--nav-h); z-index: 5;
    background: var(--bg); padding: 8px 0 44px; border-bottom: 1px solid rgba(255,255,255,.06); }
  .hero__hud { bottom: 10px; }
  .nav__links { display: none; }
  .nav__cta { margin-left: auto; }
}
@media (max-width: 620px) {
  .form__row { grid-template-columns: 1fr; }
  .hero__meta { gap: 18px; }
  .wa-fab { right: 16px; bottom: 16px; }
}

/* étiquette placée sous la pièce : le trait remonte vers elle */
.hero__label--below::after { top: auto; bottom: 100%; }

/* étiquette latérale : trait horizontal vers la pièce */
.hero__label--r::after, .hero__label--l::after { top: 50%; width: 46px; height: 1px; transform: none; }
.hero__label--r::after { left: auto; right: 100%; }
.hero__label--l::after { left: 100%; }
.hud__count { white-space: nowrap; }

/* ---- Moraxis mobile fixes: no black sticky box, 3D scene behind the text, no horizontal scroll ---- */
html,body{overflow-x:clip}
@media (max-width: 900px) {
  .hero__stage { position: relative !important; top: auto !important; background: transparent !important; border: 0 !important; padding: 0 0 24px !important; max-height: 46svh !important; }
  body.scene-fixed #ext3d { z-index: 1 !important; filter: opacity(var(--f, 1)); }
  body.scene-fixed main, body.scene-fixed footer { position: relative; z-index: 2; }
  .hero__hud { bottom: 4px; }
  .section { padding-left: 16px; padding-right: 16px; }
  img, video, canvas, svg { max-width: 100%; }
}

.nav__brand span{white-space:nowrap}
@media (max-width:560px){.nav__brand span{font-size:14px;line-height:1.15}.nav__brand span em{display:none}.nav__cta{padding:9px 14px}}
.card p .btn{margin-top:6px}.card .btn{margin-top:10px}
