/* ============================================================
   AFFILIATE THEME — VARIANTE V3-D : "EDITORIAL SERIF"
   Identité : Presse premium / Magazine longform
   Fonts : Playfair Display (headings) + Source Sans 3 (body)
   Layout : Colonne étroite centrée, typographie dominante
   Cards : Bordure gauche épaisse, fond transparent
   Buttons : Pill avec bordure outline fine
   Header : Top bar fin + logo centré
   Footer : Minimal centered 1 ligne
   Sites cibles : guide-emailing.com, mdpguide.com
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,700;0,900;1,400;1,700&family=Source+Sans+3:wght@300;400;500;600&display=swap');

/* ─── CSS VARIABLES ─────────────────────────────────────────── */
:root {
  --primary:       #0B996E;
  --primary-dark:  #077a57;
  --primary-light: #e6f7f2;
  --secondary:     #1a1a2e;
  --accent:        #0EA5E9;
  --accent-light:  #e0f2fe;
  --success:       #16a34a;
  --warning:       #d97706;
  --danger:        #dc2626;
  --background:    #FAFAF8;
  --surface:       #F5F5F0;
  --surface-2:     #EDEDEA;
  --border:        #D4D4C8;
  --border-strong: #1a1a2e;
  --text:          #1a1a2e;
  --text-light:    #5a5a6e;
  --text-muted:    #9a9aae;

  --font-heading: 'Playfair Display', Georgia, 'Times New Roman', serif;
  --font-body:    'Source Sans 3', system-ui, -apple-system, sans-serif;
  --font-mono:    'Courier New', monospace;

  --radius-sm:   2px;
  --radius:      3px;
  --radius-lg:   4px;
  --radius-xl:   6px;
  --radius-full: 9999px;

  --shadow-sm: 0 1px 3px rgba(26,26,46,.05);
  --shadow:    0 2px 8px rgba(26,26,46,.07);
  --shadow-lg: 0 8px 24px rgba(26,26,46,.09);
  --shadow-xl: 0 16px 40px rgba(26,26,46,.12);

  --max-width:      1100px;
  --content-width:  680px;
  --sidebar-width:  280px;
  --gap:            clamp(1rem, 3vw, 2rem);
  --section-py:     clamp(2.5rem, 7vw, 5rem);

  --transition: 0.18s ease;
  --border-accent-width: 3px;
}

/* ─── RESET ──────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 17px; }
body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--background);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  font-weight: 400;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-decoration: underline; text-underline-offset: 3px; text-decoration-thickness: 1px; transition: color var(--transition); }
a:hover { color: var(--primary-dark); text-decoration-thickness: 2px; }

/* ─── TYPOGRAPHY — SERIF ÉDITORIAL ──────────────────────────── */
h1,h2,h3,h4,h5,h6 {
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
  color: var(--secondary);
  letter-spacing: -0.01em;
}
h1 { font-size: clamp(2rem, 5vw, 3.25rem); font-weight: 900; }
h2 { font-size: clamp(1.5rem, 3.5vw, 2.125rem); margin-top: 3rem; margin-bottom: 1.25rem; border-bottom: 1px solid var(--border); padding-bottom: 0.5rem; }
h3 { font-size: clamp(1.15rem, 2.5vw, 1.5rem); margin-top: 2.5rem; margin-bottom: 0.75rem; }
h4 { font-size: 1.125rem; margin-top: 2rem; margin-bottom: 0.5rem; }
p  { margin-bottom: 1.5rem; }
ul,ol { margin-bottom: 1.5rem; padding-left: 2rem; }
li { margin-bottom: 0.5rem; line-height: 1.65; }
strong { font-weight: 600; }

/* Chapeau éditorial */
.lead {
  font-size: 1.2rem;
  line-height: 1.65;
  color: var(--text-light);
  font-weight: 300;
  font-style: italic;
  margin-bottom: 2rem;
}

blockquote {
  border-left: var(--border-accent-width) solid var(--primary);
  padding: 1.25rem 2rem;
  background: transparent;
  margin: 2rem 0;
  font-family: var(--font-heading);
  font-style: italic;
  font-size: 1.2rem;
  color: var(--text);
}
blockquote cite {
  display: block;
  margin-top: 0.75rem;
  font-size: 0.875rem;
  font-style: normal;
  font-family: var(--font-body);
  color: var(--text-muted);
}

/* ─── LAYOUT NARROW EDITORIAL ────────────────────────────────── */
.container {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--gap);
}
.container--narrow {
  max-width: var(--content-width);
  margin: 0 auto;
  padding: 0 var(--gap);
}
.site-layout {
  display: grid;
  grid-template-columns: 1fr var(--sidebar-width);
  gap: 4rem;
  align-items: start;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 3rem var(--gap);
}
@media (max-width: 1024px) {
  .site-layout { grid-template-columns: 1fr; }
  .sidebar { display: none; }
}

/* ─── HEADER — TOP BAR MINIMALISTE ──────────────────────────── */
.site-topbar {
  background: var(--secondary);
  color: rgba(255,255,255,.65);
  font-size: 0.75rem;
  font-family: var(--font-body);
  padding: 0.4rem var(--gap);
  text-align: center;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.site-topbar a { color: rgba(255,255,255,.85); text-decoration: none; }

.site-header {
  position: sticky;
  top: 0; left: 0; right: 0;
  background: var(--background);
  border-bottom: 1px solid var(--border);
  z-index: 100;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 var(--gap);
}
.site-logo {
  font-family: var(--font-heading);
  font-size: 1.375rem;
  font-weight: 900;
  color: var(--secondary);
  text-decoration: none;
  letter-spacing: -0.02em;
  font-style: italic;
}
.site-logo:hover { color: var(--primary); }
.site-logo .logo-tagline {
  display: block;
  font-family: var(--font-body);
  font-style: normal;
  font-size: 0.65rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-muted);
  font-weight: 400;
  margin-top: -2px;
}

.site-nav { display: flex; align-items: center; gap: 0.25rem; }
.site-nav a {
  font-family: var(--font-body);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--text-light);
  padding: 0.5rem 0.875rem;
  letter-spacing: 0.02em;
  text-decoration: none;
  border-radius: 0;
  border-bottom: 2px solid transparent;
  transition: all var(--transition);
}
.site-nav a:hover { color: var(--primary); border-bottom-color: var(--primary); }

.nav-cta {
  border: 1.5px solid var(--primary) !important;
  color: var(--primary) !important;
  padding: 0.4rem 1rem !important;
  border-radius: var(--radius-full) !important;
  font-weight: 600 !important;
  text-decoration: none !important;
  transition: all var(--transition) !important;
}
.nav-cta:hover {
  background: var(--primary) !important;
  color: #fff !important;
  border-bottom-color: transparent !important;
}

.menu-toggle { display: none; background: none; border: none; cursor: pointer; padding: 0.5rem; color: var(--text); }
@media (max-width: 768px) {
  .site-nav { display: none; }
  .menu-toggle { display: block; }
  .site-nav.open {
    display: flex; flex-direction: column;
    position: absolute; top: 72px; left: 0; right: 0;
    background: var(--background);
    border-bottom: 1px solid var(--border);
    padding: 1.25rem var(--gap); gap: 0;
  }
  .site-nav.open a { border-bottom: 1px solid var(--border); border-right: none; padding: 0.875rem 0; }
}

/* ─── PROGRESS BAR ───────────────────────────────────────────── */
#reading-progress {
  position: fixed; top: 0; left: 0;
  width: 0%; height: 2px;
  background: var(--primary);
  z-index: 9999;
  transition: width 0.1s linear;
}

/* ─── HERO ÉDITORIAL — PLEIN TEXTE ──────────────────────────── */
.hero {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  padding: clamp(3.5rem, 8vw, 6rem) var(--gap);
  text-align: center;
}
.hero-eyebrow {
  display: inline-block;
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 1.25rem;
}
.hero h1 {
  font-family: var(--font-heading);
  color: var(--secondary);
  font-size: clamp(2.25rem, 5.5vw, 3.75rem);
  max-width: 780px;
  margin: 0 auto 1.5rem;
  font-weight: 900;
  font-style: italic;
  line-height: 1.1;
  letter-spacing: -0.02em;
}
.hero-subtitle {
  font-family: var(--font-body);
  color: var(--text-light);
  font-size: 1.125rem;
  max-width: 560px;
  margin: 0 auto 2.5rem;
  font-weight: 300;
  line-height: 1.7;
}
.hero-ctas { display: flex; gap: 1rem; justify-content: center; flex-wrap: wrap; margin-bottom: 2.5rem; }
.hero-divider {
  width: 60px; height: 2px;
  background: var(--primary);
  margin: 2rem auto 0;
}

/* ─── BOUTONS OUTLINE PILL ───────────────────────────────────── */
.btn-primary {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: var(--primary);
  color: #fff;
  font-family: var(--font-body);
  font-weight: 600;
  padding: 0.8rem 1.75rem;
  border-radius: var(--radius-full);
  font-size: 0.9375rem;
  text-decoration: none;
  letter-spacing: 0.01em;
  transition: all var(--transition);
  border: 2px solid var(--primary);
}
.btn-primary:hover { background: transparent; color: var(--primary); }

.btn-secondary {
  display: inline-flex; align-items: center; gap: 0.5rem;
  background: transparent;
  color: var(--secondary);
  font-family: var(--font-body);
  font-weight: 500;
  padding: 0.8rem 1.75rem;
  border-radius: var(--radius-full);
  font-size: 0.9375rem;
  text-decoration: none;
  border: 2px solid var(--border-strong);
  transition: all var(--transition);
}
.btn-secondary:hover { background: var(--secondary); color: #fff; }

/* ─── CARDS — BORDERLINE GAUCHE ─────────────────────────────── */
.top3-section {
  padding: var(--section-py) var(--gap);
  background: var(--background);
}
.section-title { margin-bottom: 3rem; }
.section-title h2 { margin-top: 0; border: none; }
.section-label {
  font-family: var(--font-body);
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--primary);
  display: block;
  margin-bottom: 0.5rem;
}
.section-title p { color: var(--text-light); font-size: 1.0625rem; }

.top3-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2rem;
  max-width: var(--max-width);
  margin: 0 auto;
}
@media (max-width: 768px) { .top3-grid { grid-template-columns: 1fr; } }

.tool-card {
  background: var(--background);
  border-radius: 0;
  padding: 2rem;
  border: 0;
  border-left: var(--border-accent-width) solid var(--border);
  transition: border-color var(--transition);
  position: relative;
}
.tool-card:hover { border-left-color: var(--primary); }
.tool-card.featured { border-left-color: var(--primary); }
.tool-badge {
  display: inline-block;
  background: var(--primary);
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.2rem 0.6rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}
.tool-name { font-family: var(--font-heading); font-size: 1.35rem; font-weight: 700; margin-bottom: 0.5rem; }
.tool-score {
  font-family: var(--font-body);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--primary);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  margin-bottom: 0.75rem;
}
.tool-desc { color: var(--text-light); font-size: 0.9375rem; line-height: 1.65; margin-bottom: 1.5rem; }
.tool-pros { list-style: none; padding: 0; margin-bottom: 1.5rem; }
.tool-pros li { font-size: 0.875rem; padding: 0.3rem 0; border-bottom: 1px solid var(--border); color: var(--text); }
.tool-pros li::before { content: '→ '; color: var(--primary); font-weight: 600; }
.tool-cta {
  display: inline-flex; align-items: center; gap: 0.375rem;
  background: transparent;
  color: var(--primary);
  font-weight: 600;
  font-size: 0.875rem;
  text-decoration: none;
  border-bottom: 1.5px solid var(--primary);
  padding-bottom: 1px;
  transition: gap var(--transition);
}
.tool-cta:hover { gap: 0.6rem; }

/* ─── ARTICLES LISTE ─────────────────────────────────────────── */
.articles-section {
  padding: var(--section-py) var(--gap);
  background: var(--surface);
  border-top: 1px solid var(--border);
}
.articles-list {
  max-width: var(--max-width);
  margin: 0 auto;
}
.article-item {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1.5rem;
  padding: 1.75rem 0;
  border-bottom: 1px solid var(--border);
  align-items: start;
}
.article-item:first-child { border-top: 1px solid var(--border); }
.article-meta {
  font-family: var(--font-body);
  font-size: 0.75rem;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 0.5rem;
}
.article-item h3 {
  font-family: var(--font-heading);
  font-size: 1.2rem;
  font-weight: 700;
  margin: 0 0 0.5rem;
  color: var(--secondary);
}
.article-item h3 a { color: inherit; text-decoration: none; }
.article-item h3 a:hover { color: var(--primary); }
.article-excerpt { font-size: 0.9375rem; color: var(--text-light); line-height: 1.6; }
.article-thumb {
  width: 120px;
  height: 80px;
  object-fit: cover;
  flex-shrink: 0;
  filter: grayscale(20%);
}
@media (max-width: 640px) {
  .article-item { grid-template-columns: 1fr; }
  .article-thumb { display: none; }
}

/* ─── SIDEBAR ────────────────────────────────────────────────── */
.sidebar-widget {
  border-top: 3px solid var(--secondary);
  padding-top: 1.25rem;
  margin-bottom: 2.5rem;
}
.sidebar-widget h4 {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 700;
  margin-bottom: 1rem;
  color: var(--secondary);
}
.sidebar-widget ul { list-style: none; padding: 0; }
.sidebar-widget ul li { padding: 0.5rem 0; border-bottom: 1px solid var(--border); font-size: 0.9rem; }
.sidebar-widget ul li a { color: var(--text); text-decoration: none; }
.sidebar-widget ul li a:hover { color: var(--primary); }

/* ─── FOOTER MINIMAL CENTRÉ ──────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--border);
  padding: 2.5rem var(--gap);
  text-align: center;
  background: var(--background);
}
.footer-logo {
  font-family: var(--font-heading);
  font-size: 1.25rem;
  font-weight: 900;
  color: var(--secondary);
  font-style: italic;
  margin-bottom: 0.75rem;
}
.footer-nav {
  display: flex; gap: 1.5rem; justify-content: center; flex-wrap: wrap;
  margin-bottom: 1rem;
}
.footer-nav a { font-size: 0.8125rem; color: var(--text-muted); text-decoration: none; }
.footer-nav a:hover { color: var(--primary); }
.footer-copy { font-size: 0.8rem; color: var(--text-muted); }

/* ─── SINGLE ARTICLE ─────────────────────────────────────────── */
.article-header { padding: 2.5rem 0 2rem; }
.article-header .article-meta { margin-bottom: 1rem; font-size: 0.8125rem; }
.article-header h1 {
  font-family: var(--font-heading);
  font-size: clamp(1.875rem, 4.5vw, 3rem);
  font-weight: 900;
  font-style: italic;
  margin-bottom: 1.25rem;
  letter-spacing: -0.02em;
}
.article-content { font-size: 1.0625rem; line-height: 1.8; }
.article-content h2 { font-size: clamp(1.35rem, 3vw, 1.875rem); margin-top: 3rem; }

/* ─── DARK MODE ──────────────────────────────────────────────── */
@media (prefers-color-scheme: dark) {
  :root {
    --background:  #0f0f0d;
    --surface:     #1a1a16;
    --surface-2:   #242420;
    --border:      #2e2e28;
    --border-strong: #f5f5f0;
    --text:        #e8e8e0;
    --text-light:  #9a9a8e;
    --text-muted:  #6a6a5e;
    --secondary:   #f5f5f0;
  }
  .site-topbar { background: #050504; }
  .site-header { background: rgba(15,15,13,0.97); }
  .tool-card { background: var(--surface); }
  .site-footer { background: var(--background); }
}

/* ─── TRUST SIGNALS ──────────────────────────────────────────── */
.trust-signals {
  display: flex; gap: 1.5rem; justify-content: center; flex-wrap: wrap;
  color: var(--text-muted);
  font-size: 0.8125rem;
  font-family: var(--font-body);
}
.trust-signals span::before { content: '✓ '; color: var(--success); }
