/* ============================================================
   Clotho v2 — main.css
   Variables, reset, typography, layout, navigation, footer
============================================================ */

:root {
  /* ===== Couleurs — warm neutrals ===== */
  --paper: #F4EFE6;          /* fond principal — cream warm */
  --paper-soft: #EFE8DB;     /* sections en alternance */
  --ivory: #FAF6EE;          /* cards, surfaces */
  --ink: #1F1A14;            /* texte principal — encre chaude */
  --ink-soft: #4A4138;       /* texte secondaire */
  --ink-muted: #7A6F62;      /* meta, captions */
  --rule: #D9CFBE;           /* filets, séparateurs */
  --rule-soft: #E5DCCB;

  /* Accents */
  --ochre: #B8722C;          /* accent principal — chaud, doux */
  --ochre-soft: #C68847;
  --ochre-deep: #8E541E;
  --aubergine: #2A1F26;      /* fond contrasté chaud */
  --aubergine-soft: #3A2D33;

  /* Système */
  --jade: #3A6B4D;
  --geek: #4F8A6B;
  --warn: #B85C2A;

  /* Tokens (compat avec ancien thème — points d'ancrage si needed) */
  --nuit: var(--aubergine);
  --terra: var(--ochre);
  --creme: var(--paper);

  /* ===== Typographie ===== */
  --ff-serif: "Newsreader", Georgia, "Times New Roman", serif;
  --ff-sans: "Geist", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --ff-mono: "JetBrains Mono", "SF Mono", Menlo, monospace;

  --fs-xs: 0.75rem;
  --fs-sm: 0.875rem;
  --fs-base: 1rem;
  --fs-md: 1.125rem;
  --fs-lg: 1.375rem;
  --fs-xl: 1.75rem;
  --fs-2xl: 2.25rem;
  --fs-3xl: 3rem;
  --fs-4xl: 4rem;
  --fs-5xl: 5.25rem;

  --lh-tight: 1.05;
  --lh-snug: 1.2;
  --lh-base: 1.5;
  --lh-loose: 1.7;

  /* ===== Espacement ===== */
  --sp-1: 0.25rem;
  --sp-2: 0.5rem;
  --sp-3: 0.75rem;
  --sp-4: 1rem;
  --sp-5: 1.5rem;
  --sp-6: 2rem;
  --sp-7: 3rem;
  --sp-8: 4rem;
  --sp-9: 6rem;
  --sp-10: 8rem;

  --container: 1240px;
  --container-narrow: 920px;

  /* ===== Radius / shadow ===== */
  --r-sm: 4px;
  --r-md: 8px;
  --r-lg: 14px;
  --r-xl: 22px;

  --sh-sm: 0 1px 2px rgba(31,26,20,.06);
  --sh-md: 0 6px 24px rgba(31,26,20,.08);
  --sh-lg: 0 18px 48px rgba(31,26,20,.10);

  --transition: 220ms cubic-bezier(.4,.0,.2,1);
}

/* ===== Reset + base ===== */
*,*::before,*::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: var(--ff-sans);
  font-size: var(--fs-base);
  line-height: var(--lh-base);
  color: var(--ink);
  background: var(--paper);
  font-feature-settings: "ss01", "ss02", "kern";
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img, svg { max-width: 100%; display: block; }
a { color: var(--ink); text-decoration: none; transition: color var(--transition); }
a:hover { color: var(--ochre); }
button { font: inherit; cursor: pointer; }
ul, ol { padding: 0; margin: 0; list-style: none; }
p { margin: 0 0 var(--sp-4); }
h1,h2,h3,h4,h5,h6 { margin: 0; font-weight: 500; line-height: var(--lh-snug); }

/* ===== Container ===== */
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 var(--sp-6); }
.container--narrow { max-width: var(--container-narrow); }

/* ===== Kicker / utilités ===== */
.kicker {
  font-family: var(--ff-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-muted);
  font-weight: 500;
}
.kicker--accent { color: var(--ochre); }
.kicker--cream { color: rgba(244,239,230,0.75); }

.section-title {
  font-family: var(--ff-serif);
  font-weight: 400;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: var(--lh-tight);
  letter-spacing: -0.01em;
  color: var(--ink);
}

.hero-line--accent {
  font-style: italic;
  color: var(--ochre);
  font-weight: 500;
}

.section-heading {
  font-family: var(--ff-serif);
  font-weight: 400;
  font-size: var(--fs-2xl);
  line-height: var(--lh-snug);
  margin-bottom: var(--sp-6);
}
.section-heading--light { color: var(--paper); }

/* ===== Boutons ===== */
.btn-primary,
.btn-ghost,
.btn-outline {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  padding: 14px 22px;
  border-radius: 999px;
  font-family: var(--ff-sans);
  font-weight: 500;
  font-size: var(--fs-sm);
  letter-spacing: 0.01em;
  text-decoration: none;
  transition: all var(--transition);
  border: 1px solid transparent;
  cursor: pointer;
}
.btn-primary {
  background: var(--ink);
  color: var(--paper);
}
.btn-primary:hover {
  background: var(--ochre-deep);
  color: var(--paper);
  transform: translateY(-1px);
}
.btn-primary--large { padding: 18px 28px; font-size: var(--fs-base); }

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--rule);
}
.btn-ghost:hover {
  border-color: var(--ink);
  color: var(--ink);
  background: var(--ivory);
}
.btn-outline {
  background: transparent;
  color: var(--ink);
  border-color: var(--ink);
}
.btn-outline:hover { background: var(--ink); color: var(--paper); }

/* ===== Wordmark ===== */
.logo-link { display: inline-flex; align-items: center; }
.wordmark {
  font-family: var(--ff-serif);
  font-weight: 500;
  font-size: 24px;
  letter-spacing: -0.01em;
  color: var(--ink);
  line-height: 1;
}
.wordmark-o {
  position: relative;
  font-style: italic;
  color: var(--ochre);
  display: inline-block;
  padding: 0 1px;
}
.wordmark-o::after {
  content: "";
  position: absolute;
  left: 0; right: 0;
  bottom: -3px;
  height: 1.5px;
  background: var(--ochre);
}

/* ===== Navigation ===== */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(244,239,230,0.92);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid var(--rule-soft);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-6);
  padding-top: var(--sp-4);
  padding-bottom: var(--sp-4);
}
.nav-logo { display: flex; align-items: center; }
.nav-links {
  display: flex;
  gap: var(--sp-6);
  align-items: center;
}
.nav-link {
  font-size: var(--fs-sm);
  font-weight: 400;
  color: var(--ink-soft);
  letter-spacing: 0.01em;
  position: relative;
  padding: 4px 0;
}
.nav-link:hover { color: var(--ink); }
.nav-link--geek {
  color: var(--jade);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.nav-link--geek::before {
  content: "";
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--jade);
  display: inline-block;
}
.nav-link--login {
  color: var(--ink-muted);
  font-size: 14.5px;
}
.nav-link--login:hover { color: var(--ink); }
.nav-cta { display: flex; align-items: center; gap: var(--sp-4); }
.nav-btn { padding: 10px 18px; font-size: var(--fs-sm); }
.nav-hamburger {
  display: none;
  background: none;
  border: none;
  font-size: 24px;
  color: var(--ink);
}
@media (max-width: 900px) {
  .nav-hamburger { display: block; }
  .nav-links {
    display: none;
    position: absolute;
    top: 100%; left: 0; right: 0;
    flex-direction: column;
    background: var(--paper);
    padding: var(--sp-5) var(--sp-6);
    gap: var(--sp-4);
    border-bottom: 1px solid var(--rule);
  }
  .nav-links.is-open { display: flex; }
  .nav-cta { display: none; }
}

/* ===== Footer ===== */
.site-footer {
  background: var(--aubergine);
  color: rgba(244,239,230,0.85);
  padding: var(--sp-9) 0 var(--sp-6);
  margin-top: var(--sp-9);
}
.site-footer .wordmark { color: var(--paper); }
.site-footer .wordmark-o { color: var(--ochre); }
.site-footer .wordmark-o::after { background: var(--ochre); }
.site-footer a { color: rgba(244,239,230,0.75); }
.site-footer a:hover { color: var(--paper); }
.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr repeat(3, 1fr);
  gap: var(--sp-8);
  padding-bottom: var(--sp-7);
  border-bottom: 1px solid rgba(244,239,230,0.15);
}
.footer-logo { margin-bottom: var(--sp-4); }
.footer-tagline {
  font-family: var(--ff-serif);
  font-size: var(--fs-md);
  line-height: var(--lh-base);
  color: rgba(244,239,230,0.75);
  margin-bottom: var(--sp-5);
  max-width: 36ch;
}
.footer-mark {
  font-family: var(--ff-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  color: rgba(244,239,230,0.45);
}
.footer-col-title {
  font-family: var(--ff-mono);
  font-size: 11px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ochre);
  margin-bottom: var(--sp-4);
}
.footer-col ul li { margin-bottom: var(--sp-2); }
.footer-col ul a { font-size: var(--fs-sm); }
.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: var(--sp-5);
  font-size: var(--fs-xs);
  color: rgba(244,239,230,0.5);
}
.footer-mono { font-family: var(--ff-mono); }
@media (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-bottom { flex-direction: column; gap: var(--sp-3); align-items: flex-start; }
}

/* ===== Thread separator ===== */
.thread-separator {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: var(--sp-7) 0;
  max-width: var(--container);
  margin: 0 auto;
}
.thread-separator span {
  display: block;
  height: 1px;
  background: var(--rule);
}
.thread-separator .t-a { width: 60%; opacity: .6; }
.thread-separator .t-b { width: 80%; opacity: .8; }
.thread-separator .t-c { width: 100%; background: var(--ochre); opacity: .35; }
.thread-separator .t-d { width: 75%; opacity: .7; }
.thread-separator .t-e { width: 50%; opacity: .5; }

/* ===== Pagination ===== */
.pagination {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-top: var(--sp-7);
  padding-top: var(--sp-5);
  border-top: 1px solid var(--rule);
  font-size: var(--fs-sm);
}
.pagination-info { color: var(--ink-muted); font-family: var(--ff-mono); font-size: var(--fs-xs); }
.pagination-link { color: var(--ochre); }
.pagination-link:hover { color: var(--ochre-deep); }

/* ===== Skip link / a11y ===== */
.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0,0,0,0); border: 0;
}

/* ===== KG image widths ===== */
.kg-width-wide {
  margin-left: calc(25% - 25vw);
  margin-right: calc(25% - 25vw);
}

.kg-width-full {
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  width: 100vw;
}
