/* HEDHTECH — Paper & Ink */
:root {
  --ink: #12141a;
  --ink-soft: #2a2e38;
  --muted: #5c6370;
  --paper: #f7f4ef;
  --paper-2: #efebe3;
  --line: #d9d3c8;
  --indigo: #1e3a8a;
  --indigo-deep: #152a66;
  --indigo-soft: #e8eefc;
  --white: #ffffff;
  --danger: #9b1c1c;
  --radius: 2px;
  --max: 1120px;
  --nav-h: 72px;
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;
  --font-body: "IBM Plex Sans", "Segoe UI", sans-serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

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

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9990;
  opacity: 0.045;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

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

a {
  color: var(--indigo);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

a:hover {
  color: var(--indigo-deep);
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--ink);
  margin: 0 0 0.6em;
}

h1 { font-size: clamp(2.6rem, 6vw, 4.4rem); }
h2 { font-size: clamp(1.9rem, 3.5vw, 2.75rem); }
h3 { font-size: clamp(1.25rem, 2vw, 1.5rem); }

p { margin: 0 0 1em; color: var(--ink-soft); }

.container {
  width: min(100% - 2.5rem, var(--max));
  margin-inline: auto;
}

.eyebrow {
  display: inline-block;
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.85rem;
  font-weight: 500;
}

/* Header */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-h);
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid transparent;
  transition: border-color 0.3s var(--ease), background 0.3s var(--ease);
}

.site-header.is-scrolled {
  border-bottom-color: var(--line);
  background: color-mix(in srgb, var(--paper) 94%, transparent);
}

.nav {
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}

.logo {
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 600;
  color: var(--ink);
  text-decoration: none;
  letter-spacing: -0.03em;
}

.logo span {
  color: var(--indigo);
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  color: var(--ink-soft);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 450;
}

.nav-links a:hover,
.nav-links a[aria-current="page"] {
  color: var(--ink);
}

.nav-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 1.15rem;
  background: var(--indigo);
  color: var(--white) !important;
  text-decoration: none !important;
  font-size: 0.9rem;
  font-weight: 500;
  border: 1px solid var(--indigo);
  transition: background 0.25s var(--ease), transform 0.25s var(--ease);
}

.nav-cta:hover {
  background: var(--indigo-deep);
  color: var(--white) !important;
}

.nav-toggle {
  display: none;
  width: 44px;
  height: 44px;
  border: 1px solid var(--line);
  background: transparent;
  cursor: pointer;
  padding: 0;
}

.nav-toggle span {
  display: block;
  width: 18px;
  height: 1.5px;
  background: var(--ink);
  margin: 5px auto;
  transition: transform 0.25s var(--ease);
}

/* Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.9rem 1.4rem;
  font-family: var(--font-body);
  font-size: 0.95rem;
  font-weight: 500;
  border: 1px solid transparent;
  cursor: pointer;
  text-decoration: none !important;
  transition: background 0.25s var(--ease), color 0.25s var(--ease), border-color 0.25s var(--ease), transform 0.25s var(--ease);
}

.btn:active { transform: translateY(1px); }

.btn-primary {
  background: var(--indigo);
  color: var(--white) !important;
  border-color: var(--indigo);
}

.btn-primary:hover {
  background: var(--indigo-deep);
  color: var(--white) !important;
}

.btn-ghost {
  background: transparent;
  color: var(--ink) !important;
  border-color: var(--line);
}

.btn-ghost:hover {
  border-color: var(--ink);
  color: var(--ink) !important;
}

.btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.85rem;
  margin-top: 1.75rem;
}

/* Hero */
.hero {
  position: relative;
  min-height: calc(100vh - var(--nav-h));
  display: grid;
  align-items: end;
  overflow: hidden;
  background:
    linear-gradient(180deg, rgba(18, 20, 26, 0.28) 0%, rgba(18, 20, 26, 0.7) 100%),
    url("../assets/hero.jpg") center 40%/cover no-repeat;
  color: var(--white);
}

.hero-inner {
  width: min(100% - 2.5rem, var(--max));
  margin: 0 auto 4.5rem;
  max-width: 40rem;
  animation: rise 0.9s var(--ease) both;
}

.hero .eyebrow {
  color: rgba(255, 255, 255, 0.72);
}

.hero h1 {
  color: var(--white);
  margin-bottom: 0.35em;
}

.hero-brand {
  font-family: var(--font-display);
  font-size: clamp(3.2rem, 9vw, 6.5rem);
  font-weight: 600;
  letter-spacing: -0.04em;
  line-height: 0.95;
  margin: 0 0 0.35em;
  color: var(--white);
}

.hero p {
  color: rgba(255, 255, 255, 0.86);
  font-size: 1.12rem;
  max-width: 32rem;
}

.hero .btn-primary {
  background: var(--white);
  color: var(--ink) !important;
  border-color: var(--white);
}

.hero .btn-primary:hover {
  background: var(--paper);
  color: var(--ink) !important;
}

.hero .btn-ghost {
  color: var(--white) !important;
  border-color: rgba(255, 255, 255, 0.45);
}

.hero .btn-ghost:hover {
  border-color: var(--white);
  color: var(--white) !important;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(28px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Sections */
.section {
  padding: clamp(4rem, 8vw, 6.5rem) 0;
}

.section-alt {
  background: var(--paper-2);
}

.section-head {
  max-width: 38rem;
  margin-bottom: 2.75rem;
}

.section-head p {
  font-size: 1.08rem;
}

.split {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: clamp(2rem, 5vw, 4rem);
  align-items: center;
}

.split-media {
  min-height: 380px;
  background:
    linear-gradient(160deg, rgba(30, 58, 138, 0.18), rgba(18, 20, 26, 0.08)),
    url("https://images.unsplash.com/photo-1586717791821-3f44a563fa4c?auto=format&fit=crop&w=1400&q=80") center/cover no-repeat;
  border: 1px solid var(--line);
}

/* Lists / process */
.service-list,
.process-list {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--line);
}

.service-item,
.process-step {
  display: grid;
  grid-template-columns: 5.5rem 1fr;
  gap: 1.25rem;
  padding: 1.6rem 0;
  border-bottom: 1px solid var(--line);
}

.service-item:hover .service-title,
.process-step:hover .process-title {
  color: var(--indigo);
}

.service-num,
.process-num {
  font-family: var(--font-display);
  font-size: 1.35rem;
  color: var(--indigo);
}

.service-title,
.process-title {
  margin: 0 0 0.35rem;
  transition: color 0.25s var(--ease);
}

.service-item p,
.process-step p {
  margin: 0;
  max-width: 42rem;
}

/* Clickable service tiles */
.service-tiles {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.35rem;
}

.service-tile {
  display: block;
  text-decoration: none !important;
  color: inherit;
  background: var(--white);
  border: 1px solid var(--line);
  overflow: hidden;
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
}

.service-tile:hover {
  transform: translateY(-4px);
  box-shadow: 0 18px 40px rgba(18, 20, 26, 0.08);
  color: inherit;
}

.service-tile-img {
  aspect-ratio: 4 / 3;
  overflow: hidden;
  background: var(--paper-2);
}

.service-tile-img img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1);
  transition: filter 0.65s var(--ease), transform 0.65s var(--ease);
}

.service-tile:hover img {
  filter: grayscale(0);
  transform: scale(1.05);
}

.service-tile-body {
  padding: 1.3rem 1.3rem 1.45rem;
}

.service-tile-body h3 {
  margin-bottom: 0.4rem;
}

.service-tile-body p {
  margin: 0 0 0.9rem;
  font-size: 0.95rem;
}

.service-tile-more {
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--indigo);
}

/* FAQ accordion */
.faq-wrap {
  max-width: 46rem;
}

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

.faq-item {
  border-bottom: 1px solid var(--line);
}

.faq-btn {
  width: 100%;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1.25rem;
  padding: 1.3rem 0;
  background: none;
  border: 0;
  cursor: pointer;
  text-align: left;
  font: inherit;
  color: var(--ink);
}

.faq-btn:hover {
  color: var(--indigo);
}

.faq-icon {
  position: relative;
  flex-shrink: 0;
  width: 20px;
  height: 20px;
}

.faq-icon::before,
.faq-icon::after {
  content: "";
  position: absolute;
  background: currentColor;
  transition: transform 0.3s var(--ease), opacity 0.3s var(--ease);
}

.faq-icon::before {
  width: 14px;
  height: 1.5px;
  top: 9px;
  left: 3px;
}

.faq-icon::after {
  width: 1.5px;
  height: 14px;
  left: 9.25px;
  top: 3px;
}

.faq-item.is-open .faq-icon::after {
  opacity: 0;
  transform: scaleY(0);
}

.faq-answer {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.4s var(--ease);
}

.faq-answer p {
  padding-bottom: 1.2rem;
  max-width: 40rem;
}

/* Service detail pages */
.service-hero {
  min-height: 48vh;
  display: flex;
  align-items: flex-end;
  position: relative;
  background-size: cover;
  background-position: center;
}

.service-hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(18, 20, 26, 0.22), rgba(18, 20, 26, 0.72));
}

.service-hero-inner {
  position: relative;
  z-index: 1;
  width: min(100% - 2.5rem, var(--max));
  margin: 0 auto 3rem;
}

.service-hero .eyebrow {
  color: rgba(255, 255, 255, 0.7);
}

.service-hero h1 {
  color: var(--white);
  margin: 0;
}

.service-layout {
  display: grid;
  grid-template-columns: 1.55fr 0.85fr;
  gap: clamp(2rem, 5vw, 3.5rem);
  align-items: start;
}

.include-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
  list-style: none;
  margin: 0 0 2rem;
  padding: 0;
}

.include-grid li {
  border: 1px solid var(--line);
  background: var(--white);
  padding: 0.95rem 1.05rem;
  color: var(--ink-soft);
  font-size: 0.95rem;
}

.service-aside {
  border: 1px solid var(--line);
  background: var(--white);
  padding: 1.5rem 1.45rem;
  position: sticky;
  top: calc(var(--nav-h) + 1rem);
}

.service-aside p:last-of-type {
  margin-bottom: 1.25rem;
}

.other-services {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 0.7rem;
}

.other-services a {
  display: block;
  text-align: center;
  padding: 1rem 0.4rem;
  border: 1px solid var(--line);
  background: var(--white);
  text-decoration: none;
  color: var(--ink);
  font-size: 0.92rem;
}

.other-services a:hover {
  border-color: var(--indigo);
  color: var(--indigo);
}

.note-banner {
  margin-top: 2rem;
  padding: 1rem 1.15rem;
  border-left: 3px solid var(--indigo);
  background: var(--indigo-soft);
  color: var(--ink-soft);
  font-size: 0.95rem;
}

/* Stats strip — avoid hero clutter; okay mid-page as process proof */
.trust-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-top: 2.5rem;
  border-top: 1px solid var(--line);
  padding-top: 1.5rem;
}

.trust-item strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 500;
  color: var(--ink);
}

.trust-item span {
  color: var(--muted);
  font-size: 0.92rem;
}

/* Forms */
.contact-grid {
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: clamp(2rem, 5vw, 4rem);
}

.contact-meta dt {
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 1.25rem;
}

.contact-meta dd {
  margin: 0.25rem 0 0;
}

.contact-meta a {
  color: var(--ink);
  text-decoration: none;
}

.contact-meta a:hover {
  color: var(--indigo);
}

.form {
  display: grid;
  gap: 1rem;
}

.form label {
  display: grid;
  gap: 0.4rem;
  font-size: 0.92rem;
  font-weight: 500;
}

.form input,
.form textarea,
.form select {
  font: inherit;
  padding: 0.85rem 0.95rem;
  border: 1px solid var(--line);
  background: var(--white);
  color: var(--ink);
  border-radius: var(--radius);
}

.form input:focus,
.form textarea:focus,
.form select:focus {
  outline: 2px solid color-mix(in srgb, var(--indigo) 35%, transparent);
  border-color: var(--indigo);
}

.form textarea {
  min-height: 150px;
  resize: vertical;
}

.form-check {
  display: flex;
  gap: 0.65rem;
  align-items: flex-start;
  font-size: 0.9rem;
  font-weight: 400;
  color: var(--ink-soft);
}

.form-check input {
  margin-top: 0.3rem;
}

.form-status {
  font-size: 0.92rem;
  color: var(--indigo);
  min-height: 1.2em;
}

/* Legal pages */
.legal {
  max-width: 46rem;
}

.legal h2 {
  margin-top: 2.25rem;
  font-size: 1.45rem;
}

.legal h3 {
  margin-top: 1.5rem;
  font-size: 1.15rem;
}

.legal ul {
  padding-left: 1.2rem;
  color: var(--ink-soft);
}

.legal li { margin-bottom: 0.45rem; }

.page-hero {
  padding: clamp(3rem, 6vw, 4.5rem) 0 0;
}

.page-hero h1 {
  max-width: 18ch;
}

.page-hero p {
  max-width: 38rem;
  font-size: 1.1rem;
}

/* Footer */
.site-footer {
  border-top: 1px solid var(--line);
  padding: 3rem 0 2rem;
  background: var(--paper-2);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2.5rem;
}

.footer-brand {
  font-family: var(--font-display);
  font-size: 1.5rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.footer-brand span { color: var(--indigo); }

.footer-col h4 {
  font-family: var(--font-body);
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 0.85rem;
  font-weight: 500;
}

.footer-col ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.footer-col li { margin-bottom: 0.45rem; }

.footer-col a {
  color: var(--ink-soft);
  text-decoration: none;
}

.footer-col a:hover { color: var(--indigo); }

.footer-bottom {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.5rem;
  justify-content: space-between;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
  font-size: 0.88rem;
  color: var(--muted);
}

.footer-bottom span:last-child {
  line-height: 1.7;
  text-align: right;
}

.footer-bottom strong {
  color: var(--ink-soft);
  font-weight: 500;
}

.footer-bottom a {
  color: var(--muted);
}

.footer-bottom a:hover {
  color: var(--indigo);
}

.footer-bottom button {
  background: none;
  border: none;
  color: var(--indigo);
  cursor: pointer;
  font: inherit;
  padding: 0;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Reveal motion */
.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.7s var(--ease), transform 0.7s var(--ease);
}

.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* Cookie banner — GDPR / CNIL */
.cookie-banner {
  position: fixed;
  left: 1rem;
  right: 1rem;
  bottom: 1rem;
  z-index: 10000;
  max-width: 560px;
  margin-left: auto;
  background: var(--white);
  border: 1px solid var(--line);
  box-shadow: 0 20px 50px rgba(18, 20, 26, 0.14);
  padding: 1.25rem 1.35rem 1.35rem;
  display: none;
}

.cookie-banner.is-open {
  display: block;
  animation: rise 0.45s var(--ease);
}

.cookie-banner h2 {
  font-size: 1.2rem;
  margin-bottom: 0.45rem;
}

.cookie-banner p {
  font-size: 0.92rem;
  margin-bottom: 1rem;
}

.cookie-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
}

.cookie-actions .btn {
  padding: 0.7rem 1rem;
  font-size: 0.88rem;
}

.cookie-panel {
  position: fixed;
  inset: 0;
  z-index: 10001;
  background: rgba(18, 20, 26, 0.45);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 1rem;
}

.cookie-panel.is-open {
  display: flex;
}

.cookie-panel-inner {
  width: min(100%, 520px);
  background: var(--paper);
  border: 1px solid var(--line);
  padding: 1.5rem;
  max-height: 90vh;
  overflow: auto;
}

.cookie-option {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.75rem;
  align-items: start;
  padding: 1rem 0;
  border-bottom: 1px solid var(--line);
}

.cookie-option:last-of-type {
  border-bottom: none;
}

.cookie-option h3 {
  font-size: 1rem;
  margin: 0 0 0.25rem;
}

.cookie-option p {
  margin: 0;
  font-size: 0.88rem;
}

.switch {
  position: relative;
  width: 44px;
  height: 26px;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.switch .slider {
  position: absolute;
  inset: 0;
  background: #c9c3b8;
  cursor: pointer;
  transition: 0.25s;
}

.switch .slider::before {
  content: "";
  position: absolute;
  height: 20px;
  width: 20px;
  left: 3px;
  top: 3px;
  background: white;
  transition: 0.25s;
}

.switch input:checked + .slider {
  background: var(--indigo);
}

.switch input:checked + .slider::before {
  transform: translateX(18px);
}

.switch input:disabled + .slider {
  opacity: 0.7;
  cursor: not-allowed;
}

@media (max-width: 1100px) {
  .service-tiles {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* Mobile */
@media (max-width: 900px) {
  .split,
  .contact-grid,
  .service-tiles,
  .service-layout,
  .include-grid,
  .other-services,
  .footer-grid,
  .trust-row {
    grid-template-columns: 1fr;
  }

  .nav-toggle { display: inline-block; }

  .nav-links {
    position: fixed;
    inset: var(--nav-h) 0 auto 0;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    align-items: stretch;
    padding: 1rem 1.25rem 1.25rem;
    gap: 0;
    display: none;
  }

  .nav-links.is-open { display: flex; }

  .nav-links li {
    border-bottom: 1px solid var(--line);
  }

  .nav-links a {
    display: block;
    padding: 0.9rem 0;
  }

  .nav-links .nav-cta {
    margin-top: 0.75rem;
    text-align: center;
  }

  .service-item,
  .process-step {
    grid-template-columns: 3.5rem 1fr;
  }

  .hero {
    min-height: 85vh;
    align-items: end;
  }

  .hero-inner {
    margin-bottom: 3rem;
  }

  .footer-bottom span:last-child {
    text-align: left;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}


/* Language switcher (FR | EN) */
.lang-switch {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  color: var(--muted);
  font-size: 0.82rem;
}
.lang-btn {
  appearance: none;
  background: none;
  border: 0;
  padding: 0.25rem 0.2rem;
  font: inherit;
  font-weight: 500;
  letter-spacing: 0.04em;
  color: var(--muted);
  cursor: pointer;
}
.lang-btn:hover { color: var(--ink); }
.lang-btn.is-active { color: var(--indigo); font-weight: 600; text-decoration: underline; text-underline-offset: 4px; }
.lang-btn:focus-visible { outline: 2px solid var(--indigo); outline-offset: 2px; }
@media (max-width: 900px) {
  .nav-links .lang-switch { padding: 0.9rem 0; }
}
