/* ─────────────────────────────────────────────────────────
   Molleva — Hi-fi design system
   "Sous l'arc" — clarté minérale chaleureuse
   ───────────────────────────────────────────────────────── */

:root {
  /* Palette */
  --bg: #F7F3EE;
  --surface: #FCFAF7;
  --surface-2: #EEF1EC;
  --ink: #24313A;
  --ink-2: #5F6B72;
  --ink-3: #8A949B;
  --sage: #56756D;
  --cta: #4E7068;
  --terra: #C88E6E;
  --terra-soft: #E9D5C6;
  --dark: #1B272E;
  --dark-ink: #E6E3DC;
  --dark-ink-2: #C8CFD3;
  --dark-ink-3: #9AA4A9;
  --rule: rgba(36, 49, 58, .14);
  --rule-soft: rgba(36, 49, 58, .08);
  --rule-dark: rgba(230, 227, 220, .14);

  /* Type */
  --font-display: 'Instrument Sans', 'Helvetica Neue', sans-serif;
  --font-body: 'Inter', 'Helvetica Neue', sans-serif;

  /* Radii */
  --r-card: 22px;
  --r-group: 16px;
  --r-btn: 14px;
  --r-pill: 999px;

  /* Spacing */
  --gutter: clamp(20px, 4vw, 52px);
  --section-y: clamp(56px, 8vw, 110px);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; overflow-x: hidden; }

body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "ss01", "cv11";
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }

::selection { background: var(--terra); color: var(--bg); }

/* ── Type utilities ── */
.display {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.02;
}
.italic { font-style: italic; font-family: var(--font-display); font-weight: 500; }
.kicker {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-3);
}
.kicker.terra { color: var(--terra); }
.kicker.sage { color: var(--sage); }

.lead {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
  color: var(--sage);
  letter-spacing: -0.01em;
}

.muted { color: var(--ink-2); }

/* ── Container ── */
.wrap {
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.wrap-narrow {
  max-width: 820px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

/* ── Arc + Point (logo signature) ── */
.arc-mark {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.arc-mark .arc-svg {
  width: 28px;
  height: 26px;
  display: block;
}
.arc-mark .wordmark {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.04em;
  font-size: 22px;
  text-transform: lowercase;
  color: var(--ink);
}
.arc-mark.dark .wordmark { color: var(--bg); }

/* ── Arc divider — section break ── */
.arc-divider-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: clamp(24px, 4vw, 48px) 0;
}
.arc-divider-wrap .arc-divider {
  width: 70px;
  height: 20px;
}

/* ── Arc halo — drawn arcs at section base ── */
.arc-halo {
  position: relative;
  height: clamp(140px, 18vw, 260px);
  width: 100%;
  pointer-events: none;
  overflow: hidden;
}
.arc-halo .arc-halo-svg {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: min(1400px, 110vw);
  height: 100%;
  display: block;
}
.arc-halo.contained .arc-halo-svg { width: 100%; }
.arc-halo.tight { height: clamp(90px, 12vw, 160px); }

/* Section that hosts a halo at its base */
.has-halo {
  position: relative;
}
.has-halo > .arc-halo {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  pointer-events: none;
}

/* ── Buttons ── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 14px 22px;
  border-radius: var(--r-btn);
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 15px;
  letter-spacing: -0.005em;
  transition: transform .2s cubic-bezier(.4,0,.2,1), background .2s, color .2s, border-color .2s;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: translateY(0); }

.btn-primary {
  background: var(--ink);
  color: var(--bg);
}
.btn-primary:hover { background: #2f3d47; }

.btn-sage {
  background: var(--cta);
  color: var(--bg);
}
.btn-sage:hover { background: #587b73; }

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border: 1px solid rgba(36, 49, 58, .22);
}
.btn-ghost:hover { background: rgba(36, 49, 58, .04); border-color: rgba(36, 49, 58, .35); }

.btn-ghost.dark {
  color: var(--bg);
  border-color: rgba(230, 227, 220, .28);
}
.btn-ghost.dark:hover { background: rgba(230, 227, 220, .06); }

.btn-link {
  color: var(--sage);
  font-style: italic;
  font-family: var(--font-display);
  font-weight: 500;
  font-size: 16px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  letter-spacing: -0.01em;
}
.btn-link::after { content: "→"; transition: transform .25s; }
.btn-link:hover::after { transform: translateX(3px); }

/* ── Store badges ── */
.store-row {
  display: inline-flex;
  gap: 10px;
  flex-wrap: wrap;
}
.store-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 11px 18px 11px 14px;
  border-radius: var(--r-btn);
  background: var(--ink);
  color: var(--bg);
  font-family: var(--font-body);
  font-size: 13px;
  line-height: 1.1;
  transition: transform .2s, background .2s;
}
.store-badge:hover { transform: translateY(-1px); background: #2f3d47; }
.store-badge .badge-icon {
  width: 22px; height: 22px;
  display: grid; place-items: center;
  color: var(--bg);
}
.store-badge .badge-label {
  display: flex; flex-direction: column;
  font-size: 9px; letter-spacing: 0.08em; text-transform: uppercase; opacity: .7;
  white-space: nowrap;
}
.store-badge .badge-name {
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  text-transform: none;
  opacity: 1;
  margin-top: 2px;
  white-space: nowrap;
}
.store-badge.light {
  background: var(--bg);
  color: var(--ink);
}
.store-badge.light:hover { background: #ede7df; }
.store-badge.light .badge-icon { color: var(--ink); }
.store-badge.light .badge-label { color: var(--ink-2); }

/* ── Nav ── */
.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(247, 243, 238, .82);
  backdrop-filter: saturate(1.1) blur(14px);
  -webkit-backdrop-filter: saturate(1.1) blur(14px);
  border-bottom: 1px solid var(--rule-soft);
}
.nav.dark-mode {
  background: rgba(27, 39, 46, .85);
  border-bottom-color: var(--rule-dark);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 70px;
  max-width: 1240px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}
.nav-links {
  display: flex;
  align-items: center;
  gap: 32px;
}
.nav-links a {
  font-size: 14.5px;
  font-weight: 500;
  color: var(--ink-2);
  position: relative;
  transition: color .2s;
}
.nav-links a:hover { color: var(--ink); }
.nav-links a.active {
  color: var(--ink);
}
.nav-links a.active::after {
  content: "";
  position: absolute;
  left: 0; right: 0;
  bottom: -22px;
  height: 1.5px;
  background: var(--terra);
}
.nav.dark-mode .nav-links a { color: var(--dark-ink-2); }
.nav.dark-mode .nav-links a:hover, .nav.dark-mode .nav-links a.active { color: var(--bg); }
.nav.dark-mode .arc-mark .wordmark { color: var(--bg); }

.nav-cta { padding: 10px 18px; font-size: 14px; }

.menu-toggle { display: none; }

@media (max-width: 760px) {
  .nav-links { display: none; }
  .nav-cta { padding: 9px 14px; font-size: 13px; }
}

/* ── Footer ── */
footer {
  padding: 64px 0 40px;
  border-top: 1px solid var(--rule-soft);
  background: var(--bg);
  margin-top: var(--section-y);
}
.foot-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1fr;
  gap: 40px;
}
.foot-col h4 {
  font-family: var(--font-body);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--ink-3);
  margin-bottom: 14px;
}
.foot-col ul { list-style: none; }
.foot-col li { margin-bottom: 8px; }
.foot-col a {
  font-size: 14px;
  color: var(--ink-2);
  transition: color .2s;
}
.foot-col a:hover { color: var(--ink); }
.foot-tagline {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 15px;
  color: var(--ink-2);
  margin-top: 12px;
  max-width: 240px;
  line-height: 1.45;
}
.foot-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: 48px;
  padding-top: 24px;
  border-top: 1px solid var(--rule-soft);
  gap: 24px;
  flex-wrap: wrap;
}
.foot-bottom .legal {
  font-size: 12.5px;
  color: var(--ink-3);
  font-style: italic;
  font-family: var(--font-display);
}

@media (max-width: 880px) {
  .foot-grid { grid-template-columns: 1fr 1fr; gap: 36px 28px; }
}
@media (max-width: 520px) {
  .foot-grid { grid-template-columns: 1fr; }
}

/* ── Sticky mobile CTA ── */
.sticky-cta {
  position: fixed;
  bottom: 16px;
  left: 16px;
  right: 16px;
  z-index: 60;
  display: none;
  align-items: center;
  gap: 10px;
  padding: 12px 14px 12px 18px;
  background: rgba(36, 49, 58, .97);
  color: var(--bg);
  border-radius: 18px;
  box-shadow: 0 10px 30px rgba(36, 49, 58, .18);
  backdrop-filter: blur(10px);
  transform: translateY(0);
  transition: transform .3s cubic-bezier(.4,0,.2,1), opacity .3s;
}
.sticky-cta.hidden { transform: translateY(120%); opacity: 0; pointer-events: none; }
.sticky-cta .sticky-label {
  flex: 1;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: -0.01em;
}
.sticky-cta .sticky-close {
  width: 28px; height: 28px;
  border-radius: 50%;
  display: grid; place-items: center;
  color: var(--dark-ink-2);
  font-size: 14px;
  background: rgba(230, 227, 220, .08);
}
.sticky-cta .sticky-cta-btn {
  background: var(--bg);
  color: var(--ink);
  padding: 8px 14px;
  border-radius: 12px;
  font-size: 13px;
  font-weight: 500;
}
@media (max-width: 760px) {
  .sticky-cta { display: flex; }
  body.has-sticky { padding-bottom: 80px; }
}

/* ── Sections ── */
.section { padding: var(--section-y) 0; position: relative; }
.section.tight { padding: clamp(40px, 6vw, 70px) 0; }
.section.surf { background: var(--surface-2); }
.section.night {
  background: var(--dark);
  color: var(--dark-ink);
}
.section.night .muted { color: var(--dark-ink-2); }

/* ── Soft divider ── */
.divider {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px 0;
}
.divider .arc-divider {
  width: 58px; height: 16px;
}

/* ── Halo ── */
.halo {
  position: absolute;
  pointer-events: none;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  width: 1000px;
  height: 360px;
  background:
    radial-gradient(ellipse at 50% 100%, rgba(86, 117, 109, .12) 0%, rgba(86, 117, 109, 0) 60%),
    radial-gradient(circle at 50% 100%, rgba(200, 142, 110, .14) 0%, rgba(200, 142, 110, 0) 40%);
}

/* ── Cards ── */
.card {
  background: var(--surface);
  border-radius: var(--r-card);
  padding: 28px;
  border: 1px solid var(--rule-soft);
}
.card.surf-2 { background: var(--surface-2); border-color: transparent; }
.card.dark {
  background: rgba(230, 227, 220, .04);
  border-color: var(--rule-dark);
  color: var(--dark-ink);
}

/* ── Pillar mark (arc + dot pastille) ── */
.pillar-mark {
  display: inline-flex;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--surface-2);
  align-items: center;
  justify-content: center;
}

/* ── Phone screenshot (real app images) ── */
.phone-screenshot {
  --w: 280px;
  width: var(--w);
  background: var(--ink);
  border-radius: 38px;
  padding: 8px;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, .04) inset,
    0 30px 60px -20px rgba(36, 49, 58, .22),
    0 10px 24px -12px rgba(36, 49, 58, .18);
  display: inline-block;
}
.phone-screenshot img {
  width: 100%;
  height: auto;
  border-radius: 30px;
  display: block;
}

/* ── Phone mockup base ── */
.phone {
  --w: 280px;
  width: var(--w);
  aspect-ratio: 9 / 19.5;
  background: var(--ink);
  border-radius: 38px;
  padding: 8px;
  box-shadow:
    0 1px 0 rgba(255, 255, 255, .04) inset,
    0 30px 60px -20px rgba(36, 49, 58, .22),
    0 10px 24px -12px rgba(36, 49, 58, .18);
  position: relative;
}
.phone .screen {
  background: var(--bg);
  width: 100%;
  height: 100%;
  border-radius: 30px;
  overflow: hidden;
  position: relative;
  display: flex;
  flex-direction: column;
}
.phone .notch {
  position: absolute;
  top: 14px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px; height: 22px;
  background: var(--ink);
  border-radius: 14px;
  z-index: 5;
}
.phone .status {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 14px 20px 6px;
  font-size: 12px;
  font-weight: 600;
  color: var(--ink);
  font-family: var(--font-display);
}
.phone .status .right { display: flex; gap: 5px; align-items: center; }

/* ── In-screen content tokens (app surface) ── */
.app-surface {
  flex: 1;
  padding: 18px 20px 22px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  overflow: hidden;
}
.app-surface .app-h {
  font-family: var(--font-display);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink-3);
  white-space: nowrap;
}
.app-surface .app-title {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 600;
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.app-surface .app-title em { color: var(--sage); }
.app-surface .item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  background: var(--surface);
  border-radius: 14px;
  font-size: 14px;
}
.app-surface .item .check {
  width: 18px; height: 18px; border-radius: 50%;
  border: 1.5px solid var(--ink-3);
  flex-shrink: 0;
}
.app-surface .item.done .check {
  background: var(--sage);
  border-color: var(--sage);
  position: relative;
}
.app-surface .item.done .check::after {
  content: ""; position: absolute;
  left: 4px; top: 7px;
  width: 8px; height: 4px;
  border-left: 1.5px solid var(--bg);
  border-bottom: 1.5px solid var(--bg);
  transform: rotate(-45deg);
}
.app-surface .item.done .label { color: var(--ink-3); text-decoration: line-through; text-decoration-thickness: 1px; }

/* ── Article body ── */
.article-body {
  font-size: 18px;
  line-height: 1.7;
  color: var(--ink);
}
.article-body p { margin-bottom: 1.2em; }
.article-body > p:first-of-type::first-letter {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 3.2em;
  float: left;
  line-height: 0.9;
  margin: 0.06em 0.08em 0 -0.04em;
  color: var(--ink);
}
.article-body h1 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(24px, 3.4vw, 38px);
  letter-spacing: -0.025em;
  line-height: 1.08;
  margin: 0 0 0.8em;
}
.article-body h2 {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 26px;
  letter-spacing: -0.02em;
  margin: 2em 0 0.6em;
  line-height: 1.2;
}
.article-body blockquote {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 500;
  font-size: 28px;
  line-height: 1.3;
  color: var(--ink);
  border-left: 1.5px solid var(--terra);
  padding-left: 22px;
  margin: 1.6em 0;
  letter-spacing: -0.015em;
}
.article-body em { font-style: italic; }

/* ── Reading progress ── */
.read-progress {
  position: fixed;
  top: 0; left: 0;
  height: 1.5px;
  background: var(--terra);
  z-index: 100;
  width: 0;
  transition: width .12s linear;
}

/* ── Reveal anim — content always visible, gentle fade-in on first observe ── */
.reveal {
  transition: opacity .6s cubic-bezier(.4,0,.2,1), transform .6s cubic-bezier(.4,0,.2,1);
}
.js-ready .reveal:not(.in) {
  opacity: 0;
  transform: translateY(8px);
}
.js-ready .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .js-ready .reveal:not(.in) { opacity: 1; transform: none; }
}

/* ── Tag / chip ── */
.chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  border-radius: var(--r-pill);
  background: var(--surface-2);
  font-size: 12px;
  color: var(--ink-2);
  font-family: var(--font-body);
  font-weight: 500;
}
.chip .dot { width: 5px; height: 5px; border-radius: 50%; background: var(--terra); }

/* ── Refus / Keep lists ── */
.refus-list, .keep-list {
  list-style: none;
  display: flex; flex-direction: column;
  gap: 10px;
}
.refus-list li {
  display: flex; gap: 12px;
  color: var(--ink-2);
  font-size: 16px;
  line-height: 1.45;
}
.refus-list li::before {
  content: "✗";
  color: var(--terra);
  font-weight: 600;
  flex-shrink: 0;
  margin-top: 2px;
}
.keep-list li {
  display: flex; gap: 12px;
  font-size: 16px;
  line-height: 1.45;
  color: var(--ink);
  font-weight: 500;
}
.keep-list li::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--sage);
  flex-shrink: 0;
  margin-top: 10px;
}

/* ── Sage / terra inline ── */
.t-sage { color: var(--sage); }
.t-terra { color: var(--terra); }

/* ── Helpers ── */
.hide-mobile { }
.hide-desktop { display: none; }
@media (max-width: 760px) {
  .hide-mobile { display: none !important; }
  .hide-desktop { display: revert !important; }
}

/* ── Article lead (direct-answer intro) ── */
.article-lead {
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  border-left: 2px solid var(--terra);
  padding-left: 16px;
  margin-bottom: 1.6em;
}

/* ── Résumé block (GEO — self-contained citability) ── */
.resume-block {
  background: var(--surface-2);
  border-radius: 10px;
  padding: 22px 26px;
  margin: 2em 0;
}
.resume-block strong {
  display: block;
  font-family: var(--font-display);
  font-size: 15px;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--sage);
  margin-bottom: 14px;
}
.resume-block ul {
  margin: 0;
  padding-left: 18px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.resume-block li {
  line-height: 1.55;
  color: var(--ink);
}

/* ──────────────────────────────────────────────
   Article byline & author-bio — extensions
   ────────────────────────────────────────────── */
.byline .name a        { color: inherit; text-decoration: none; }
.byline .name a:hover  { text-decoration: underline; text-decoration-color: var(--terra); text-underline-offset: 3px; }
.byline .role          { font-size: 12px; color: var(--ink-3); font-style: italic; font-family: var(--font-display); margin-top: 1px; }
.author-bio h3 a       { color: inherit; text-decoration: none; }
.author-bio h3 a:hover { text-decoration: underline; text-decoration-color: var(--terra); text-underline-offset: 3px; }
.author-bio-link       { display: inline-block; margin-top: 10px; font-size: 13.5px; color: var(--terra); font-family: var(--font-display); font-style: italic; text-decoration: none; }
.author-bio-link:hover { text-decoration: underline; text-underline-offset: 3px; }
.sources-section       { margin-top: 48px; padding-top: 28px; border-top: 1px solid var(--rule-soft); }
.sources-section .label { font-family: var(--font-body); font-size: 11px; letter-spacing: 0.14em; text-transform: uppercase; color: var(--ink-3); font-weight: 500; margin-bottom: 14px; }
.sources-section ul    { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.sources-section li    { font-size: 14px; color: var(--ink-2); line-height: 1.5; padding-left: 14px; position: relative; }
.sources-section li::before { content: "·"; position: absolute; left: 0; color: var(--terra); font-weight: 700; }

/* ──────────────────────────────────────────────
   Global mobile — ADN préservé sur toutes pages
   ────────────────────────────────────────────── */
@media (max-width: 600px) {

  /* Cards : moins de padding, plus de respiration */
  .card { padding: 22px 20px; }

  /* Article-body : lisibilité mobile */
  .article-body { font-size: 17px; line-height: 1.68; }

  /* Blockquotes : moins imposants sur petit écran */
  .article-body blockquote { font-size: 22px; padding-left: 16px; }

  /* Store badges : stack si trop serrés */
  .store-row { flex-direction: column; align-items: flex-start; }
  .final-night .store-row,
  .lapp-final .store-row { align-items: center; }
}

/* ── Skip link — accessibilité et agents IA ── */
.skip-link {
  position: absolute !important;
  left: -9999px !important;
  top: auto !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  clip-path: inset(50%) !important;
  white-space: nowrap !important;
}
.skip-link:focus {
  position: fixed;
  top: 0;
  left: 0;
  width: auto;
  height: auto;
  overflow: visible;
  padding: 12px 22px;
  background: var(--ink);
  color: var(--bg);
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 500;
  border-radius: 0 0 10px 0;
  text-decoration: none;
  z-index: 9999;
}
