/* ============================================================
   Journal d'un CRS — site vitrine
   ============================================================ */

:root {
  --ink: #0e1117;
  --ink-2: #171b23;
  --ink-3: #20252f;
  --paper: #f3efe6;
  --paper-dim: #c9c2b2;
  --accent: #c69a3f;
  --accent-dim: #8a7232;
  --red: #8c2b26;
  --line: rgba(243, 239, 230, 0.12);
  --max: 1120px;
  --serif: "Iowan Old Style", "Palatino Linotype", Georgia, "Times New Roman", serif;
  --sans: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --radius: 2px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

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

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

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

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

h1, h2, h3 {
  font-family: var(--serif);
  font-weight: 600;
  letter-spacing: 0.01em;
  margin: 0 0 0.5em;
}

h2 {
  font-size: clamp(1.7rem, 3vw, 2.4rem);
  color: var(--paper);
}

.eyebrow {
  display: inline-block;
  font-family: var(--sans);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 0.9em;
}

p { color: #d8d3c6; }

.lede {
  font-size: 1.1rem;
  color: var(--paper);
}

/* ---------- header ---------- */
header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  background: rgba(14, 17, 23, 0.85);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}

.brand {
  font-family: var(--serif);
  font-size: 1.05rem;
  letter-spacing: 0.02em;
}

.brand strong { color: var(--accent); }

.nav-links {
  display: flex;
  gap: 28px;
  font-size: 0.88rem;
}

.nav-links a {
  color: var(--paper-dim);
  transition: color 0.2s;
}
.nav-links a:hover { color: var(--accent); }

.nav-cta {
  background: var(--accent);
  color: var(--ink);
  padding: 9px 18px;
  border-radius: var(--radius);
  font-size: 0.85rem;
  font-weight: 600;
}
.nav-cta:hover { background: #d9ad55; }

.burger {
  display: none;
  background: none;
  border: none;
  color: var(--paper);
  font-size: 1.6rem;
  cursor: pointer;
}

/* ---------- hero ---------- */
.hero {
  position: relative;
  padding: 150px 0 90px;
  overflow: hidden;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at top right, rgba(198,154,63,0.12), transparent 60%);
  pointer-events: none;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  gap: 60px;
  align-items: center;
}

.hero h1 {
  font-size: clamp(2.2rem, 4.2vw, 3.4rem);
  line-height: 1.1;
}

.hero .subtitle {
  font-size: 1.15rem;
  color: var(--accent);
  font-family: var(--serif);
  font-style: italic;
  margin-bottom: 1em;
}

.hero .by {
  color: var(--paper-dim);
  font-size: 0.95rem;
  margin-bottom: 1.8em;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.cta-row {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 1.6em;
}

.btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 14px 26px;
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-weight: 600;
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform 0.15s, background 0.2s, border-color 0.2s;
}
.btn:hover { transform: translateY(-1px); }

.btn-primary {
  background: var(--accent);
  color: var(--ink);
}
.btn-primary:hover { background: #d9ad55; }

.btn-ghost {
  background: transparent;
  border-color: var(--paper-dim);
  color: var(--paper);
}
.btn-ghost:hover { border-color: var(--paper); }

.hero-cover {
  position: relative;
  display: flex;
  justify-content: center;
}

.hero-cover img {
  width: 100%;
  max-width: 340px;
  box-shadow: 0 30px 60px -20px rgba(0,0,0,0.6), 0 0 0 1px var(--line);
  border-radius: 3px;
}

.badge-note {
  margin-top: 1.4em;
  font-size: 0.8rem;
  color: var(--paper-dim);
  text-align: center;
  max-width: 320px;
}

/* ---------- facts strip ---------- */
.facts {
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  background: var(--ink-2);
}
.facts .wrap {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  padding: 28px 24px;
  gap: 20px;
}
.fact { text-align: center; }
.fact span {
  display: block;
  font-family: var(--serif);
  font-size: 1.3rem;
  color: var(--accent);
}
.fact small {
  color: var(--paper-dim);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ---------- section generic ---------- */
section { padding: 100px 0; position: relative; }
.section-alt { background: var(--ink-2); }

.section-head {
  max-width: 640px;
  margin-bottom: 2.6em;
}

/* ---------- livre / presentation ---------- */
.livre-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 60px;
  align-items: start;
}

.toc {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: 10px;
}
.toc li {
  display: flex;
  gap: 14px;
  align-items: baseline;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
  font-size: 0.95rem;
  color: var(--paper);
}
.toc li span.num {
  font-family: var(--serif);
  color: var(--accent);
  min-width: 26px;
}

.excerpt {
  background: var(--ink-3);
  border-left: 3px solid var(--accent);
  padding: 28px 30px;
  border-radius: var(--radius);
  margin-top: 28px;
}
.excerpt p {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.05rem;
  color: var(--paper);
  margin: 0;
}
.excerpt cite {
  display: block;
  margin-top: 14px;
  font-style: normal;
  font-size: 0.8rem;
  color: var(--paper-dim);
}

/* ---------- bg photo band ---------- */
.band {
  position: relative;
  padding: 0;
  height: 340px;
  background-size: cover;
  background-position: center;
}
.band::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(14,17,23,0.75), rgba(14,17,23,0.55) 40%, rgba(14,17,23,0.92));
}
.band-text {
  position: relative;
  z-index: 2;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 0 24px;
}
.band-text p {
  max-width: 720px;
  font-family: var(--serif);
  font-size: clamp(1.2rem, 2.4vw, 1.7rem);
  font-style: italic;
  color: var(--paper);
  margin: 0;
}

/* ---------- auteur ---------- */
.auteur-grid {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 48px;
  align-items: start;
}
.auteur-emblem {
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: var(--ink-3);
  border: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--serif);
  font-size: 3rem;
  color: var(--accent);
}

/* ---------- acheter ---------- */
.achat-card {
  background: var(--ink-3);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 40px;
  display: grid;
  grid-template-columns: 180px 1fr;
  gap: 36px;
  align-items: center;
}
.achat-card img { border-radius: 3px; box-shadow: 0 20px 40px -15px rgba(0,0,0,0.5); }

.price-row {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 10px 0 18px;
}
.price {
  font-family: var(--serif);
  font-size: 2.4rem;
  color: var(--accent);
}
.price-note { color: var(--paper-dim); font-size: 0.85rem; }

.achat-list {
  margin: 18px 0 24px;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 8px;
  font-size: 0.92rem;
  color: #d8d3c6;
}
.achat-list li::before {
  content: "— ";
  color: var(--accent);
}

.alt-buy {
  margin-top: 36px;
  padding-top: 28px;
  border-top: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
}
.alt-buy p { margin: 0; font-size: 0.92rem; }

/* ---------- newsletter ---------- */
.newsletter-card {
  background: linear-gradient(135deg, var(--ink-3), var(--ink-2));
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 48px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  align-items: center;
}

.nl-perks { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.nl-perks li { font-size: 0.92rem; color: #d8d3c6; display: flex; gap: 10px; }
.nl-perks li::before { content: "✓"; color: var(--accent); font-weight: 700; }

form.nl-form { display: grid; gap: 14px; }
.nl-form input[type="text"],
.nl-form input[type="email"] {
  width: 100%;
  padding: 13px 16px;
  background: var(--ink);
  border: 1px solid var(--line);
  color: var(--paper);
  border-radius: var(--radius);
  font-size: 0.95rem;
  font-family: var(--sans);
}
.nl-form input:focus { outline: none; border-color: var(--accent); }

.consent {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 0.78rem;
  color: var(--paper-dim);
}
.consent input { margin-top: 3px; }
.consent a { color: var(--accent); text-decoration: underline; }

.nl-msg {
  font-size: 0.85rem;
  min-height: 1.2em;
}
.nl-msg.ok { color: #7cb87f; }
.nl-msg.err { color: #d98080; }

/* ---------- footer ---------- */
footer {
  background: var(--ink-2);
  border-top: 1px solid var(--line);
  padding: 56px 0 28px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1fr;
  gap: 40px;
  margin-bottom: 36px;
}
.footer-grid h4 {
  font-family: var(--sans);
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 1em;
}
.footer-grid ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.footer-grid a { color: var(--paper-dim); font-size: 0.9rem; }
.footer-grid a:hover { color: var(--paper); }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 10px;
  padding-top: 24px;
  border-top: 1px solid var(--line);
  font-size: 0.78rem;
  color: var(--paper-dim);
}

/* ---------- legal pages ---------- */
.legal {
  padding: 150px 0 100px;
  max-width: 760px;
  margin: 0 auto;
}
.legal h1 { font-size: 2rem; }
.legal h2 { font-size: 1.3rem; margin-top: 1.6em; }
.legal p, .legal li { color: #d8d3c6; font-size: 0.95rem; }
.todo {
  background: rgba(198,154,63,0.12);
  border: 1px dashed var(--accent);
  padding: 2px 8px;
  border-radius: 3px;
  color: var(--accent);
  font-size: 0.85em;
}

/* ---------- responsive ---------- */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-cover { order: -1; }
  .livre-grid { grid-template-columns: 1fr; }
  .achat-card { grid-template-columns: 1fr; text-align: center; }
  .achat-card img { margin: 0 auto; max-width: 200px; }
  .newsletter-card { grid-template-columns: 1fr; }
  .auteur-grid { grid-template-columns: 1fr; justify-items: center; text-align: center; }
  .footer-grid { grid-template-columns: 1fr; }
  .facts .wrap { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 760px) {
  .nav-links, .nav-cta { display: none; }
  .burger { display: block; }
  .nav-links.open {
    display: flex;
    position: absolute;
    top: 68px; left: 0; right: 0;
    background: var(--ink-2);
    flex-direction: column;
    padding: 20px 24px;
    border-bottom: 1px solid var(--line);
  }
  .alt-buy { flex-direction: column; align-items: stretch; text-align: center; }
}
