/* =========================================================
   DESL Consulting — design immersif (fond 3D permanent)
   Noir profond · filaments électriques · typo grotesque
   ========================================================= */

:root {
  --bg:        #06070b;
  --ink:       #eef1f7;   /* texte principal */
  --dim:       #9aa3b5;   /* texte secondaire */
  --faint:     #828b9f;   /* texte tertiaire — remonté pour contraste WCAG AA */
  --accent:    #6ea8ff;   /* bleu électrique */
  --accent-2:  #9db9ff;
  --line:      rgba(255,255,255,.10);
  --panel:     rgba(13,16,24,.55);
  --font-head: 'Space Grotesk', 'Inter', system-ui, sans-serif;
  --font-body: 'Inter', system-ui, sans-serif;
  --pad: clamp(20px, 5vw, 72px);
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 100px; }

body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--ink);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
em { font-style: normal; }

h1, h2, h3 { font-family: var(--font-head); font-weight: 600; line-height: 1.04; letter-spacing: -0.02em; }

/* ---------- Fond 3D + habillage ---------- */
#scene {
  position: fixed; inset: 0; width: 100vw; height: 100vh;
  z-index: 0; display: block;
}
.grain {
  position: fixed; inset: -50%; z-index: 2; pointer-events: none; opacity: .05;
  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%3C/filter%3E%3Crect width='120' height='120' filter='url(%23n)' opacity='0.9'/%3E%3C/svg%3E");
  animation: grain 8s steps(10) infinite;
}
@keyframes grain {
  0%,100% { transform: translate(0,0); } 20% { transform: translate(-3%,2%); }
  40% { transform: translate(2%,-3%); } 60% { transform: translate(-2%,-2%); }
  80% { transform: translate(3%,3%); }
}
.vignette {
  position: fixed; inset: 0; z-index: 1; pointer-events: none;
  background: radial-gradient(120% 90% at 50% 45%, transparent 55%, rgba(3,4,7,.75) 100%);
}

/* ---------- Loader ---------- */
#loader {
  position: fixed; inset: 0; z-index: 100; background: var(--bg);
  display: flex; align-items: center; justify-content: center;
  transition: opacity .8s ease, visibility .8s;
}
#loader.done { opacity: 0; visibility: hidden; }
.loader-inner { text-align: center; }
.loader-brand { font-family: var(--font-head); font-size: 1.4rem; font-weight: 700; letter-spacing: .02em; }
.loader-brand em { color: var(--dim); font-weight: 400; }
.loader-bar {
  display: block; width: 160px; height: 1px; margin: 22px auto 0;
  background: rgba(255,255,255,.12); overflow: hidden;
}
.loader-bar span {
  display: block; height: 100%; width: 40%;
  background: var(--accent);
  animation: load 1.2s ease-in-out infinite;
}
@keyframes load { 0% { transform: translateX(-100%);} 100% { transform: translateX(400%);} }

/* ---------- Progression ---------- */
.progress { position: fixed; top: 0; left: 0; right: 0; height: 2px; z-index: 60; }
.progress span { display: block; height: 100%; width: 0; background: var(--accent); transition: width .1s linear; }

/* ---------- En-tête ---------- */
.site-header {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; gap: 32px;
  padding: 22px var(--pad);
  transition: background .4s ease, backdrop-filter .4s ease, padding .4s ease;
}
.site-header.scrolled {
  background: rgba(6,7,11,.6);
  backdrop-filter: blur(14px);
  padding-top: 14px; padding-bottom: 14px;
  border-bottom: 1px solid var(--line);
}
.brand { font-family: var(--font-head); font-weight: 700; font-size: 1.15rem; letter-spacing: .02em; }
.brand em { color: var(--dim); font-weight: 400; }
.main-nav { display: flex; gap: 26px; margin-left: auto; }
.main-nav a {
  font-size: .82rem; text-transform: uppercase; letter-spacing: .12em; color: var(--dim);
  transition: color .2s;
}
.main-nav a:hover { color: var(--ink); }

/* ---------- Boutons ---------- */
.btn-solid, .btn-line {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-family: var(--font-head); font-weight: 500; font-size: .92rem;
  padding: 15px 28px; cursor: pointer;
  transition: background .25s, color .25s, border-color .25s, transform .2s;
}
.btn-solid { background: var(--ink); color: #0a0c12; border: 1px solid var(--ink); }
.btn-solid:hover { background: var(--accent); border-color: var(--accent); color: #05070c; transform: translateY(-2px); }
.btn-line { background: transparent; color: var(--ink); border: 1px solid rgba(255,255,255,.25); }
.btn-line:hover { border-color: var(--accent); color: var(--accent-2); transform: translateY(-2px); }
.btn-line .arrow { transition: transform .25s; }
.btn-line:hover .arrow { transform: translateX(4px); }
.btn-block { width: 100%; }

.nav-toggle { display: none; margin-left: auto; background: none; border: 0; cursor: pointer; flex-direction: column; gap: 6px; padding: 8px; }
.nav-toggle span { width: 26px; height: 1.5px; background: var(--ink); }

/* ---------- Contenu au-dessus de la scène ---------- */
main, .site-footer { position: relative; z-index: 10; }

.eyebrow {
  font-size: .78rem; text-transform: uppercase; letter-spacing: .22em;
  color: var(--accent-2);
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex; flex-direction: column; justify-content: center;
  padding: 120px var(--pad) 80px;
  max-width: 1200px;
  isolation: isolate;
}
/* Lisibilité du hero sous 900px : la scène 3D est centrée et passe pile
   derrière le texte. On atténue globalement la scène et on ajoute un voile
   sombre renforcé au centre (là où se trouve le texte) — les particules en
   fusion additive sont ainsi domptées sans masquer complètement l'animation. */
@media (max-width: 900px) {
  #scene { opacity: .5; }
  .hero::before {
    content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
    background: linear-gradient(180deg,
      rgba(6,7,11,.55) 0%, rgba(6,7,11,.9) 38%, rgba(6,7,11,.92) 72%, rgba(6,7,11,.8) 100%);
  }
}
.hero-title {
  font-size: clamp(3rem, 9.5vw, 7.6rem);
  margin: 26px 0 30px;
  text-transform: none;
}
.hero-title .line { display: block; }
.hero-title em { color: var(--accent); }
.hero-sub { max-width: 520px; color: var(--dim); font-size: clamp(1rem, 1.5vw, 1.15rem); }
.hero-cta { display: flex; flex-wrap: wrap; gap: 16px; margin-top: 42px; }

.scroll-cue {
  position: absolute; bottom: 30px; left: var(--pad);
  display: flex; align-items: center; gap: 12px;
  font-size: .72rem; text-transform: uppercase; letter-spacing: .2em; color: var(--faint);
}
.scroll-cue span { display: block; width: 1px; height: 48px; background: linear-gradient(var(--accent), transparent); animation: cue 2s ease-in-out infinite; transform-origin: top; }
@keyframes cue { 0%,100% { transform: scaleY(.3); opacity:.4;} 50% { transform: scaleY(1); opacity:1;} }

/* ---------- Manifeste / grandes phrases ---------- */
.manifesto { padding: 22vh var(--pad); max-width: 1100px; }
.big-statement {
  font-family: var(--font-head);
  font-size: clamp(1.6rem, 4vw, 3rem);
  font-weight: 500; line-height: 1.25; letter-spacing: -0.015em;
}
.big-statement em { color: var(--accent); }

.stats {
  list-style: none; display: grid; grid-template-columns: repeat(4, 1fr);
  gap: 28px; margin-top: 9vh; padding-top: 40px; border-top: 1px solid var(--line);
}
.stats strong { display: block; font-family: var(--font-head); font-size: clamp(2rem, 4vw, 3.2rem); font-weight: 600; color: var(--ink); line-height: 1; }
.stats span { display: block; margin-top: 12px; font-size: .85rem; color: var(--dim); line-height: 1.5; }

/* ---------- Sections ---------- */
.section { padding: 16vh var(--pad); max-width: 1240px; }
.section-head { margin-bottom: 7vh; max-width: 720px; }
.section-head .index {
  display: block; font-family: var(--font-head); font-size: .8rem;
  color: var(--accent); letter-spacing: .3em; margin-bottom: 18px;
}
.section-head h2 { font-size: clamp(2.4rem, 6vw, 4.6rem); }
.section-head h2 em { color: var(--accent); }
.section-head p { margin-top: 18px; color: var(--dim); font-size: 1.05rem; max-width: 540px; }
.section-note { margin-top: 6vh; color: var(--faint); font-size: .9rem; max-width: 560px; }

/* ---------- Lignes services ---------- */
.rows { border-top: 1px solid var(--line); }
.row {
  display: grid; grid-template-columns: 90px 320px 1fr; gap: 28px; align-items: start;
  padding: 44px 0; border-bottom: 1px solid var(--line);
  transition: padding-left .35s ease;
}
.row:hover { padding-left: 16px; }
.row-num { font-family: var(--font-head); color: var(--faint); font-size: .95rem; padding-top: 6px; }
.row h3 { font-size: clamp(1.3rem, 2.4vw, 1.8rem); }
.row:hover h3 { color: var(--accent-2); }
.row p { color: var(--dim); font-size: .98rem; max-width: 560px; }

/* ---------- Panneaux ---------- */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  backdrop-filter: blur(10px);
  padding: 36px 32px;
  transition: border-color .3s, transform .3s;
}
.panel:hover { border-color: rgba(110,168,255,.4); transform: translateY(-4px); }
.panel h3 { font-size: 1.25rem; margin-bottom: 22px; }
.panel ul { list-style: none; display: grid; gap: 13px; }
.panel li { position: relative; padding-left: 24px; color: var(--dim); font-size: .95rem; }
.panel li::before { content: ""; position: absolute; left: 0; top: .62em; width: 12px; height: 1px; background: var(--accent); }

/* ---------- Étapes ---------- */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.step { border-top: 1px solid var(--line); padding-top: 30px; }
.step-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 44px; height: 44px; border: 1px solid rgba(110,168,255,.5); border-radius: 50%;
  font-family: var(--font-head); color: var(--accent-2); margin-bottom: 20px;
}
.step h3 { font-size: 1.25rem; margin-bottom: 10px; }
.step p { color: var(--dim); font-size: .95rem; }

/* ---------- Offres ---------- */
.offer { display: flex; flex-direction: column; position: relative; }
.offer-price { font-family: var(--font-head); font-size: 1.7rem; font-weight: 600; margin-bottom: 24px; }
.offer-price span { display: block; font-family: var(--font-body); font-weight: 400; font-size: .84rem; color: var(--faint); margin-top: 4px; }
.offer ul { margin-bottom: 30px; }
.offer .btn-line, .offer .btn-solid { margin-top: auto; }
.offer.featured { border-color: rgba(110,168,255,.55); background: rgba(17,24,39,.6); }
.tag {
  position: absolute; top: -12px; left: 30px;
  background: var(--accent); color: #05070c;
  font-family: var(--font-head); font-size: .7rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: .1em; padding: 5px 12px;
}

/* ---------- Métriques (résultats) ---------- */
.metric strong {
  display: block; font-family: var(--font-head); font-weight: 600;
  font-size: clamp(1.9rem, 3.6vw, 2.8rem); color: var(--ink); line-height: 1.05;
  margin-bottom: 16px;
}
.metric strong em { color: var(--accent); font-size: .55em; font-weight: 500; }
.metric h3 { margin-bottom: 10px; }
.metric p { color: var(--dim); font-size: .95rem; }
.link-more { color: var(--accent-2); border-bottom: 1px solid rgba(110,168,255,.4); }
.link-more:hover { color: var(--ink); border-color: var(--ink); }

/* ---------- Page exemples ---------- */
.hero-page { min-height: 62vh; padding-bottom: 30px; }
.cases-section { padding-top: 4vh; }
.cases { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.case { display: flex; flex-direction: column; }
.case-tag {
  align-self: flex-start;
  font-family: var(--font-head); font-size: .72rem; font-weight: 600;
  text-transform: uppercase; letter-spacing: .14em; color: var(--accent-2);
  border: 1px solid rgba(110,168,255,.35); padding: 6px 12px; margin-bottom: 20px;
}
.case h3 { font-size: 1.3rem; margin-bottom: 12px; }
.case > p { color: var(--dim); font-size: .95rem; margin-bottom: 22px; }
.compare {
  display: grid; grid-template-columns: 1fr 1fr; gap: 1px;
  background: var(--line); border: 1px solid var(--line); margin-bottom: 22px;
}
.compare > div { background: rgba(6,7,11,.6); padding: 18px 16px; }
.compare span {
  display: block; font-size: .68rem; text-transform: uppercase; letter-spacing: .16em;
  color: var(--faint); margin-bottom: 8px;
}
.compare > div:last-child span { color: var(--accent-2); }
.compare strong { display: block; font-family: var(--font-head); font-size: 1.35rem; color: var(--ink); line-height: 1.1; }
.compare > div:last-child strong { color: var(--accent-2); }
.compare em { display: block; margin-top: 6px; font-size: .8rem; color: var(--dim); line-height: 1.4; }
.case ul { margin-bottom: 22px; }
.case-price {
  margin-top: auto; padding-top: 16px; border-top: 1px solid var(--line);
  font-family: var(--font-head); font-size: .9rem; color: var(--ink);
}
.cta-final { text-align: left; padding-bottom: 14vh; }
.section-note em { color: var(--accent-2); }

/* ---------- À propos ---------- */
.about { max-width: 860px; }
.about > p:last-child { margin-top: 28px; color: var(--dim); font-size: 1.05rem; max-width: 680px; }

/* ---------- Contact ---------- */
.contact { padding-bottom: 10vh; }
.contact .section-head h2 { font-size: clamp(2.8rem, 7vw, 5.4rem); }
.contact-form { max-width: 640px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.field { margin-bottom: 18px; }
.field label { display: block; font-size: .78rem; text-transform: uppercase; letter-spacing: .14em; color: var(--dim); margin-bottom: 9px; }
.field .opt { text-transform: none; letter-spacing: 0; color: var(--faint); }
.field input, .field textarea {
  width: 100%; padding: 15px 16px;
  font-family: var(--font-body); font-size: .96rem; color: var(--ink);
  background: rgba(255,255,255,.04); border: 1px solid var(--line);
  transition: border-color .25s, background .25s;
}
.field input:focus, .field textarea:focus { outline: none; border-color: var(--accent); background: rgba(110,168,255,.06); }
.field textarea { resize: vertical; }
.form-success {
  border: 1px solid rgba(110,168,255,.4); background: rgba(110,168,255,.06);
  padding: 28px 26px; border-radius: 4px;
}
.form-success strong { font-family: var(--font-head); font-size: 1.15rem; color: var(--ink); }
.form-success p { margin-top: 8px; color: var(--dim); font-size: .95rem; }
.form-meta { margin-top: 18px; font-size: .85rem; color: var(--faint); }
.form-meta a { color: var(--dim); border-bottom: 1px solid var(--faint); }
.form-meta a:hover { color: var(--accent-2); border-color: var(--accent-2); }

/* ---------- Pied de page ---------- */
.site-footer {
  display: flex; align-items: center; gap: 30px; flex-wrap: wrap;
  padding: 40px var(--pad);
  border-top: 1px solid var(--line);
  background: rgba(6,7,11,.7); backdrop-filter: blur(10px);
}
.site-footer nav { display: flex; gap: 22px; }
.site-footer nav a { font-size: .82rem; color: var(--dim); }
.site-footer nav a:hover { color: var(--ink); }
.site-footer p { margin-left: auto; font-size: .8rem; color: var(--faint); }

/* ---------- Curseur personnalisé ---------- */
@media (pointer: fine) {
  body.has-cursor, body.has-cursor a, body.has-cursor button,
  body.has-cursor input, body.has-cursor textarea, body.has-cursor label { cursor: none; }
  .cursor-dot, .cursor-ring {
    position: fixed; top: 0; left: 0; z-index: 200; pointer-events: none;
    border-radius: 50%; transform: translate(-50%, -50%);
    opacity: 0; transition: opacity .3s;
  }
  body.has-cursor .cursor-dot, body.has-cursor .cursor-ring { opacity: 1; }
  .cursor-dot { width: 7px; height: 7px; background: var(--accent); }
  .cursor-ring {
    width: 38px; height: 38px; border: 1px solid rgba(110,168,255,.5);
    transition: opacity .3s, width .25s ease, height .25s ease, border-color .25s ease, background .25s ease;
  }
  .cursor-ring.is-hover {
    width: 62px; height: 62px;
    border-color: rgba(110,168,255,.9);
    background: rgba(110,168,255,.08);
  }
}
@media (pointer: coarse) { .cursor-dot, .cursor-ring { display: none; } }

/* ---------- Bandeau défilant ---------- */
.marquee {
  overflow: hidden; white-space: nowrap;
  border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
  padding: 26px 0; position: relative; z-index: 10;
}
.marquee-track { display: inline-flex; animation: marquee 36s linear infinite; }
.marquee-track span {
  font-family: var(--font-head); font-weight: 700;
  font-size: clamp(1.6rem, 4vw, 3rem);
  text-transform: uppercase; letter-spacing: .04em;
  color: transparent; -webkit-text-stroke: 1px rgba(238,241,247,.35);
  white-space: nowrap;
}
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ---------- Chiffres fantômes des sections ---------- */
.section-head { position: relative; }
.section-head[data-ghost]::after {
  content: attr(data-ghost);
  position: absolute; right: -4vw; top: -.55em;
  font-family: var(--font-head); font-weight: 700;
  font-size: clamp(7rem, 17vw, 14rem); line-height: 1;
  color: transparent; -webkit-text-stroke: 1px rgba(110,168,255,.13);
  pointer-events: none; z-index: -1;
}

/* ---------- Inclinaison 3D des panneaux (souris) ---------- */
.panel, .step { will-change: transform; }

/* ---------- Piège anti-spam (invisible pour les humains) ---------- */
.hp-field { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }

/* ---------- Apparitions ---------- */
.reveal { opacity: 0; transform: translateY(34px); transition: opacity .9s cubic-bezier(.2,.65,.3,1), transform .9s cubic-bezier(.2,.65,.3,1); }
.reveal.is-visible { opacity: 1; transform: none; }
.hero-title .line { transition-delay: calc(var(--d, 0) * .12s); }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
  .grain, .scroll-cue span, .marquee-track { animation: none; }
  .cursor-dot, .cursor-ring { display: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
  .grid-2, .grid-3, .steps, .cases { grid-template-columns: 1fr; }
  .row { grid-template-columns: 60px 1fr; }
  .row p { grid-column: 2; }
}
/* Menu : bascule en hamburger dès 980px pour éviter que la navigation
   déborde sur tablette (5 items + logo ne tiennent pas sous ~1000px). */
@media (max-width: 980px) {
  .main-nav, .site-header > .btn-line { display: none; }
  .nav-toggle { display: flex; }
  .site-header.nav-open { background: rgba(6,7,11,.92); backdrop-filter: blur(16px); }
  .site-header.nav-open .main-nav {
    display: flex; flex-direction: column; gap: 18px;
    position: absolute; top: 100%; left: 0; right: 0;
    background: rgba(6,7,11,.92); backdrop-filter: blur(16px);
    padding: 24px var(--pad) 30px; border-bottom: 1px solid var(--line);
  }
}
@media (max-width: 760px) {
  .field-row { grid-template-columns: 1fr; }
  .site-footer p { margin-left: 0; }
}
