/* ==========================================================================
   Relance — fondations communes du site (couleurs, typographie, boutons,
   navigation, pied de page). Direction artistique : analytique éditoriale,
   serif sur papier chaud, achromatique avec un seul accent pêche.
   ========================================================================== */

@font-face {
  font-family: "Relance Serif";
  src: url("../fonts/source-serif-4.woff2") format("woff2-variations"), url("../fonts/source-serif-4.woff2") format("woff2");
  font-weight: 200 900; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Relance Serif";
  src: url("../fonts/source-serif-4-italic.woff2") format("woff2-variations"), url("../fonts/source-serif-4-italic.woff2") format("woff2");
  font-weight: 200 900; font-style: italic; font-display: swap;
}
@font-face {
  font-family: "Relance Sans";
  src: url("../fonts/inter.woff2") format("woff2-variations"), url("../fonts/inter.woff2") format("woff2");
  font-weight: 100 900; font-style: normal; font-display: swap;
}

:root {
  /* Couleurs */
  --ink: #17191c;
  --paper: #ffffff;
  --mist: #f2f2f3;
  --mist-2: #ebebed;
  --fog: #fafafb;
  --slate: #777b86;
  --ash: #979799;
  --smoke: #a3a6af;
  --peach: #fbe1d1;
  --sienna: #5d2a1a;
  --hairline: #ececec;

  /* Typographie */
  --serif: "Relance Serif", "Source Serif 4", ui-serif, Georgia, "Times New Roman", serif;
  --sans: "Relance Sans", Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  --t-caption: 15px;
  --t-body: 17px;
  --t-body-lg: 20px;
  --t-sub: 22px;
  --t-h-sm: 26px;
  --t-h: clamp(34px, 4.2vw, 44px);
  --t-h-lg: clamp(40px, 5.6vw, 64px);
  --t-display: clamp(46px, 7.2vw, 90px);

  /* Espacements (base 4 px) */
  --s4: 4px; --s8: 8px; --s12: 12px; --s16: 16px; --s20: 20px; --s24: 24px;
  --s28: 28px; --s32: 32px; --s40: 40px; --s64: 64px; --s80: 80px; --s96: 96px;
  --s128: 128px; --s160: 160px;
  --section: clamp(96px, 12vw, 160px);
  --gutter: clamp(20px, 4vw, 40px);
  --max: 1200px;

  /* Formes */
  --r-card: 24px;
  --r-elev: 20px;
  --r-small: 16px;
  --r-input: 16px;
  --r-img: 12px;
  --r-pill: 9999px;

  /* Ombres : réservées aux fragments flottants du produit */
  --sh-float: 0 0 0 1px rgba(4, 23, 43, .05), 0 20px 25px -5px rgba(0, 0, 0, .10), 0 8px 10px -6px rgba(0, 0, 0, .10);
  --sh-pop: 0 0 0 1px rgba(0, 0, 0, .05), 0 4px 24px rgba(0, 0, 0, .08);
  --sh-modal: 0 0 0 1px rgba(0, 0, 0, .05), 0 8px 40px rgba(0, 0, 0, .10);

  --ease-out: cubic-bezier(.16, 1, .3, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-stopped { overflow: hidden; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: var(--t-body);
  line-height: 1.5;
  font-weight: 400;
  font-feature-settings: "ss01", "cv11";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
h1, h2, h3, h4, p, ul, ol, figure { margin: 0; }
ul, ol { padding: 0; list-style: none; }
::selection { background: var(--peach); color: var(--sienna); }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; border-radius: 6px; }
svg use { pointer-events: none; }

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

.skip { position: absolute; left: 16px; top: -60px; z-index: 200; background: var(--ink); color: #fff; padding: 10px 16px; border-radius: var(--r-pill); transition: top .2s; }
.skip:focus { top: 16px; }

/* --- Typographie ------------------------------------------------------- */
.display, .h-lg, .h-md, .serif {
  font-family: var(--serif);
  font-weight: 400;
  font-optical-sizing: auto;
  line-height: 1.12;
  text-wrap: balance;
}
.display { font-size: var(--t-display); letter-spacing: -0.025em; line-height: 1.06; }
.h-lg { font-size: var(--t-h-lg); letter-spacing: -0.015em; }
.h-md { font-size: var(--t-h); letter-spacing: -0.015em; line-height: 1.16; }
.display em, .h-lg em, .h-md em { font-style: italic; }
.lead { font-size: clamp(17px, 1.5vw, 18px); font-weight: 430; color: var(--slate); line-height: 1.5; letter-spacing: -0.009em; max-width: 34em; }
.muted { color: var(--slate); }

.tag {
  display: inline-flex; align-items: center; gap: 10px;
  font-size: 14px; font-weight: 400; color: var(--ash); letter-spacing: 0;
}

.arrow-link { color: var(--ink); white-space: nowrap; background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat; transition: background-size .4s var(--ease-out); }
.arrow-link:hover { background-size: 100% 1px; }

/* --- Boutons pilule ---------------------------------------------------- */
.pill {
  --pill-h: 44px;
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: var(--pill-h); padding: 0 20px;
  border-radius: var(--r-pill);
  font-size: 16px; font-weight: 400; line-height: 1; white-space: nowrap;
  border: 1px solid var(--ink);
  overflow: hidden; isolation: isolate;
  transition: color .45s var(--ease-out), border-color .45s var(--ease-out), background-color .45s var(--ease-out);
}
.pill > span { position: relative; z-index: 1; display: inline-block; }
.pill::before {
  content: ""; position: absolute; inset: -1px; z-index: 0;
  border-radius: inherit;
  transform: translateY(101%);
  transition: transform .55s var(--ease-out);
}
.pill:hover::before { transform: translateY(0); }
.pill-filled { background: var(--ink); color: #fff; border-color: var(--ink); }
.pill-filled::before { background: #2b2e33; }
.pill-ghost { background: transparent; color: var(--ink); }
.pill-ghost::before { background: var(--ink); }
.pill-ghost:hover { color: #fff; }
.pill-lg { --pill-h: 52px; padding: 0 26px; font-size: 16px; }
.pill-block { width: 100%; }
.pill-row { display: flex; flex-wrap: wrap; gap: 12px; }

.chip {
  display: inline-flex; align-items: center; height: 26px; padding: 0 10px;
  border-radius: var(--r-pill); background: var(--mist); color: var(--slate);
  font-size: 13px; font-weight: 450; white-space: nowrap;
}
.chip-dark { background: var(--ink); color: #fff; }

/* --- Navigation -------------------------------------------------------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  transition: transform .6s var(--ease-out), background-color .4s, box-shadow .4s, backdrop-filter .4s;
}
.nav-inner {
  max-width: calc(var(--max) + var(--gutter) * 2); margin: 0 auto; padding: 0 var(--gutter);
  height: 76px; display: flex; align-items: center; gap: 32px;
  padding-left: max(var(--gutter), env(safe-area-inset-left)); padding-right: max(var(--gutter), env(safe-area-inset-right));
}
.nav.is-scrolled { background: rgba(255, 255, 255, .82); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px); box-shadow: 0 1px 0 rgba(0, 0, 0, .05); }
.nav.is-hidden { transform: translateY(-100%); }
.logo { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; font-family: var(--serif); font-size: 24px; letter-spacing: -0.02em; line-height: 1; }
.logo-mark { width: 30px; height: 30px; border-radius: 50%; background: var(--ink); display: grid; place-items: center; flex: none; }
.logo-mark svg { width: 30px; height: 30px; fill: none; stroke: #fff; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.nav-links { display: flex; gap: 28px; margin: 0 auto; }
.nav-links a { font-size: 16px; padding: 2px 0; position: relative; }
.nav-links a:not(.pill)::after { content: ""; position: absolute; left: 0; right: 0; bottom: -3px; height: 1px; background: currentColor; transform: scaleX(0); transform-origin: right; transition: transform .45s var(--ease-out); }
.nav-links a:not(.pill):hover::after { transform: scaleX(1); transform-origin: left; }
.nav-cta { display: flex; align-items: center; gap: 22px; }
.nav-login { font-size: 16px; }
.nav-mobile-only { display: none !important; }
.menu-btn { display: none; width: 44px; height: 44px; border-radius: 50%; position: relative; }
.menu-btn span { position: absolute; left: 13px; right: 13px; height: 1.5px; background: var(--ink); transition: transform .5s var(--ease-out), top .5s var(--ease-out); }
.menu-btn span:nth-child(1) { top: 18px; }
.menu-btn span:nth-child(2) { top: 25px; }
.menu-btn[aria-expanded="true"] span:nth-child(1) { top: 21.5px; transform: rotate(45deg); }
.menu-btn[aria-expanded="true"] span:nth-child(2) { top: 21.5px; transform: rotate(-45deg); }

@media (max-width: 960px) {
  .nav-inner { height: 64px; gap: 12px; }
  .nav-cta { margin-left: auto; }
  .nav-cta .nav-login { display: none; }
  .menu-btn { display: block; }
  .nav-links {
    position: fixed; inset: 64px 0 auto 0; margin: 0; z-index: -1;
    flex-direction: column; gap: 0; padding: 8px var(--gutter) 28px;
    background: rgba(255, 255, 255, .97); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
    box-shadow: 0 1px 0 rgba(0, 0, 0, .05), 0 24px 40px -24px rgba(0, 0, 0, .15);
    clip-path: inset(0 0 100% 0); visibility: hidden;
    transition: clip-path .6s var(--ease-out), visibility 0s .6s;
  }
  .nav-links.is-open { clip-path: inset(0 0 0 0); visibility: visible; transition: clip-path .6s var(--ease-out), visibility 0s; }
  .nav-links a { font-family: var(--serif); font-size: 30px; letter-spacing: -0.015em; padding: 12px 0; border-bottom: 1px solid var(--hairline); }
  .nav-links a::after { display: none; }
  .nav-mobile-only { display: flex !important; }
  .nav-links a.nav-mobile-only.pill { font-family: var(--sans); font-size: 16px; margin-top: 20px; border-bottom: 1px solid var(--ink); justify-content: center; padding: 0 20px; }
  .nav.menu-open { background: rgba(255, 255, 255, .97); }
}
@media (max-width: 420px) {
  .nav-cta .pill { display: none; }
}

/* --- Fragments flottants du produit ------------------------------------ */
.artifact { background: var(--paper); border-radius: var(--r-elev); box-shadow: var(--sh-float); }
.ic-round { width: 32px; height: 32px; border-radius: 50%; background: var(--mist); display: grid; place-items: center; flex: none; }
.ic-round svg { width: 16px; height: 16px; fill: none; stroke: var(--ink); stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.avatar {
  position: relative; flex: none;
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--peach); color: var(--sienna);
  display: grid; place-items: center; font-size: 14px; font-weight: 500; letter-spacing: .02em;
}
.avatar.sm { width: 32px; height: 32px; font-size: 12px; background: var(--mist); color: var(--ink); }
.avatar .cursor { position: absolute; right: -10px; bottom: -8px; width: 16px; height: 16px; fill: var(--ink); stroke: #fff; stroke-width: 1.5; stroke-linejoin: round; }

/* --- Pastille d’icône --- */
.ncard-ic { width: 44px; height: 44px; border-radius: 50%; background: var(--paper); display: grid; place-items: center; margin-bottom: 40px; transition: transform .6s var(--ease-out); }
.ncard-ic svg { width: 20px; height: 20px; fill: none; stroke: var(--ink); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.ncard:hover .ncard-ic, .ccard:hover .ncard-ic { transform: translateY(-4px) rotate(-6deg); }

/* --- Pied de page ------------------------------------------------------ */
.footer { position: relative; padding-top: var(--section); background: var(--paper); overflow: hidden; }
.foot-head { display: grid; gap: 20px; }
.foot-contact { display: grid; grid-template-columns: 1fr 1.5fr; gap: var(--s40); align-items: end; padding-bottom: var(--s80); }
.contact-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.ccard {
  display: flex; flex-direction: column; gap: 4px;
  background: var(--mist); border-radius: var(--r-card); padding: 20px 20px 22px;
  transition: background-color .4s var(--ease-out);
}
.ccard:hover { background: var(--mist-2); }
.ccard .ncard-ic { margin-bottom: 28px; }
.ccard small { font-size: 14px; color: var(--ash); }
.ccard b { font-weight: 450; font-size: 16px; line-height: 1.35; overflow-wrap: anywhere; }
.foot-bar { display: flex; align-items: center; justify-content: space-between; gap: 24px; flex-wrap: wrap; padding: var(--s32) 0; border-top: 1px solid var(--hairline); }
.foot-bar nav { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.foot-bar nav a { font-size: 15px; color: var(--slate); transition: color .3s; display: inline-flex; align-items: center; min-height: 32px; }
.foot-bar nav a:hover { color: var(--ink); }
.legal { padding-bottom: var(--s32); display: grid; gap: 8px; }
.legal p { font-size: 13px; color: var(--ash); line-height: 1.6; max-width: 88ch; }
.legal b { font-weight: 500; color: var(--slate); }
.legal a { color: var(--slate); }
.legal a:hover { color: var(--ink); }
.giant { padding: 0 var(--gutter); line-height: .78; overflow: hidden; margin-top: var(--s24); user-select: none; }
.giant-word { display: block; font-family: var(--serif); font-weight: 400; font-size: 25.5vw; letter-spacing: -0.045em; color: var(--mist); text-align: center; transform: translateY(6%); white-space: nowrap; }

@media (max-width: 1100px) {
  .foot-contact { grid-template-columns: 1fr; align-items: start; }
}
@media (max-width: 700px) {
  .contact-cards { grid-template-columns: 1fr; }
  .ccard { flex-direction: row; align-items: center; gap: 14px; flex-wrap: wrap; }
  .ccard .ncard-ic { margin-bottom: 0; }
  .ccard small { width: calc(100% - 60px); order: 2; display: none; }
}

/* --- Accessibilité : mouvements réduits -------------------------------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; scroll-behavior: auto !important; }
}

/* --- Écrans tactiles ------------------------------------------------------ */
/* Pas d'effet de survol qui reste « collé » après un appui ; un retour au toucher à la place. */
@media (hover: none) {
  .pill:hover::before { transform: translateY(101%); }
  .pill-ghost:hover { color: var(--ink); }
  .pill:active::before { transform: translateY(0); transition-duration: .2s; }
  .pill-ghost:active { color: #fff; }
  .ncard:hover .ncard-ic, .ccard:hover .ncard-ic { transform: none; }
  .ccard:active { background: var(--mist-2); }
  .nav-links a:not(.pill):hover::after { transform: scaleX(0); }
}
/* Cibles tactiles confortables (44 px) */
@media (pointer: coarse) {
  .nav-links a:not(.pill), .nav-login { display: inline-flex; align-items: center; min-height: 44px; }
  .foot-bar nav a { min-height: 44px; }
  .foot-bar nav { gap: 0 22px; }
  .legal a { display: inline-block; padding: 4px 0; }
  .menu-btn { width: 48px; height: 48px; margin-right: -8px; }
  .menu-btn span { left: 15px; right: 15px; }
  .menu-btn span:nth-child(1) { top: 20px; }
  .menu-btn span:nth-child(2) { top: 27px; }
  .menu-btn[aria-expanded="true"] span:nth-child(1), .menu-btn[aria-expanded="true"] span:nth-child(2) { top: 23.5px; }
}
/* Menu mobile : il défile si l'écran est bas (téléphone en paysage) */
@media (max-width: 960px) {
  .nav-links { max-height: calc(100svh - 64px); overflow-y: auto; overscroll-behavior: contain; padding-bottom: max(28px, env(safe-area-inset-bottom)); }
}
@media (max-width: 960px) and (max-height: 520px) {
  .nav-links a { font-size: 22px; padding: 8px 0; }
}
.footer { padding-bottom: env(safe-area-inset-bottom); }
