:root {
  --bg: #faf9f6;
  --surface: #ffffff;
  --ink: #1d1f23;
  --muted: #5f6672;
  --line: #e6e3dc;
  --accent: #1f5f8b;
  --accent-ink: #ffffff;
  --accent-soft: #e8f1f8;
  --cta: #c7511f;
  --cta-ink: #ffffff;
  --radius: 10px;
  --maxw: 760px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #15171b;
    --surface: #1e2127;
    --ink: #ebebe6;
    --muted: #a3a9b4;
    --line: #2d313a;
    --accent: #6fb1e3;
    --accent-ink: #0f1b26;
    --accent-soft: #1b2a38;
    --cta: #f0883e;
    --cta-ink: #1a1208;
  }
}

* { box-sizing: border-box; }

html { font-size: 17px; -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: Georgia, "Iowan Old Style", "Palatino Linotype", "Book Antiqua", serif;
  line-height: 1.65;
}

.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 16px; }

a { color: var(--accent); }
a:hover { text-decoration-thickness: 2px; }

h1, h2, h3, .brand-name, .site-nav, .card-title, .btn, .meta, .site-footer, .toc, .product-card {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

h1 { font-size: 2rem; line-height: 1.2; margin: 0 0 .5rem; letter-spacing: -.01em; }
h2 { font-size: 1.45rem; line-height: 1.3; margin: 2.2rem 0 .8rem; }
h3 { font-size: 1.15rem; margin: 1.6rem 0 .5rem; }
p, ul, ol { margin: 0 0 1.1rem; }
li { margin-bottom: .35rem; }
img { max-width: 100%; height: auto; border-radius: var(--radius); }
blockquote {
  margin: 1.2rem 0; padding: .8rem 1rem; border-left: 4px solid var(--accent);
  background: var(--accent-soft); border-radius: 0 var(--radius) var(--radius) 0;
}
table { width: 100%; border-collapse: collapse; margin: 1.2rem 0; font-size: .95rem; }
th, td { text-align: left; padding: .55rem .6rem; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; font-size: .85rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }

/* En-tête */
.site-header { border-bottom: 1px solid var(--line); background: var(--surface); }
.site-header .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .5rem 1rem; padding-top: .9rem; padding-bottom: .9rem; }
.brand { display: inline-flex; align-items: center; gap: .5rem; text-decoration: none; color: var(--ink); font-weight: 700; font-size: 1.15rem; }
.brand-mark { color: var(--accent); font-size: 1.3rem; }
.site-nav { display: flex; flex-wrap: wrap; gap: .3rem .9rem; font-size: .9rem; }
.site-nav a { color: var(--muted); text-decoration: none; }
.site-nav a:hover, .site-nav a.active { color: var(--accent); }

/* Accueil */
.hero { padding: 2.4rem 0 1.2rem; }
.hero h1 { font-size: 2.2rem; }
.hero p { color: var(--muted); font-size: 1.1rem; max-width: 36rem; }
.hero-with-img { display: grid; gap: 1.4rem; align-items: center; }
.hero-img { width: 100%; height: auto; border-radius: var(--radius); border: 1px solid var(--line); }
@media (min-width: 640px) {
  .hero-with-img { grid-template-columns: 1.15fr 1fr; }
}

.card-list { list-style: none; padding: 0; margin: 1.5rem 0 2.5rem; display: grid; gap: 1rem; }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; display: flex; flex-direction: column; }
.card-img { display: block; aspect-ratio: 3 / 2; overflow: hidden; background: var(--accent-soft); }
.card-img img { width: 100%; height: 100%; object-fit: cover; border-radius: 0; transition: transform .3s ease; }
.card:hover .card-img img { transform: scale(1.03); }
.card-body { padding: 1rem 1.2rem 1.1rem; }
.card-title { font-size: 1.15rem; font-weight: 700; margin: 0 0 .35rem; line-height: 1.3; }
.card-title a { color: var(--ink); text-decoration: none; }
.card-title a:hover { color: var(--accent); }
.card p { margin: 0 0 .5rem; color: var(--muted); font-size: .97rem; }
.meta { font-size: .82rem; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.meta a { color: var(--accent); text-decoration: none; }

/* Article */
.article-header { padding: 2rem 0 1rem; border-bottom: 1px solid var(--line); margin-bottom: 1.6rem; }
.article-header .lead { font-size: 1.15rem; color: var(--muted); margin-top: .8rem; }
.article-img { width: 100%; height: auto; aspect-ratio: 2 / 1; object-fit: cover; border-radius: var(--radius); border: 1px solid var(--line); margin: 0 0 1.6rem; }
.notice {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  font-size: .85rem; color: var(--muted); background: var(--surface);
  border: 1px dashed var(--line); border-radius: var(--radius); padding: .6rem .9rem; margin: 0 0 1.6rem;
}
.article-body { font-size: 1.05rem; }
.article-footer { margin: 3rem 0 2rem; padding-top: 1.5rem; border-top: 1px solid var(--line); }
.article-footer h2 { margin-top: 0; font-size: 1.2rem; }

/* Fiche produit */
.product-card {
  display: grid; gap: .4rem; background: var(--surface); border: 1px solid var(--line);
  border-left: 5px solid var(--cta); border-radius: var(--radius); padding: 1rem 1.2rem; margin: 1.6rem 0;
}
.product-card .product-title { font-weight: 700; font-size: 1.08rem; margin: 0; }
.product-card .product-price { color: var(--muted); font-size: .9rem; margin: 0; }
.product-card .product-note { margin: 0; font-size: .97rem; }
.btn {
  display: inline-block; justify-self: start; margin-top: .4rem; padding: .55rem 1rem; border-radius: 999px;
  background: var(--cta); color: var(--cta-ink); font-weight: 700; font-size: .92rem; text-decoration: none;
}
.btn:hover { filter: brightness(1.08); text-decoration: none; }

/* Pied de page */
.site-footer { margin-top: 3rem; border-top: 1px solid var(--line); background: var(--surface); padding: 1.6rem 0 2rem; font-size: .85rem; color: var(--muted); }
.site-footer p { margin: 0 0 .6rem; }
.footer-links a { color: var(--muted); }

@media (min-width: 640px) {
  .card-list { grid-template-columns: 1fr 1fr; }
  .card-list .card.featured { grid-column: 1 / -1; }
  .card.featured { flex-direction: row; }
  .card.featured .card-img { flex: 0 0 48%; aspect-ratio: auto; }
  .card.featured .card-body { display: flex; flex-direction: column; justify-content: center; }
}
