/* MOK Services — feuille de styles
   Palette tirée de la carte de visite : marine, rouge en accent rare, blanc dominant. */

@font-face {
  font-family: "Manrope";
  src: url("fonts/manrope.woff2") format("woff2");
  font-weight: 200 800;
  font-style: normal;
  font-display: swap;
}

:root {
  --ink: #16213f;
  --navy: #1f2d55;
  --navy-soft: #2c3d6b;
  --red: #e3262d;
  --red-deep: #c81e25;
  --paper: #ffffff;
  --mist: #f4f5f8;
  --line: rgba(22, 33, 63, 0.12);
  --line-strong: rgba(22, 33, 63, 0.22);
  --muted: #5b6479;

  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);

  --wrap: 1180px;
  --gutter: clamp(16px, 4vw, 40px);
  --radius: 8px;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 88px;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Manrope", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 17px;
  line-height: 1.6;
  font-feature-settings: "ss01";
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  text-rendering: optimizeLegibility;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
h1, h2, h3 { margin: 0; font-weight: 700; letter-spacing: -0.025em; line-height: 1.1; text-wrap: balance; }
p { margin: 0; text-wrap: pretty; }
ol, ul { margin: 0; padding: 0; list-style: none; }

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

.wrap { width: min(100% - 2 * var(--gutter), var(--wrap)); margin-inline: auto; }

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

.skip {
  position: absolute; left: 16px; top: -60px; z-index: 100;
  background: var(--ink); color: #fff; padding: 10px 16px; border-radius: var(--radius);
}
.skip:focus { top: 12px; }

.muted { color: var(--muted); }
.break { overflow-wrap: anywhere; }

/* ---------- Étiquettes : reprend le filet rouge de la carte ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: 12px;
  font-size: 12px; font-weight: 700; letter-spacing: 0.2em; text-transform: uppercase;
  color: var(--navy);
}
.eyebrow::before {
  content: ""; width: 28px; height: 2px; border-radius: 2px; background: var(--red); flex: none;
}
.eyebrow-light { color: rgba(255, 255, 255, 0.78); }

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 50px; padding: 0 24px;
  border-radius: var(--radius); border: 1px solid var(--ink);
  background: var(--ink); color: #fff;
  font: inherit; font-size: 15px; font-weight: 700; letter-spacing: 0.01em;
  cursor: pointer; user-select: none;
  transition: transform 160ms var(--ease-out), background-color 200ms ease, border-color 200ms ease, color 200ms ease;
}
.btn:active { transform: scale(0.97); }
.btn svg { width: 16px; height: 16px; fill: currentColor; }

.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line-strong); }
.btn-small { min-height: 40px; padding: 0 16px; font-size: 14px; }

@media (hover: hover) and (pointer: fine) {
  .btn:hover { background: var(--navy-soft); border-color: var(--navy-soft); }
  .btn-ghost:hover { background: var(--mist); border-color: var(--line-strong); color: var(--ink); }
}

/* ---------- En-tête ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 255, 255, 0.86);
  -webkit-backdrop-filter: saturate(160%) blur(12px);
  backdrop-filter: saturate(160%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color 200ms ease;
}
.site-header[data-scrolled] { border-bottom-color: var(--line); }

.header-inner { display: flex; align-items: center; gap: 32px; height: 72px; }

.brand { display: inline-flex; align-items: center; gap: 12px; margin-right: auto; }
.brand img { width: 62px; height: auto; }
.brand-word {
  font-size: 11px; font-weight: 700; letter-spacing: 0.32em; text-transform: uppercase; color: var(--navy);
  padding-left: 12px; border-left: 1px solid var(--line-strong); line-height: 20px;
}

.nav { display: flex; gap: 28px; font-size: 15px; font-weight: 600; color: var(--muted); }
.nav a { transition: color 150ms ease; }
@media (hover: hover) and (pointer: fine) {
  .nav a:hover { color: var(--ink); }
}

/* ---------- Héros ---------- */
.hero { padding: clamp(48px, 8vw, 104px) 0 clamp(64px, 9vw, 120px); overflow: hidden; }

.hero-grid {
  display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  align-items: center; gap: clamp(40px, 6vw, 88px);
}

.hero h1 { margin-top: 22px; font-size: clamp(2.35rem, 5.2vw, 4.1rem); line-height: 1.04; letter-spacing: -0.035em; }
.lead { margin-top: 24px; max-width: 34em; font-size: clamp(1.03rem, 1.4vw, 1.16rem); color: var(--muted); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 36px; }
.hero-note { margin-top: 20px; font-size: 14px; color: var(--muted); }

/* Entrée du héros : une seule fois, au chargement */
.js [data-enter] {
  animation: enter 760ms var(--ease-out) both;
  animation-delay: calc(var(--i, 0) * 70ms + 80ms);
}
@keyframes enter {
  from { opacity: 0; transform: translateY(12px); filter: blur(4px); }
  to   { opacity: 1; transform: none; filter: none; }
}

/* ---------- Carte de visite 3D ---------- */
.card-stage { display: grid; justify-items: center; gap: 18px; perspective: 1600px; }

.bizcard {
  all: unset;
  display: block; position: relative; cursor: pointer;
  width: 100%; max-width: 480px; aspect-ratio: 85 / 55;
  container-type: inline-size;
  border-radius: 12px;
  -webkit-user-select: none; user-select: none;
  -webkit-tap-highlight-color: transparent;
}
.bizcard:focus-visible { outline: 2px solid var(--red); outline-offset: 6px; }

/* Ombre portée au sol, indépendante de la rotation */
.bizcard::before {
  content: ""; position: absolute; left: 8%; right: 8%; bottom: -7%; height: 18%;
  background: radial-gradient(50% 50% at 50% 50%, rgba(22, 33, 63, 0.28), transparent 70%);
  filter: blur(14px); z-index: -1;
}

.bizcard-tilt, .bizcard-inner { display: block; position: absolute; inset: 0; transform-style: preserve-3d; }
.bizcard-tilt { will-change: transform; }
.bizcard-inner { transition: transform 820ms var(--ease-in-out); }
.bizcard.is-flipped .bizcard-inner { transform: rotateY(180deg); }

.bizcard-face {
  position: absolute; inset: 0; display: flex; flex-direction: column;
  border-radius: 12px; overflow: hidden;
  background: linear-gradient(160deg, #ffffff 0%, #f7f8fb 100%);
  box-shadow:
    0 0 0 1px rgba(22, 33, 63, 0.06),
    0 1px 2px rgba(22, 33, 63, 0.06),
    0 12px 32px -12px rgba(22, 33, 63, 0.22);
  -webkit-backface-visibility: hidden; backface-visibility: hidden;
}

.bizcard-front { align-items: center; justify-content: center; padding: 9cqi 10cqi; }
.bizcard-front .mark { width: 78%; height: auto; overflow: visible; }
.lockup {
  display: flex; align-items: center; gap: 3.2cqi; margin-top: 5cqi;
  font-size: 5.2cqi; font-weight: 600; letter-spacing: 0.42em; text-transform: uppercase; color: var(--ink);
  padding-left: 0.42em; /* compense l'espacement de la dernière lettre */
}
.lockup .rule { width: 13cqi; height: 0.5cqi; min-height: 1.5px; background: var(--red); border-radius: 2px; }
.tagline {
  margin-top: 2.2cqi; font-size: 2.85cqi; font-weight: 700; letter-spacing: 0.2em; text-transform: uppercase; color: var(--ink);
}

/* Le swoosh se trace une fois, de gauche à droite */
.js .bizcard-front .swoosh { animation: swoosh 1100ms var(--ease-in-out) 520ms both; }
@keyframes swoosh {
  from { clip-path: inset(0 100% 0 0); }
  to   { clip-path: inset(0 0 0 0); }
}

.bizcard-back {
  transform: rotateY(180deg);
  padding: 8.5cqi 9cqi; justify-content: center; color: var(--ink);
}
.bizcard-back::after { /* rappel du swoosh en coin, comme sur la carte imprimée */
  content: ""; position: absolute; right: -30cqi; bottom: -38cqi; width: 70cqi; height: 50cqi;
  border-radius: 50%; border-top: 3.2cqi solid rgba(227, 38, 45, 0.06);
  transform: rotate(-24deg);
}
.back-name { font-size: 6.4cqi; font-weight: 800; line-height: 1.08; letter-spacing: -0.01em; text-transform: uppercase; }
.back-role { margin-top: 1.8cqi; font-size: 3.5cqi; font-weight: 500; color: var(--navy); }
.back-rule { width: 10cqi; height: 0.9cqi; background: var(--red); border-radius: 2px; margin: 4cqi 0 4.4cqi; }
.back-list { display: grid; gap: 2.6cqi; font-size: 3.35cqi; font-weight: 500; }
.back-list > span { display: flex; align-items: center; gap: 3cqi; }
.back-list .dot {
  flex: none; width: 4.2cqi; height: 4.2cqi; border-radius: 50%;
  border: 0.9cqi solid var(--red); background: #fff;
}
.back-bar { position: absolute; right: 9cqi; top: 15%; bottom: 15%; width: 1.5px; background: var(--navy); opacity: 0.7; }

.card-hint {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 13px; font-weight: 600; color: var(--muted);
}
.card-hint svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Pour qui ---------- */
.audiences { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.audience-grid { display: grid; grid-template-columns: 1fr 1fr; }
.audience { padding: clamp(40px, 6vw, 72px) clamp(0px, 4vw, 56px) clamp(40px, 6vw, 72px) 0; }
.audience + .audience { border-left: 1px solid var(--line); padding-left: clamp(24px, 4vw, 56px); padding-right: 0; }
.audience-tag { font-size: 13px; font-weight: 700; color: var(--red); letter-spacing: 0.02em; }
.audience h3 { margin-top: 14px; font-size: clamp(1.35rem, 2.2vw, 1.75rem); letter-spacing: -0.02em; }
.audience p:last-child { margin-top: 14px; color: var(--muted); max-width: 32em; }

/* ---------- Sections ---------- */
.section { padding: clamp(72px, 10vw, 128px) 0; }
.section-tight { padding: clamp(48px, 6vw, 72px) 0; }
.section-mist { background: var(--mist); }
.section-ink { background: var(--ink); color: #fff; }

.section-head h2 { margin-top: 18px; font-size: clamp(1.9rem, 3.6vw, 2.9rem); max-width: 16em; }
.section-head .muted { margin-top: 18px; max-width: 28em; }

/* ---------- Expertise ---------- */
.services {
  margin-top: clamp(40px, 6vw, 64px);
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  column-gap: clamp(24px, 3.5vw, 48px); row-gap: clamp(36px, 4vw, 56px);
}
.service { border-top: 1px solid var(--line-strong); padding-top: 24px; }
.service-num { font-size: 13px; font-weight: 700; color: var(--red); font-variant-numeric: tabular-nums; letter-spacing: 0.06em; }
.service h3 { margin-top: 14px; font-size: 1.22rem; letter-spacing: -0.015em; }
.service p { margin-top: 10px; color: var(--muted); font-size: 16px; }

/* ---------- Approche ---------- */
.approach-grid { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(40px, 7vw, 104px); align-items: start; }
.sticky { position: sticky; top: 120px; }

.steps { position: relative; display: grid; gap: 8px; }
.step {
  position: relative; display: grid; grid-template-columns: 48px 1fr; gap: 24px;
  padding: 26px 28px; background: var(--paper); border-radius: 12px;
  box-shadow: 0 0 0 1px var(--line);
}
.step-num {
  display: grid; place-items: center; width: 48px; height: 48px; border-radius: 50%;
  border: 1.5px solid var(--ink); font-weight: 700; font-variant-numeric: tabular-nums;
}
.step h3 { font-size: 1.2rem; margin-top: 2px; }
.step p { margin-top: 8px; color: var(--muted); font-size: 16px; }

/* ---------- Engagements ---------- */
.pledges { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(24px, 4vw, 48px); }
.pledges li { display: grid; gap: 8px; padding-left: 20px; border-left: 2px solid var(--red); }
.pledges strong { font-size: 1.1rem; letter-spacing: -0.01em; }
.pledges span { color: var(--muted); font-size: 16px; }

/* ---------- À propos ---------- */
.about-grid { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(32px, 7vw, 104px); align-items: start; }
.about-head h2 { margin-top: 18px; font-size: clamp(1.9rem, 3.4vw, 2.7rem); max-width: 12em; }
.about-role { margin-top: 12px; font-weight: 600; color: rgba(255, 255, 255, 0.62); }
.about-copy { padding-top: 6px; }
.about-copy p { max-width: 34em; font-size: clamp(1.02rem, 1.4vw, 1.12rem); color: rgba(255, 255, 255, 0.82); }
.about-copy p + p { margin-top: 20px; }
.about-copy p:first-child {
  padding-left: 20px; border-left: 2px solid var(--red);
  font-size: clamp(1.2rem, 2vw, 1.45rem); font-weight: 600; line-height: 1.4; color: #fff;
}

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr); gap: clamp(40px, 7vw, 104px); align-items: start; }
.contact-list { display: grid; gap: 10px; }
.contact-item {
  display: flex; align-items: center; gap: 20px; padding: 20px 22px;
  border-radius: 12px; box-shadow: 0 0 0 1px var(--line);
  font-size: clamp(1.02rem, 1.6vw, 1.18rem); font-weight: 700;
  transition: transform 160ms var(--ease-out), background-color 200ms ease, box-shadow 200ms ease;
}
.contact-item small {
  display: block; margin-bottom: 2px;
  font-size: 12px; font-weight: 600; letter-spacing: 0.04em; color: var(--muted);
}
.contact-item > span:last-child { min-width: 0; }
.contact-item:active { transform: scale(0.98); }
.contact-icon {
  flex: none; display: grid; place-items: center; width: 46px; height: 46px; border-radius: 50%;
  color: var(--red); box-shadow: inset 0 0 0 1.5px rgba(227, 38, 45, 0.35);
}
.contact-icon svg { width: 20px; height: 20px; fill: currentColor; }
.contact-icon svg path[fill="none"], .contact-icon svg circle { fill: none; }

@media (hover: hover) and (pointer: fine) {
  .contact-item:hover { background: var(--mist); box-shadow: 0 0 0 1px var(--line-strong); }
}

/* ---------- Pied de page ---------- */
.site-footer { border-top: 1px solid var(--line); padding: 36px 0 44px; }
.footer-inner { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.footer-brand { display: flex; align-items: center; gap: 16px; }
.footer-brand img { width: 78px; height: auto; }
.footer-brand p, .footer-legal { font-size: 13px; color: var(--muted); }
.footer-brand p { letter-spacing: 0.14em; text-transform: uppercase; font-size: 11px; font-weight: 700; }

/* ---------- Apparition au défilement (une seule fois) ---------- */
.js [data-reveal] {
  opacity: 0; transform: translateY(14px);
  transition: opacity 700ms var(--ease-out), transform 700ms var(--ease-out);
}
.js [data-reveal].is-in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .nav { display: none; }
  .hero-grid, .approach-grid, .about-grid, .contact-grid { grid-template-columns: 1fr; }
  .card-stage { order: 2; }
  .sticky { position: static; }
  .services { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 640px) {
  body { font-size: 16px; }
  .header-inner { height: 64px; }
  .brand-word { display: none; }
  .audience-grid, .services, .pledges { grid-template-columns: 1fr; }
  .audience { padding: 40px 0; }
  .audience + .audience { border-left: 0; border-top: 1px solid var(--line); padding-left: 0; }
  .step { grid-template-columns: 40px 1fr; gap: 16px; padding: 22px 20px; }
  .step-num { width: 40px; height: 40px; }
  .hero-actions .btn { flex: 1 1 100%; }
  .contact-item { padding: 16px; gap: 14px; }
  .contact-icon { width: 40px; height: 40px; }
}

/* ---------- Mouvement réduit : opacité seulement, pas de déplacement ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js [data-enter] { animation: fade 300ms ease both; animation-delay: 0ms; }
  .js .bizcard-front .swoosh { animation: none; }
  .js [data-reveal] { transform: none; transition: opacity 300ms ease; }
  .btn:active, .contact-item:active { transform: none; }

  .bizcard-inner, .bizcard.is-flipped .bizcard-inner { transform: none; transition: none; }
  .bizcard-back { transform: none; opacity: 0; transition: opacity 200ms ease; }
  .bizcard-front { transition: opacity 200ms ease; }
  .bizcard.is-flipped .bizcard-back { opacity: 1; }
  .bizcard.is-flipped .bizcard-front { opacity: 0; }
}
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
