/* ==========================================================================
   HAZON — Design system (mobile first)
   Source of truth: Charte graphique HAZON TECH v1.1
     · Bleu principal #0B4173 — dominante (≈ 60 %)
     · Blanc / neutres (Brume, Gris, Encre) — respiration (≈ 30 %)
     · Orange vif #F38D2C — accent, jamais dominant (≈ 10 %)
     · Space Grotesk (titres 600/700) · Inter (texte 400/500)
   The logo is always used as supplied (PNG files in /assets/brand), never recoloured or retypeset.
   ========================================================================== */

@font-face {
  font-family: "Space Grotesk";
  src: url("../assets/fonts/space-grotesk-var.woff2") format("woff2");
  font-weight: 300 700;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("../assets/fonts/inter-var.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}

:root {
  /* brand */
  --navy: #0b4173;
  --navy-deep: #082c4e;
  --orange: #f38d2c;
  /* neutrals from the charter */
  --ink: #0a1f33;
  --grey: #5b6b7a;
  --mist: #f1f4f8;
  --white: #ffffff;
  --sky: #cbdcea;
  --sky-soft: #eaf1f8;
  --line: #dde3ea;

  /* roles */
  --bg: var(--mist);
  --fg: var(--ink);
  --fg-muted: var(--grey);
  --rule: var(--line);

  --f-display: "Space Grotesk", "Helvetica Neue", Arial, sans-serif;
  --f-body: "Inter", "Helvetica Neue", Arial, sans-serif;

  --gutter: 20px;
  --max: 1360px;
  --header-h: 64px;
  --radius: 18px;
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-in-out: cubic-bezier(0.65, 0, 0.35, 1);

  --safe-top: env(safe-area-inset-top, 0px);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
}

@media (min-width: 768px) { :root { --gutter: 36px; --header-h: 76px; } }
@media (min-width: 1200px) { :root { --gutter: 56px; } }

/* ---------- Reset ---------- */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; background: var(--bg); color: var(--fg); }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }
body {
  margin: 0;
  background: var(--bg); color: var(--fg);
  font: 400 1rem/1.6 var(--f-body);
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
  text-rendering: optimizeLegibility;
}
img, svg, video { display: block; max-width: 100%; }
img { height: auto; }
a { color: inherit; }
button, input, textarea, select { font: inherit; color: inherit; }
button { background: none; border: 0; padding: 0; cursor: pointer; }
h1, h2, h3, h4, p, ul, ol, figure, blockquote, address { margin: 0; }
ul[role="list"], ol[role="list"] { list-style: none; padding: 0; }
::selection { background: var(--orange); color: var(--ink); }

:focus-visible { outline: 2px solid var(--orange); outline-offset: 3px; border-radius: 4px; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: fixed; left: 12px; top: 12px; z-index: 100;
  padding: 12px 16px; border-radius: 10px;
  background: var(--ink); color: var(--white); font-weight: 500; text-decoration: none;
  transform: translateY(-160%); transition: transform .3s var(--ease);
}
.skip-link:focus { transform: none; }

/* ---------- Layout ---------- */

.wrap { width: 100%; max-width: calc(var(--max) + var(--gutter) * 2); margin-inline: auto; padding-inline: var(--gutter); }
.section { padding-block: clamp(80px, 18vw, 168px); position: relative; }
.section--tight { padding-block: clamp(56px, 12vw, 112px); }

/* dark (brand) surfaces */
.on-navy { --bg: var(--navy); --fg: var(--white); --fg-muted: rgba(255, 255, 255, .74); --rule: rgba(255, 255, 255, .18); background: var(--bg); color: var(--fg); }
.on-ink { --bg: var(--ink); --fg: var(--white); --fg-muted: rgba(255, 255, 255, .68); --rule: rgba(255, 255, 255, .14); background: var(--bg); color: var(--fg); }
.on-white { --bg: var(--white); background: var(--bg); }

/* ---------- Type ---------- */

.display, .h1, .h2, .h3 { font-family: var(--f-display); font-weight: 700; text-wrap: balance; }
.display {
  font-size: clamp(3.4rem, 16.5vw, 11.5rem);
  line-height: .86; letter-spacing: -.05em; text-transform: uppercase;
}
.h1 { font-size: clamp(2.5rem, 10.5vw, 6rem); line-height: .94; letter-spacing: -.04em; }
.h2 { font-size: clamp(2.05rem, 8.4vw, 4.4rem); line-height: .98; letter-spacing: -.035em; }
.h3 { font-size: clamp(1.3rem, 4.8vw, 1.8rem); line-height: 1.12; letter-spacing: -.015em; font-weight: 600; }
.lead { font-size: clamp(1.08rem, 3.9vw, 1.35rem); line-height: 1.5; color: var(--fg); max-width: 38ch; }
.muted { color: var(--fg-muted); }
.prose { max-width: 62ch; color: var(--fg-muted); }
.prose p + p { margin-top: 1em; }
.accent { color: var(--orange); }

/* Section label — echoes the "— TECH —" rules of the logo */
.label {
  display: inline-flex; align-items: center; gap: 12px;
  font: 500 .74rem/1 var(--f-display); letter-spacing: .2em; text-transform: uppercase;
  color: var(--fg-muted);
}
.label::before { content: ""; width: 28px; height: 2px; background: var(--orange); flex: none; }
.label__num { color: var(--fg); }

/* ---------- Buttons ---------- */

.btn {
  --btn-bg: transparent; --btn-fg: var(--fg); --btn-bd: var(--rule);
  display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  min-height: 54px; padding: 0 24px;
  border-radius: 999px; border: 1px solid var(--btn-bd);
  background: var(--btn-bg); color: var(--btn-fg);
  font: 500 .98rem/1 var(--f-body); text-decoration: none; white-space: nowrap;
  transition: background-color .35s var(--ease), border-color .35s var(--ease), color .35s var(--ease), transform .2s var(--ease);
}
.btn:hover { --btn-bd: var(--fg); }
.btn:active { transform: scale(.98); }
.btn__arrow { transition: transform .45s var(--ease); }
.btn:hover .btn__arrow { transform: translateX(4px); }
.btn--primary { --btn-bg: var(--orange); --btn-fg: var(--ink); --btn-bd: var(--orange); font-weight: 600; }
.btn--primary:hover { --btn-bg: #f69c46; --btn-bd: #f69c46; }
.btn--navy { --btn-bg: var(--navy); --btn-fg: var(--white); --btn-bd: var(--navy); }
.btn--navy:hover { --btn-bg: var(--navy-deep); --btn-bd: var(--navy-deep); }
.btn--block { width: 100%; }
@media (min-width: 560px) { .btn--block { width: auto; } }

.link-arrow {
  display: inline-flex; align-items: center; gap: 10px; min-height: 44px;
  font: 500 1rem/1 var(--f-body); text-decoration: none; color: var(--fg);
  background: linear-gradient(currentColor, currentColor) 0 100% / 100% 1px no-repeat;
  padding-bottom: 2px;
  transition: background-size .45s var(--ease);
}
.link-arrow:hover { background-size: 0 1px; background-position: 100% 100%; }
.link-arrow span { color: var(--orange); transition: transform .45s var(--ease); }
.link-arrow:hover span { transform: translateX(4px); }

/* ---------- Reveal (only when JS is running) ---------- */

.js [data-reveal] { opacity: 0; transform: translate3d(0, 26px, 0); transition: opacity .9s var(--ease), transform .9s var(--ease); transition-delay: calc(var(--d, 0) * 70ms); }
.js [data-reveal].is-in { opacity: 1; transform: none; }
.js .split .ln { display: block; overflow: hidden; padding-bottom: .04em; margin-bottom: -.04em; }
.js .split .ln > span { display: block; transform: translate3d(0, 105%, 0); transition: transform 1.1s var(--ease); transition-delay: calc(var(--i, 0) * 80ms); }
.js .split.is-in .ln > span { transform: none; }

/* ==========================================================================
   Header + burger menu
   ========================================================================== */

.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 40;
  padding-top: var(--safe-top);
  transition: transform .5s var(--ease), background-color .4s var(--ease), box-shadow .4s var(--ease);
}
.site-header__bar { display: flex; align-items: center; justify-content: space-between; height: var(--header-h); }
.site-header.is-scrolled { background: rgba(241, 244, 248, .88); -webkit-backdrop-filter: saturate(1.4) blur(14px); backdrop-filter: saturate(1.4) blur(14px); box-shadow: 0 1px 0 var(--line); }
.site-header.is-hidden { transform: translateY(-100%); }
.menu-open .site-header { transform: none; background: transparent; box-shadow: none; -webkit-backdrop-filter: none; backdrop-filter: none; }

.brand { display: inline-flex; align-items: center; min-height: 44px; position: relative; z-index: 2; }
.brand img { height: 30px; width: auto; }
.brand .brand__light { display: none; }
@media (min-width: 768px) { .brand img { height: 36px; } }
/* dark header variant (pages that open on a navy surface) + whenever the menu is open */
[data-header="dark"] .brand__dark,
.menu-open .brand__dark { display: none; }
[data-header="dark"] .brand__light,
.menu-open .brand__light { display: block; }
[data-header="dark"] .burger { color: var(--white); }
[data-header="dark"] .site-header.is-scrolled { background: rgba(11, 65, 115, .9); box-shadow: 0 1px 0 rgba(255, 255, 255, .12); }
/* header floating over a dark section (e.g. the home film) */
.site-header.is-on-dark .brand__dark { display: none; }
.site-header.is-on-dark .brand__light { display: block; }
.site-header.is-on-dark .burger { color: var(--white); }
.site-header.is-on-dark.is-scrolled { background: rgba(10, 31, 51, .78); box-shadow: 0 1px 0 rgba(255, 255, 255, .1); }

.burger {
  position: relative; z-index: 2;
  display: inline-flex; align-items: center; gap: 12px;
  min-height: 44px; min-width: 44px; padding: 0 2px 0 10px; margin-right: -4px;
  font: 500 .78rem/1 var(--f-display); letter-spacing: .18em; text-transform: uppercase;
  color: var(--ink);
}
.menu-open .burger { color: var(--white); }
.burger__label { display: none; }
@media (min-width: 480px) { .burger__label { display: inline; } }
.burger__icon { position: relative; width: 26px; height: 14px; }
.burger__icon i { position: absolute; left: 0; right: 0; height: 2px; border-radius: 2px; background: currentColor; transition: transform .55s var(--ease), top .55s var(--ease), width .55s var(--ease); }
.burger__icon i:nth-child(1) { top: 1px; }
.burger__icon i:nth-child(2) { top: 11px; width: 62%; left: auto; }
.burger:hover .burger__icon i:nth-child(2) { width: 100%; }
.menu-open .burger__icon i:nth-child(1) { top: 6px; transform: rotate(45deg); }
.menu-open .burger__icon i:nth-child(2) { top: 6px; width: 100%; transform: rotate(-45deg); }

.site-menu {
  position: fixed; inset: 0; z-index: 35;
  display: flex; flex-direction: column;
  padding: calc(var(--header-h) + var(--safe-top) + 24px) var(--gutter) calc(28px + var(--safe-bottom));
  background: var(--navy); color: var(--white);
  overflow-y: auto; overscroll-behavior: contain;
  clip-path: inset(0 0 100% 0);
  visibility: hidden;
  transition: clip-path .75s var(--ease-in-out), visibility 0s .75s;
}
.menu-open .site-menu { clip-path: inset(0 0 0 0); visibility: visible; transition: clip-path .75s var(--ease-in-out), visibility 0s; }
.site-menu__inner { width: 100%; max-width: var(--max); margin-inline: auto; display: flex; flex-direction: column; flex: 1; gap: 40px; }
.site-menu__list { list-style: none; margin: 0; padding: 0; border-top: 1px solid rgba(255, 255, 255, .16); }
.site-menu__list li { border-bottom: 1px solid rgba(255, 255, 255, .16); overflow: hidden; }
.site-menu__list a {
  display: flex; align-items: baseline; gap: 16px;
  padding: 16px 0;
  font: 600 clamp(2rem, 9.5vw, 4.4rem)/1 var(--f-display); letter-spacing: -.035em;
  text-decoration: none; color: var(--white);
  transform: translate3d(0, 100%, 0);
  transition: transform .8s var(--ease), color .3s;
  transition-delay: calc(.12s + var(--i, 0) * .05s);
}
.menu-open .site-menu__list a { transform: none; }
.site-menu__list a span { font: 500 .72rem/1 var(--f-display); letter-spacing: .18em; color: rgba(255, 255, 255, .6); min-width: 24px; }
.site-menu__list a:hover { color: var(--sky); }
.site-menu__list a[aria-current="page"] { color: var(--white); }
.site-menu__list a[aria-current="page"]::after {
  content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--orange);
  align-self: center; margin-left: 4px;
}
.site-menu__foot { margin-top: auto; display: grid; gap: 18px; opacity: 0; transition: opacity .6s .35s; }
.menu-open .site-menu__foot { opacity: 1; }
.site-menu__foot p { color: rgba(255, 255, 255, .72); font-size: .95rem; }
.site-menu__foot a { color: var(--white); }
@media (min-width: 900px) {
  .site-menu__inner { flex-direction: row; align-items: flex-end; justify-content: space-between; }
  .site-menu__list { flex: 1; max-width: 860px; }
  .site-menu__foot { margin-top: 0; max-width: 320px; }
}

/* ==========================================================================
   Footer
   ========================================================================== */

.site-footer { padding: clamp(72px, 14vw, 128px) 0 calc(28px + var(--safe-bottom)); }
.footer-cta { display: grid; gap: 28px; padding-bottom: clamp(56px, 10vw, 96px); border-bottom: 1px solid var(--rule); }
.footer-cta__mail {
  font: 600 clamp(1.7rem, 7.6vw, 4rem)/1 var(--f-display); letter-spacing: -.035em;
  color: var(--white); text-decoration: none; word-break: break-word;
  background: linear-gradient(var(--orange), var(--orange)) 0 100% / 0 3px no-repeat;
  padding-bottom: 6px; transition: background-size .6s var(--ease);
  justify-self: start;
}
.footer-cta__mail:hover { background-size: 100% 3px; }

.footer-grid { display: grid; gap: 44px; padding-block: clamp(48px, 9vw, 80px); }
.footer-brand img { width: 168px; }
.footer-brand p { margin-top: 18px; max-width: 34ch; color: var(--fg-muted); font-size: .95rem; }
.footer-col h2 { font: 500 .72rem/1 var(--f-display); letter-spacing: .2em; text-transform: uppercase; color: var(--fg-muted); margin-bottom: 18px; }
.footer-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.footer-col a { display: inline-flex; min-height: 40px; align-items: center; text-decoration: none; color: var(--fg); transition: color .25s; }
.footer-col a:hover { color: var(--sky); }
.footer-col address { font-style: normal; color: var(--fg-muted); font-size: .95rem; line-height: 1.6; }
.footer-col address a { min-height: 0; color: var(--fg); }

.newsletter p { color: var(--fg-muted); font-size: .92rem; margin-bottom: 16px; max-width: 40ch; }
.newsletter__row { display: flex; gap: 8px; }
.newsletter input[type="email"] {
  flex: 1; min-width: 0; height: 52px; padding: 0 18px;
  border-radius: 999px; border: 1px solid var(--rule); background: rgba(255, 255, 255, .06);
  color: var(--fg); font-size: 16px; outline: none; transition: border-color .25s, background-color .25s;
}
.newsletter input[type="email"]::placeholder { color: rgba(255, 255, 255, .5); }
.newsletter input[type="email"]:focus { border-color: var(--orange); background: rgba(255, 255, 255, .1); }
.newsletter button { height: 52px; width: 52px; flex: none; border-radius: 50%; background: var(--orange); color: var(--ink); display: grid; place-items: center; transition: transform .2s var(--ease), background-color .3s; }
.newsletter button:hover { background: #f69c46; }
.newsletter button:disabled { opacity: .6; cursor: progress; }
.consent { display: flex; gap: 12px; align-items: flex-start; margin-top: 14px; font-size: .84rem; line-height: 1.5; color: var(--fg-muted); cursor: pointer; }
.consent input { appearance: none; -webkit-appearance: none; flex: none; width: 20px; height: 20px; margin: 1px 0 0; border-radius: 6px; border: 1.5px solid currentColor; display: grid; place-items: center; cursor: pointer; }
.consent input::after { content: ""; width: 10px; height: 6px; border: 2px solid var(--ink); border-top: 0; border-right: 0; transform: rotate(-45deg) scale(0); margin-top: -2px; transition: transform .2s var(--ease); }
.consent input:checked { background: var(--orange); border-color: var(--orange); }
.consent input:checked::after { transform: rotate(-45deg) scale(1); }
.consent a { color: var(--fg); }
.form-msg { margin-top: 12px; font-size: .88rem; min-height: 1.3em; }
.form-msg[data-state="error"] { color: #ffb4a3; }
.form-msg[data-state="ok"] { color: var(--sky); }
.on-white .form-msg[data-state="error"], .form-msg--light[data-state="error"] { color: #b3261e; }
.on-white .form-msg[data-state="ok"], .form-msg--light[data-state="ok"] { color: var(--navy); }

.footer-legal {
  display: flex; flex-direction: column; gap: 14px;
  padding-top: 28px; border-top: 1px solid var(--rule);
  font-size: .82rem; color: var(--fg-muted);
}
.footer-legal ul { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 4px 22px; }
.footer-legal a { color: var(--fg); text-decoration: none; display: inline-flex; min-height: 36px; align-items: center; }
.footer-legal a:hover { text-decoration: underline; }

@media (min-width: 768px) {
  .footer-cta { grid-template-columns: 1fr auto; align-items: end; }
  .footer-grid { grid-template-columns: repeat(2, 1fr); }
  .footer-legal { flex-direction: row; justify-content: space-between; align-items: center; }
}
@media (min-width: 1100px) {
  .footer-grid { grid-template-columns: 1.3fr .8fr .8fr 1.3fr; gap: 56px; }
}

/* ==========================================================================
   Shared page header (inner pages)
   ========================================================================== */

.page-hero { padding: calc(var(--header-h) + var(--safe-top) + clamp(56px, 14vw, 120px)) 0 clamp(56px, 12vw, 104px); }
.page-hero .label { margin-bottom: clamp(22px, 5vw, 36px); }
.page-hero .lead { margin-top: clamp(22px, 5vw, 36px); color: var(--fg-muted); }

/* numbered rows (services, method…) */
.rows { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
.row { border-bottom: 1px solid var(--rule); padding-block: clamp(28px, 6vw, 44px); display: grid; gap: 14px; }
.row__num { font: 500 .78rem/1 var(--f-display); letter-spacing: .18em; color: var(--fg-muted); }
.row__body { color: var(--fg-muted); max-width: 56ch; }
.tags { list-style: none; margin: 4px 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.tags li { padding: 7px 12px; border-radius: 999px; border: 1px solid var(--rule); font-size: .82rem; line-height: 1; color: var(--fg-muted); }
@media (min-width: 900px) {
  .row { grid-template-columns: 80px minmax(0, 1.1fr) minmax(0, 1fr); gap: 32px; align-items: start; }
}

/* Legal / long-form pages */
.legal-doc { padding-bottom: clamp(80px, 14vw, 140px); }
.legal-doc .wrap { display: grid; gap: 40px; }
.legal-doc article { max-width: 72ch; }
.legal-doc h2 { font: 600 clamp(1.3rem, 4.4vw, 1.7rem)/1.2 var(--f-display); letter-spacing: -.015em; margin: 2.4em 0 .7em; color: var(--ink); }
.legal-doc h2:first-child { margin-top: 0; }
.legal-doc h3 { font: 600 1.05rem/1.3 var(--f-display); margin: 1.6em 0 .5em; }
.legal-doc p, .legal-doc li { color: #33475b; }
.legal-doc p + p { margin-top: .9em; }
.legal-doc ul { padding-left: 1.2em; margin: .6em 0; display: grid; gap: .35em; }
.legal-doc a { color: var(--navy); }
.legal-doc dl { display: grid; gap: 4px 20px; margin: 1em 0; }
.legal-doc dt { font-weight: 500; color: var(--ink); }
.legal-doc dd { margin: 0 0 10px; color: #33475b; }
@media (min-width: 700px) { .legal-doc dl { grid-template-columns: 220px 1fr; } .legal-doc dd { margin: 0; } }
.notice {
  border-left: 3px solid var(--orange); background: var(--white);
  padding: 18px 20px; border-radius: 0 12px 12px 0; color: #33475b; font-size: .95rem;
}
.todo { background: #fff3e4; color: #7a4310; padding: 1px 6px; border-radius: 4px; font-size: .92em; }
.toc { position: sticky; top: calc(var(--header-h) + 24px); align-self: start; display: none; }
.toc ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; font-size: .9rem; }
.toc a { color: var(--grey); text-decoration: none; }
.toc a:hover { color: var(--ink); }
@media (min-width: 1100px) { .legal-doc .wrap { grid-template-columns: 240px 1fr; gap: 72px; } .toc { display: block; } }

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; transition-delay: 0s !important; scroll-behavior: auto !important; }
  .js [data-reveal] { opacity: 1; transform: none; }
  .js .split .ln > span { transform: none; }
}

/* Désinscription */
.unsub { max-width: 560px; display: grid; gap: 14px; padding: 24px; border-radius: 20px; }
.unsub .btn { justify-self: start; }
.unsub__note { margin-top: 22px; color: var(--grey); max-width: 60ch; }
.unsub__note a { color: var(--navy); }

