/* ===================================================
   Petit Mètre Carré — Design System v2
   Direction artistique : blanc ultra aéré, minimaliste
   Accent : vert sauge désaturé #7A9E7E
   =================================================== */

/* ── Variables ─────────────────────────────────────── */
:root {
  --bg:           #FAFAFA;
  --surface:      #FFFFFF;
  --text:         #111111;
  --muted:        #6B6B6B;
  --accent:       #7A9E7E;
  --accent-bg:    rgba(122, 158, 126, 0.07);
  --border:       #E8E8E8;
  --divider:      #E5E5E5;
  --muted-bg:     #F5F5F5;
  --footer-bg:    #F7F7F7;

  --font-base:    "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;

  --text-xs:      0.8125rem;
  --text-sm:      0.875rem;
  --text-base:    1.0625rem;
  --text-lg:      1.125rem;

  --line-height:  1.75;

  --section-py:   80px;
  --shell:        min(1100px, calc(100vw - 48px));
  --max-prose:    780px;

  --radius:       8px;
  --radius-sm:    5px;
  --transition:   200ms ease;
}

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  font-family: var(--font-base);
  font-size: var(--text-base);
  color: var(--text);
  background: var(--bg);
  line-height: var(--line-height);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body::before { display: none; }

a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }
input, select, button { font: inherit; }
ul, ol { list-style: none; padding: 0; margin: 0; }
p { margin: 0; }

/* ── Layout ─────────────────────────────────────────── */
.shell {
  width: var(--shell);
  margin: 0 auto;
}

.page-aura { display: none; }

.site-header,
main,
.site-footer { position: relative; }

/* ── Typography ─────────────────────────────────────── */
h1, h2, h3, h4 {
  font-family: var(--font-base);
  margin: 0;
  color: var(--text);
}

h1 {
  font-size: clamp(2.75rem, 6vw, 3.5rem);
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

h2 {
  font-size: clamp(1.75rem, 3.5vw, 2rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.015em;
}

h3 {
  font-size: clamp(1.05rem, 2vw, 1.2rem);
  font-weight: 600;
  line-height: 1.35;
}

p {
  color: var(--muted);
  line-height: var(--line-height);
}

strong { color: var(--text); }

.eyebrow,
.brandmark__eyebrow,
.footer-kicker,
.footer-title,
.breadcrumb {
  font-size: var(--text-xs);
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  font-weight: 500;
  display: block;
  margin: 0;
}

/* ── Header ─────────────────────────────────────────── */
.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--divider);
  position: sticky;
  top: 0;
  z-index: 100;
  padding: 16px 0;
}

.brand-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.brandmark {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.brandmark__eyebrow {
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.brandmark__title {
  font-family: var(--font-base);
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text);
  letter-spacing: -0.01em;
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 0 24px;
  flex-wrap: wrap;
  padding: 0;
}

.nav-link {
  font-size: var(--text-sm);
  font-weight: 500;
  color: var(--muted);
  padding: 4px 0;
  border-bottom: 1px solid transparent;
  transition: color var(--transition), border-color var(--transition);
}

.nav-link.is-active,
.nav-link:hover,
.utility-link:hover {
  color: var(--text);
  border-bottom-color: var(--accent);
}

.menu-toggle {
  display: none;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: var(--radius-sm);
  padding: 8px 14px;
  font-size: var(--text-sm);
  font-weight: 500;
  cursor: pointer;
  color: var(--text);
}

/* ── Hero ────────────────────────────────────────────── */
.hero {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 0.6fr);
  gap: 64px;
  align-items: start;
  padding: var(--section-py) 0;
}

.hero-copy h1 {
  margin-top: 16px;
  margin-bottom: 20px;
}

.lead {
  font-size: var(--text-lg);
  color: var(--muted);
  line-height: 1.7;
  max-width: 60ch;
  margin-top: 16px;
}

.page-hero,
.article-hero {
  padding: var(--section-py) 0 40px;
  max-width: var(--max-prose);
}

.article-hero .eyebrow {
  margin-bottom: 16px;
}

/* ── Buttons ─────────────────────────────────────────── */
.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 32px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 24px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  font-size: var(--text-sm);
  font-weight: 500;
  cursor: pointer;
  transition: opacity var(--transition), transform var(--transition);
  text-decoration: none;
  line-height: 1;
}

.button:hover {
  opacity: 0.85;
  transform: translateY(-1px);
}

.button-primary {
  background: var(--text);
  color: #FFFFFF;
  border-color: var(--text);
}

.button-secondary {
  background: transparent;
  color: var(--text);
  border-color: var(--text);
}

/* ── Stat row ────────────────────────────────────────── */
.stat-row {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  margin-top: 40px;
  padding: 0;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}

.stat-row li {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 80px;
}

.stat-row strong {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
}

.stat-row span {
  font-size: var(--text-sm);
  color: var(--muted);
}

/* ── Hero panel (paper notes restyle) ───────────────── */
.hero-panel {
  padding-top: 8px;
}

.paper-stack {
  display: grid;
  gap: 16px;
  transform: none;
}

.paper-note {
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0;
  padding: 20px 24px;
  box-shadow: none;
}

.paper-note--accent {
  transform: none;
  background: var(--accent-bg);
  border-color: var(--border);
  border-left: 3px solid var(--accent);
}

.paper-note h2 {
  font-size: 1rem;
  font-weight: 600;
  margin: 8px 0;
}

.paper-note p {
  font-size: var(--text-sm);
}

/* ── Section headers ─────────────────────────────────── */
.section-intro,
.spotlight,
.tools-banner {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  padding: var(--section-py) 0 32px;
}

/* ── Cards ───────────────────────────────────────────── */
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 24px;
  padding-bottom: 32px;
}

.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
  display: grid;
  gap: 12px;
  transition: box-shadow var(--transition), transform var(--transition);
}

.card:hover {
  box-shadow: 0 4px 16px rgba(0, 0, 0, 0.08);
  transform: translateY(-2px);
}

.card h3 a {
  color: var(--text);
  transition: color var(--transition);
}

.card h3 a:hover,
.text-link:hover { color: var(--accent); }

.text-link {
  color: var(--accent);
  font-weight: 500;
  font-size: var(--text-sm);
  transition: opacity var(--transition);
}

.text-link:hover { opacity: 0.75; color: var(--accent); }

/* ── Prose layout ────────────────────────────────────── */
.prose-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(220px, 0.5fr);
  gap: 32px;
  padding-bottom: var(--section-py);
}

.prose-col,
.prose-aside,
.tool-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 32px;
  box-shadow: none;
}

.copy-section,
.article-body .copy-section {
  display: grid;
  gap: 12px;
  padding: 32px 0;
  border-top: 1px solid var(--border);
}

.copy-section:first-child {
  border-top: 0;
  padding-top: 0;
}

.article-intro {
  font-size: var(--text-lg);
  color: var(--text);
  margin-bottom: 24px;
  line-height: 1.65;
}

.copy-section h2 {
  font-size: 1.2rem;
  margin-bottom: 0;
}

/* ── Editorial accent blocks ─────────────────────────── */
.block-editorial {
  background: var(--accent-bg);
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  padding: 16px 20px;
  margin: 16px 0;
}

/* ── Tools ───────────────────────────────────────────── */
.tool-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 24px;
  padding-bottom: var(--section-py);
}

.tool-card { display: grid; gap: 20px; }

.tool-form { display: grid; gap: 14px; }

.tool-form label {
  display: grid;
  gap: 6px;
  color: var(--text);
  font-weight: 600;
  font-size: var(--text-sm);
}

.tool-form input,
.tool-form select {
  width: 100%;
  padding: 11px 14px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  transition: border-color var(--transition);
}

.tool-form input:focus,
.tool-form select:focus {
  outline: none;
  border-color: var(--accent);
}

.tool-result {
  min-height: 3.4em;
  padding: 12px 16px;
  border-radius: var(--radius-sm);
  background: var(--muted-bg);
  color: var(--text);
  font-size: var(--text-sm);
  border-left: 3px solid var(--accent);
}

/* ── Footer ──────────────────────────────────────────── */
.site-footer {
  margin-top: 32px;
  padding: 56px 0 32px;
  background: var(--footer-bg);
  border-top: 1px solid var(--border);
  color: var(--muted);
}

.site-footer p,
.site-footer a,
.site-footer span { color: inherit; }

.site-footer a:hover { color: var(--text); }

.footer-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) repeat(2, minmax(130px, 0.55fr));
  gap: 40px;
}

.footer-grid h2 {
  font-size: 0.95rem;
  font-weight: 600;
  margin: 12px 0 8px;
  color: var(--text);
}

.footer-grid a {
  display: block;
  margin-top: 8px;
  font-size: var(--text-sm);
  transition: color var(--transition);
}

.footer-baseline {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-top: 24px;
  margin-top: 32px;
  border-top: 1px solid var(--border);
  font-size: var(--text-sm);
}

/* ── Subtle reveal animation ─────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 300ms ease, transform 300ms ease;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── Responsive : tablet ─────────────────────────────── */
@media (max-width: 980px) {
  :root {
    --section-py: 60px;
    --shell: min(1100px, calc(100vw - 32px));
  }

  .hero,
  .prose-grid,
  .footer-grid,
  .tool-grid,
  .card-grid {
    grid-template-columns: 1fr;
  }

  .hero { gap: 40px; }

  .section-intro,
  .spotlight,
  .tools-banner,
  .footer-baseline {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ── Responsive : mobile ─────────────────────────────── */
@media (max-width: 720px) {
  :root {
    --section-py: 48px;
    --shell: min(1100px, calc(100vw - 24px));
  }

  .site-header { position: sticky; top: 0; }

  .menu-toggle { display: inline-flex; }

  .site-nav {
    display: none;
    flex-direction: column;
    padding: 12px 0 4px;
    gap: 0;
    border-top: 1px solid var(--border);
    margin-top: 12px;
  }

  .site-nav.is-open { display: flex; }

  .nav-link {
    padding: 10px 0;
    border-bottom: 0;
  }

  .hero { padding-top: 40px; }

  .paper-stack { transform: none; }
  .paper-note--accent { transform: none; }

  .card,
  .prose-col,
  .prose-aside,
  .tool-card { padding: 20px; }

  .card-grid { gap: 16px; }

  .stat-row { gap: 20px; }

  .copy-section,
  .article-body .copy-section { padding: 24px 0; }
}
