/* Massyca — site de présentation
   Palette et typographie strictement issues de la charte graphique officielle
   (charte-graphique/PROMPT-charte-graphique-massyca.md). Ne pas dévier. */

:root {
  --orange: #ff5a1f;
  --orange-dark: #e8470f;
  --green: #0b5e4f;
  --green-dark: #084a3e;
  --ink: #0f100b;
  --white: #ffffff;
  --mist: #f6f6f8;
  --mist-warm: #f4f1ea;
  --line: #e7e7ec;
  --muted: #6b7280;

  --gradient-massyca: linear-gradient(90deg, #ff5a1f 0%, #0b5e4f 100%);

  --font-brand: "Space Grotesk", system-ui, sans-serif;

  --container: 1180px;
  --radius: 20px;
  --radius-sm: 12px;
  --shadow-card: 0 1px 2px rgba(15, 16, 11, 0.04), 0 20px 40px -24px rgba(15, 16, 11, 0.22);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; scroll-behavior: auto !important; }
}

body {
  margin: 0;
  font-family: var(--font-brand);
  font-weight: 400;
  color: var(--ink);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 { font-family: var(--font-brand); font-weight: 500; margin: 0; letter-spacing: -0.01em; }
p { margin: 0; }
img { max-width: 100%; display: block; }
a { color: inherit; }
button { font-family: inherit; cursor: pointer; }

.wrap { max-width: var(--container); margin: 0 auto; padding: 0 24px; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--green);
}
.eyebrow::before {
  content: "";
  width: 18px;
  height: 2px;
  background: var(--orange);
  display: inline-block;
}
.on-dark .eyebrow { color: rgba(255, 255, 255, 0.85); }
.on-dark .eyebrow::before { background: var(--white); }

.section-head { max-width: 640px; margin-bottom: 48px; }
.section-head h2 { font-size: clamp(28px, 4vw, 40px); line-height: 1.12; margin-top: 12px; }
.section-head .lede { margin-top: 16px; font-size: 17px; line-height: 1.6; color: var(--muted); font-weight: 300; }

section { padding: 96px 0; scroll-margin-top: 84px; }
.bg-mist { background: var(--mist); }

/* ---------- Progress rail : le dégradé « en mouvement », signature de la marque ---------- */
.progress-rail {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 3px;
  z-index: 60;
  background: var(--line);
}
.progress-rail__fill {
  height: 100%;
  width: 100%;
  background: var(--gradient-massyca);
  transform: scaleX(var(--scroll-progress, 0));
  transform-origin: left center;
}
.progress-rail__cart {
  position: absolute;
  top: -8px;
  left: calc(var(--scroll-progress, 0) * 100%);
  translate: -50% 0;
  width: 19px; height: 19px;
  filter: drop-shadow(0 2px 6px rgba(15, 16, 11, 0.25));
}

/* ---------- Nav ---------- */
.nav {
  position: sticky;
  top: 3px;
  z-index: 50;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(10px) saturate(1.4);
  border-bottom: 1px solid var(--line);
}
.nav .wrap { display: flex; align-items: center; justify-content: space-between; height: 76px; gap: 24px; }
.nav__logo img { height: 26px; width: auto; }
.nav__links { display: flex; align-items: center; gap: 30px; list-style: none; margin: 0; padding: 0; }
.nav__links a { font-size: 14px; font-weight: 500; text-decoration: none; color: var(--ink); opacity: 0.72; transition: opacity 0.15s ease; }
.nav__links a:hover { opacity: 1; }
.nav__cta { display: inline-flex; align-items: center; gap: 8px; }
@media (max-width: 860px) { .nav__links { display: none; } }

/* ---------- Boutons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 14px 26px;
  border-radius: 999px;
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  border: 1.5px solid transparent;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease, border-color 0.15s ease;
  white-space: nowrap;
}
.btn:active { transform: scale(0.97); }
.btn--primary { background: var(--orange); color: var(--white); box-shadow: 0 10px 24px -10px rgba(255, 90, 31, 0.55); }
.btn--primary:hover { background: var(--orange-dark); }
.btn--ghost-dark { border-color: rgba(255, 255, 255, 0.55); color: var(--white); }
.btn--ghost-dark:hover { border-color: var(--white); background: rgba(255, 255, 255, 0.08); }
.btn--outline { border-color: var(--line); color: var(--ink); background: var(--white); }
.btn--outline:hover { border-color: var(--ink); }
.btn--sm { padding: 10px 18px; font-size: 13px; }
.btn svg { width: 16px; height: 16px; flex: none; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  background: var(--gradient-massyca);
  color: var(--white);
  padding: 132px 0 108px;
}
.hero::before {
  /* Léger aplat sombre : le point médian du dégradé (mélange orange/vert) manque de
     contraste pour du texte — la charte autorise un overlay dans ce cas précis. */
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(60% 55% at 82% 8%, rgba(255, 255, 255, 0.14), transparent 60%),
    linear-gradient(180deg, rgba(15, 16, 11, 0.12) 0%, rgba(15, 16, 11, 0.32) 100%);
  pointer-events: none;
}
.hero .wrap { position: relative; }
.hero__kicker { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; font-weight: 500; letter-spacing: 0.18em; text-transform: uppercase; color: rgba(255, 255, 255, 0.85); }
.hero__kicker::before { content: ""; width: 18px; height: 2px; background: var(--white); }
.hero h1 { font-size: clamp(38px, 6vw, 68px); line-height: 1.05; margin-top: 22px; max-width: 15ch; }
.hero p.lede { margin-top: 24px; max-width: 56ch; font-size: 18px; line-height: 1.6; color: rgba(255, 255, 255, 0.86); font-weight: 300; }
.hero__actions { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 40px; }
.hero__chips { display: flex; flex-wrap: wrap; gap: 10px 22px; margin-top: 56px; padding-top: 28px; border-top: 1px solid rgba(255, 255, 255, 0.25); }
.hero__chips span { font-size: 13px; font-weight: 500; color: rgba(255, 255, 255, 0.92); display: inline-flex; align-items: center; gap: 8px; }
.hero__chips span::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--white); }
.hero__credit { margin-top: 22px; font-size: 12.5px; font-weight: 300; color: rgba(255, 255, 255, 0.68); }
.hero__credit strong { font-weight: 500; color: rgba(255, 255, 255, 0.92); }

/* ---------- Charte graphique ---------- */
.swatches { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 16px; }
.swatch { border-radius: var(--radius-sm); padding: 20px; height: 128px; display: flex; flex-direction: column; justify-content: flex-end; box-shadow: var(--shadow-card); }
.swatch__name { font-size: 13px; font-weight: 500; }
.swatch__hex { font-size: 12px; font-weight: 300; opacity: 0.85; margin-top: 2px; font-variant-numeric: tabular-nums; }
.swatch--orange { background: var(--orange); color: var(--white); }
.swatch--green { background: var(--green); color: var(--white); }
.swatch--ink { background: var(--ink); color: var(--white); }
.swatch--white { background: var(--white); color: var(--ink); border: 1px solid var(--line); }

.gradient-bar {
  border-radius: var(--radius-sm);
  height: 84px;
  background: var(--gradient-massyca);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  color: var(--white);
  box-shadow: var(--shadow-card);
  margin-bottom: 40px;
}
.gradient-bar span { font-size: 13px; font-weight: 500; letter-spacing: 0.04em; }

.charte-grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 24px; align-items: stretch; }
.charte-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 32px; box-shadow: var(--shadow-card); }
.charte-card__label { font-size: 12px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.14em; color: var(--muted); margin-bottom: 20px; }
.logo-showcase { display: flex; align-items: center; justify-content: center; padding: 36px 20px; background: var(--mist); border-radius: var(--radius-sm); }
.logo-showcase img { height: 40px; width: auto; }
.type-sample { margin-top: 24px; }
.type-sample .big { font-size: 46px; line-height: 1; }
.type-sample .w-500 { font-weight: 500; }
.type-sample .w-400 { font-weight: 400; color: var(--muted); }
.type-sample .w-300 { font-weight: 300; color: var(--muted); }
.type-scale-row { display: flex; align-items: baseline; gap: 14px; margin-top: 10px; padding-top: 14px; border-top: 1px dashed var(--line); font-size: 14px; }
.type-scale-row .tag { font-size: 11px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.08em; color: var(--orange); width: 90px; flex: none; }

.pdf-cta { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-top: 24px; padding-top: 24px; border-top: 1px solid var(--line); }
.pdf-cta__meta { font-size: 13px; color: var(--muted); font-weight: 300; }
.pdf-cta__actions { display: flex; gap: 12px; flex-wrap: wrap; }

@media (max-width: 860px) {
  .swatches { grid-template-columns: repeat(2, 1fr); }
  .charte-grid { grid-template-columns: 1fr; }
}

/* ---------- Features ---------- */
.feature-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.feature-card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px; transition: border-color 0.15s ease, transform 0.15s ease; }
.feature-card:hover { border-color: var(--ink); transform: translateY(-2px); }
.feature-card__icon { width: 44px; height: 44px; border-radius: 12px; display: flex; align-items: center; justify-content: center; background: var(--mist); color: var(--green); margin-bottom: 18px; }
.feature-card__icon svg { width: 22px; height: 22px; }
.feature-card h3 { font-size: 17px; }
.feature-card p { margin-top: 10px; font-size: 14px; line-height: 1.6; color: var(--muted); font-weight: 300; }
@media (max-width: 900px) { .feature-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 600px) { .feature-grid { grid-template-columns: 1fr; } }
.feature-grid--compact { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 900px) { .feature-grid--compact { grid-template-columns: 1fr; } }

/* ---------- Deep dives (paiement / livraison / publicités) ---------- */
.deepdive-list { display: flex; flex-direction: column; gap: 84px; }
.deepdive { display: flex; align-items: center; gap: 56px; }
.deepdive:nth-child(even) { flex-direction: row-reverse; }
.deepdive__media, .deepdive__copy { flex: 1 1 48%; min-width: 0; }
.device-browser--wide { max-width: none; }
.device-browser--wide img { width: 100%; height: auto; }
.deepdive__copy h3 { font-size: clamp(21px, 2.4vw, 27px); line-height: 1.2; margin-top: 10px; }
.deepdive__copy .lead-text { margin-top: 16px; font-size: 15.5px; line-height: 1.72; color: var(--muted); font-weight: 300; }
.deepdive__specs { list-style: none; margin: 24px 0 0; padding: 0; display: grid; gap: 13px; }
.deepdive__specs li { display: flex; align-items: flex-start; gap: 10px; font-size: 14px; line-height: 1.5; }
.deepdive__specs li svg { width: 17px; height: 17px; flex: none; margin-top: 2px; color: var(--orange); }
@media (max-width: 900px) {
  .deepdive, .deepdive:nth-child(even) { flex-direction: column; align-items: stretch; gap: 28px; }
}

/* ---------- Web & mobile parity ---------- */
.parity { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; align-items: center; }
.parity-copy h2 { font-size: clamp(26px, 3.6vw, 36px); line-height: 1.15; }
.parity-copy p { margin-top: 18px; font-size: 16px; line-height: 1.65; color: var(--muted); font-weight: 300; }
.parity-list { list-style: none; margin: 26px 0 0; padding: 0; display: grid; gap: 12px; }
.parity-list li { display: flex; align-items: flex-start; gap: 10px; font-size: 14.5px; }
.parity-list li svg { width: 18px; height: 18px; flex: none; margin-top: 2px; color: var(--orange); }
.devices { display: flex; align-items: flex-end; gap: 20px; justify-content: center; flex-wrap: wrap; }
.device-browser { width: 100%; max-width: 380px; border-radius: 14px; overflow: hidden; box-shadow: var(--shadow-card); border: 1px solid var(--line); background: var(--white); }
.device-browser__bar { height: 30px; background: var(--mist); display: flex; align-items: center; gap: 6px; padding: 0 12px; }
.device-browser__bar span { width: 8px; height: 8px; border-radius: 50%; background: var(--line); }
.device-phone { width: 148px; flex: none; border-radius: 30px; background: var(--ink); padding: 10px; box-shadow: var(--shadow-card); }
.device-phone__screen { border-radius: 20px; background: var(--gradient-massyca); aspect-ratio: 9/18.5; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px; color: var(--white); text-align: center; padding: 20px; }
.device-phone__screen img { width: 46px; height: 46px; border-radius: 12px; }
.device-phone__screen strong { font-size: 12.5px; font-weight: 500; }
.device-phone__screen small { font-size: 10.5px; font-weight: 300; opacity: 0.85; }
.qr-card { flex: none; width: 132px; background: var(--white); border: 1px solid var(--line); border-radius: 14px; padding: 14px; box-shadow: var(--shadow-card); text-align: center; }
.qr-card img { width: 100%; height: auto; border-radius: 4px; }
.qr-card p { margin-top: 10px; font-size: 11.5px; line-height: 1.4; color: var(--muted); font-weight: 300; }
.qr-card p strong { display: block; font-size: 12px; font-weight: 500; color: var(--ink); margin-bottom: 2px; }
@media (max-width: 860px) { .qr-card { width: 148px; } }
@media (max-width: 860px) { .parity { grid-template-columns: 1fr; } .devices { margin-top: 12px; } }

/* ---------- Screenshots ---------- */
.shot-grid { display: grid; grid-template-columns: 1.4fr 1fr; grid-template-rows: auto auto; gap: 20px; }
.shot-card { position: relative; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--line); box-shadow: var(--shadow-card); background: var(--white); }
.shot-card img { width: 100%; height: 100%; object-fit: cover; object-position: left top; display: block; }
.shot-card figcaption { position: absolute; left: 16px; bottom: 16px; background: rgba(15, 16, 11, 0.78); color: var(--white); font-size: 12.5px; font-weight: 500; padding: 8px 14px; border-radius: 999px; backdrop-filter: blur(4px); }
.shot-card--tall { grid-row: 1 / 3; }
.shot-card--tall img { height: 640px; }
.shot-card:not(.shot-card--tall) img { height: 300px; }
@media (max-width: 900px) {
  .shot-grid { grid-template-columns: 1fr; }
  .shot-card--tall { grid-row: auto; }
  .shot-card--tall img, .shot-card:not(.shot-card--tall) img { height: 320px; }
}

/* ---------- Télécharger ---------- */
.download {
  background: var(--ink);
  color: var(--white);
  border-radius: 28px;
  padding: 56px;
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 40px;
  align-items: center;
}
.download__icon { width: 96px; height: 96px; border-radius: 24px; box-shadow: 0 20px 40px -14px rgba(255, 90, 31, 0.45); flex: none; }
.download__copy h2 { font-size: clamp(24px, 3vw, 30px); color: var(--white); }
.download__copy p { margin-top: 10px; font-size: 14.5px; color: rgba(255, 255, 255, 0.68); font-weight: 300; max-width: 46ch; }
.download__meta { display: flex; gap: 18px; margin-top: 18px; flex-wrap: wrap; }
.download__meta div { font-size: 12px; color: rgba(255, 255, 255, 0.55); font-weight: 300; }
.download__meta strong { display: block; font-size: 14px; color: var(--white); font-weight: 500; }
.download__cta { display: flex; flex-direction: column; gap: 12px; align-items: flex-start; }
.install-steps { list-style: none; margin: 40px 0 0; padding: 24px 0 0; border-top: 1px solid rgba(255, 255, 255, 0.14); grid-column: 1 / -1; display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; }
.install-steps li { font-size: 13.5px; color: rgba(255, 255, 255, 0.75); font-weight: 300; line-height: 1.55; }
.install-steps b { display: block; font-size: 12px; font-weight: 500; letter-spacing: 0.08em; text-transform: uppercase; color: var(--orange); margin-bottom: 8px; }
@media (max-width: 860px) {
  .download { grid-template-columns: 1fr; text-align: left; padding: 40px 26px; border-radius: 20px; }
  .install-steps { grid-template-columns: 1fr; }
}

/* ---------- Footer ---------- */
footer { background: var(--green); color: var(--white); padding: 64px 0 32px; }
.footer-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 32px; flex-wrap: wrap; padding-bottom: 40px; border-bottom: 1px solid rgba(255, 255, 255, 0.18); }
.footer-brand img { height: 24px; }
.footer-brand p { margin-top: 14px; font-size: 13.5px; color: rgba(255, 255, 255, 0.7); font-weight: 300; max-width: 34ch; line-height: 1.6; }
.footer-links { display: flex; gap: 56px; flex-wrap: wrap; }
.footer-links h4 { font-size: 12px; font-weight: 500; text-transform: uppercase; letter-spacing: 0.1em; color: rgba(255, 255, 255, 0.55); margin-bottom: 14px; }
.footer-links ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.footer-links a { font-size: 14px; text-decoration: none; color: rgba(255, 255, 255, 0.88); }
.footer-links a:hover { text-decoration: underline; }
.footer-bottom { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding-top: 24px; font-size: 12.5px; color: rgba(255, 255, 255, 0.55); font-weight: 300; }

/* ---------- Modal (charte PDF) ---------- */
.modal-overlay {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(15, 16, 11, 0.6);
  display: flex; align-items: center; justify-content: center;
  padding: 24px;
  opacity: 0; pointer-events: none;
  transition: opacity 0.18s ease;
}
.modal-overlay.is-open { opacity: 1; pointer-events: auto; }
.modal {
  width: min(920px, 100%);
  height: min(84vh, 980px);
  background: var(--white);
  border-radius: 18px;
  overflow: hidden;
  display: flex; flex-direction: column;
  box-shadow: 0 40px 80px -20px rgba(0, 0, 0, 0.5);
  transform: translateY(10px) scale(0.98);
  transition: transform 0.18s ease;
}
.modal-overlay.is-open .modal { transform: translateY(0) scale(1); }
.modal__head { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px; border-bottom: 1px solid var(--line); gap: 16px; }
.modal__head h3 { font-size: 15px; }
.modal__head-actions { display: flex; align-items: center; gap: 10px; }
.modal__close { width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--line); background: var(--white); display: flex; align-items: center; justify-content: center; }
.modal__close:hover { border-color: var(--ink); }
.modal__close svg { width: 16px; height: 16px; }
.modal__body { flex: 1; background: var(--mist); }
.modal__body object { width: 100%; height: 100%; }
.modal__fallback { height: 100%; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px; text-align: center; padding: 24px; }
.modal__fallback p { font-size: 14px; color: var(--muted); }
body.modal-open { overflow: hidden; }

/* ---------- Focus ---------- */
a:focus-visible, button:focus-visible { outline: 2px solid var(--orange); outline-offset: 3px; border-radius: 4px; }
