/* ==========================================================================
   BE Designwork — Design system (industrial / technical)
   ========================================================================== */

:root {
  /* Couleurs */
  --bg:        #0c0e11;
  --bg-elev:   #14171c;
  --surface:   #1a1e24;
  --surface-2: #20252c;
  --line:      #2a2f38;
  --line-soft: #21262e;
  --text:      #eceef1;
  --text-dim:  #9aa2ad;
  --text-mute: #878e99;
  --accent:    #ff6a1a;
  --accent-2:  #ff8845;
  --accent-ink:#1a0d04;

  /* Typo */
  --font-head: "Space Grotesk", "Segoe UI", system-ui, sans-serif;
  --font-body: "Inter", "Segoe UI", system-ui, sans-serif;
  --font-mono: ui-monospace, "Cascadia Mono", "Roboto Mono", Menlo, Consolas, monospace;

  /* Échelle */
  --container: 1200px;
  --gutter: clamp(1.25rem, 4vw, 2.5rem);
  --radius: 4px;
  --radius-lg: 8px;

  /* Transitions */
  --t-fast: .18s ease;
  --t-med:  .32s cubic-bezier(.2,.6,.2,1);
}

/* Reset ------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--text);
  line-height: 1.6;
  font-size: 1rem;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
ul { list-style: none; padding: 0; }
button { font: inherit; cursor: pointer; }

/* Typo -------------------------------------------------------------------- */
h1, h2, h3, h4 {
  font-family: var(--font-head);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: -0.02em;
}
h1 { font-size: clamp(2.4rem, 6vw, 4.6rem); font-weight: 700; }
h2 { font-size: clamp(1.9rem, 4vw, 3rem); }
h3 { font-size: clamp(1.2rem, 2vw, 1.5rem); }
p  { color: var(--text-dim); }
strong { color: var(--text); }

.eyebrow {
  font-family: var(--font-mono);
  font-size: .78rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: .6rem;
}
.eyebrow::before {
  content: "";
  width: 1.6rem;
  height: 1px;
  background: var(--accent);
}

/* Layout ------------------------------------------------------------------ */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.section { padding-block: clamp(4rem, 9vw, 7.5rem); }
.section--tight { padding-block: clamp(3rem, 6vw, 4.5rem); }
.section-head { max-width: 60ch; margin-bottom: 3rem; }
.section-head h2 { margin: .8rem 0 1rem; }
.section-head p { font-size: 1.075rem; }

.lede { font-size: clamp(1.1rem, 1.6vw, 1.3rem); color: var(--text); max-width: 60ch; }

/* Skip link --------------------------------------------------------------- */
.skip-link {
  position: absolute; left: 1rem; top: -3rem;
  background: var(--accent); color: var(--accent-ink);
  padding: .6rem 1rem; border-radius: var(--radius); font-weight: 600;
  z-index: 1000; transition: top var(--t-fast);
}
.skip-link:focus { top: 1rem; }

/* Header / nav ------------------------------------------------------------ */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line-soft);
}
.nav {
  display: flex; align-items: center; justify-content: space-between;
  height: 72px;
}
.brand {
  font-family: var(--font-head);
  font-weight: 700; font-size: 1.15rem; letter-spacing: -0.01em;
  display: inline-flex; align-items: center; gap: .55rem;
}
.brand .mark {
  width: 30px; height: 30px; flex: none;
  background: var(--accent); color: var(--accent-ink);
  display: grid; place-items: center;
  font-size: .85rem; font-weight: 700; border-radius: var(--radius);
}
.brand span { color: var(--text-mute); font-weight: 400; }

.nav-links { display: flex; align-items: center; gap: 2rem; }
.nav-links a {
  font-size: .95rem; color: var(--text-dim);
  position: relative; padding: .25rem 0; transition: color var(--t-fast);
}
.nav-links a:hover, .nav-links a[aria-current="page"] { color: var(--text); }
.nav-links a[aria-current="page"]::after {
  content: ""; position: absolute; left: 0; bottom: -2px;
  width: 100%; height: 2px; background: var(--accent);
}
.nav-cta { margin-left: .5rem; }

.nav-toggle {
  display: none; background: none; border: 1px solid var(--line);
  border-radius: var(--radius); width: 44px; height: 44px;
  color: var(--text); padding: 0;
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  content: ""; display: block; width: 20px; height: 2px; background: currentColor;
  margin-inline: auto; transition: transform var(--t-fast), opacity var(--t-fast);
}
.nav-toggle span::before { transform: translateY(-6px); }
.nav-toggle span::after  { transform: translateY(4px); }
.nav-toggle[aria-expanded="true"] span { background: transparent; }
.nav-toggle[aria-expanded="true"] span::before { transform: rotate(45deg); }
.nav-toggle[aria-expanded="true"] span::after  { transform: rotate(-45deg) translateY(-1.4px); }

/* Buttons ----------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; gap: .6rem;
  font-family: var(--font-head); font-weight: 600; font-size: .95rem;
  padding: .85rem 1.5rem; border-radius: var(--radius);
  border: 1px solid transparent; transition: transform var(--t-fast), background var(--t-fast), border-color var(--t-fast);
}
.btn:hover { transform: translateY(-2px); }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: var(--accent-2); }
.btn-ghost { background: transparent; border-color: var(--line); color: var(--text); }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }
.btn .arrow { transition: transform var(--t-fast); }
.btn:hover .arrow { transform: translateX(3px); }

.btn-row { display: flex; flex-wrap: wrap; gap: 1rem; margin-top: 2rem; }

/* Hero -------------------------------------------------------------------- */
.hero {
  position: relative; overflow: hidden;
  border-bottom: 1px solid var(--line-soft);
}
.hero__media { position: absolute; inset: 0; z-index: 0; }
.hero__media img { width: 100%; height: 100%; object-fit: cover; opacity: .55; }
.hero__media::after {
  content: ""; position: absolute; inset: 0;
  background:
    linear-gradient(90deg, var(--bg) 8%, color-mix(in srgb, var(--bg) 40%, transparent) 60%, transparent),
    linear-gradient(0deg, var(--bg), transparent 55%);
}
.hero__inner { position: relative; z-index: 1; padding-block: clamp(5rem, 14vw, 9rem); }
.hero h1 { max-width: 16ch; margin: 1.4rem 0 1.5rem; }
.hero .lede { color: var(--text-dim); }
.hero__meta {
  display: flex; flex-wrap: wrap; gap: 2rem; margin-top: 3rem;
  padding-top: 2rem; border-top: 1px solid var(--line-soft);
  font-family: var(--font-mono); font-size: .8rem; letter-spacing: .05em;
  color: var(--text-mute); text-transform: uppercase;
}
.hero__meta b { color: var(--text); font-weight: 600; }

/* Grilles ----------------------------------------------------------------- */
.grid { display: grid; gap: 1.5rem; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* Cards services ---------------------------------------------------------- */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 2rem 1.75rem;
  transition: transform var(--t-med), border-color var(--t-med), background var(--t-med);
  position: relative;
}
.card:hover { transform: translateY(-4px); border-color: var(--accent); background: var(--surface-2); }
.card .num {
  font-family: var(--font-mono); font-size: .8rem; color: var(--accent);
  letter-spacing: .1em;
}
.card h3 { margin: 1rem 0 .65rem; }
.card p { font-size: .96rem; }
.card ul { margin-top: 1.1rem; display: grid; gap: .5rem; }
.card li {
  font-size: .9rem; color: var(--text-dim);
  padding-left: 1.1rem; position: relative;
}
.card li::before {
  content: ""; position: absolute; left: 0; top: .62em;
  width: 6px; height: 6px; background: var(--accent); border-radius: 1px;
}

/* Process ----------------------------------------------------------------- */
.process { counter-reset: step; }
.process-step {
  border-top: 1px solid var(--line);
  padding: 1.75rem 0;
  display: grid; grid-template-columns: 4rem 1fr; gap: 1.5rem; align-items: start;
}
.process-step .step-num {
  font-family: var(--font-mono); color: var(--accent); font-size: 1.1rem;
}
.process-step h3 { margin-bottom: .4rem; }
.process-step p { font-size: .96rem; max-width: 60ch; }

/* Split (image + texte) --------------------------------------------------- */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.split--reverse .split__media { order: 2; }
.split__media img { border-radius: var(--radius-lg); border: 1px solid var(--line); width: 100%; }
.split__body h2 { margin: .8rem 0 1.2rem; }

/* Liste de principes ------------------------------------------------------ */
.principles { display: grid; gap: 0; }
.principle { border-top: 1px solid var(--line); padding: 1.5rem 0; }
.principle h3 { margin-bottom: .35rem; font-size: 1.15rem; }
.principle p { font-size: .96rem; }

/* Stats ------------------------------------------------------------------- */
.stats { display: grid; grid-template-columns: repeat(4,1fr); gap: 1px; background: var(--line); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; }
.stat { background: var(--surface); padding: 2rem 1.5rem; }
.stat .big { font-family: var(--font-head); font-size: clamp(2rem,4vw,2.8rem); font-weight: 700; color: var(--text); }
.stat .lbl { font-size: .9rem; color: var(--text-dim); margin-top: .4rem; }

/* Projets ----------------------------------------------------------------- */
.project {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: 1.75rem;
  display: flex; flex-direction: column; gap: .9rem;
  transition: transform var(--t-med), border-color var(--t-med);
}
.project:hover { transform: translateY(-4px); border-color: var(--accent); }
.project .sector { font-family: var(--font-mono); font-size: .76rem; color: var(--accent); letter-spacing: .08em; text-transform: uppercase; }
.project h3 { font-size: 1.2rem; }
.project .row { font-size: .92rem; }
.project .row b { color: var(--text); }
.tags { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: auto; padding-top: .4rem; }
.tag { font-size: .76rem; font-family: var(--font-mono); color: var(--text-dim); border: 1px solid var(--line); padding: .25rem .6rem; border-radius: 100px; }

/* Bandeau CTA ------------------------------------------------------------- */
.cta-band {
  background:
    radial-gradient(120% 140% at 80% 0%, color-mix(in srgb, var(--accent) 22%, transparent), transparent 55%),
    var(--bg-elev);
  border: 1px solid var(--line); border-radius: var(--radius-lg);
  padding: clamp(2.5rem, 6vw, 4rem);
  text-align: center;
}
.cta-band h2 { max-width: 18ch; margin: 0 auto 1.75rem; }
.cta-band .btn-row { justify-content: center; }

/* Notice ------------------------------------------------------------------ */
.notice {
  border-left: 3px solid var(--accent);
  background: var(--bg-elev);
  padding: 1rem 1.25rem; border-radius: 0 var(--radius) var(--radius) 0;
  font-size: .92rem; color: var(--text-dim);
}

/* Prose (pages légales) --------------------------------------------------- */
.prose { max-width: 75ch; }
.prose > * + * { margin-top: 1rem; }
.prose h2 { font-size: clamp(1.35rem, 2.4vw, 1.8rem); margin-top: 2.5rem; }
.prose h3 { font-size: 1.1rem; margin-top: 1.75rem; }
.prose p, .prose li { color: var(--text-dim); }
.prose ul { list-style: disc; padding-left: 1.3rem; display: grid; gap: .45rem; }
.prose a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.prose strong { color: var(--text); }
.prose .updated { font-family: var(--font-mono); font-size: .82rem; color: var(--text-mute); letter-spacing: .04em; }

/* Liens légaux (footer) --------------------------------------------------- */
.legal-links { display: flex; flex-wrap: wrap; gap: .9rem; }
.legal-links a { color: var(--text-mute); transition: color var(--t-fast); }
.legal-links a:hover { color: var(--accent); }

/* Bannière de consentement ------------------------------------------------ */
.consent {
  position: fixed; left: 1rem; right: 1rem; bottom: 1rem; z-index: 200;
  max-width: 820px; margin-inline: auto;
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: 1rem 1.5rem;
  background: var(--bg-elev); border: 1px solid var(--line);
  border-radius: var(--radius-lg); padding: 1.1rem 1.25rem;
  box-shadow: 0 16px 48px rgba(0,0,0,.55);
  transform: translateY(150%); transition: transform var(--t-med);
}
.consent.is-visible { transform: none; }
.consent__text { margin: 0; font-size: .88rem; color: var(--text-dim); flex: 1 1 320px; }
.consent__text a { color: var(--accent); text-decoration: underline; text-underline-offset: 2px; }
.consent__actions { display: flex; gap: .6rem; flex: none; }
.consent .btn { padding: .6rem 1.15rem; font-size: .88rem; }
@media (max-width: 520px){ .consent__actions { width: 100%; } .consent__actions .btn { flex: 1; justify-content: center; } }

/* Formulaire -------------------------------------------------------------- */
.form { display: grid; gap: 1.25rem; }
.field { display: grid; gap: .45rem; }
.field label { font-size: .88rem; font-weight: 600; color: var(--text); }
.field input, .field select, .field textarea {
  font: inherit; color: var(--text);
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: .8rem .9rem;
  transition: border-color var(--t-fast), box-shadow var(--t-fast);
}
.field textarea { resize: vertical; min-height: 140px; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 25%, transparent);
}
.field .hint { font-size: .82rem; color: var(--text-mute); }
.contact-grid { display: grid; grid-template-columns: 1.3fr .9fr; gap: clamp(2rem,5vw,4rem); align-items: start; }
.contact-aside { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 2rem; }
.contact-aside h3 { margin-bottom: .5rem; }
.contact-aside a.mail { color: var(--accent); font-family: var(--font-mono); }

/* Footer ------------------------------------------------------------------ */
.site-footer { border-top: 1px solid var(--line); background: var(--bg-elev); padding-block: 3.5rem 2rem; margin-top: 2rem; }
.footer-top { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 2rem; }
.footer-top h4 { font-family: var(--font-mono); font-size: .78rem; letter-spacing: .14em; text-transform: uppercase; color: var(--text-mute); margin-bottom: 1.1rem; font-weight: 500; }
.footer-top a { color: var(--text-dim); font-size: .95rem; display: inline-block; padding: .2rem 0; transition: color var(--t-fast); }
.footer-top a:hover { color: var(--accent); }
.footer-blurb { color: var(--text-dim); font-size: .95rem; max-width: 34ch; margin-top: 1rem; }
.footer-bottom {
  display: flex; flex-wrap: wrap; gap: 1rem; justify-content: space-between;
  margin-top: 3rem; padding-top: 1.5rem; border-top: 1px solid var(--line-soft);
  font-size: .85rem; color: var(--text-mute); font-family: var(--font-mono); letter-spacing: .03em;
}

/* Focus visible ----------------------------------------------------------- */
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 2px; }

/* Reveal (animation au scroll, désactivable) ------------------------------ */
.reveal { opacity: 0; transform: translateY(20px); transition: opacity .6s ease, transform .6s cubic-bezier(.2,.6,.2,1); }
.reveal.is-visible { opacity: 1; transform: none; }

/* Responsive -------------------------------------------------------------- */
@media (max-width: 900px) {
  .grid-3, .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .stats { grid-template-columns: repeat(2,1fr); }
  .split, .contact-grid { grid-template-columns: 1fr; }
  .split--reverse .split__media { order: 0; }
  .footer-top { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .nav-toggle { display: inline-grid; place-items: center; }
  .nav-links {
    position: fixed; inset: 72px 0 auto 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--bg-elev); border-bottom: 1px solid var(--line);
    padding: .5rem var(--gutter) 1.5rem;
    transform: translateY(-130%); transition: transform var(--t-med);
    height: auto;
  }
  .nav-links.open { transform: translateY(0); }
  .nav-links a { padding: .9rem 0; border-bottom: 1px solid var(--line-soft); }
  .nav-links a[aria-current="page"]::after { display: none; }
  .nav-cta { margin: 1rem 0 0; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .stats { grid-template-columns: 1fr 1fr; }
  .footer-top { grid-template-columns: 1fr; }
  .process-step { grid-template-columns: 1fr; gap: .5rem; }
}

/* Reduced motion ---------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .reveal { opacity: 1 !important; transform: none !important; }
  .btn:hover, .card:hover, .project:hover { transform: none; }
}
