/* ============================================================
   AN ADVISORY — Agence digitale
   Design : "bordereau technique premium" — éditorial suisse,
   grille apparente, bleu Klein électrique, surligneur signal.
   ============================================================ */

:root {
  --paper: #f7f6f2;
  --paper-2: #efeee8;
  --ink: #10141a;
  --ink-2: #4a5160;
  --line: #d8d5ca;
  --blue: #2036e8;
  --blue-deep: #1626a8;
  --hi: #efff54;
  --dark: #0c0f14;
  --dark-2: #12161d;
  --dark-line: #262c38;
  --dark-text: #edebe4;
  --dark-muted: #8b93a3;
  --font-display: "Bricolage Grotesque", sans-serif;
  --font-body: "Archivo", sans-serif;
  --font-mono: "IBM Plex Mono", monospace;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--paper);
  color: var(--ink);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--hi); color: var(--ink); }

.container {
  max-width: 1240px;
  margin: 0 auto;
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
  background: var(--paper);
}

.dark .container {
  border-color: var(--dark-line);
  background: transparent;
}

a { color: inherit; }

img { max-width: 100%; display: block; }

/* ---------- utilities ---------- */

.mono {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 500;
}

.section-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 24px;
  padding: 28px 48px;
  border-bottom: 1px solid var(--line);
}

.section-head .num { color: var(--blue); }

.dark .section-head { border-color: var(--dark-line); }
.dark .section-head .num { color: var(--hi); }

h2 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(30px, 4.2vw, 52px);
  line-height: 1.05;
  letter-spacing: -0.02em;
  padding: 44px 48px 8px;
}

.section-intro {
  padding: 0 48px 44px;
  max-width: 720px;
  color: var(--ink-2);
  font-size: 18px;
}

.dark { background: var(--dark); color: var(--dark-text); }
.dark .section-intro { color: var(--dark-muted); }

.hl {
  background: var(--hi);
  color: var(--ink);
  padding: 0 0.14em;
  box-decoration-break: clone;
  -webkit-box-decoration-break: clone;
}

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  padding: 16px 28px;
  border: 1px solid var(--ink);
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.btn-primary { background: var(--blue); border-color: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-deep); border-color: var(--blue-deep); }

.btn-ghost { background: transparent; color: var(--ink); }
.btn-ghost:hover { background: var(--ink); color: var(--paper); }

.dark .btn-ghost { border-color: var(--dark-text); color: var(--dark-text); }
.dark .btn-ghost:hover { background: var(--dark-text); color: var(--dark); }

.btn .arrow { transition: transform 0.18s ease; }
.btn:hover .arrow { transform: translateX(4px); }

/* ---------- header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(247, 246, 242, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 48px;
  height: 72px;
  border-top: none;
  border-bottom: none;
}

.logo {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 21px;
  letter-spacing: -0.02em;
  text-decoration: none;
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo .mark {
  width: 26px;
  height: 26px;
  background: var(--blue);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 12px;
  font-family: var(--font-mono);
  font-weight: 700;
}

.main-nav { display: flex; align-items: center; gap: 32px; }

.main-nav a {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--ink-2);
  transition: color 0.15s ease;
}

.main-nav a:hover { color: var(--blue); }

.nav-cta {
  border: 1px solid var(--blue);
  color: var(--blue) !important;
  padding: 9px 16px;
  transition: background 0.15s ease, color 0.15s ease !important;
}

.nav-cta:hover { background: var(--blue); color: #fff !important; }

.lang-switch {
  display: flex;
  gap: 2px;
  border: 1px solid var(--line);
  padding: 2px;
}

.lang-switch a {
  padding: 4px 9px;
  color: var(--ink-2);
}

.lang-switch a.active { background: var(--ink); color: var(--paper); }

.burger {
  display: none;
  background: none;
  border: 1px solid var(--line);
  width: 42px;
  height: 42px;
  cursor: pointer;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: 5px;
}

.burger span { width: 18px; height: 2px; background: var(--ink); transition: 0.2s; }

/* ---------- hero ---------- */

.hero .container { padding: 96px 48px 0; }

.hero-tag {
  color: var(--blue);
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
}

.hero-tag::before {
  content: "";
  width: 40px;
  height: 1px;
  background: var(--blue);
}

h1 {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(42px, 6.4vw, 88px);
  line-height: 1.0;
  letter-spacing: -0.03em;
  max-width: 1000px;
}

.hero-sub {
  margin-top: 32px;
  max-width: 640px;
  font-size: 19px;
  color: var(--ink-2);
}

.hero-ctas { display: flex; gap: 16px; margin-top: 44px; flex-wrap: wrap; }

.hero-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line);
  margin-top: 80px;
}

.hero-stats .stat {
  padding: 28px 24px 32px;
  border-right: 1px solid var(--line);
}

.hero-stats .stat:last-child { border-right: none; }
.hero-stats .stat:first-child { padding-left: 48px; }

.stat-value {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: clamp(28px, 3.4vw, 44px);
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.stat-value em { font-style: normal; color: var(--blue); }

.stat-label { color: var(--ink-2); margin-top: 6px; }

/* ---------- clients marquee ---------- */

.clients { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); background: var(--paper-2); }

.clients .container { padding: 0; background: transparent; }

.clients-label {
  padding: 14px 48px 0;
  color: var(--ink-2);
}

.marquee { overflow: hidden; padding: 18px 0 22px; }

.marquee-track {
  display: flex;
  gap: 72px;
  width: max-content;
  animation: scroll 30s linear infinite;
}

.marquee-track span {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 24px;
  letter-spacing: 0.02em;
  color: var(--ink);
  opacity: 0.75;
  white-space: nowrap;
}

.marquee-track span::after {
  content: "/";
  color: var(--blue);
  margin-left: 72px;
  opacity: 0.6;
}

@keyframes scroll {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

/* ---------- services ---------- */

.services-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--line);
}

.service {
  padding: 36px 32px 44px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  position: relative;
  transition: background 0.2s ease;
}

.service:nth-child(3n) { border-right: none; }
.service:nth-child(n+4) { border-bottom: none; }

.service:hover { background: #fff; }

.service .idx { color: var(--blue); display: block; margin-bottom: 22px; }

.service h3 {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 22px;
  letter-spacing: -0.01em;
  margin-bottom: 12px;
}

.service p { color: var(--ink-2); font-size: 15.5px; }

.service .tags { margin-top: 18px; display: flex; flex-wrap: wrap; gap: 6px; }

.service .tags span {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.05em;
  padding: 4px 8px;
  border: 1px solid var(--line);
  color: var(--ink-2);
}

/* ---------- model (dark section) ---------- */

.model-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0;
  border-top: 1px solid var(--dark-line);
}

.model-text { padding: 48px; border-right: 1px solid var(--dark-line); }

.model-text p { color: var(--dark-muted); margin-bottom: 18px; font-size: 17px; }

.model-text p strong { color: var(--dark-text); font-weight: 600; }

.model-points { list-style: none; margin-top: 32px; }

.model-points li {
  display: flex;
  gap: 16px;
  padding: 18px 0;
  border-top: 1px solid var(--dark-line);
  font-size: 16px;
}

.model-points .mono { color: var(--hi); padding-top: 3px; }

.compare { padding: 48px; }

.compare-table { width: 100%; border-collapse: collapse; border: 1px solid var(--dark-line); }

.compare-table th {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  font-weight: 500;
  text-align: left;
  padding: 14px 18px;
  border-bottom: 1px solid var(--dark-line);
  color: var(--dark-muted);
}

.compare-table th.us { color: var(--hi); }

.compare-table td {
  padding: 13px 18px;
  border-bottom: 1px solid var(--dark-line);
  font-size: 14.5px;
  color: var(--dark-muted);
  vertical-align: top;
  width: 50%;
}

.compare-table td.us { color: var(--dark-text); border-left: 1px solid var(--dark-line); }

.compare-table tr:last-child td { border-bottom: none; }

.compare-note {
  margin-top: 22px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 22px;
  color: var(--dark-text);
}

.compare-note .hl { font-weight: 800; }

/* ---------- work (registre) ---------- */

.work-list { border-top: 1px solid var(--line); }

.work-row {
  display: grid;
  grid-template-columns: 90px 170px 1fr 150px;
  gap: 28px;
  align-items: baseline;
  padding: 30px 48px;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  transition: background 0.18s ease, color 0.18s ease;
}

.work-row:last-child { border-bottom: none; }

.work-row .year { color: var(--ink-2); }

.work-row .client {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 21px;
  letter-spacing: -0.01em;
}

.work-row .desc h4 { font-weight: 600; font-size: 16.5px; margin-bottom: 4px; }

.work-row .desc p { color: var(--ink-2); font-size: 14.5px; }

.work-row .sector { text-align: right; color: var(--ink-2); }

.work-row:hover { background: var(--blue); color: #fff; }
.work-row:hover .year, .work-row:hover .desc p, .work-row:hover .sector { color: rgba(255, 255, 255, 0.75); }

/* ---------- method ---------- */

.method-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border-top: 1px solid var(--line);
}

.step { padding: 36px 32px 48px; border-right: 1px solid var(--line); }

.step:last-child { border-right: none; }

.step .idx {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 44px;
  color: transparent;
  -webkit-text-stroke: 1.4px var(--blue);
  display: block;
  margin-bottom: 20px;
}

.step h3 { font-family: var(--font-display); font-weight: 700; font-size: 19px; margin-bottom: 10px; }

.step p { color: var(--ink-2); font-size: 15px; }

.method-banner {
  border-top: 1px solid var(--line);
  padding: 22px 48px;
  display: flex;
  align-items: center;
  gap: 14px;
  color: var(--ink-2);
  font-size: 15.5px;
  background: var(--paper-2);
}

.method-banner .dot { width: 8px; height: 8px; background: var(--blue); flex-shrink: 0; }

/* ---------- contact ---------- */

.contact-grid {
  display: grid;
  grid-template-columns: 1fr 1.2fr;
  border-top: 1px solid var(--dark-line);
}

.contact-info { padding: 48px; border-right: 1px solid var(--dark-line); }

.contact-info p { color: var(--dark-muted); margin-bottom: 32px; max-width: 400px; }

.contact-lines { list-style: none; }

.contact-lines li {
  padding: 16px 0;
  border-top: 1px solid var(--dark-line);
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.contact-lines .mono { color: var(--dark-muted); }

.contact-lines a, .contact-lines .val {
  color: var(--dark-text);
  text-decoration: none;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 19px;
}

.contact-lines a:hover { color: var(--hi); }

.contact-form { padding: 48px; }

.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }

.field { margin-bottom: 20px; }

.field label {
  display: block;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--dark-muted);
  margin-bottom: 8px;
}

.field input, .field select, .field textarea {
  width: 100%;
  background: var(--dark-2);
  border: 1px solid var(--dark-line);
  color: var(--dark-text);
  font-family: var(--font-body);
  font-size: 15.5px;
  padding: 13px 14px;
  outline: none;
  transition: border-color 0.15s ease;
}

.field select { appearance: none; cursor: pointer; }

.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--hi); }

.field textarea { resize: vertical; min-height: 130px; }

.form-submit {
  background: var(--hi);
  border: 1px solid var(--hi);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 16px 32px;
  cursor: pointer;
  transition: background 0.15s ease;
}

.form-submit:hover { background: #f6ff8a; }

.form-note { margin-top: 14px; color: var(--dark-muted); font-size: 13.5px; }

/* ---------- footer ---------- */

.site-footer { background: var(--dark); color: var(--dark-muted); border-top: 1px solid var(--dark-line); }

.site-footer .container {
  padding: 28px 48px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
  border-color: var(--dark-line);
  background: transparent;
  font-size: 13.5px;
}

.site-footer a { color: var(--dark-muted); text-decoration: none; }
.site-footer a:hover { color: var(--dark-text); }

.footer-links { display: flex; gap: 24px; }

/* ---------- legal page ---------- */

.legal-page .container { padding: 72px 48px 96px; max-width: 900px; }

.legal-page h1 { font-size: clamp(34px, 4.5vw, 54px); margin-bottom: 40px; }

.legal-page h2 { font-size: 21px; padding: 36px 0 10px; }

.legal-page p { color: var(--ink-2); margin-bottom: 12px; max-width: 700px; }

.back-link { display: inline-block; margin-bottom: 40px; color: var(--blue); text-decoration: none; }

/* ---------- reveal animation ---------- */

.js .reveal { opacity: 0; transform: translateY(22px); transition: opacity 0.6s ease, transform 0.6s ease; }
.js .reveal.visible { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  .marquee-track { animation: none; }
  html { scroll-behavior: auto; }
}

/* ---------- responsive ---------- */

@media (max-width: 1000px) {
  .services-grid { grid-template-columns: 1fr 1fr; }
  .service:nth-child(3n) { border-right: 1px solid var(--line); }
  .service:nth-child(2n) { border-right: none; }
  .service:nth-child(n+4) { border-bottom: 1px solid var(--line); }
  .service:nth-child(n+5) { border-bottom: none; }
  .method-grid { grid-template-columns: 1fr 1fr; }
  .step { border-bottom: 1px solid var(--line); }
  .step:nth-child(2n) { border-right: none; }
  .step:nth-child(n+3) { border-bottom: none; }
  .model-grid, .contact-grid { grid-template-columns: 1fr; }
  .model-text, .contact-info { border-right: none; border-bottom: 1px solid var(--dark-line); }
  .work-row { grid-template-columns: 70px 1fr 130px; }
  .work-row .desc { grid-column: 1 / -1; }
}

@media (max-width: 720px) {
  .section-head, h2, .section-intro, .hero .container, .clients-label,
  .method-banner, .legal-page .container { padding-left: 24px; padding-right: 24px; }
  .site-header .container { padding: 0 16px; }
  .hero .container { padding-top: 64px; }
  .hero-stats { grid-template-columns: 1fr 1fr; }
  .hero-stats .stat { padding: 20px 16px 24px; border-bottom: 1px solid var(--line); }
  .hero-stats .stat:first-child { padding-left: 24px; }
  .hero-stats .stat:nth-child(2n) { border-right: none; }
  .hero-stats .stat:nth-child(n+3) { border-bottom: none; }
  .services-grid { grid-template-columns: 1fr; }
  .service { border-right: none !important; border-bottom: 1px solid var(--line) !important; }
  .service:last-child { border-bottom: none !important; }
  .method-grid { grid-template-columns: 1fr; }
  .step { border-right: none; border-bottom: 1px solid var(--line); }
  .step:last-child { border-bottom: none; }
  .model-text, .compare, .contact-info, .contact-form { padding: 32px 24px; }
  .work-row { padding: 24px; gap: 10px 20px; grid-template-columns: 1fr auto; }
  .work-row .year { order: 2; }
  .work-row .client { order: 1; }
  .work-row .sector { display: none; }
  .form-row { grid-template-columns: 1fr; gap: 0; }
  .main-nav {
    display: none;
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    align-items: flex-start;
    padding: 24px;
    gap: 20px;
  }
  .main-nav.open { display: flex; }
  .burger { display: flex; }
  .site-footer .container { flex-direction: column; align-items: flex-start; }
}
