/* ============================================================
   MDJLABS — Styles de la vitrine
   ============================================================ */

body { overflow-x: hidden; }

/* =========================================================
   NAV
   ========================================================= */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  height: 60px; padding: 0 32px;
  display: flex; align-items: center; gap: 28px;
  background: rgba(7,7,8,0.65);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color .3s var(--ease), background .3s var(--ease);
}
.nav.is-scrolled { border-color: var(--line); background: rgba(7,7,8,0.9); }
.nav-mark {
  display: inline-flex; align-items: baseline; gap: 2px;
  font-family: var(--ff-mono); font-size: 14px; font-weight: 600;
  letter-spacing: 0.04em; color: var(--fg-0);
}
.nav-mark b { color: var(--acc); font-weight: 600; }
.nav-mark .blink {
  display: inline-block; width: 8px; height: 2px; margin-left: 4px;
  background: var(--acc); box-shadow: 0 0 8px var(--acc-glow);
  animation: mblink 1.2s steps(2) infinite;
}
@keyframes mblink { 50% { opacity: 0; } }
.nav-links { display: flex; gap: 2px; margin-left: 16px; }
.nav-links a {
  padding: 7px 12px; font-size: 13px; color: var(--fg-1);
  border-radius: var(--r-sm); font-family: var(--ff-mono); letter-spacing: 0.02em;
}
.nav-links a:hover { color: var(--fg-0); background: var(--bg-2); }
.nav-links a i { font-style: normal; color: var(--fg-3); font-size: 10px; margin-right: 6px; }
.nav-cta { margin-left: auto; }

/* =========================================================
   Boutons
   ========================================================= */
.btn {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 13px 22px;
  border-radius: var(--r-sm);
  font-size: 14px; font-weight: 500;
  border: 1px solid var(--line);
  background: var(--bg-1);
  color: var(--fg-0);
  transition: background var(--dur) var(--ease), border-color var(--dur) var(--ease), box-shadow var(--dur) var(--ease), transform var(--dur) var(--ease);
  white-space: nowrap;
}
.btn:hover { background: var(--bg-2); border-color: var(--line-strong); }
.btn-primary {
  background: var(--acc); color: var(--fg-inv);
  border-color: var(--acc-line);
  font-weight: 600;
  box-shadow: 0 10px 32px -14px var(--acc-glow);
}
.btn-primary:hover {
  background: var(--acc-hi);
  box-shadow: 0 0 0 1px var(--acc-line), 0 14px 40px -12px var(--acc-glow);
  transform: translateY(-1px);
}
.btn-sm { padding: 8px 14px; font-size: 13px; }
.btn .arr { font-family: var(--ff-mono); transition: transform var(--dur) var(--ease); }
.btn:hover .arr { transform: translateX(3px); }

/* =========================================================
   Coquilles de section
   ========================================================= */
.ct { max-width: 1240px; margin: 0 auto; padding: 0 32px; position: relative; }
section { position: relative; }
.sec { padding: 130px 0; border-top: 1px solid var(--line-weak); }

/* En-tête de section façon carnet de labo */
.sec-head {
  display: flex; align-items: baseline; gap: 20px;
  margin-bottom: 64px;
  border-bottom: 1px solid var(--line);
  padding-bottom: 20px;
}
.sec-num {
  font-family: var(--ff-mono); font-size: 12px; color: var(--acc);
  letter-spacing: 0.16em;
}
.sec-title {
  font-size: clamp(30px, 4vw, 44px);
  font-weight: 600; letter-spacing: -0.03em; line-height: var(--lh-tight);
  margin: 0;
}
.sec-side {
  margin-left: auto;
  font-family: var(--ff-mono); font-size: 11px; color: var(--fg-3);
  letter-spacing: 0.1em; text-align: right;
  display: none;
}
@media (min-width: 760px) { .sec-side { display: block; } }

/* Croix de repérage aux coins (détail scientifique) */
.crosshair { position: absolute; width: 13px; height: 13px; pointer-events: none; opacity: .5; }
.crosshair::before, .crosshair::after { content: ""; position: absolute; background: var(--fg-3); }
.crosshair::before { left: 6px; top: 0; width: 1px; height: 13px; }
.crosshair::after { top: 6px; left: 0; height: 1px; width: 13px; }

/* =========================================================
   HERO
   ========================================================= */
.hero {
  min-height: 100vh;
  display: flex; flex-direction: column; justify-content: center;
  position: relative; overflow: hidden;
  padding: 120px 0 100px;
}
.hero-grid {
  position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(var(--line-weak) 1px, transparent 1px),
    linear-gradient(90deg, var(--line-weak) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: radial-gradient(ellipse 70% 65% at 50% 42%, rgba(0,0,0,1), transparent 78%);
}
.hero-glow {
  position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(900px 480px at 70% 18%, var(--acc-soft), transparent 65%);
}
.hero-inner { position: relative; z-index: 2; }
.hero-eyebrow {
  font-family: var(--ff-mono); font-size: 12px; letter-spacing: 0.18em;
  color: var(--fg-2); text-transform: uppercase;
  display: flex; align-items: center; gap: 14px;
  margin-bottom: 36px;
}
.hero-eyebrow::before {
  content: ""; width: 32px; height: 1px;
  background: var(--acc); box-shadow: 0 0 8px var(--acc-glow);
}
.hero-eyebrow b { color: var(--fg-0); font-weight: 500; }

h1.hero-title {
  font-size: clamp(56px, 10.5vw, 152px);
  font-weight: 600;
  letter-spacing: -0.045em;
  line-height: 0.94;
  margin: 0 0 40px;
  text-transform: uppercase;
}
h1.hero-title .l2 { display: block; }
h1.hero-title em {
  font-style: normal; color: var(--acc);
  text-shadow: 0 0 32px var(--acc-glow);
}
h1.hero-title .dot { color: var(--acc); }

.hero-lede {
  font-size: clamp(17px, 1.6vw, 20px); color: var(--fg-1);
  max-width: 600px; margin: 0 0 44px;
  line-height: 1.6;
  text-wrap: pretty;
}
.hero-lede strong { color: var(--fg-0); font-weight: 500; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.hero-cta .hint {
  font-family: var(--ff-mono); font-size: 11px; color: var(--fg-3);
  letter-spacing: 0.08em; margin-left: 6px;
}

/* Marginalia mono du hero */
.hero-meta {
  position: absolute; right: 32px; top: 50%; transform: translateY(-50%);
  font-family: var(--ff-mono); font-size: 11px; color: var(--fg-2);
  letter-spacing: 0.08em; line-height: 2.1;
  text-align: right;
  display: none;
}
@media (min-width: 1080px) { .hero-meta { display: block; } }
.hero-meta b { color: var(--acc); font-weight: 500; }
.hero-meta .sep { color: var(--fg-3); }

.hero-foot {
  position: absolute; left: 32px; right: 32px; bottom: 28px;
  display: flex; justify-content: space-between; align-items: flex-end;
  font-family: var(--ff-mono); font-size: 11px; color: var(--fg-3);
  letter-spacing: 0.12em;
  z-index: 2;
}
.hero-foot .dot {
  display: inline-block; width: 6px; height: 6px; border-radius: 999px;
  background: var(--acc); box-shadow: 0 0 8px var(--acc);
  margin-right: 8px; vertical-align: 1px;
  animation: mpulse 2.2s var(--ease) infinite;
}
@keyframes mpulse { 50% { opacity: .35; } }

/* Règle de mesure horizontale sous le hero */
.ruler {
  height: 12px; position: relative; overflow: hidden;
  border-top: 1px solid var(--line);
  background-image: repeating-linear-gradient(90deg,
    var(--line) 0, var(--line) 1px, transparent 1px, transparent 12px);
  background-size: 120px 100%;
  mask-image: linear-gradient(90deg, transparent, black 15%, black 85%, transparent);
}

/* =========================================================
   01 — LE LABO (manifeste)
   ========================================================= */
.manifesto {
  font-size: clamp(24px, 3.2vw, 38px);
  font-weight: 500; letter-spacing: -0.025em; line-height: 1.3;
  max-width: 900px; margin: 0 0 72px;
  text-wrap: pretty;
}
.manifesto em { font-style: normal; color: var(--acc); }
.manifesto .mut { color: var(--fg-3); }

.labo-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); }
@media (max-width: 860px) { .labo-grid { grid-template-columns: 1fr; } }
.labo-cell { background: var(--bg-0); padding: 32px 28px 36px; position: relative; transition: background var(--dur) var(--ease); }
.labo-cell:hover { background: var(--bg-1); }
.labo-cell .idx { font-family: var(--ff-mono); font-size: 11px; color: var(--acc); letter-spacing: 0.14em; }
.labo-cell h3 { font-size: 21px; font-weight: 600; letter-spacing: -0.02em; margin: 14px 0 10px; }
.labo-cell p { margin: 0; color: var(--fg-1); font-size: 15px; max-width: 34ch; }

/* =========================================================
   02 — PRODUITS
   ========================================================= */
.prod-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 20px; }
@media (max-width: 920px) { .prod-grid { grid-template-columns: 1fr; } }

.prod-feature {
  border: 1px solid var(--prolearn-line);
  border-radius: var(--r-md);
  background:
    radial-gradient(600px 300px at 85% -10%, var(--prolearn-soft), transparent 60%),
    var(--bg-1);
  padding: 40px;
  position: relative;
  display: flex; flex-direction: column;
  transition: box-shadow var(--dur-slow) var(--ease), transform var(--dur-slow) var(--ease);
}
.prod-feature:hover {
  box-shadow: 0 0 0 1px var(--prolearn-line), 0 24px 60px -30px var(--prolearn-glow);
  transform: translateY(-2px);
}
.prod-chip {
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--ff-mono); font-size: 11px; letter-spacing: 0.12em;
  color: var(--prolearn);
  background: var(--prolearn-soft);
  border: 1px solid var(--prolearn-line);
  border-radius: var(--r-sm);
  padding: 4px 10px;
  width: fit-content;
}
.prod-chip i { width: 6px; height: 6px; border-radius: 999px; background: currentColor; box-shadow: 0 0 6px currentColor; }
.prod-feature h3 {
  font-size: clamp(30px, 3.4vw, 42px); font-weight: 600; letter-spacing: -0.03em;
  margin: 22px 0 12px;
}
.prod-feature h3 span { color: var(--prolearn); text-shadow: 0 0 20px var(--prolearn-glow); }
.prod-feature .desc { color: var(--fg-1); font-size: 16px; max-width: 48ch; margin: 0 0 28px; text-wrap: pretty; }
.prod-specs {
  display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 36px;
}
.prod-specs span {
  font-family: var(--ff-mono); font-size: 11px; letter-spacing: 0.06em;
  color: var(--fg-2); border: 1px solid var(--line); border-radius: var(--r-sm);
  padding: 4px 10px;
}
.prod-feature .foot {
  margin-top: auto; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  border-top: 1px solid var(--line); padding-top: 22px;
}
.prod-link {
  font-family: var(--ff-mono); font-size: 13px; color: var(--prolearn);
  display: inline-flex; gap: 8px; align-items: center;
}
.prod-link:hover { text-shadow: 0 0 14px var(--prolearn-glow); }
.prod-feature .foot .ref { font-family: var(--ff-mono); font-size: 11px; color: var(--fg-3); letter-spacing: 0.1em; }

.prod-pending { display: flex; flex-direction: column; gap: 20px; }
.pending-card {
  flex: 1;
  border: 1px dashed var(--line-strong);
  border-radius: var(--r-md);
  padding: 28px;
  display: flex; flex-direction: column; gap: 12px;
  position: relative;
  background:
    repeating-linear-gradient(-45deg, transparent 0 14px, rgba(255,255,255,0.012) 14px 28px),
    var(--bg-0);
}
.pending-card .tag {
  font-family: var(--ff-mono); font-size: 11px; letter-spacing: 0.14em;
  color: var(--acc);
  display: flex; align-items: center; gap: 8px;
}
.pending-card .tag i {
  width: 6px; height: 6px; border-radius: 999px; background: var(--acc);
  animation: mpulse 1.6s var(--ease) infinite;
}
.pending-card .redact { display: flex; flex-direction: column; gap: 8px; margin: 4px 0; }
.pending-card .redact b {
  display: block; height: 14px; border-radius: 2px;
  background: var(--bg-3);
}
.pending-card .redact b:nth-child(2) { width: 72%; }
.pending-card .redact b:nth-child(3) { width: 45%; }
.pending-card .note { font-family: var(--ff-mono); font-size: 11px; color: var(--fg-3); letter-spacing: 0.08em; margin-top: auto; }

/* =========================================================
   03 — LA MÉTHODE (protocole)
   ========================================================= */
.proto { display: flex; flex-direction: column; }
.proto-step {
  display: grid; grid-template-columns: 110px 1fr 1.1fr; gap: 28px;
  padding: 34px 0;
  border-top: 1px solid var(--line);
  align-items: baseline;
  transition: background var(--dur) var(--ease);
}
.proto-step:last-child { border-bottom: 1px solid var(--line); }
.proto-step:hover { background: linear-gradient(90deg, var(--bg-1), transparent 70%); }
@media (max-width: 860px) {
  .proto-step { grid-template-columns: 70px 1fr; }
  .proto-step .how { grid-column: 2; }
}
.proto-step .stepnum {
  font-family: var(--ff-mono); font-size: 13px; color: var(--acc); letter-spacing: 0.1em;
}
.proto-step .stepnum small { display: block; color: var(--fg-3); font-size: 10px; margin-top: 6px; letter-spacing: 0.14em; }
.proto-step h3 { font-size: clamp(22px, 2.4vw, 30px); font-weight: 600; letter-spacing: -0.025em; margin: 0; }
.proto-step h3 small { display: block; font-family: var(--ff-mono); font-size: 11px; font-weight: 400; color: var(--fg-2); letter-spacing: 0.12em; text-transform: uppercase; margin-top: 8px; }
.proto-step .how { color: var(--fg-1); font-size: 15px; margin: 0; max-width: 52ch; text-wrap: pretty; }
.proto-step .how b { color: var(--fg-0); font-weight: 500; }

/* =========================================================
   04 — LE COLLECTIF (tableau périodique)
   ========================================================= */
.collectif-intro { display: grid; grid-template-columns: 1.1fr 1fr; gap: 60px; margin-bottom: 64px; }
@media (max-width: 920px) { .collectif-intro { grid-template-columns: 1fr; gap: 24px; } }
.collectif-intro .big {
  font-size: clamp(22px, 2.6vw, 32px); font-weight: 500; letter-spacing: -0.02em;
  line-height: 1.35; margin: 0; text-wrap: pretty;
}
.collectif-intro .big em { font-style: normal; color: var(--acc); }
.collectif-intro .side { color: var(--fg-1); font-size: 15px; margin: 0; align-self: end; max-width: 52ch; text-wrap: pretty; }

.periodic {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
}
@media (max-width: 860px) { .periodic { grid-template-columns: repeat(2, 1fr); } }
.element {
  background: var(--bg-0);
  aspect-ratio: 1 / 0.92;
  padding: 18px 20px;
  display: flex; flex-direction: column;
  position: relative;
  transition: background var(--dur) var(--ease);
}
.element:hover { background: var(--bg-1); }
.element .mass { font-family: var(--ff-mono); font-size: 10px; color: var(--fg-3); letter-spacing: 0.1em; display: flex; justify-content: space-between; }
.element .sym {
  font-family: var(--ff-mono); font-weight: 600;
  font-size: clamp(34px, 4.5vw, 52px); letter-spacing: -0.04em;
  margin: auto 0 4px; line-height: 1;
  color: var(--fg-0);
}
.element .name { font-size: 13px; color: var(--fg-1); font-weight: 500; }
.element .dose { font-family: var(--ff-mono); font-size: 10px; color: var(--fg-3); letter-spacing: 0.1em; margin-top: 4px; }
.element.is-catalyst {
  background: linear-gradient(135deg, var(--acc-soft), transparent 70%), var(--bg-1);
  box-shadow: inset 0 0 0 1px var(--acc-line);
}
.element.is-catalyst .sym { color: var(--acc); text-shadow: 0 0 24px var(--acc-glow); }
.element.is-catalyst .mass, .element.is-catalyst .dose { color: var(--acc-deep); }
.element.is-catalyst .dose { color: color-mix(in oklab, var(--acc) 60%, var(--fg-2)); }

.collectif-caption {
  margin-top: 18px;
  font-family: var(--ff-mono); font-size: 11px; color: var(--fg-3);
  letter-spacing: 0.1em;
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
}
.collectif-caption b { color: var(--acc); font-weight: 500; }

/* =========================================================
   05 — POURQUOI NOUS
   ========================================================= */
.proof-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
@media (max-width: 860px) { .proof-grid { grid-template-columns: 1fr; } }
.proof {
  border: 1px solid var(--line); border-radius: var(--r-md);
  background: var(--bg-1);
  padding: 32px 28px;
  display: flex; flex-direction: column; gap: 14px;
  transition: border-color var(--dur) var(--ease), transform var(--dur-slow) var(--ease);
}
.proof:hover { border-color: var(--acc-line); transform: translateY(-2px); }
.proof .k {
  font-family: var(--ff-mono); font-size: clamp(34px, 3.6vw, 46px); font-weight: 600;
  letter-spacing: -0.03em; color: var(--acc); line-height: 1;
}
.proof .k small { font-size: 0.45em; color: var(--fg-2); letter-spacing: 0.06em; margin-left: 6px; }
.proof h3 { margin: 0; font-size: 18px; font-weight: 600; letter-spacing: -0.015em; }
.proof p { margin: 0; color: var(--fg-1); font-size: 14.5px; text-wrap: pretty; }

/* =========================================================
   CONTACT
   ========================================================= */
.contact { padding: 150px 0 130px; border-top: 1px solid var(--line-weak); position: relative; overflow: hidden; }
.contact-glow {
  position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(700px 400px at 30% 100%, var(--acc-soft), transparent 65%);
}
.contact-grid { display: grid; grid-template-columns: 1.1fr 1fr; gap: 80px; position: relative; }
@media (max-width: 920px) { .contact-grid { grid-template-columns: 1fr; gap: 48px; } }
.contact h2 {
  font-size: clamp(40px, 6vw, 76px); font-weight: 600; letter-spacing: -0.04em;
  line-height: 1.0; margin: 0 0 28px; text-transform: uppercase;
}
.contact h2 em { font-style: normal; color: var(--acc); text-shadow: 0 0 28px var(--acc-glow); }
.contact .pitch { color: var(--fg-1); font-size: 17px; max-width: 46ch; margin: 0 0 36px; text-wrap: pretty; }
.contact .pitch strong { color: var(--fg-0); font-weight: 500; }
.contact-direct { display: flex; flex-direction: column; gap: 10px; font-family: var(--ff-mono); font-size: 13px; }
.contact-direct a { color: var(--fg-1); display: inline-flex; gap: 12px; align-items: baseline; width: fit-content; }
.contact-direct a:hover { color: var(--acc); }
.contact-direct .lbl { font-size: 10px; color: var(--fg-3); letter-spacing: 0.14em; width: 64px; }

.form { display: flex; flex-direction: column; gap: 18px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field label {
  font-family: var(--ff-mono); font-size: 11px; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--fg-2);
  display: flex; justify-content: space-between;
}
.field label i { font-style: normal; color: var(--fg-3); }
.field input, .field textarea {
  background: var(--bg-1);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  padding: 13px 14px;
  font-size: 15px;
  color: var(--fg-0);
  transition: border-color var(--dur) var(--ease), background var(--dur) var(--ease);
  resize: vertical;
}
.field input::placeholder, .field textarea::placeholder { color: var(--fg-3); }
.field input:hover, .field textarea:hover { border-color: var(--line-strong); }
.field input:focus, .field textarea:focus { border-color: var(--acc-line); background: var(--bg-2); box-shadow: none; outline: none; }
.form-foot { display: flex; align-items: center; gap: 16px; margin-top: 6px; }
.form-foot .promise { font-family: var(--ff-mono); font-size: 11px; color: var(--fg-3); letter-spacing: 0.06em; }
.form-sent {
  border: 1px solid var(--acc-line); border-radius: var(--r-sm);
  background: var(--acc-soft); color: var(--acc-hi);
  font-family: var(--ff-mono); font-size: 13px;
  padding: 12px 14px; letter-spacing: 0.04em;
  display: none;
}
.form.is-sent .form-sent { display: block; }

/* =========================================================
   FOOTER
   ========================================================= */
footer {
  border-top: 1px solid var(--line);
  padding: 36px 0 44px;
}
.foot-grid {
  display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap;
  font-family: var(--ff-mono); font-size: 11.5px; color: var(--fg-3);
  letter-spacing: 0.06em;
}
.foot-grid a { color: var(--fg-2); }
.foot-grid a:hover { color: var(--fg-0); }
.foot-links { display: flex; gap: 20px; flex-wrap: wrap; }

/* =========================================================
   Révélations au scroll — nettes et rapides
   ========================================================= */
@media (prefers-reduced-motion: no-preference) {
  .rv {
    opacity: 0;
    transform: translateY(16px);
    transition: opacity .55s var(--ease), transform .55s var(--ease);
    transition-delay: var(--rv-d, 0ms);
  }
  .rv.is-in { opacity: 1; transform: none; }

  /* Signature : assemblage des éléments du tableau périodique */
  .periodic .element {
    opacity: 0;
    transform: translate(var(--scatter-x, 0), var(--scatter-y, 24px)) scale(.96);
    transition: opacity .6s var(--ease), transform .6s var(--ease);
    transition-delay: var(--rv-d, 0ms);
  }
  .periodic.is-in .element { opacity: 1; transform: none; }

  .hero-eyebrow, h1.hero-title, .hero-lede, .hero-cta {
    animation: heroIn .7s var(--ease) backwards;
  }
  h1.hero-title { animation-delay: .08s; }
  .hero-lede { animation-delay: .2s; }
  .hero-cta { animation-delay: .3s; }
  @keyframes heroIn {
    from { opacity: 0; transform: translateY(18px); }
    to   { opacity: 1; transform: none; }
  }
}

/* =========================================================
   Tweak fab (réactif)
   ========================================================= */
.mdj-tweak {
  position: fixed; right: 16px; bottom: 16px; z-index: 90;
  display: flex; align-items: center; gap: 10px;
  background: rgba(12,12,14,0.92);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 8px 12px;
  font-family: var(--ff-mono); font-size: 10px; letter-spacing: 0.14em;
  backdrop-filter: blur(10px);
}
.mdj-tweak .sw {
  width: 16px; height: 16px; border-radius: 999px; cursor: pointer;
  border: 1px solid var(--line-strong);
  transition: transform var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
}
.mdj-tweak .sw:hover { transform: scale(1.15); }
.mdj-tweak .sw.is-active { box-shadow: 0 0 0 2px var(--bg-0), 0 0 0 3.5px var(--fg-2); }
.mdj-tweak .sw[data-sw="reactif"] { background: #FF6A3C; }
.mdj-tweak .sw[data-sw="cyan"]    { background: #45D2FF; }
.mdj-tweak .sw[data-sw="acide"]   { background: #DCFF3D; }
