/* =====================================================
   design-system.css - base partagée pour toutes les pages
   Inclure dans chaque page : <link rel="stylesheet" href="design-system.css">
   ===================================================== */

/* ——— VARIABLES — changer ici, ça se répercute partout ——— */
:root {
  --accent:      #7fd56f;
  --accent-soft: #edf8e8;
  --accent-text: #3f8d43;
  --on-accent:   #111111;
  --font-body:   -apple-system, BlinkMacSystemFont, "SF Pro Text", "SF Pro Display", "Helvetica Neue", system-ui, sans-serif;
  --bg-desktop:  #1c1a17;
  --desktop-background-image: url("saint%20george%20kandinsky.jpg");
  --desktop-background-size: cover;
  --desktop-background-position: center;
  --desktop-overlay: rgba(18,16,13,0.48);
  --window-shell: #f5f3f0;
  --window-bar-start: #eae8e4;
  --window-bar-end: #dedad6;
  --window-bar-border: #c8c4be;
  --win-body:    #ffffff;
  --soft-surface: #f7f5f2;
  --soft-surface-hover: #eeecea;
  --row-hover:   #faf9f7;
  --icon-surface: #ebebeb;
  --button-surface: #ffffff;
  --text-1:      #111111;
  --text-2:      #555555;
  --text-3:      #707070;
  --line:        #958d82;
  --focus-ring:  #8ccc81;
  --doc-max:     700px;
  --doc-pad-y:   clamp(2rem, 5vw, 3.5rem);
  --doc-pad-x:   clamp(1.5rem, 6vw, 3.5rem);
  --section-gap: 3.5rem;
  --card-radius: 8px;
  --tile-gap:    10px;
  --ease-lift:   cubic-bezier(0.22, 1, 0.36, 1);
  --lift-y:      -2px;
  --window-shadow:
    0 0 0 1px rgba(0,0,0,0.22),
    0 24px 64px rgba(0,0,0,0.55),
    0 4px 12px rgba(0,0,0,0.3);
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --accent:      #7fd56f;
  --accent-soft: #2b4324;
  --accent-text: #b6ea9f;
  --on-accent:   #111111;
  --bg-desktop:  #12110f;
  --desktop-overlay: rgba(13,12,10,0.58);
  --window-shell: #25231f;
  --window-bar-start: #302d29;
  --window-bar-end: #25231f;
  --window-bar-border: #403c36;
  --win-body:    #1d1c19;
  --soft-surface: #25231f;
  --soft-surface-hover: #2d2a25;
  --row-hover:   #25231f;
  --icon-surface: #302d29;
  --button-surface: #f2eee8;
  --text-1:      #f1eee8;
  --text-2:      #c8c1b7;
  --text-3:      #8f877d;
  --line:        #756c62;
  --focus-ring:  #c2eca8;
  --window-shadow:
    0 0 0 1px rgba(255,255,255,0.08),
    0 24px 64px rgba(0,0,0,0.58),
    0 4px 12px rgba(0,0,0,0.42);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --accent:      #7fd56f;
    --accent-soft: #2b4324;
    --accent-text: #b6ea9f;
    --on-accent:   #111111;
    --bg-desktop:  #12110f;
    --desktop-overlay: rgba(13,12,10,0.58);
    --window-shell: #25231f;
    --window-bar-start: #302d29;
    --window-bar-end: #25231f;
    --window-bar-border: #403c36;
    --win-body:    #1d1c19;
    --soft-surface: #25231f;
    --soft-surface-hover: #2d2a25;
    --row-hover:   #25231f;
    --icon-surface: #302d29;
    --button-surface: #f2eee8;
    --text-1:      #f1eee8;
    --text-2:      #c8c1b7;
    --text-3:      #8f877d;
    --line:        #756c62;
    --focus-ring:  #c2eca8;
    --window-shadow:
      0 0 0 1px rgba(255,255,255,0.08),
      0 24px 64px rgba(0,0,0,0.58),
      0 4px 12px rgba(0,0,0,0.42);
  }
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  position: relative;
  font-family: var(--font-body);
  font-size: 14px;
  min-height: 100vh;
  background-color: var(--bg-desktop);
  color: var(--text-1);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  background-image:
    linear-gradient(var(--desktop-overlay), var(--desktop-overlay)),
    var(--desktop-background-image);
  background-size: var(--desktop-background-size);
  background-position: var(--desktop-background-position);
  background-repeat: no-repeat;
  pointer-events: none;
}

body > * {
  position: relative;
  z-index: 1;
}

a { color: inherit; text-decoration: none; }

:where(a, button, summary, [tabindex]:not([tabindex="-1"])):focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 3px;
  border-radius: 6px;
}

[id] { scroll-margin-top: 56px; }

.skip-link {
  position: fixed;
  left: 1rem;
  top: 1rem;
  z-index: 999;
  transform: translateY(-180%);
  display: inline-flex;
  align-items: center;
  min-height: 40px;
  padding: 0 1rem;
  border-radius: 6px;
  background: var(--win-body);
  color: var(--text-1);
  border: 2px solid var(--focus-ring);
  box-shadow: var(--window-shadow);
  font-size: 0.85rem;
  font-weight: 800;
  transition: transform 160ms var(--ease-lift);
}

.skip-link:focus {
  transform: translateY(0);
}

/* ——— DESKTOP ——— */
.desktop {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.5rem;
}

/* ——— WINDOW ——— */
.window {
  background: var(--window-shell);
  border-radius: 10px;
  box-shadow: var(--window-shadow);
  overflow: hidden;
}

/* ——— WINDOW BAR ——— */
.window-bar {
  height: 36px;
  background: linear-gradient(180deg, var(--window-bar-start) 0%, var(--window-bar-end) 100%);
  border-bottom: 1px solid var(--window-bar-border);
  display: flex;
  align-items: center;
  padding: 0 12px;
  gap: 7px;
  flex-shrink: 0;
  position: relative;
}

/* sticky variant for long pages */
.window-bar.sticky {
  position: sticky;
  top: 0;
  z-index: 10;
}

.dot { width: 12px; height: 12px; border-radius: 50%; flex-shrink: 0; }
.dot-r { background: #ff5f57; border: 1px solid #df3d35; }
.dot-y { background: #febc2e; border: 1px solid #d49c10; }
.dot-g { background: #28c840; border: 1px solid #15a82c; }

.window-title {
  position: absolute;
  left: 50%; transform: translateX(-50%);
  font-size: 11.5px;
  font-weight: 600;
  color: var(--text-3);
  white-space: nowrap;
}

.window-breadcrumb {
  margin-left: 10px;
  font-size: 11px;
  font-weight: 500;
  color: var(--text-3);
  display: flex;
  align-items: center;
  gap: 5px;
}

.window-breadcrumb a { color: var(--text-3); }
.window-breadcrumb a:hover { color: var(--text-2); }

/* ——— WINDOW BODY ——— */
.window-body { background: var(--win-body); }

/* ——— DOCUMENT PAGES ——— */
.doc {
  background: var(--win-body);
  padding: var(--doc-pad-y) var(--doc-pad-x);
  display: flex;
  flex-direction: column;
}

.back {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 600;
  color: var(--text-3);
  margin-bottom: 2.5rem;
  transition: color 120ms;
}

.back:hover { color: var(--text-2); }

.doc-hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 108px;
  gap: 1.5rem;
  align-items: start;
  margin-bottom: 4rem;
}

.doc-hero-copy,
.book-copy {
  min-width: 0;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.hero-emoji {
  width: 108px;
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  border-radius: 10px;
  background: var(--accent-soft);
  border: 1px solid var(--line);
  font-size: 3.1rem;
  line-height: 1;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 12%, transparent);
}

.doc-eyebrow {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 0.5rem;
}

.doc-title {
  font-size: clamp(2.4rem, 7vw, 3.6rem);
  font-weight: 800;
  letter-spacing: -0.04em;
  line-height: 0.95;
  color: var(--text-1);
  margin-bottom: 1.25rem;
}

.doc-lead {
  font-size: 1.05rem;
  font-weight: 500;
  line-height: 1.55;
  color: var(--text-2);
  max-width: 52ch;
  margin-bottom: 1.75rem;
}

.doc-cta,
.buy-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 40px;
  padding: 0 1.25rem;
  background: var(--accent);
  color: var(--on-accent);
  font-size: 12px;
  font-weight: 700;
  border-radius: 6px;
  transition:
    transform 160ms var(--ease-lift),
    filter 160ms var(--ease-lift),
    opacity 160ms var(--ease-lift);
  width: fit-content;
}

.doc-cta:hover,
.buy-link:hover {
  filter: brightness(1.08);
  transform: translateY(var(--lift-y));
}

.doc-cta:active,
.buy-link:active {
  transform: translateY(0);
}

.section { margin-bottom: var(--section-gap); }

.section-num {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent-text);
  margin-bottom: 0.5rem;
}

.section-title {
  font-size: 1.4rem;
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.15;
  color: var(--text-1);
  margin-bottom: 0.9rem;
}

.section-body {
  font-size: 13.5px;
  line-height: 1.7;
  color: var(--text-2);
  max-width: 56ch;
}

/* ——— SMALL SHARED COMPONENTS ——— */
.bio-strip {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--soft-surface);
  border: 1px solid var(--line);
  border-radius: var(--card-radius);
  padding: 12px;
  margin-top: 1.5rem;
}

.bio-strip proposal-avatar {
  width: 52px;
  height: 52px;
  flex-shrink: 0;
}

.bio-copy {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.bio-name {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-1);
}

.bio-meta {
  font-size: 11.5px;
  line-height: 1.5;
  color: var(--text-3);
}

.steps {
  display: flex;
  flex-direction: column;
  margin-top: 1.5rem;
}

.step {
  display: grid;
  grid-template-columns: 28px 1fr;
  gap: 0 1rem;
  padding: 1rem 0;
  border-top: 1px solid var(--line);
}

.step:last-child { border-bottom: 1px solid var(--line); }

.step-num {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-3);
  padding-top: 3px;
  letter-spacing: 0.05em;
}

.step-content {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.step-title {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-1);
}

.step-desc {
  font-size: 12px;
  color: var(--text-3);
  line-height: 1.5;
}

.proof-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: var(--tile-gap);
  margin-top: 1.5rem;
}

.quote {
  min-height: 100%;
  background: var(--soft-surface);
  border: 1px solid var(--line);
  border-radius: var(--card-radius);
  padding: 1rem;
}

.quote p {
  font-size: 12.5px;
  line-height: 1.65;
  color: var(--text-2);
}

.quote strong {
  color: var(--text-1);
  font-style: normal;
}

.quote-author {
  display: block;
  margin-top: 0.75rem;
  font-size: 10.5px;
  font-weight: 700;
  line-height: 1.4;
  color: var(--text-3);
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.quote-author a { color: inherit; }

.faq {
  display: flex;
  flex-direction: column;
  margin-top: 1.5rem;
}

details { border-top: 1px solid var(--line); }
details:last-child { border-bottom: 1px solid var(--line); }

summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 0;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-1);
  cursor: pointer;
  list-style: none;
  gap: 1rem;
}

summary::-webkit-details-marker { display: none; }

.summary-icon {
  font-size: 16px;
  color: var(--text-3);
  flex-shrink: 0;
  transition: transform 200ms;
}

details[open] .summary-icon { transform: rotate(45deg); }

.faq-answer {
  font-size: 12.5px;
  line-height: 1.65;
  color: var(--text-3);
  padding-bottom: 1rem;
  max-width: 54ch;
}

.faq-answer a {
  color: var(--accent-text);
  font-weight: 700;
}

.final-cta {
  background: var(--accent);
  color: var(--on-accent);
  border-radius: var(--card-radius);
  padding: 2rem;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
}

.final-cta h2 {
  font-size: 1.3rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.final-cta p {
  font-size: 12px;
  opacity: 0.75;
  max-width: 42ch;
  line-height: 1.6;
}

.final-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 40px;
  padding: 0 1.5rem;
  background: var(--button-surface);
  color: var(--on-accent);
  font-size: 12px;
  font-weight: 700;
  border-radius: 6px;
  transition:
    transform 160ms var(--ease-lift),
    opacity 160ms var(--ease-lift);
}

.final-btn:hover {
  opacity: 0.9;
  transform: translateY(var(--lift-y));
}

.final-btn:active {
  transform: translateY(0);
}

/* ——— SHARED UTILITY ——— */
.divider {
  border: none;
  border-top: 1px solid var(--line);
  margin: 2.5rem 0;
}

.back-to-top {
  display: inline-flex;
  width: fit-content;
  margin-top: 2rem;
  color: var(--accent-text);
  font-size: 0.82rem;
  font-weight: 800;
}

@media (max-width: 620px) {
  .doc-hero,
  .proof-grid {
    grid-template-columns: 1fr;
  }

  .doc-hero { gap: 1.25rem; }

  .hero-emoji {
    width: 88px;
    font-size: 2.55rem;
    order: -1;
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  .doc-cta,
  .buy-link,
  .final-btn,
  .skip-link {
    transition: filter 120ms, opacity 120ms;
  }

  .doc-cta:hover,
  .buy-link:hover,
  .final-btn:hover,
  .doc-cta:active,
  .buy-link:active,
  .final-btn:active {
    transform: none;
  }
}
