/* OldWriter — site vitrine. Statique, sans dépendance. */

:root {
  --paper: #fbf6ec;
  --paper-deep: #f2e7d3;
  --ink: #2b2219;
  --ink-soft: #6b5a48;
  --rule: #e6d6bb;
  --margin-line: #e9b4ad;
  --wood-dark: #4a2c17;
  --wood: #7a4a26;
  --wood-light: #a8703f;
  --gold: #e3c27a;
  --accent: #a3282b;
  --book: #3e4a57;
  --cat-book: #c8413a;
  --cat-char: #3f73b8;
  --cat-place: #3f9b5a;
  --cat-sheet: #e2a32b;
  --cat-note: #8d5aa8;
  --cat-tag: #1f9396;
  --serif: Georgia, "Times New Roman", Times, serif;
  --sans: "Lucida Grande", "Helvetica Neue", Helvetica, Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif);
  font-size: 18px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--accent); }
a:hover { color: var(--ink); }

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 24px; }

/* ---------- En-tête bois ---------- */

.wood {
  background-color: var(--wood);
  background-image:
    repeating-linear-gradient(90deg,
      rgba(0,0,0,.06) 0 2px, transparent 2px 9px,
      rgba(255,255,255,.04) 9px 11px, transparent 11px 23px),
    linear-gradient(180deg, var(--wood) 0%, #6a3f20 100%);
  color: #fbecd2;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 18px 0;
}

.brand {
  font-weight: bold;
  font-size: 24px;
  color: #fde9c6;
  text-decoration: none;
  text-shadow: 0 1px 0 rgba(0,0,0,.4);
  letter-spacing: .01em;
}
.brand:hover { color: #fff; }

.nav { display: flex; align-items: center; gap: 20px; font-family: var(--sans); font-size: 14px; }
.nav a { color: #f6dfb8; text-decoration: none; }
.nav a:hover { color: #fff; }

.lang {
  display: inline-flex;
  border-radius: 5px;
  overflow: hidden;
  border: 1px solid rgba(0,0,0,.45);
  box-shadow: 0 1px 0 rgba(255,255,255,.15);
}
.lang a, .lang span {
  padding: 3px 12px;
  font-size: 13px;
}
.lang span {
  background: linear-gradient(#3a2414, #5a3720);
  color: #fff;
}
.lang a {
  background: linear-gradient(#b98656, #93633a);
  color: #3b2414;
}
.lang a:hover { color: #000; }

/* ---------- Héros ---------- */

.hero { padding: 40px 0 0; text-align: center; }

.hero h1 {
  font-size: 54px;
  line-height: 1.1;
  margin: 10px 0 14px;
  color: #fde9c6;
  text-shadow: 0 2px 0 rgba(0,0,0,.35);
}

.hero .lede {
  max-width: 640px;
  margin: 0 auto 28px;
  font-size: 21px;
  color: #f3dcb6;
}

.fleuron { color: var(--accent); font-size: 26px; line-height: 1; }
.hero .fleuron { color: var(--gold); }

.actions { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-bottom: 40px; }

.btn {
  display: inline-block;
  font-family: var(--sans);
  font-size: 15px;
  text-decoration: none;
  padding: 9px 22px;
  border-radius: 6px;
  border: 1px solid rgba(0,0,0,.35);
}
.btn-primary,
.btn-primary:link,
.btn-primary:visited,
.btn-primary:focus,
.btn-primary:active {
  background-color: #6aaef4;
  background-image: -webkit-linear-gradient(#a6d2ff, #4f9df0);
  background-image: linear-gradient(#a6d2ff, #4f9df0);
  color: #0d2340;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.6), 0 1px 2px rgba(0,0,0,.3);
}
.btn-primary:hover {
  color: #000;
  background-color: #7ab8f5;
  background-image: -webkit-linear-gradient(#b8dbff, #61a8f3);
  background-image: linear-gradient(#b8dbff, #61a8f3);
}
.btn-primary:active {
  background-image: -webkit-linear-gradient(#4f9df0, #8cc4fc);
  background-image: linear-gradient(#4f9df0, #8cc4fc);
}
.btn-plain,
.btn-plain:link,
.btn-plain:visited,
.btn-plain:focus,
.btn-plain:active {
  background-color: #f2f2f2;
  background-image: -webkit-linear-gradient(#fff, #e8e8e8);
  background-image: linear-gradient(#fff, #e8e8e8);
  color: #222;
  box-shadow: inset 0 1px 0 #fff, 0 1px 2px rgba(0,0,0,.3);
}
.btn-plain:hover { color: #000; }
.btn-plain:active {
  background-image: -webkit-linear-gradient(#e2e2e2, #f6f6f6);
  background-image: linear-gradient(#e2e2e2, #f6f6f6);
}
.btn:focus { outline: none; }
.btn:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

/* Étagère sous la capture principale */
.shelf-shot { position: relative; padding-bottom: 26px; }
.shelf-shot::after {
  content: "";
  position: absolute;
  left: -24px; right: -24px; bottom: 0;
  height: 18px;
  background: linear-gradient(#d8955a, #b47240 40%, #7d4a26);
  box-shadow: 0 6px 10px rgba(0,0,0,.35);
}

.window {
  border-radius: 6px 6px 3px 3px;
  overflow: hidden;
  box-shadow: 0 18px 40px rgba(0,0,0,.4), 0 0 0 1px rgba(0,0,0,.25);
  background: #fff;
  margin: 0 auto;
}
.hero .window { max-width: 900px; position: relative; z-index: 1; margin-bottom: -2px; }

/* ---------- Sections papier ---------- */

section { padding: 72px 0; }
section + section { border-top: 1px solid var(--rule); }

.kicker {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: bold;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin: 0 0 8px;
}

h2 { font-size: 36px; line-height: 1.2; margin: 0 0 18px; }
h3 { font-size: 22px; margin: 0 0 8px; }

.center { text-align: center; }
.intro { max-width: 720px; margin: 0 auto; }
.intro p { font-size: 20px; color: var(--ink-soft); }

/* Trois raisons */
.reasons {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 28px;
  margin-top: 44px;
}
.reason {
  background: #fffdf8;
  border: 1px solid var(--rule);
  border-radius: 4px;
  padding: 26px 26px 22px 42px;
  position: relative;
  box-shadow: 0 1px 0 #fff inset, 0 2px 6px rgba(80,50,20,.06);
}
.reason::before {
  content: "";
  position: absolute;
  top: 0; bottom: 0; left: 24px;
  width: 1px;
  background: var(--margin-line);
}
.reason p { margin: 0; color: var(--ink-soft); font-size: 17px; }

/* Fonctionnalités avec captures */
.feature {
  display: grid;
  grid-template-columns: 5fr 7fr;
  gap: 48px;
  align-items: center;
}
.feature.flip { grid-template-columns: 7fr 5fr; }
.feature.flip .feature-text { order: 2; }
.feature-text p { color: var(--ink-soft); }
.feature-text ul { padding-left: 0; list-style: none; margin: 18px 0 0; }
.feature-text li { padding-left: 26px; position: relative; margin-bottom: 8px; color: var(--ink-soft); font-size: 17px; }
.feature-text li::before { content: "❦"; position: absolute; left: 0; color: var(--accent); }

.paper-alt { background: var(--paper-deep); }

/* Intercalaires colorés */
.tabs { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; padding: 0; list-style: none; }
.tabs li {
  font-family: var(--sans);
  font-size: 12px;
  font-weight: bold;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: var(--ink-soft);
  background: #fffdf8;
  border: 1px solid var(--rule);
  border-left: 5px solid var(--c);
  padding: 4px 10px 4px 8px;
  border-radius: 3px;
}

/* Fichiers */
.files {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  align-items: center;
}
pre.tree {
  margin: 0;
  background: #fffdf8;
  border: 1px solid var(--rule);
  border-radius: 4px;
  padding: 22px 24px;
  font-family: Menlo, Monaco, "Courier New", monospace;
  font-size: 14px;
  line-height: 1.7;
  color: var(--ink);
  overflow-x: auto;
  box-shadow: 0 2px 6px rgba(80,50,20,.06);
}
pre.tree .c { color: #a08c74; }

/* Compatibilité */
.compat {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin: 36px 0 0;
  padding: 0;
  list-style: none;
}
.compat li {
  text-align: center;
  background: #fffdf8;
  border: 1px solid var(--rule);
  border-radius: 4px;
  padding: 18px 10px;
}
.compat strong { display: block; font-size: 20px; }
.compat span { font-family: var(--sans); font-size: 13px; color: var(--ink-soft); }

/* Téléchargement */
.download { text-align: center; }
.download .wrap { max-width: 760px; }
.download h2 { color: #fde9c6; }
.download p { color: #f3dcb6; font-size: 19px; }
.download .note { font-family: var(--sans); font-size: 14px; color: #e7c99c; margin-top: 18px; }
.download .actions { margin: 26px 0 0; }
.download a:not(.btn) { color: #fde9c6; }

.badge {
  display: inline-block;
  font-family: var(--sans);
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
  background: rgba(0,0,0,.25);
  color: var(--gold);
  border: 1px solid rgba(227,194,122,.5);
  padding: 3px 10px;
  border-radius: 20px;
  margin-bottom: 14px;
}

footer {
  background: var(--wood-dark);
  color: #cfae86;
  font-family: var(--sans);
  font-size: 13px;
  padding: 22px 0;
}
footer .wrap { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
footer a { color: #f0d3a8; }

/* ---------- Petits écrans ---------- */

@media (max-width: 820px) {
  body { font-size: 17px; }
  .wrap { padding: 0 16px; }
  .nav .hide-sm { display: none; }
  .hero h1 { font-size: 38px; }
  .hero .lede { font-size: 18px; }
  h2 { font-size: 28px; }
  section { padding: 52px 0; }
  .reasons, .feature, .feature.flip, .files { grid-template-columns: 1fr; gap: 28px; }
  .feature.flip .feature-text { order: 0; }
  .compat { grid-template-columns: 1fr 1fr; }
  .shelf-shot::after { left: -16px; right: -16px; }
}

/* Icône de l'application */
.brand { display: inline-flex; align-items: center; gap: 10px; }
.brand img { width: 32px; height: 32px; }
.app-icon { width: 128px; height: 128px; margin: 0 auto 4px; }
@media (max-width: 820px) { .app-icon { width: 96px; height: 96px; } }
.feature-text .tabs li { padding-left: 8px; margin-bottom: 0; font-size: 12px; }
.feature-text .tabs li::before { content: none; }
@media (max-width: 820px) {
  .compat strong { font-size: 17px; }
  .compat span { line-height: 1.4; display: block; }
}
