/* ===== Tokens ===== */
:root {
  --ink: #1c1c1d;
  --ink-soft: #727272;
  --paper: #ffffff;
  --paper-soft: #f6f6f6;
  --line: #e3e3e8;
  --brand: #1c1c1d;
  --brand-soft: #2b2b2d;
  --accent: #caa05c;
  --accent-soft: #f7efe0;
  --radius: 10px;
  --shadow: 0 4px 24px rgba(28, 28, 29, 0.08);
  --maxw: 1160px;
  --font-display: "Cal Sans", "Golos Text", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --font-body: "Golos Text", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 16px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #eeeeee;
    --ink-soft: #a3a3a3;
    --paper: #131314;
    --paper-soft: #1c1c1d;
    --line: #303032;
    --brand: #0d0d0e;
    --brand-soft: #1c1c1d;
    --accent: #d8b374;
    --accent-soft: #2b2416;
    --shadow: 0 4px 24px rgba(0, 0, 0, 0.4);
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

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

.wrap {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 0 24px;
}

h1, h2, h3, h4 { font-family: var(--font-display); line-height: 1.15; margin: 0 0 16px; font-weight: 700; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.2rem, 4.4vw, 3.4rem); }
h2 { font-size: clamp(1.6rem, 3.2vw, 2.3rem); }
h3 { font-size: 1.2rem; margin-bottom: 10px; }
h4 { font-size: 1rem; margin-bottom: 6px; }
p { margin: 0 0 12px; color: var(--ink-soft); }
a { color: inherit; text-decoration: none; }

.section-eyebrow, .eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--accent);
  margin: 0 0 10px;
}

/* ===== Buttons ===== */
.btn {
  display: inline-block;
  padding: 12px 22px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 0.95rem;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
  white-space: nowrap;
}
.btn-accent {
  background: var(--accent);
  color: #fff;
}
.btn-accent:hover { transform: translateY(-1px); box-shadow: 0 6px 18px rgba(202, 160, 92, 0.4); }
.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid var(--line);
}
.btn-ghost:hover { border-color: var(--ink-soft); }

/* ===== Header ===== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.site-header.scrolled {
  border-bottom-color: var(--line);
  box-shadow: 0 2px 12px rgba(16, 25, 43, 0.05);
}
.header-inner {
  display: flex;
  align-items: center;
  gap: 24px;
  height: 72px;
}
.logo {
  display: flex;
  align-items: center;
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
  color: var(--brand-soft);
}
.logo span { color: var(--accent); }
.logo img { height: 38px; width: auto; display: block; }
.main-nav {
  display: flex;
  gap: 28px;
  margin-left: auto;
}
.nav-link {
  font-size: 0.94rem;
  font-weight: 600;
  color: var(--ink-soft);
  position: relative;
  padding: 4px 0;
  transition: color 0.15s ease;
}
.nav-link:hover, .nav-link.active { color: var(--ink); }
.nav-link.active::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -4px;
  height: 2px;
  background: var(--accent);
  border-radius: 2px;
}
.header-cta { margin-left: 8px; }
.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 6px;
  margin-left: auto;
}
.nav-toggle span {
  width: 22px;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav-toggle.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle.open span:nth-child(2) { opacity: 0; }
.nav-toggle.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ===== Hero ===== */
.hero {
  position: relative;
  padding: 140px 0 120px;
  overflow: hidden;
  isolation: isolate;
}
.hero-bg {
  position: absolute;
  inset: -8% -8%;
  background-size: cover;
  background-position: center;
  will-change: transform;
  z-index: -2;
}
.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(12, 12, 13, 0.78) 0%, rgba(12, 12, 13, 0.62) 55%, rgba(12, 12, 13, 0.88) 100%);
  z-index: -1;
}
.hero-inner { max-width: 780px; }
.hero .eyebrow { color: var(--accent); }
.hero h1, .hero .lead { color: #fff; }
.hero .lead { color: #d8d8da; }
.lead { font-size: 1.1rem; max-width: 620px; }
.hero-actions { display: flex; gap: 14px; margin-top: 28px; flex-wrap: wrap; }
.hero .btn-ghost { color: #fff; border-color: rgba(255,255,255,0.4); }
.hero .btn-ghost:hover { border-color: #fff; }

/* ===== Stats band ===== */
.stats-band { padding: 0 0 96px; }
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
}
.stat-tile {
  background: var(--paper);
  padding: 32px 24px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  text-align: center;
}
.stat-number {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 3.4vw, 2.4rem);
  color: var(--accent);
  font-weight: 700;
}
.stat-label { font-size: 0.88rem; color: var(--ink-soft); }

/* ===== Le constat / Notre réponse ===== */
.challenge { padding: 96px 0; }
.challenge-inner {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: start;
}
.challenge-inner h2 { max-width: 460px; }
.risk-list { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 14px; }
.risk-list li {
  font-size: 0.95rem;
  color: var(--ink-soft);
  padding-left: 18px;
  border-left: 2px solid var(--line);
}
.risk-list strong { color: var(--ink); display: block; font-size: 0.82rem; text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 2px; }

.pillars-title { max-width: 420px; }
.pillar {
  display: flex;
  gap: 16px;
  padding: 22px 0;
  border-top: 1px solid var(--line);
}
.pillar:last-child { padding-bottom: 0; }
.pillar-num {
  font-family: var(--font-display);
  font-size: 1.1rem;
  color: var(--accent);
  flex-shrink: 0;
  width: 32px;
}
.pillar h4 { margin-bottom: 6px; }
.pillar p { margin: 0; font-size: 0.92rem; }

/* ===== Services ===== */
.services { padding: 88px 0; background: var(--paper-soft); }
.services h2, .targets h2 { max-width: 560px; }
.cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 40px;
}
.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.card-icon {
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent);
  margin-bottom: 18px;
}
.card-icon svg { width: 22px; height: 22px; }
.card p { margin: 0; font-size: 0.95rem; }

/* ===== Solutions (cibles) ===== */
.targets { padding: 96px 0; }
.target-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 40px;
}
.target-card {
  position: relative;
  border-radius: var(--radius);
  padding: 28px;
  min-height: 360px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  background-size: 130% auto;
  background-position: center;
  transition: transform 0.3s ease, background-size 1s cubic-bezier(0.16, 1, 0.3, 1);
}
.target-card.in-view { background-size: cover; }
.target-card:hover { transform: translateY(-4px); }
.target-num {
  font-family: var(--font-display);
  font-size: 1.4rem;
  color: var(--accent);
  display: block;
  margin-bottom: 14px;
}
.target-card h3 { color: #fff; }
.target-card p { margin: 0 0 8px; font-size: 0.92rem; }
.target-pain { color: #d8d8da; }
.target-solution { color: #fff; font-weight: 600; }

/* ===== Testimonials ===== */
.testimonials { padding: 96px 0; background: var(--paper-soft); }
.testimonials h2 { max-width: 520px; }
.testimonial-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
  margin-top: 40px;
}
.testimonial-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.testimonial-stars { color: var(--accent); font-size: 0.95rem; letter-spacing: 2px; }
.testimonial-quote { margin: 0; font-size: 0.95rem; color: var(--ink); font-style: italic; }
.testimonial-author { margin: 0; font-size: 0.86rem; font-weight: 700; color: var(--ink); }
.testimonial-author span { font-weight: 400; color: var(--ink-soft); }

/* ===== Réalisations preview ===== */
.realisations-preview { padding: 96px 0; background: var(--paper-soft); }
.realisations-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 24px;
  flex-wrap: wrap;
}
.realisations-header h2 { max-width: 460px; }
.realisations-header .lead { margin: 0; }
.realisations-list { margin-top: 40px; border-top: 1px solid var(--line); }
.realisation-row {
  display: flex;
  align-items: center;
  gap: 20px;
  padding: 16px 4px;
  border-bottom: 1px solid var(--line);
  transition: padding-left 0.2s ease, color 0.2s ease;
}
.realisation-row:hover { padding-left: 12px; color: var(--accent); }
.realisation-thumb {
  width: 56px;
  height: 56px;
  border-radius: 8px;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--line);
}
.realisation-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; transform: scale(1.3); transition: transform 0.9s cubic-bezier(0.16, 1, 0.3, 1); }
.realisations-list.in-view .realisation-thumb img { transform: scale(1); }
.realisation-row:hover .realisation-thumb img { transform: scale(1.08); }
.realisation-num { font-family: var(--font-display); color: var(--accent); font-size: 0.95rem; width: 32px; flex-shrink: 0; }
.realisation-name { font-weight: 700; font-size: 1.05rem; flex: 1; }
.realisation-meta { color: var(--ink-soft); font-size: 0.88rem; }

/* ===== About ===== */
.about { padding: 88px 0; background: var(--brand); color: #fff; }
.about h2, .about .section-eyebrow { color: #fff; }
.about p { color: #c6cede; }
.about-inner {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 56px;
  align-items: start;
}
.about-points { display: grid; gap: 22px; }
.point {
  border-left: 2px solid var(--accent);
  padding-left: 16px;
}
.point h4 { color: #fff; }
.point p { margin: 0; font-size: 0.92rem; }

/* ===== Contact ===== */
.contact { padding: 88px 0; }
.contact-inner {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: 56px;
  align-items: start;
}
.contact-list { list-style: none; padding: 0; margin: 24px 0 0; display: grid; gap: 16px; }
.contact-list li { display: flex; flex-direction: column; gap: 2px; }
.contact-label { font-size: 0.78rem; text-transform: uppercase; letter-spacing: 0.08em; color: var(--ink-soft); font-weight: 700; }
.contact-list a { font-size: 1.05rem; font-weight: 600; }
.contact-list a:hover { color: var(--accent); }

.contact-form {
  background: var(--paper-soft);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  display: grid;
  gap: 16px;
}
.form-row { display: grid; gap: 6px; }
.form-row label { font-size: 0.88rem; font-weight: 600; }
.form-row .optional { font-weight: 400; color: var(--ink-soft); }
.form-row input, .form-row textarea {
  font: inherit;
  padding: 11px 13px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: var(--paper);
  color: var(--ink);
  resize: vertical;
}
.form-row input:focus, .form-row textarea:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
}
.form-row.invalid input, .form-row.invalid textarea { border-color: #dc2626; }
.form-submit { justify-self: start; }
.form-status { margin: 0; font-size: 0.9rem; min-height: 1.2em; }
.form-status.success { color: #16a34a; }
.form-status.error { color: #dc2626; }

/* ===== References page ===== */
.hero-compact { padding: 120px 0 88px; }
.hero-compact .lead { max-width: 560px; }
.refs-grid-section { padding: 88px 0 96px; }

.projects-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.project-card {
  position: relative;
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  border: none;
  border-radius: var(--radius);
  overflow: hidden;
  cursor: pointer;
  padding: 0;
  background: var(--paper-soft);
}
.project-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transform: scale(1.18);
  transition: transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
}
.project-card.in-view img { transform: scale(1); }
.project-card:hover img { transform: scale(1.06); }

.projects-grid .project-card:nth-child(3n+1) { transition-delay: 0s; }
.projects-grid .project-card:nth-child(3n+2) { transition-delay: 0.12s; }
.projects-grid .project-card:nth-child(3n+3) { transition-delay: 0.24s; }
.project-card-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 18px;
  background: linear-gradient(180deg, transparent 40%, rgba(10, 14, 24, 0.82) 100%);
  text-align: left;
}
.project-card-name { color: #fff; font-weight: 700; font-size: 1.05rem; }
.project-card-count { color: #d7dce6; font-size: 0.82rem; }

/* ===== References table ===== */
.refs-table-section { padding: 0 0 96px; }
.refs-table-section h2 { max-width: 560px; }
.refs-table-wrap {
  margin-top: 32px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow-x: auto;
}
.refs-table { width: 100%; border-collapse: collapse; font-size: 0.92rem; min-width: 640px; }
.refs-table th {
  text-align: left;
  padding: 14px 18px;
  background: var(--paper-soft);
  color: var(--ink-soft);
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-weight: 700;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
.refs-table td {
  padding: 14px 18px;
  border-bottom: 1px solid var(--line);
  color: var(--ink);
  vertical-align: top;
}
.refs-table tbody tr:last-child td { border-bottom: none; }
.refs-table tbody tr:hover { background: var(--paper-soft); }
.refs-table td:first-child { font-weight: 700; white-space: nowrap; }
.refs-table td:nth-child(4), .refs-table td:nth-child(5) { white-space: nowrap; color: var(--ink-soft); }

/* ===== Lightbox ===== */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: none;
  align-items: center;
  justify-content: center;
  background: rgba(6, 9, 16, 0.94);
  padding: 24px;
}
.lightbox.open { display: flex; }
.lightbox-body {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 14px;
  max-width: min(1000px, 90vw);
  max-height: 88vh;
}
.lightbox-stage {
  max-width: 100%;
  max-height: 76vh;
  display: flex;
  align-items: center;
  justify-content: center;
}
.lightbox-stage img, .lightbox-stage video {
  max-width: 100%;
  max-height: 76vh;
  border-radius: 6px;
  display: block;
}
.lightbox-caption {
  display: flex;
  gap: 12px;
  align-items: baseline;
  color: #fff;
  font-size: 0.92rem;
}
.lightbox-caption #lightbox-count { color: #9aa4b8; }
.lightbox-close, .lightbox-nav {
  position: absolute;
  background: rgba(255, 255, 255, 0.08);
  border: none;
  color: #fff;
  cursor: pointer;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease;
}
.lightbox-close:hover, .lightbox-nav:hover { background: rgba(255, 255, 255, 0.18); }
.lightbox-close { top: 20px; right: 20px; width: 44px; height: 44px; font-size: 1.6rem; line-height: 1; }
.lightbox-nav { top: 50%; transform: translateY(-50%); width: 52px; height: 52px; font-size: 2rem; }
.lightbox-prev { left: 16px; }
.lightbox-next { right: 16px; }

@media (max-width: 880px) {
  .projects-grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .projects-grid { grid-template-columns: 1fr; }
  .lightbox-nav { width: 40px; height: 40px; font-size: 1.5rem; }
}

/* ===== Footer ===== */
.site-footer { background: var(--brand); padding: 36px 0; }
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-size: 0.88rem;
  color: #a3a3a3;
}
.footer-links { display: flex; gap: 20px; flex-wrap: wrap; }
.footer-links a { color: #e3e3e3; }
.footer-links a:hover { color: var(--accent); }

/* ===== Reveal on scroll ===== */
.reveal {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.in-view { opacity: 1; transform: translateY(0); }

/* Staggered entrance for grid children */
.cards .card:nth-child(1), .target-cards .target-card:nth-child(1), .testimonial-cards .testimonial-card:nth-child(1), .stats-grid .stat-tile:nth-child(1) { transition-delay: 0s; }
.cards .card:nth-child(2), .target-cards .target-card:nth-child(2), .testimonial-cards .testimonial-card:nth-child(2), .stats-grid .stat-tile:nth-child(2) { transition-delay: 0.1s; }
.cards .card:nth-child(3), .target-cards .target-card:nth-child(3), .testimonial-cards .testimonial-card:nth-child(3), .stats-grid .stat-tile:nth-child(3) { transition-delay: 0.2s; }
.pillar.reveal:nth-of-type(2) { transition-delay: 0.1s; }
.pillar.reveal:nth-of-type(3) { transition-delay: 0.2s; }

/* ===== Responsive ===== */
@media (max-width: 880px) {
  .cards, .target-cards, .testimonial-cards { grid-template-columns: 1fr; }
  .about-inner, .contact-inner, .challenge-inner { grid-template-columns: 1fr; gap: 36px; }
  .realisations-header { align-items: flex-start; }
  .stats-grid { grid-template-columns: 1fr; }
}

@media (max-width: 760px) {
  .main-nav {
    position: fixed;
    top: 72px; left: 0; right: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    gap: 0;
    padding: 8px 24px 20px;
    transform: translateY(-8px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
  }
  .main-nav.open { opacity: 1; transform: translateY(0); pointer-events: auto; }
  .main-nav a { padding: 12px 0; border-bottom: 1px solid var(--line); }
  .header-cta { display: none; }
  .nav-toggle { display: flex; }
  .hero { padding: 100px 0 72px; }
  .hero-compact { padding: 100px 0 56px; }
  .target-card { min-height: 280px; }
}
