/* ==========================================================
   ili — Agent Double · feuille de styles principale
   ========================================================== */

@font-face {
  font-family: "Montserrat";
  src: url("../fonts/montserrat-var.woff2") format("woff2");
  font-weight: 300 800;
  font-display: swap;
}

:root {
  --paper: #f4f1ea;
  --paper-2: #ebe6da;
  --card: #fbfaf6;
  --ink: #121414;
  --ink-2: #2b2f2f;
  --muted: #5d625f;
  --line: rgba(18, 20, 20, 0.14);
  --teal: #006666;
  --teal-bright: #0b8c8c;
  --teal-soft: #d6e7e4;
  --night: #0c1515;
  --night-2: #142121;
  --stamp: #b3261e;

  --font: "Montserrat", system-ui, -apple-system, "Segoe UI", sans-serif;

  --wrap: 1200px;
  --gutter: clamp(20px, 4vw, 48px);
  --radius: 14px;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
  --header-h: 76px;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, video { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
p { margin: 0 0 1em; }
h1, h2, h3, h4 { margin: 0; line-height: 1.12; font-weight: 600; letter-spacing: -0.02em; text-wrap: balance; }
::selection { background: var(--teal); color: #fff; }

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

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap;
}

.skip-link {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 8px;
  text-decoration: none; font-weight: 600;
  transition: top .2s;
}
.skip-link:focus { top: 12px; }

.wrap {
  width: 100%;
  max-width: calc(var(--wrap) + var(--gutter) * 2);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* ---------- Petits éléments typographiques ---------- */

.label {
  display: inline-flex; align-items: center; gap: .6em;
  font-family: var(--font);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--teal);
}

.lead { font-size: clamp(18px, 1.6vw, 21px); color: var(--ink-2); max-width: 62ch; }
.muted { color: var(--muted); }

/* ---------- Boutons ---------- */

.btn {
  --bg: var(--ink); --fg: #fff;
  display: inline-flex; align-items: center; gap: .65em;
  padding: 14px 24px;
  border-radius: 999px;
  border: 1.5px solid var(--bg);
  background: var(--bg); color: var(--fg);
  font: 600 15px/1 var(--font);
  letter-spacing: .01em;
  text-decoration: none;
  cursor: pointer;
  transition: transform .25s var(--ease), background .25s, color .25s, border-color .25s;
}
.btn:hover { transform: translateY(-2px); background: var(--teal); border-color: var(--teal); }
.btn svg { width: 18px; height: 18px; transition: transform .25s var(--ease); }
.btn:hover svg { transform: translateX(3px); }
.btn--ghost { --bg: transparent; --fg: var(--ink); border-color: var(--ink); }
.btn--ghost:hover { color: #fff; }
.btn--light { --bg: #fff; --fg: var(--ink); }
.btn--light:hover { color: #fff; }

.link-arrow {
  display: inline-flex; align-items: center; gap: .5em;
  font-weight: 600; text-decoration: none;
  border-bottom: 1.5px solid currentColor;
  padding-bottom: 2px;
}
.link-arrow:hover { color: var(--teal); }
.link-arrow svg { width: 18px; height: 18px; flex: none; transition: transform .25s var(--ease); }
.link-arrow:hover svg { transform: translateX(3px); }
.section-head--split .link-arrow { white-space: nowrap; }

/* ---------- En-tête ---------- */

.site-header {
  position: sticky; top: 0; z-index: 50;
  height: var(--header-h);
  border-bottom: 1px solid transparent;
  transition: border-color .3s;
}
/* le flou est porté par un pseudo-élément : sur l'en-tête lui-même,
   il emprisonnerait le menu mobile (position: fixed) dans ses 76 px */
.site-header::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: color-mix(in srgb, var(--paper) 86%, transparent);
  backdrop-filter: saturate(1.4) blur(14px);
  -webkit-backdrop-filter: saturate(1.4) blur(14px);
}
.site-header.is-scrolled { border-bottom-color: var(--line); }
.site-header .wrap {
  height: 100%;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}

.brand {
  display: inline-flex; align-items: center; gap: 12px;
  text-decoration: none; color: var(--ink);
}
.brand__mark { width: 22px; height: 40px; flex: none; }
.brand__name { font-size: 21px; font-weight: 500; letter-spacing: -0.01em; line-height: 1; }
.brand__name small { display: block; font-family: var(--font); font-size: 10.5px; letter-spacing: .18em; text-transform: uppercase; color: var(--muted); margin-top: 5px; }

.nav { display: flex; align-items: center; gap: 4px; }
.nav__list { list-style: none; display: flex; gap: 2px; margin: 0; padding: 0; }
.nav__list a {
  display: block;
  padding: 9px 14px;
  border-radius: 999px;
  text-decoration: none;
  font-size: 15px; font-weight: 500;
  color: var(--ink-2);
  transition: background .2s, color .2s;
}
.nav__list a:hover { background: var(--paper-2); color: var(--ink); }
.nav__list a[aria-current="page"] { color: var(--teal); }
.nav__cta { margin-left: 10px; padding: 11px 20px; font-size: 14.5px; }

.nav-toggle {
  display: none;
  width: 46px; height: 46px;
  border: 1.5px solid var(--ink); border-radius: 50%;
  background: transparent; cursor: pointer;
  align-items: center; justify-content: center;
  color: var(--ink);
}
.nav-toggle span, .nav-toggle span::before, .nav-toggle span::after {
  display: block; width: 18px; height: 1.8px; background: currentColor; border-radius: 2px;
  position: relative; transition: transform .3s var(--ease), background .2s;
}
.nav-toggle span::before, .nav-toggle span::after { content: ""; position: absolute; left: 0; }
.nav-toggle span::before { top: -6px; }
.nav-toggle span::after { top: 6px; }
.nav-open .nav-toggle span { background: transparent; }
.nav-open .nav-toggle span::before { transform: translateY(6px) rotate(45deg); }
.nav-open .nav-toggle span::after { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 960px) {
  .nav-toggle { display: inline-flex; position: relative; z-index: 60; }
  .nav {
    position: fixed; inset: 0; z-index: 55;
    flex-direction: column; align-items: flex-start; justify-content: center; gap: 28px;
    padding: 100px var(--gutter) 40px;
    background: var(--night); color: #fff;
    opacity: 0; visibility: hidden;
    transition: opacity .35s var(--ease), visibility .35s;
  }
  .nav-open .nav { opacity: 1; visibility: visible; }
  .nav-open .nav-toggle { color: #fff; border-color: #fff; }
  .nav__list { flex-direction: column; gap: 4px; }
  .nav__list a { font-size: clamp(28px, 7vw, 40px); font-weight: 500; color: #fff; padding: 4px 0; border-radius: 0; }
  .nav__list a:hover { background: none; color: var(--teal-bright); }
  .nav__list a[aria-current="page"] { color: var(--teal-bright); }
  .nav__cta { margin: 0; --bg: #fff; --fg: var(--ink); }
  body.nav-open { overflow: hidden; }
}

/* ---------- Sections génériques ---------- */

.section { padding-block: clamp(72px, 10vw, 128px); }
.section--tight { padding-block: clamp(48px, 7vw, 88px); }
.section--alt { background: var(--paper-2); }
.section--dark { background: var(--night); color: #e9efec; }
.section--dark .label { color: var(--teal-bright); }
.section--dark .muted, .section--dark .lead { color: #a9b6b2; }

.section-head { display: grid; gap: 18px; margin-bottom: clamp(40px, 6vw, 64px); max-width: 760px; }
.section-head h2 { font-size: clamp(32px, 4.4vw, 54px); }
.section-head--split {
  max-width: none;
  grid-template-columns: 1fr auto; align-items: end; gap: 24px 48px;
}
@media (max-width: 760px) { .section-head--split { grid-template-columns: 1fr; } }

/* ---------- Hero accueil ---------- */

.hero {
  position: relative;
  padding-block: clamp(48px, 8vw, 110px) clamp(64px, 9vw, 120px);
  overflow: hidden;
}
.hero__visual { margin: 0 0 0 auto; max-width: 480px; }
.hero__visual img { width: 100%; border-radius: var(--radius); }
.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr);
  gap: clamp(40px, 6vw, 80px);
  align-items: center;
}
.hero__title {
  font-size: clamp(42px, 6.6vw, 88px);
  font-weight: 600;
  letter-spacing: -0.035em;
  margin: 22px 0 26px;
}
.hero__title em { font-style: normal; color: var(--teal); }
.hero__title .thin { font-weight: 300; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 34px; }

@media (max-width: 900px) {
  .hero__grid { grid-template-columns: 1fr; }
  .hero__visual { max-width: 420px; margin: 0 auto; }
}

/* ---------- Services ---------- */

.services {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  border-top: 1px solid var(--line);
}
.service {
  padding: 32px 28px 36px 0;
  border-bottom: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 16px;
}
.service + .service { padding-left: 28px; border-left: 1px solid var(--line); }
.service__num { font-family: var(--font); font-size: 13px; color: var(--teal); letter-spacing: .1em; }
.service__icon { width: 44px; height: 44px; color: var(--ink); }
.service h3 { font-size: 24px; }
.service p { color: var(--muted); font-size: 15.5px; margin: 0; }
@media (max-width: 1000px) {
  .services { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .service:nth-child(3) { padding-left: 0; border-left: 0; }
}
@media (max-width: 600px) {
  .services { grid-template-columns: 1fr; }
  .service, .service + .service { padding: 28px 0; border-left: 0; }
}

/* Version détaillée (page Services) */
.service-rows { border-top: 1px solid var(--line); }
.service-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr);
  gap: 24px 48px;
  padding-block: clamp(36px, 5vw, 56px);
  border-bottom: 1px solid var(--line);
  align-items: start;
}
.service-row__num { font-family: var(--font); color: var(--teal); font-size: 14px; letter-spacing: .1em; padding-top: 10px; }
.service-row h2 { font-size: clamp(30px, 3.6vw, 46px); display: flex; align-items: center; gap: 16px; }
.service-row h2 svg { width: 40px; height: 40px; flex: none; color: var(--teal); }
.service-row__body { font-size: 17.5px; color: var(--ink-2); }
.service-row__body p:last-child { margin-bottom: 0; }
.service-row--feature { background: var(--night); color: #e9efec; border-radius: var(--radius); padding-inline: clamp(24px, 4vw, 48px); margin-top: 32px; border: 0; }
.service-row--feature .service-row__body { color: #c3cdca; }
.service-row--feature .service-row__num, .service-row--feature h2 svg { color: var(--teal-bright); }
@media (max-width: 800px) {
  .service-row { grid-template-columns: 1fr; gap: 14px; }
  .service-row__num { padding-top: 0; }
}

/* ---------- Grille de missions (catégories) ---------- */

.missions {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 18px;
}
.mission {
  position: relative;
  grid-column: span 2;
  display: block;
  aspect-ratio: 4 / 5;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--night);
  color: #fff;
  text-decoration: none;
  isolation: isolate;
}
.mission--wide { grid-column: span 3; aspect-ratio: 16 / 11; }
.mission img, .mission video {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2;
  transition: transform .8s var(--ease), filter .5s;
  filter: saturate(.9);
}
.mission::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(180deg, rgba(8,14,14,0) 35%, rgba(8,14,14,.85) 100%);
}
.mission:hover img, .mission:hover video { transform: scale(1.05); filter: saturate(1.05); }
.mission__body {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 24px;
  display: flex; align-items: flex-end; justify-content: space-between; gap: 16px;
}
.mission h3 { font-size: clamp(22px, 2.2vw, 28px); font-weight: 600; }
.mission__arrow {
  flex: none; width: 46px; height: 46px; border-radius: 50%;
  background: #fff; color: var(--ink);
  display: grid; place-items: center;
  transition: transform .35s var(--ease), background .3s, color .3s;
}
.mission__arrow svg { width: 20px; height: 20px; }
.mission:hover .mission__arrow { transform: rotate(-45deg); background: var(--teal-bright); color: #fff; }
@media (max-width: 900px) {
  .missions { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .mission, .mission--wide { grid-column: span 1; aspect-ratio: 4 / 5; }
}
@media (max-width: 560px) {
  .missions { grid-template-columns: 1fr; }
  .mission, .mission--wide { aspect-ratio: 5 / 4; }
}

/* ---------- Bloc agent (à propos) ---------- */

.agent {
  display: grid;
  grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr);
  gap: clamp(40px, 7vw, 96px);
  align-items: start;
}
.agent__text h2 { font-size: clamp(30px, 3.6vw, 44px); margin-bottom: 18px; }
.agent__text h3 { font-size: 22px; margin: 36px 0 10px; }
.agent__text h3:first-child { margin-top: 0; }
.agent > h2 { font-size: clamp(30px, 3.6vw, 44px); }
.agent__text--solo { grid-column: 1 / -1; max-width: 720px; }
.agent__text p { color: var(--ink-2); font-size: 17.5px; }
@media (max-width: 860px) {
  .agent { grid-template-columns: 1fr; }
}

/* ---------- Bandeau CTA ---------- */

.cta {
  position: relative;
  border-radius: calc(var(--radius) + 6px);
  background: var(--night);
  color: #fff;
  padding: clamp(40px, 7vw, 88px);
  overflow: hidden;
  display: grid; grid-template-columns: 1fr auto; gap: 32px; align-items: end;
}
.cta h2 { font-size: clamp(32px, 4.6vw, 60px); max-width: 16ch; }
.cta p { color: #a9b6b2; margin: 18px 0 0; max-width: 48ch; }
@media (max-width: 760px) { .cta { grid-template-columns: 1fr; } }

/* ---------- En-tête de page intérieure ---------- */

.page-hero { padding-block: clamp(48px, 8vw, 104px) clamp(36px, 5vw, 64px); }
.page-hero__back { display: inline-flex; align-items: center; gap: 8px; font-family: var(--font); font-size: 13px; letter-spacing: .06em; text-decoration: none; color: var(--muted); margin-bottom: 28px; }
.page-hero__back:hover { color: var(--teal); }
.page-hero__back svg { width: 16px; height: 16px; }
.page-hero h1 { font-size: clamp(42px, 7vw, 92px); letter-spacing: -0.04em; margin: 18px 0 24px; font-weight: 600; }
.page-hero h1 .thin { font-weight: 300; }
.page-hero__row { display: flex; flex-wrap: wrap; gap: 20px 48px; align-items: flex-end; justify-content: space-between; }
.page-hero__count { font-family: var(--font); font-size: 13px; color: var(--muted); letter-spacing: .08em; text-transform: uppercase; }

/* ---------- Galeries ---------- */

.gallery { columns: 3 300px; column-gap: 18px; }
.gallery__item {
  break-inside: avoid;
  margin: 0 0 18px;
  position: relative;
  border-radius: 10px;
  overflow: hidden;
  background: var(--paper-2);
  cursor: zoom-in;
  display: block;
  width: 100%;
  border: 0; padding: 0;
  text-align: left;
  color: inherit;
}
.gallery__item img { width: 100%; transition: transform .7s var(--ease); }
.gallery__item:hover img { transform: scale(1.035); }
.gallery__item figcaption {
  position: absolute; left: 10px; bottom: 10px;
  font-family: var(--font); font-size: 12px; letter-spacing: .06em;
  background: rgba(12, 21, 21, .78); color: #fff;
  padding: 5px 10px; border-radius: 6px;
  opacity: 0; transform: translateY(6px);
  transition: opacity .3s, transform .3s var(--ease);
}
.gallery__item:hover figcaption, .gallery__item:focus-visible figcaption { opacity: 1; transform: none; }
@media (hover: none) { .gallery__item figcaption { display: none; } }

.gallery--row {
  columns: initial;
  display: grid;
  grid-template-columns: repeat(var(--cols, 3), minmax(0, 1fr));
  gap: 14px;
}
.gallery--row .gallery__item { margin: 0; aspect-ratio: var(--ratio, 842 / 1191); }
.gallery--row .gallery__item img { height: 100%; object-fit: cover; }
@media (max-width: 700px) {
  /* sur mobile : carrousel horizontal à faire glisser */
  .gallery--row {
    grid-template-columns: none; grid-auto-flow: column; grid-auto-columns: 72%;
    overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none;
    margin-inline: calc(var(--gutter) * -1); padding-inline: var(--gutter);
    scroll-padding-inline: var(--gutter);
  }
  .gallery--row::-webkit-scrollbar { display: none; }
  .gallery--row .gallery__item { scroll-snap-align: start; }
}

/* ---------- Projets (Ghosts) ---------- */

.project {
  display: grid;
  grid-template-columns: minmax(0, 300px) minmax(0, 1fr);
  gap: 24px 56px;
  padding-block: clamp(40px, 6vw, 72px);
  border-top: 1px solid var(--line);
}
.project__info { position: sticky; top: calc(var(--header-h) + 24px); align-self: start; }
.project__num { font-family: var(--font); font-size: 13px; color: var(--teal); letter-spacing: .1em; }
.project__client { font-size: clamp(26px, 3vw, 36px); margin: 10px 0 6px; }
.project__title { font-size: 18px; font-weight: 400; color: var(--muted); letter-spacing: 0; }
.project__tags { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.tag {
  font-family: var(--font); font-size: 12px; letter-spacing: .04em;
  padding: 5px 11px; border-radius: 999px;
  border: 1px solid var(--line); color: var(--ink-2);
}
@media (max-width: 860px) {
  .project { grid-template-columns: 1fr; }
  .project__info { position: static; }
}

/* ---------- Études de cas (campagnes) ---------- */

.case { padding-block: clamp(48px, 7vw, 96px); border-top: 1px solid var(--line); }
.case__head {
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 24px 64px; margin-bottom: clamp(32px, 5vw, 56px);
}
.case__name { font-size: clamp(44px, 6vw, 80px); letter-spacing: -0.04em; }
.case__kind { font-family: var(--font); font-size: 13px; letter-spacing: .1em; text-transform: uppercase; color: var(--teal); margin-top: 14px; }
.case__brief { font-size: 18px; color: var(--ink-2); }
.case__brief dl { margin: 24px 0 0; display: grid; gap: 10px; }
.case__brief dl div { display: grid; grid-template-columns: 110px 1fr; gap: 16px; padding-top: 10px; border-top: 1px dashed var(--line); font-size: 15.5px; }
.case__brief dt { font-family: var(--font); font-size: 12px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); padding-top: 3px; }
.case__brief dd { margin: 0; }
.case__grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 14px;
}
.case__grid .gallery__item { margin: 0; height: 100%; }
.case__grid .gallery__item img { height: 100%; object-fit: cover; }
.span-4 { grid-column: span 4; } .span-5 { grid-column: span 5; } .span-6 { grid-column: span 6; }
.span-7 { grid-column: span 7; } .span-8 { grid-column: span 8; } .span-3 { grid-column: span 3; } .span-12 { grid-column: span 12; }
@media (max-width: 800px) {
  .case__head { grid-template-columns: 1fr; }
  .case__grid > * { grid-column: span 6; }
  .case__grid > .span-12, .case__grid > .span-8, .case__grid > .span-7 { grid-column: span 12; }
}

/* ---------- Motion design ---------- */

.reel {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 18px;
}
.reel__item {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
}
.reel__item--wide { grid-column: span 2; }
.reel__media { position: relative; aspect-ratio: 16 / 9; background: #fff; }
.reel__media video { width: 100%; height: 100%; object-fit: contain; }
.reel__caption {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
  padding: 14px 18px;
  border-top: 1px solid var(--line);
  background: var(--card);
}
.reel__caption h3 { font-size: 17px; font-weight: 600; letter-spacing: -0.01em; }
.reel__caption span { font-family: var(--font); font-size: 12px; color: var(--muted); letter-spacing: .06em; }
.reel__toggle {
  position: absolute; right: 12px; top: 12px;
  width: 40px; height: 40px; border-radius: 50%;
  border: 0; cursor: pointer;
  background: rgba(12,21,21,.72); color: #fff;
  display: grid; place-items: center;
  opacity: 0; transition: opacity .3s;
}
.reel__item:hover .reel__toggle, .reel__toggle:focus-visible { opacity: 1; }
@media (hover: none) { .reel__toggle { opacity: 1; } }
.reel__toggle svg { width: 16px; height: 16px; }
@media (max-width: 760px) {
  .reel { grid-template-columns: 1fr; }
  .reel__item--wide { grid-column: auto; }
}

/* ---------- Sites web ---------- */

.sites { display: grid; gap: 0; border-top: 1px solid var(--line); }
.site-card {
  display: grid;
  grid-template-columns: 80px minmax(0, 1fr) auto;
  gap: 24px; align-items: center;
  padding: clamp(28px, 4vw, 44px) 0;
  border-bottom: 1px solid var(--line);
  text-decoration: none; color: inherit;
  position: relative;
  transition: padding .4s var(--ease);
}
.site-card::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: var(--teal-soft);
  transform: scaleY(0); transform-origin: bottom;
  transition: transform .45s var(--ease);
}
.site-card:hover { padding-inline: 20px; }
.site-card:hover::before { transform: scaleY(1); }
.site-card__num { font-family: var(--font); font-size: 13px; color: var(--teal); letter-spacing: .1em; }
.site-card h2 { font-size: clamp(30px, 5vw, 64px); letter-spacing: -0.04em; font-weight: 500; }
.site-card p { margin: 8px 0 0; color: var(--muted); font-size: 15.5px; }
.site-card .mission__arrow { background: var(--ink); color: #fff; }
.site-card:hover .mission__arrow { transform: rotate(-45deg); background: var(--teal); }
@media (max-width: 600px) {
  .site-card { grid-template-columns: 1fr auto; }
  .site-card__num { grid-column: 1 / -1; }
}

/* ---------- Contact ---------- */

.contact {
  display: grid;
  grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr);
  gap: clamp(40px, 7vw, 96px);
  align-items: start;
}
.contact__aside h2 { font-size: clamp(28px, 3vw, 38px); margin-bottom: 16px; }
.contact__aside ul { list-style: none; margin: 32px 0 0; padding: 0; display: grid; gap: 0; }
.contact__aside li { padding: 16px 0; border-top: 1px dashed var(--line); display: grid; gap: 2px; }
.contact__aside li span { font-family: var(--font); font-size: 12px; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); }
.contact__aside li a { font-weight: 600; text-decoration: none; }
.contact__aside li a:hover { color: var(--teal); }

.form {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: calc(var(--radius) + 4px);
  padding: clamp(24px, 4vw, 44px);
  display: grid; grid-template-columns: 1fr 1fr; gap: 20px;
  position: relative;
}
.form__head { grid-column: 1 / -1; display: flex; justify-content: space-between; align-items: center; padding-bottom: 18px; border-bottom: 1px dashed var(--line); margin-bottom: 4px; font-family: var(--font); font-size: 12.5px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.field { display: grid; gap: 8px; }
.field--full { grid-column: 1 / -1; }
.field label { font-size: 14px; font-weight: 600; }
.field label .opt { font-weight: 400; color: var(--muted); }
.field input, .field textarea, .field select {
  width: 100%;
  font: 400 16px/1.4 var(--font);
  color: var(--ink);
  background: var(--paper);
  border: 1.5px solid transparent;
  border-bottom-color: var(--line);
  border-radius: 10px;
  padding: 14px 16px;
  transition: border-color .2s, background .2s;
}
.field textarea { min-height: 170px; resize: vertical; }
.field input:hover, .field textarea:hover { border-bottom-color: var(--ink); }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--teal); background: #fff; }
.field input:user-invalid, .field textarea:user-invalid { border-color: var(--stamp); }
.check { grid-column: 1 / -1; display: flex; gap: 12px; align-items: flex-start; font-size: 14px; color: var(--muted); }
.check input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--teal); flex: none; }
.form__foot { grid-column: 1 / -1; display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between; }
.form__status { font-size: 15px; font-weight: 500; margin: 0; }
.form__status.is-ok { color: var(--teal); }
.form__status.is-error { color: var(--stamp); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.form.is-sent { display: block; text-align: center; padding-block: 64px; }
.form.is-sent > *:not(.form__success) { display: none; }
.form__success { display: none; }
.form.is-sent .form__success { display: block; }
.form__success h3 { font-size: 28px; margin: 18px 0 10px; }
@media (max-width: 860px) {
  .contact { grid-template-columns: 1fr; }
}
@media (max-width: 560px) { .form { grid-template-columns: 1fr; } }

/* ---------- Texte légal ---------- */

.prose { max-width: 760px; }
.prose h2 { font-size: 24px; margin: 48px 0 14px; }
.prose h3 { font-size: 19px; margin: 28px 0 10px; }
.prose p, .prose li { color: var(--ink-2); }
.prose ul { padding-left: 1.2em; margin: 0 0 1em; }
.prose li { margin-bottom: .4em; }
.prose a { color: var(--teal); }
.prose .todo { background: #fff3c4; padding: 0 4px; border-radius: 3px; }

/* ---------- Pied de page ---------- */

.site-footer {
  background: var(--night);
  color: #c3cdca;
  padding-block: clamp(56px, 8vw, 96px) 32px;
}
.site-footer--flush { margin-top: 0; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: #fff; }
.footer__top {
  display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px;
  padding-bottom: 48px; border-bottom: 1px solid rgba(255,255,255,.1);
}
.footer__brand .brand { color: #fff; }
.footer__brand .brand__name small { color: #8a9995; }
.footer__brand p { margin-top: 20px; max-width: 34ch; color: #8a9995; font-size: 15px; }
.footer__mail { display: inline-block; margin-top: 8px; color: #fff; font-size: clamp(18px, 2vw, 22px); font-weight: 500; border-bottom: 1px solid rgba(255,255,255,.3); }
.footer__col h2 { font-family: var(--font); font-size: 12px; font-weight: 500; letter-spacing: .14em; text-transform: uppercase; color: #8a9995; margin-bottom: 16px; }
.footer__col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; font-size: 15.5px; }
.footer__bottom { display: flex; flex-wrap: wrap; gap: 12px 32px; justify-content: space-between; padding-top: 28px; font-size: 13.5px; color: #8a9995; }
.footer__bottom ul { list-style: none; display: flex; flex-wrap: wrap; gap: 8px 24px; margin: 0; padding: 0; }
@media (max-width: 760px) { .footer__top { grid-template-columns: 1fr 1fr; } .footer__brand { grid-column: 1 / -1; } }

/* ---------- Lightbox ---------- */

.lightbox {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(8, 12, 12, .94);
  display: grid; grid-template-rows: auto 1fr auto;
  opacity: 0; visibility: hidden;
  transition: opacity .3s, visibility .3s;
  color: #fff;
}
.lightbox.is-open { opacity: 1; visibility: visible; }
.lightbox__bar { display: flex; justify-content: space-between; align-items: center; padding: 16px 20px; font-family: var(--font); font-size: 13px; letter-spacing: .06em; }
.lightbox__stage { position: relative; display: grid; place-items: center; padding: 0 72px; min-height: 0; }
.lightbox__stage img { max-width: 100%; max-height: calc(100vh - 140px); object-fit: contain; border-radius: 6px; box-shadow: 0 20px 60px rgba(0,0,0,.5); }
.lightbox button {
  background: rgba(255,255,255,.08); color: #fff; border: 1px solid rgba(255,255,255,.18);
  width: 48px; height: 48px; border-radius: 50%; cursor: pointer;
  display: grid; place-items: center; transition: background .2s;
}
.lightbox button:hover { background: rgba(255,255,255,.2); }
.lightbox button svg { width: 20px; height: 20px; }
.lightbox__prev, .lightbox__next { position: absolute; top: 50%; transform: translateY(-50%); }
.lightbox__prev { left: 16px; } .lightbox__next { right: 16px; }
.lightbox__caption { text-align: center; padding: 14px 20px 22px; font-size: 15px; color: #c3cdca; }
@media (max-width: 600px) {
  .lightbox__stage { padding: 0 12px; }
  .lightbox__prev, .lightbox__next { top: auto; bottom: -64px; transform: none; }
  .lightbox__prev { left: calc(50% - 60px); } .lightbox__next { right: calc(50% - 60px); }
  .lightbox__caption { padding-top: 76px; }
}

/* ---------- Apparition au défilement ---------- */

.reveal { opacity: 0; transform: translateY(22px); transition: opacity .9s var(--ease), transform .9s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; }
}

/* ---------- 404 ---------- */
.notfound { min-height: 60vh; display: grid; place-items: center; text-align: center; padding-block: 80px; }
.notfound h1 { font-size: clamp(80px, 16vw, 200px); letter-spacing: -0.06em; font-weight: 700; line-height: 1; }


/* En-tête transparent au-dessus de la mascotte (accueil) */
.is-home .site-header.on-dark { border-bottom-color: transparent; }
.is-home .site-header.on-dark::before { background: transparent; backdrop-filter: none; -webkit-backdrop-filter: none; }
.is-home .site-header.on-dark .brand,
.is-home .site-header.on-dark .nav__list a { color: #fff; }
.is-home .site-header.on-dark .brand__name small { color: rgba(255,255,255,.6); }
.is-home .site-header.on-dark .nav__list a:hover { background: rgba(255,255,255,.1); }
.is-home .site-header.on-dark .nav__cta { --bg: #fff; --fg: var(--ink); }
.is-home .site-header.on-dark .nav__cta:hover { --bg: var(--teal-bright); color: #fff; border-color: var(--teal-bright); }
.is-home .site-header.on-dark .nav-toggle { color: #fff; border-color: #fff; }
.site-header .brand, .site-header .nav__list a, .site-header::before { transition: color .4s, background .4s; }

/* ==========================================================
   Accueil : la mascotte (le logo) et ses fenêtres
   ========================================================== */

.mh {
  position: relative;
  height: 100vh; height: 100svh;
  min-height: 560px;
  margin-top: calc(var(--header-h) * -1);
  padding: calc(var(--header-h) + 24px) var(--gutter) 28px;
  background: var(--night);
  color: #fff;
  overflow: hidden;
  display: flex; flex-direction: column;
}

/* Les fenêtres : un calque plein cadre, découpé en JS selon les barres du logo */
.mh__media {
  position: absolute; inset: 0;
  clip-path: inset(50%);
  background: #1c2a2a;
  will-change: clip-path;
}
.mh__slide {
  position: absolute; inset: -3%;
  width: 106%; height: 106%; max-width: none;
  object-fit: cover;
  opacity: 0;
  transform: translate3d(var(--mx, 0px), var(--my, 0px), 0) scale(1.06);
  transition: opacity .7s ease, transform 1.2s var(--ease);
}
.mh__slide.is-active { opacity: 1; transform: translate3d(var(--mx, 0px), var(--my, 0px), 0) scale(1); }
video.mh__slide { background: #fff; object-fit: contain; }

/* Les yeux (les deux points du logo) et le nœud papillon */
.mh__eye {
  position: absolute; left: 0; top: 0; z-index: 2;
  border-radius: 50%;
  background: #fff;
  will-change: transform;
}
.mh__tie {
  position: absolute; left: 0; top: 0; z-index: 2;
  color: var(--teal-bright);
  will-change: transform;
}
.mh__eye, .mh__tie { opacity: 0; }
.mh.is-ready .mh__eye, .mh.is-ready .mh__tie { opacity: 1; transition: opacity .3s; }

/* Mise en page : catégories autour d'un emplacement vide réservé à la mascotte */
.mh__layout {
  position: relative; z-index: 3;
  flex: 1;
  display: grid;
  grid-template-columns: 1fr clamp(220px, 24vw, 380px) 1fr;
  grid-template-rows: repeat(6, 1fr);
  column-gap: clamp(32px, 5vw, 80px);
  min-height: 0;
}
.mh__nav, .mh__cats { display: contents; }
.mh__cats { list-style: none; margin: 0; padding: 0; }
.mh__slot { grid-column: 2; grid-row: 1 / -1; }
.mh__item { display: flex; align-items: center; }
.mh__item:nth-child(1) { grid-column: 1; grid-row: 1 / 3; justify-content: flex-end; }
.mh__item:nth-child(2) { grid-column: 1; grid-row: 3 / 5; justify-content: flex-end; }
.mh__item:nth-child(3) { grid-column: 1; grid-row: 5 / 7; justify-content: flex-end; }
.mh__item:nth-child(4) { grid-column: 3; grid-row: 2 / 4; }
.mh__item:nth-child(5) { grid-column: 3; grid-row: 4 / 6; }
.mh__item:nth-child(-n+3) .mh__cat { text-align: right; align-items: flex-end; }

.mh__cat {
  display: inline-flex; flex-direction: column; gap: 6px;
  text-decoration: none; color: #fff;
  padding: 10px 4px;
  transition: opacity .35s, transform .45s var(--ease);
}
.mh__name { font-size: clamp(24px, 2.7vw, 42px); font-weight: 500; letter-spacing: -0.03em; line-height: 1.05; }
.mh__meta { font-size: 14px; color: #8fa09b; transition: color .3s; }
.mh.has-focus .mh__cat { opacity: .32; }
.mh.has-focus .mh__cat.is-active { opacity: 1; }
.mh__cat.is-active .mh__meta { color: var(--teal-bright); }
.mh__item:nth-child(-n+3) .mh__cat.is-active { transform: translateX(-8px); }
.mh__item:nth-child(n+4) .mh__cat.is-active { transform: translateX(8px); }
.mh__cat:focus-visible { outline-color: #fff; }

.mh__foot {
  position: relative; z-index: 3;
  display: flex; justify-content: space-between; align-items: flex-end; gap: 24px;
  padding-top: 16px;
}
.mh__foot h1 { font-size: clamp(18px, 1.6vw, 24px); font-weight: 500; letter-spacing: -0.01em; max-width: 26ch; color: #dfe7e4; }
.mh__hint { margin: 0; font-size: 13px; color: #8fa09b; }
.mh__hint--touch { display: none; }

/* Ouverture d'une fenêtre (clic sur une catégorie) */
.mh.is-opening .mh__layout, .mh.is-opening .mh__foot { opacity: 0; transition: opacity .3s; }

/* Entrée */
.mh__layout, .mh__foot { animation: mh-in .9s var(--ease) .5s both; }
@keyframes mh-in { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* ---------- Mobile : mascotte en haut, catégories en carrousel ---------- */
@media (max-width: 900px) {
  .mh { padding-top: calc(var(--header-h) + 8px); }
  .mh__layout { display: flex; flex-direction: column; }
  .mh__slot { flex: 1; min-height: 200px; order: 0; }
  .mh__nav { display: block; order: 1; margin-inline: calc(var(--gutter) * -1); }
  .mh__cats {
    display: flex; gap: 12px;
    overflow-x: auto; scroll-snap-type: x mandatory;
    padding: 8px calc(50% - 34vw) 4px;
    scrollbar-width: none;
  }
  .mh__cats::-webkit-scrollbar { display: none; }
  .mh__item { flex: 0 0 68vw; scroll-snap-align: center; }
  .mh__item:nth-child(n) { grid-column: auto; grid-row: auto; justify-content: stretch; }
  .mh__item .mh__cat, .mh__item:nth-child(-n+3) .mh__cat {
    width: 100%; text-align: left; align-items: flex-start;
    padding: 16px 18px;
    border: 1px solid rgba(255,255,255,.16); border-radius: 14px;
    background: rgba(255,255,255,.03);
    transform: none !important;
  }
  .mh__name { font-size: 24px; }
  .mh.has-focus .mh__cat { opacity: .45; }
  .mh__cat.is-active { border-color: var(--teal-bright); background: rgba(11,140,140,.12); }
  .mh__foot { flex-direction: column; align-items: flex-start; gap: 6px; }
  .mh__hint--desk { display: none; }
  .mh__hint--touch { display: inline; }
}
@media (hover: none) and (min-width: 901px) {
  .mh__hint--desk { display: none; }
  .mh__hint--touch { display: inline; }
}

/* Sans JavaScript : pas de découpe, l'image est simplement assombrie */
.no-js .mh__media { clip-path: none; opacity: .35; }

/* ==========================================================
   ili, le personnage : il se déplace sur la page au fil du scroll.
   Sa position est calculée en JS (transform sur .ili__char).
   ========================================================== */

.ili {
  --h: 104px;                                   /* hauteur d'ili sur ordinateur */
  --u: calc(var(--h) / 89.25);                  /* 1 unité du logo */
  position: fixed; inset: 0;
  z-index: 60;
  pointer-events: none;
}
.ili[hidden] { display: none; }
.nav-open .ili { visibility: hidden; }

.ili__char {
  position: absolute; left: 0; top: 0;
  padding: 10px;                                /* zone cliquable un peu plus large qu'ili */
  border: 0; background: none; cursor: pointer;
  color: var(--ink);
  pointer-events: auto;
  transform-origin: 50% 100%;
  will-change: transform;
  -webkit-tap-highlight-color: transparent;
  transition: color .35s;
}
.ili__char:focus-visible { outline: 2px solid var(--teal-bright); outline-offset: 2px; border-radius: 12px; }
.ili.on-dark .ili__char { color: #fff; }
.ili.on-dark .ili__tie { color: var(--teal-bright); }

/* le corps, aux proportions exactes du logo */
.ili__body {
  position: relative; display: block;
  width: calc(var(--u) * 48); height: calc(var(--u) * 89.25);
  transform-origin: 50% 100%;
}
.ili__bar {
  position: absolute; top: 0;
  width: calc(var(--u) * 9); height: calc(var(--u) * 36);
  background: currentColor;
}
.ili__bar:nth-child(1) { left: 0; }
.ili__bar--l { left: calc(var(--u) * 19.5); height: calc(var(--u) * 50.25); }
.ili__bar:nth-child(3) { left: calc(var(--u) * 39); }
.ili__eyes { position: absolute; inset: 0; }
.ili__eye {
  position: absolute; top: calc(var(--u) * 41.65);
  width: calc(var(--u) * 11.2); height: calc(var(--u) * 11.2);
  border-radius: 50%; background: currentColor;
}
.ili__eye:nth-child(1) { left: calc(var(--u) * -1.1); }
.ili__eye:nth-child(2) { left: calc(var(--u) * 37.9); }
.ili__tie {
  position: absolute;
  left: calc(var(--u) * 10.5); top: calc(var(--u) * 72.75);
  width: calc(var(--u) * 27); height: calc(var(--u) * 16.5);
  color: var(--teal);
  transform-origin: 50% 30%;
}
.ili__char[aria-expanded="true"] .ili__tie { color: var(--teal-bright); }

/* le menu : posé à côté d'ili (position calculée en JS) */
.ili__panel {
  position: absolute; left: 0; top: 0;
  width: min(360px, calc(100vw - 32px));
  max-height: min(70vh, 540px);
  background: var(--card); color: var(--ink);
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: 0 24px 60px -20px rgba(12,21,21,.45);
  padding: 20px 20px 18px;
  pointer-events: auto;
  animation: ili-pop .35s cubic-bezier(.3,1.4,.5,1);
}
.ili__panel[hidden] { display: none; }
.ili__panel:not([hidden]) { display: flex; flex-direction: column; overflow: hidden; }
@keyframes ili-pop { from { opacity: 0; transform: scale(.94); } to { opacity: 1; transform: none; } }
.ili__head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 14px; flex: none; }
.ili__kicker { font-size: 12.5px; font-weight: 600; color: var(--teal); }
.ili__title { margin: 2px 0 0; font-size: 20px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.2; }
.ili__close {
  flex: none; width: 34px; height: 34px; border-radius: 50%;
  border: 1px solid var(--line); background: transparent; color: var(--ink);
  display: grid; place-items: center; cursor: pointer;
}
.ili__close:hover { background: var(--paper-2); }
.ili__close svg { width: 16px; height: 16px; }
.ili__terms { margin: 0; overflow-y: auto; min-height: 0; flex: 1 1 auto; overscroll-behavior: contain; }
.ili__terms div { padding: 11px 0; border-top: 1px solid var(--line); }
.ili__terms dt { font-size: 15px; font-weight: 600; margin-bottom: 3px; }
.ili__terms dd { margin: 0; font-size: 14px; line-height: 1.5; color: var(--muted); }
.ili__terms.is-changing { animation: ili-swap .4s var(--ease); }
@keyframes ili-swap { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
.ili__links { display: grid; gap: 8px; margin-top: 14px; flex: none; }
.ili__link, .ili__contact {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 12px 16px; border-radius: 12px;
  font-size: 15px; font-weight: 600; text-decoration: none;
  transition: background .2s, color .2s;
}
.ili__link { background: var(--ink); color: #fff; flex-direction: row-reverse; }
.ili__link:hover { background: var(--teal); }
.ili__contact { background: var(--teal-soft); color: var(--teal); }
.ili__contact:hover { background: var(--teal); color: #fff; }
.ili__link svg, .ili__contact svg { width: 18px; height: 18px; flex: none; }

@media (max-width: 760px) {
  .ili { --h: 66px; }
  /* sur mobile, le menu s'ouvre en bas de l'écran ; ili vient se poser dessus */
  .ili__panel { left: 12px; right: 12px; top: auto; bottom: 12px; width: auto; max-height: 62vh; }
}
.ili__links [hidden] { display: none; }
.ili__char { opacity: 0; }   /* invisible tant que le JS ne l’a pas placé */
/* Mobile : le premier écran laisse le navigateur gérer le défilement vertical,
   et transmet les gestes horizontaux au JS pour faire glisser les cartes */
@media (max-width: 900px) {
  .mh { touch-action: pan-y; }
  .mh__cats { touch-action: auto; }
}
