/* ===================================================================
   SOS-CALVITIE.COM — Design system
   =================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Fraunces:opsz,wght@9..144,400;9..144,600;9..144,700&family=Source+Sans+3:wght@400;500;600;700&family=IBM+Plex+Mono:wght@400;500&display=swap');

:root {
  --ink:        #1B2A3A;
  --cream:      #F7F5F1;
  --terracotta: #C6602E;
  --sage:       #2F6E5C;
  --taupe:      #8A8378;
  --alert:      #B23B3B;
  --white:      #FFFFFF;
  --line:       #DDD8CE;

  --font-display: 'Fraunces', serif;
  --font-body: 'Source Sans 3', sans-serif;
  --font-mono: 'IBM Plex Mono', monospace;

  --max-width: 1200px;
  --radius: 4px;
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--cream);
  color: var(--ink);
  line-height: 1.6;
  font-size: 16px;
}

a { color: var(--terracotta); text-decoration: none; }
a:hover { text-decoration: underline; }
a:focus-visible, button:focus-visible { outline: 3px solid var(--sage); outline-offset: 2px; }

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

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--ink);
  line-height: 1.15;
  font-weight: 600;
}

h1 { font-size: clamp(2rem, 4vw, 3.2rem); font-weight: 700; }
h2 { font-size: clamp(1.5rem, 3vw, 2.2rem); margin-bottom: .6em; }
h3 { font-size: 1.4rem; margin-bottom: .5em; }

p { margin-bottom: 1em; max-width: 72ch; }

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

.eyebrow {
  font-family: var(--font-mono);
  font-size: .75rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--taupe);
}

/* ---------- Top utility bar ---------- */
.utility-bar {
  background: var(--ink);
  color: var(--cream);
  font-family: var(--font-mono);
  font-size: .78rem;
  padding: 6px 0;
}
.utility-bar .container { display: flex; justify-content: space-between; align-items: center; }
.utility-bar a { color: var(--cream); opacity: .85; }

/* ---------- Header ---------- */
.site-header {
  background: var(--cream);
  border-bottom: 3px solid var(--ink);
  padding: 18px 0;
  position: sticky;
  top: 0;
  z-index: 100;
}
.site-header .container { display: flex; align-items: center; justify-content: space-between; gap: 24px; }

.logo {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--ink);
  display: flex;
  align-items: baseline;
  gap: 6px;
}
.logo span { color: var(--terracotta); }

.main-nav { display: flex; gap: 4px; flex-wrap: wrap; }
.main-nav details { position: relative; }
.main-nav summary {
  list-style: none;
  cursor: pointer;
  font-weight: 600;
  font-size: .92rem;
  padding: 8px 12px;
  border-radius: var(--radius);
  color: var(--ink);
}
.main-nav summary::-webkit-details-marker { display: none; }
.main-nav summary:hover { background: var(--line); }
.main-nav .dropdown {
  position: absolute;
  top: 100%;
  left: 0;
  background: var(--white);
  border: 1px solid var(--line);
  box-shadow: 0 8px 24px rgba(27,42,58,.12);
  min-width: 240px;
  padding: 8px;
  z-index: 50;
}
.main-nav .dropdown a {
  display: block;
  padding: 8px 10px;
  color: var(--ink);
  font-size: .9rem;
  border-radius: var(--radius);
}
.main-nav .dropdown a:hover { background: var(--cream); text-decoration: none; color: var(--terracotta); }

.nav-cta {
  background: var(--terracotta);
  color: var(--white) !important;
  padding: 9px 16px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: .9rem;
  white-space: nowrap;
}
.nav-cta:hover { background: #A94E22; text-decoration: none; }

/* ---------- Breadcrumb ---------- */
.breadcrumb {
  font-family: var(--font-mono);
  font-size: .78rem;
  color: var(--taupe);
  padding: 14px 0;
}
.breadcrumb a { color: var(--taupe); }

/* ---------- Ad slots ---------- */
.ad-slot {
  background: repeating-linear-gradient(135deg, #EFEBE2, #EFEBE2 10px, #E6E1D5 10px, #E6E1D5 20px);
  border: 1px dashed #B8B0A0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--taupe);
  font-family: var(--font-mono);
  font-size: .72rem;
  text-transform: uppercase;
  letter-spacing: .05em;
  position: relative;
  margin: 28px auto;
  overflow: hidden;
}
.ad-slot::before {
  content: "Publicité";
  position: absolute;
  top: 4px;
  left: 8px;
  font-size: .62rem;
  color: #A69E8C;
}
.ad-slot span { margin-top: 8px; }

.ad-leaderboard  { width: 100%; max-width: 728px; height: 90px; }
.ad-billboard    { width: 100%; max-width: 970px; height: 250px; }
.ad-rectangle    { width: 300px; height: 250px; }
.ad-skyscraper   { width: 300px; height: 600px; }
.ad-native       { width: 100%; height: auto; min-height: 120px; padding: 16px; text-align: left; justify-content: flex-start; }
.ad-infeed       { width: 100%; height: 120px; }

.ad-slot-header { margin: 0 auto 0; }
.ad-slot-footer { margin: 40px auto 0; }

/* Native in-content ad, styled like a card so it fits editorially but stays clearly labeled */
.ad-native-card {
  border: 1px solid var(--line);
  border-left: 3px solid var(--terracotta);
  background: var(--white);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin: 32px 0;
}
.ad-native-card .ad-native-tag {
  font-family: var(--font-mono);
  font-size: .65rem;
  text-transform: uppercase;
  color: var(--taupe);
  letter-spacing: .06em;
  display: block;
  margin-bottom: 6px;
}
.ad-native-card h4 { font-size: 1rem; margin-bottom: 4px; }
.ad-native-card p { font-size: .88rem; color: var(--taupe); margin-bottom: 0; }

/* ---------- Layout with sidebar ---------- */
.layout {
  display: grid;
  grid-template-columns: 1fr 300px;
  gap: 40px;
  align-items: start;
  padding: 32px 0 64px;
}
.sidebar { position: sticky; top: 100px; display: flex; flex-direction: column; gap: 24px; }

@media (max-width: 900px) {
  .layout { grid-template-columns: 1fr; }
  .sidebar { position: static; }
  .main-nav { display: none; }
}

/* ---------- Evidence badges (signature element) ---------- */
.evidence-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: .72rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .04em;
  padding: 5px 10px;
  border-radius: 999px;
  white-space: nowrap;
}
.evidence-badge::before { content: ''; width: 7px; height: 7px; border-radius: 50%; }

.evidence-forte { background: #E3EEE9; color: #1E5443; }
.evidence-forte::before { background: var(--sage); }

.evidence-moderee { background: #F3EBDD; color: #8A5A1E; }
.evidence-moderee::before { background: #C68A2E; }

.evidence-faible { background: #F5E6DC; color: #8F4321; }
.evidence-faible::before { background: var(--terracotta); }

.evidence-anecdotique { background: #F1E2E2; color: #8A2E2E; }
.evidence-anecdotique::before { background: var(--alert); }

.evidence-key {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  padding: 16px;
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-size: .85rem;
  margin: 20px 0 32px;
}

/* ---------- Cards ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 20px;
  margin: 24px 0;
}
.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.card h3 { font-size: 1.15rem; margin-bottom: 2px; }
.card .card-meta { font-size: .82rem; color: var(--taupe); }
.card p { font-size: .92rem; margin-bottom: 0; }
.card-footer { margin-top: auto; display: flex; justify-content: space-between; align-items: center; }

/* ---------- Sidebar widgets ---------- */
.widget {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
}
.widget h4 {
  font-size: .95rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  font-family: var(--font-mono);
  color: var(--taupe);
  margin-bottom: 12px;
}
.widget ul { list-style: none; display: flex; flex-direction: column; gap: 8px; }
.widget a { color: var(--ink); font-size: .9rem; }
.widget a:hover { color: var(--terracotta); }

/* ---------- Fact box / alert box ---------- */
.box {
  border-left: 4px solid var(--sage);
  background: #F0F5F2;
  padding: 16px 20px;
  margin: 24px 0;
  border-radius: 0 var(--radius) var(--radius) 0;
}
.box.warning { border-color: var(--alert); background: #FBF0EF; }
.box.info { border-color: var(--terracotta); background: #FCF3ED; }
.box h4 { font-family: var(--font-body); font-size: .95rem; text-transform: none; letter-spacing: 0; margin-bottom: 6px; color: var(--ink); }
.box p { font-size: .9rem; margin-bottom: 0; }

/* ---------- Table ---------- */
table { width: 100%; border-collapse: collapse; margin: 24px 0; font-size: .9rem; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line); }
th { font-family: var(--font-mono); font-size: .75rem; text-transform: uppercase; color: var(--taupe); letter-spacing: .04em; }

/* ---------- Sources / approfondissement toggle ---------- */
.deep-dive {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  margin: 24px 0;
  background: var(--white);
}
.deep-dive summary {
  cursor: pointer;
  padding: 14px 18px;
  font-weight: 600;
  font-family: var(--font-display);
  list-style: none;
  display: flex;
  align-items: center;
  gap: 8px;
}
.deep-dive summary::before { content: '+ '; color: var(--terracotta); font-weight: 700; }
.deep-dive[open] summary::before { content: '– '; }
.deep-dive summary::-webkit-details-marker { display: none; }
.deep-dive .deep-dive-body { padding: 0 18px 18px; font-size: .93rem; color: #3A4756; }
.deep-dive .sources { margin-top: 16px; font-size: .78rem; color: var(--taupe); }
.deep-dive .sources li { margin-bottom: 4px; }

/* ---------- Hero ---------- */
.hero {
  padding: 56px 0 40px;
  border-bottom: 1px solid var(--line);
}
.hero .eyebrow { margin-bottom: 12px; }
.hero p.lede { font-size: 1.15rem; color: #3A4756; max-width: 60ch; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--ink);
  color: #C9CFD6;
  padding: 48px 0 24px;
  margin-top: 40px;
}
.footer-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 32px;
  margin-bottom: 32px;
}
.footer-grid h4 { color: var(--cream); font-family: var(--font-mono); font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; margin-bottom: 12px; }
.footer-grid ul { list-style: none; display: flex; flex-direction: column; gap: 7px; }
.footer-grid a { color: #A9B2BC; font-size: .88rem; }
.footer-grid a:hover { color: var(--cream); }
.footer-bottom { border-top: 1px solid #35455A; padding-top: 20px; font-size: .78rem; color: #7C8896; display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; }
.footer-disclaimer { font-size: .78rem; color: #7C8896; max-width: 80ch; margin-bottom: 20px; line-height: 1.6; }

/* ---------- Utility ---------- */
.text-center { text-align: center; }
.mt-0 { margin-top: 0; }
.btn {
  display: inline-block;
  background: var(--ink);
  color: var(--white);
  padding: 12px 22px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: .92rem;
}
.btn:hover { background: var(--terracotta); text-decoration: none; }
.btn-outline { background: transparent; border: 2px solid var(--ink); color: var(--ink); }
.btn-outline:hover { background: var(--ink); color: var(--white); }
