
@import url('https://fonts.googleapis.com/css2?family=Fraunces:ital,wght@0,400;0,700;0,900;1,400;1,700;1,900&family=IBM+Plex+Mono:wght@300;400;500&family=DM+Sans:wght@300;400;500&display=swap');

:root {
  --bg:       #0c1710;
  --bg2:      #111f15;
  --green:    #64c878;
  --sage:     #c8d9a0;
  --forest:   #162a1c;
  --mid:      #1e3a26;
  --text:     #e8f0e0;
  --muted:    #4a6a4c;
  --dimmed:   #2a4a2c;
  --red:      #c0392b;
  --cream:    #f2efe8;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg) !important;
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  min-height: 100vh;
  overflow-x: hidden;
  cursor: default;
}

/* =====================
   SONAR CANVAS
===================== */
#sonar {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

/* =====================
   LAYOUT
===================== */
.page {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* =====================
   NAV
===================== */
nav {
  padding: 28px 48px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  animation: fade-down 0.8s ease both;
}

.nav-logo {
  font-family: 'Fraunces', serif;
  font-size: 22px;
  font-weight: 900;
  font-style: italic;
  color: var(--sage);
  letter-spacing: -0.01em;
  display: flex;
  align-items: center;
  gap: 8px;
}

.nav-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--green);
  box-shadow: 0 0 8px rgba(100,200,120,0.7);
  animation: pulse-dot 2s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.35; transform: scale(0.65); }
}

.nav-right {
  display: flex;
  align-items: center;
  gap: 24px;
}

.nav-link {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  transition: color 0.2s;
}

.nav-link:hover { color: var(--sage); }

.nav-badge {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 8px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--green);
  border: 1px solid rgba(100,200,120,0.3);
  padding: 4px 10px;
  border-radius: 2px;
}

/* =====================
   HERO
===================== */
.hero {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 60px 48px 80px;
  max-width: 820px;
  margin: 0 auto;
  width: 100%;
}

.hero-eyebrow {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: 28px;
  opacity: 0;
  animation: fade-up 0.7s 0.2s ease both;
  display: flex;
  align-items: center;
  gap: 10px;
}

.hero-eyebrow::before,
.hero-eyebrow::after {
  content: '';
  width: 32px;
  height: 1px;
  background: rgba(100,200,120,0.4);
}

.hero-title {
  font-family: 'Fraunces', serif;
  font-size: clamp(64px, 12vw, 110px);
  font-weight: 900;
  font-style: italic;
  line-height: 0.9;
  letter-spacing: -0.03em;
  color: var(--text);
  margin-bottom: 8px;
  opacity: 0;
  animation: fade-up 0.8s 0.35s ease both;
}

.hero-title .accent { color: var(--green); }

.hero-subtitle {
  font-family: 'Fraunces', serif;
  font-size: clamp(18px, 3vw, 26px);
  font-weight: 400;
  font-style: italic;
  color: var(--muted);
  margin-bottom: 36px;
  opacity: 0;
  animation: fade-up 0.8s 0.5s ease both;
}

.hero-desc {
  font-size: 15px;
  font-weight: 300;
  line-height: 1.85;
  color: #6a8a6c;
  max-width: 500px;
  margin-bottom: 48px;
  opacity: 0;
  animation: fade-up 0.8s 0.65s ease both;
}

.hero-desc strong {
  color: var(--sage);
  font-weight: 500;
}

/* =====================
   FORM
===================== */
.form-wrap {
  width: 100%;
  max-width: 460px;
  opacity: 0;
  animation: fade-up 0.8s 0.8s ease both;
}

.form-row {
  display: flex;
  gap: 0;
  border: 1px solid rgba(100,200,120,0.25);
  background: rgba(22,42,28,0.6);
  backdrop-filter: blur(12px);
  transition: border-color 0.2s;
}

.form-row:focus-within {
  border-color: rgba(100,200,120,0.6);
  box-shadow: 0 0 0 3px rgba(100,200,120,0.08);
}

.form-input {
  flex: 1;
  background: none;
  border: none;
  outline: none;
  padding: 16px 20px;
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  font-weight: 300;
  color: var(--text);
  min-width: 0;
}

.form-input::placeholder {
  color: var(--dimmed);
  font-style: italic;
}

.form-btn {
  background: var(--green);
  border: none;
  padding: 16px 24px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--forest);
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s, color 0.2s;
  white-space: nowrap;
  flex: 1;
  width: 100%;
}

.form-btn:hover {
  background: var(--sage);
}

.form-note {
  margin-top: 10px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.12em;
  color: var(--dimmed);
  text-align: center;
}

.form-note span {
  color: var(--muted);
}

/* =====================
   STATS STRIP
===================== */
.stats {
  display: flex;
  justify-content: center;
  gap: 0;
  margin-top: 64px;
  border-top: 1px solid rgba(100,200,120,0.08);
  border-bottom: 1px solid rgba(100,200,120,0.08);
  opacity: 0;
  animation: fade-up 0.8s 1s ease both;
}

.stat {
  flex: 1;
  max-width: 160px;
  text-align: center;
  padding: 24px 16px;
  border-right: 1px solid rgba(100,200,120,0.08);
}
.stat:last-child { border-right: none; }

.stat-num {
  font-family: 'Fraunces', serif;
  font-size: 32px;
  font-weight: 700;
  color: var(--sage);
  line-height: 1;
  margin-bottom: 4px;
}

.stat-label {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 8px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--dimmed);
}

/* =====================
   SECTION : POURQUOI
===================== */
.why-section {
  padding: 100px 48px;
  max-width: 900px;
  margin: 0 auto;
  width: 100%;
}

.section-eyebrow {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: 20px;
}

.why-title {
  font-family: 'Fraunces', serif;
  font-size: clamp(32px, 5vw, 52px);
  font-weight: 900;
  font-style: italic;
  color: var(--text);
  line-height: 1.05;
  margin-bottom: 60px;
  max-width: 600px;
}

.why-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 1px;
  background: rgba(100,200,120,0.08);
  border: 1px solid rgba(100,200,120,0.08);
}

.why-card {
  background: var(--bg2);
  padding: 32px 28px;
  transition: background 0.2s;
}

.why-card:hover { background: rgba(22,42,28,0.9); }

.why-icon {
  font-size: 22px;
  margin-bottom: 16px;
}

.why-card-title {
  font-family: 'Fraunces', serif;
  font-size: 18px;
  font-weight: 700;
  color: var(--sage);
  margin-bottom: 10px;
  line-height: 1.2;
}

.why-card-body {
  font-size: 13px;
  font-weight: 300;
  color: #5a7a5c;
  line-height: 1.8;
  text-align: justify;
}

/* =====================
   APERÇU ÉDITION
===================== */
.preview-section {
  padding: 0 48px 100px;
  max-width: 900px;
  margin: 0 auto;
  width: 100%;
}

.preview-label {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 9px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: 20px;
}

.preview-title {
  font-family: 'Fraunces', serif;
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 900;
  font-style: italic;
  color: var(--text);
  margin-bottom: 32px;
}

/* Mini preview newsletter */
.mini-newsletter {
  border: 1px solid rgba(100,200,120,0.15);
  background: rgba(22,42,28,0.4);
  backdrop-filter: blur(8px);
  overflow: hidden;
}

.mn-header {
  background: var(--forest);
  padding: 18px 28px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid rgba(100,200,120,0.12);
  position: relative;
  overflow: hidden;
}

/* Sonar rings dans le header */
.mn-ring {
  position: absolute;
  border-radius: 50%;
  border: 1px solid rgba(100,200,120,0.07);
  pointer-events: none;
}

.mn-logo {
  font-family: 'Fraunces', serif;
  font-size: 20px;
  font-weight: 900;
  font-style: italic;
  color: var(--sage);
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 6px;
}

.mn-meta {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 9px;
  color: var(--dimmed);
  letter-spacing: 0.15em;
  position: relative;
  z-index: 1;
}

.mn-alert {
  background: var(--red);
  padding: 6px 28px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 8px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #faf8f3;
}

.mn-body { padding: 24px 28px; }

.mn-card {
  border: 1px solid rgba(100,200,120,0.1);
  padding: 20px 22px;
  margin-bottom: 12px;
}

.mn-card:last-child { margin-bottom: 0; }

.mn-card-title {
  font-family: 'Fraunces', serif;
  font-size: 17px;
  font-weight: 700;
  color: var(--sage);
  margin-bottom: 6px;
}

.mn-card-body {
  font-size: 12px;
  font-weight: 300;
  color: #5a7a5c;
  line-height: 1.75;
  text-align: justify;
}

.mn-blur {
  filter: blur(3.5px);
  pointer-events: none;
  user-select: none;
}

/* =====================
   CTA FINAL
===================== */
.cta-section {
  padding: 80px 48px 100px;
  text-align: center;
  border-top: 1px solid rgba(100,200,120,0.07);
  position: relative;
  overflow: hidden;
}

.cta-glow {
  position: absolute;
  width: 600px; height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(100,200,120,0.04) 0%, transparent 70%);
  top: 50%; left: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
}

.cta-title {
  font-family: 'Fraunces', serif;
  font-size: clamp(36px, 6vw, 62px);
  font-weight: 900;
  font-style: italic;
  color: var(--text);
  line-height: 1;
  margin-bottom: 16px;
  position: relative;
}

.cta-sub {
  font-size: 14px;
  font-weight: 300;
  color: var(--muted);
  margin-bottom: 40px;
  position: relative;
}

.cta-form {
  max-width: 400px;
  margin: 0 auto;
  position: relative;
}

/* =====================
   FOOTER
===================== */
footer {
  padding: 24px 48px;
  border-top: 1px solid rgba(100,200,120,0.06);
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.footer-logo {
  font-family: 'Fraunces', serif;
  font-size: 16px;
  font-weight: 900;
  font-style: italic;
  color: var(--dimmed);
}

.footer-meta {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 8px;
  color: var(--dimmed);
  letter-spacing: 0.12em;
  opacity: 0.6;
}

/* =====================
   ANIMATIONS
===================== */
@keyframes fade-up {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

@keyframes fade-down {
  from { opacity: 0; transform: translateY(-10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* =====================
   SUCCESS STATE
===================== */
.success-msg {
  display: none;
  text-align: center;
  padding: 20px;
}

.success-msg.visible { display: block; }

.success-icon { font-size: 28px; margin-bottom: 8px; }

.success-title {
  font-family: 'Fraunces', serif;
  font-size: 22px;
  font-weight: 700;
  font-style: italic;
  color: var(--sage);
  margin-bottom: 6px;
}

.success-sub {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 10px;
  color: var(--muted);
  letter-spacing: 0.1em;
}


/* =====================
   GHOST OVERRIDES
===================== */

/* Nav logo - lien */
.nav-logo { text-decoration: none; }

/* Posts grid sur la landing */
.editions-section {
  padding: 60px 48px;
  background: var(--bg2);
  position: relative;
  z-index: 1;
}

.editions-inner {
  max-width: 1000px;
  margin: 0 auto;
}

.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 20px;
  margin: 32px 0;
}

.post-card {
  background: var(--surface);
  border: 1px solid var(--border);
  transition: border-color 0.2s;
}

.post-card:hover { border-color: var(--green); }

.post-card-link {
  display: block;
  padding: 24px 28px;
  text-decoration: none;
  color: inherit;
}

.post-card-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.post-card-date {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
}

.post-card-tag {
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  background: var(--red);
  color: #faf8f3;
  padding: 3px 8px;
}

.post-card-title {
  font-family: var(--serif);
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
  line-height: 1.2;
  margin-bottom: 8px;
}

.post-card-excerpt {
  font-size: 13px;
  line-height: 1.7;
  color: var(--muted);
  font-weight: 300;
  margin-bottom: 14px;
}

.post-card-cta {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--green);
}

/* Pagination */
.pagination {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.pagination a {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--green);
  padding: 8px 16px;
  border: 1px solid var(--border);
  text-decoration: none;
  transition: border-color 0.2s;
}

.pagination a:hover { border-color: var(--green); }

/* Post individuel */
.post-header {
  background: var(--dark);
  padding: 60px 48px 48px;
}

.post-header-inner {
  max-width: 800px;
  margin: 0 auto;
}

.post-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.post-date {
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--green);
}

.post-tag {
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  background: var(--red);
  color: #faf8f3;
  padding: 3px 8px;
}

.post-title {
  font-family: var(--serif);
  font-size: clamp(28px, 4vw, 48px);
  font-weight: 900;
  color: var(--text);
  line-height: 1.1;
  margin-bottom: 16px;
}

.post-excerpt {
  font-size: 15px;
  line-height: 1.7;
  color: var(--muted);
  font-weight: 300;
}

.post-content-wrapper {
  padding: 48px;
  background: var(--surface);
}

.post-content {
  max-width: 960px;
  margin: 0 auto;
}

/* Ghost content */
.gh-content h2 {
  font-family: var(--serif);
  font-size: 24px;
  font-weight: 700;
  color: var(--dark);
  margin: 28px 0 14px;
}

.gh-content p {
  font-size: 15px;
  line-height: 1.85;
  color: #3a3a34;
  font-weight: 300;
  margin-bottom: 18px;
}

.gh-content a { color: var(--green); text-decoration: underline; }
.gh-content strong { font-weight: 500; color: var(--dark); }

/* Post nav */
.post-nav {
  border-top: 1px solid var(--border);
  padding: 32px 48px;
  background: var(--surface);
}

.post-nav-inner {
  max-width: 960px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  gap: 20px;
}

.post-nav-link {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-width: 320px;
  text-decoration: none;
}

.post-nav-next { align-items: flex-end; text-align: right; }

.post-nav-label {
  font-family: var(--mono);
  font-size: 8px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
}

.post-nav-title {
  font-family: var(--serif);
  font-size: 16px;
  font-weight: 700;
  color: var(--dark);
  line-height: 1.2;
}

/* Newsletter dans post - responsive */
.gh-content table {
  width: 100% !important;
  max-width: 100% !important;
}

/* Ghost card assets */
.kg-width-wide { margin-left: -48px; margin-right: -48px; }
.kg-width-full { margin-left: calc(50% - 50vw); margin-right: calc(50% - 50vw); width: 100vw; }
.kg-image-card img { width: 100%; }

/* Error page */
.error-section {
  padding: 80px 48px;
  text-align: center;
  background: var(--bg);
}

/* Responsive */
@media (max-width: 768px) {
  nav { padding: 20px 24px; }
  .hero { padding: 48px 24px 40px; }
  .editions-section { padding: 40px 24px; }
  .posts-grid { grid-template-columns: 1fr; }
  .post-header { padding: 40px 24px 32px; }
  .post-content-wrapper { padding: 32px 24px; }
  .post-nav { padding: 24px; }
  .why-grid { grid-template-columns: 1fr; gap: 16px; }
}
