@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:ital,wght@0,400;0,600;0,700;1,400&family=Source+Serif+4:ital,opsz,wght@0,8..60,300;0,8..60,400;0,8..60,600;1,8..60,400&display=swap');

:root {
  --navy: #1a2744;
  --navy-dark: #111b30;
  --navy-light: #253560;
  --green: #1a7a4a;
  --green-light: #e8f5ee;
  --gold: #c9a227;
  --gold-light: #fdf6e3;
  --bg: #f7f5f0;
  --white: #ffffff;
  --text: #1a1a1a;
  --text-muted: #5a5a5a;
  --border: #e2ddd6;
  --radius: 8px;
  --shadow: 0 2px 12px rgba(26,39,68,0.08);
  --max-width: 1100px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 17px; scroll-behavior: smooth; }
body { font-family: 'Source Serif 4', Georgia, serif; background: var(--bg); color: var(--text); line-height: 1.75; }
img { max-width: 100%; height: auto; }
a { color: var(--green); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ===== HEADER ===== */
.site-header { background: var(--navy); position: sticky; top: 0; z-index: 100; box-shadow: 0 2px 8px rgba(0,0,0,0.2); }
.header-inner { max-width: var(--max-width); margin: 0 auto; padding: 0 1.5rem; display: flex; align-items: center; justify-content: space-between; height: 64px; }
.site-logo { font-family: 'Playfair Display', Georgia, serif; font-size: 1.3rem; font-weight: 700; color: var(--white); text-decoration: none; }
.site-logo span { color: var(--gold); }
.site-nav { display: flex; }
.site-nav a { color: rgba(255,255,255,0.85); font-size: 0.875rem; padding: 0 1rem; height: 64px; display: flex; align-items: center; border-bottom: 3px solid transparent; transition: background 0.15s, color 0.15s; }
.site-nav a:hover { background: rgba(255,255,255,0.08); color: white; text-decoration: none; border-bottom-color: var(--gold); }

/* ===== HERO ===== */
.hero { background: linear-gradient(135deg, var(--navy-dark) 0%, var(--navy) 60%, var(--navy-light) 100%); color: white; padding: 4rem 1.5rem 3rem; text-align: center; }
.hero-inner { max-width: 760px; margin: 0 auto; }
.hero-label { display: inline-block; background: var(--gold); color: var(--navy); font-size: 0.72rem; font-weight: 600; letter-spacing: 0.08em; text-transform: uppercase; padding: 4px 14px; border-radius: 3px; margin-bottom: 1.25rem; }
.hero h1 { font-family: 'Playfair Display', Georgia, serif; font-size: 2.6rem; font-weight: 700; line-height: 1.2; margin-bottom: 1rem; }
.hero p { font-size: 1.1rem; color: rgba(255,255,255,0.8); font-weight: 300; }

/* ===== SIMULATEUR ===== */
.simulator-section { background: white; padding: 3rem 1.5rem; border-bottom: 1px solid var(--border); }
.simulator-wrap { max-width: 900px; margin: 0 auto; background: white; border-radius: var(--radius); box-shadow: var(--shadow); border: 1px solid var(--border); overflow: hidden; }
.simulator-header { background: var(--navy); color: white; padding: 1.25rem 2rem; display: flex; align-items: center; gap: 12px; }
.simulator-header h2 { font-family: 'Playfair Display', serif; font-size: 1.2rem; font-weight: 600; margin: 0; }
.sim-icon { font-size: 1.5rem; }
.simulator-body { padding: 2rem; }
.sim-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; margin-bottom: 1.5rem; }
.sim-field label { display: block; font-size: 0.78rem; font-weight: 600; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 8px; }
.sim-field input, .sim-field select { width: 100%; padding: 10px 14px; border: 1.5px solid var(--border); border-radius: var(--radius); font-size: 1rem; font-family: inherit; color: var(--text); background: var(--bg); transition: border-color 0.15s; }
.sim-field input:focus, .sim-field select:focus { outline: none; border-color: var(--green); }
.sim-btn { width: 100%; padding: 14px; background: var(--green); color: white; border: none; border-radius: var(--radius); font-size: 1rem; font-family: 'Playfair Display', serif; font-weight: 600; cursor: pointer; transition: background 0.15s; margin-bottom: 1.5rem; }
.sim-btn:hover { background: #156039; }
.sim-results { display: none; }
.sim-results.active { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.result-card { background: var(--bg); border-radius: var(--radius); padding: 1rem; text-align: center; border: 1px solid var(--border); }
.result-card.highlight { background: var(--green-light); border-color: var(--green); }
.result-val { font-family: 'Playfair Display', serif; font-size: 1.8rem; font-weight: 700; color: var(--navy); display: block; line-height: 1; margin-bottom: 4px; }
.result-card.highlight .result-val { color: var(--green); }
.result-label { font-size: 0.72rem; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.04em; }
.sim-disclaimer { font-size: 0.8rem; color: var(--text-muted); margin-top: 1rem; font-style: italic; }

/* ===== LAYOUT ===== */
.main-wrap { max-width: var(--max-width); margin: 0 auto; padding: 2.5rem 1.5rem; display: grid; grid-template-columns: 1fr 300px; gap: 2.5rem; }
.main-wrap.full-width { grid-template-columns: 1fr; max-width: 820px; }
.section-wrap { max-width: var(--max-width); margin: 0 auto; padding: 3rem 1.5rem; }
.section-title { font-family: 'Playfair Display', serif; font-size: 1.8rem; color: var(--navy); margin-bottom: 0.5rem; }
.section-subtitle { color: var(--text-muted); margin-bottom: 2rem; font-size: 1rem; }

/* ===== ARTICLE CONTENT ===== */
.article-main h1 { font-family: 'Playfair Display', serif; font-size: 2.2rem; font-weight: 700; color: var(--navy); line-height: 1.25; margin-bottom: 1rem; }
.article-meta { display: flex; align-items: center; gap: 1rem; font-size: 0.85rem; color: var(--text-muted); margin-bottom: 2rem; padding-bottom: 1rem; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.category-tag { background: var(--navy); color: white; padding: 3px 10px; border-radius: 3px; font-size: 0.72rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; }
.article-content h2 { font-family: 'Playfair Display', serif; font-size: 1.6rem; color: var(--navy); margin: 2.5rem 0 1rem; padding-bottom: 0.5rem; border-bottom: 2px solid var(--gold); }
.article-content h3 { font-family: 'Playfair Display', serif; font-size: 1.2rem; color: var(--navy); margin: 1.75rem 0 0.75rem; }
.article-content p { margin-bottom: 1.25rem; }
.article-content ul, .article-content ol { padding-left: 1.5rem; margin-bottom: 1.25rem; }
.article-content li { margin-bottom: 0.5rem; }

/* Encadré intro */
.intro-box { background: var(--gold-light); border-left: 4px solid var(--gold); border-radius: 0 var(--radius) var(--radius) 0; padding: 1.25rem 1.5rem; margin-bottom: 2rem; font-size: 1.05rem; }

/* Chiffres clés */
.key-figures { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin: 2rem 0; }
.key-fig { background: var(--navy); color: white; border-radius: var(--radius); padding: 1.25rem; text-align: center; }
.key-fig strong { display: block; font-family: 'Playfair Display', serif; font-size: 2rem; font-weight: 700; color: var(--gold); line-height: 1; margin-bottom: 6px; }
.key-fig span { font-size: 0.8rem; color: rgba(255,255,255,0.75); }

/* Tables */
.article-content table { width: 100%; border-collapse: collapse; margin: 1.5rem 0; font-size: 0.9rem; }
.article-content th { background: var(--navy); color: white; padding: 10px 14px; text-align: left; font-family: 'Playfair Display', serif; font-size: 0.85rem; }
.article-content td { padding: 9px 14px; border-bottom: 1px solid var(--border); }
.article-content tr:nth-child(even) td { background: var(--bg); }
.article-content tr:hover td { background: var(--green-light); }

/* Steps */
.steps { margin: 2rem 0; }
.step { display: flex; gap: 1rem; margin-bottom: 1.25rem; align-items: flex-start; }
.step-num { width: 36px; height: 36px; min-width: 36px; background: var(--green); color: white; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-family: 'Playfair Display', serif; font-weight: 700; font-size: 1rem; margin-top: 2px; }
.step-body h4 { font-family: 'Playfair Display', serif; color: var(--navy); margin-bottom: 4px; font-size: 1rem; }

/* Alertes */
.alert { border-radius: var(--radius); padding: 1rem 1.25rem; margin: 1.5rem 0; border-left: 4px solid; }
.alert-green { background: var(--green-light); border-color: var(--green); color: #0d4a2e; }
.alert-gold { background: var(--gold-light); border-color: var(--gold); color: #5a4200; }
.alert-navy { background: #eef0f5; border-color: var(--navy); color: var(--navy); }
.alert strong { display: block; margin-bottom: 4px; }

/* FAQ */
.faq-section { margin: 2.5rem 0; }
.faq-item { border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 8px; overflow: hidden; }
.faq-question { width: 100%; background: none; border: none; padding: 1rem 1.25rem; text-align: left; font-family: 'Source Serif 4', serif; font-size: 1rem; font-weight: 600; color: var(--navy); cursor: pointer; display: flex; justify-content: space-between; align-items: center; transition: background 0.15s; }
.faq-question:hover { background: var(--bg); }
.faq-question.open { background: var(--navy); color: white; }
.faq-arrow { font-size: 1.1rem; transition: transform 0.2s; }
.faq-question.open .faq-arrow { transform: rotate(180deg); }
.faq-answer { max-height: 0; overflow: hidden; transition: max-height 0.3s ease; padding: 0 1.25rem; font-size: 0.95rem; line-height: 1.7; }
.faq-answer.open { max-height: 600px; padding: 1rem 1.25rem; }

/* Articles liés */
.related-articles { margin-top: 2.5rem; }
.related-articles h2 { font-family: 'Playfair Display', serif; font-size: 1.4rem; color: var(--navy); margin-bottom: 1rem; border-bottom: 2px solid var(--gold); padding-bottom: 0.5rem; }
.related-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; }
.related-card { background: white; border: 1px solid var(--border); border-radius: var(--radius); padding: 1rem; transition: box-shadow 0.15s; display: block; }
.related-card:hover { box-shadow: var(--shadow); text-decoration: none; }
.related-card .cat { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.05em; color: var(--green); font-weight: 600; margin-bottom: 4px; }
.related-card h3 { font-family: 'Playfair Display', serif; font-size: 0.95rem; color: var(--navy); margin: 0; line-height: 1.4; }

/* Sidebar */
.sidebar-widget { background: white; border: 1px solid var(--border); border-radius: var(--radius); padding: 1.25rem; margin-bottom: 1.5rem; }
.sidebar-widget h3 { font-family: 'Playfair Display', serif; font-size: 1rem; color: var(--navy); margin-bottom: 1rem; padding-bottom: 0.5rem; border-bottom: 2px solid var(--gold); }
.sidebar-links { list-style: none; padding: 0; }
.sidebar-links li { padding: 6px 0; border-bottom: 1px solid var(--border); font-size: 0.9rem; }
.sidebar-links li:last-child { border: none; }
.sidebar-links a { color: var(--navy); font-weight: 500; }
.sidebar-links a:hover { color: var(--green); text-decoration: none; }

/* AdSense */
.ad-container { margin: 2rem 0; text-align: center; min-height: 100px; background: #f9f9f9; border: 1px dashed var(--border); border-radius: var(--radius); display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 1rem; }
.ad-label { font-size: 0.65rem; text-transform: uppercase; color: var(--text-muted); margin-bottom: 4px; letter-spacing: 0.05em; }

/* Homepage cards */
.articles-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.5rem; }
.article-card { background: white; border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; transition: box-shadow 0.2s; display: flex; flex-direction: column; }
.article-card:hover { box-shadow: var(--shadow); text-decoration: none; }
.card-top { background: var(--navy); padding: 1.25rem; flex: 1; }
.card-cat { font-size: 0.68rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--gold); font-weight: 600; margin-bottom: 6px; }
.card-title { font-family: 'Playfair Display', serif; font-size: 1rem; color: white; line-height: 1.35; }
.card-bottom { padding: 0.75rem 1.25rem; background: white; display: flex; justify-content: space-between; align-items: center; border-top: 1px solid var(--border); }
.card-link { font-size: 0.8rem; color: var(--green); font-weight: 600; }
.card-time { font-size: 0.78rem; color: var(--text-muted); }

/* Categories strip */
.cats-strip { background: var(--navy); padding: 2rem 1.5rem; }
.cats-inner { max-width: var(--max-width); margin: 0 auto; display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; }
.cat-card { background: rgba(255,255,255,0.1); border-radius: var(--radius); padding: 1.5rem 1.25rem; text-align: center; color: white; transition: background 0.2s; border: 1px solid rgba(255,255,255,0.15); display: block; }
.cat-card:hover { background: rgba(255,255,255,0.18); text-decoration: none; }
.cat-icon { font-size: 2rem; display: block; margin-bottom: 8px; }
.cat-name { font-family: 'Playfair Display', serif; font-size: 1rem; color: white; display: block; margin-bottom: 4px; }
.cat-desc { font-size: 0.8rem; color: rgba(255,255,255,0.65); }

/* Trust bar */
.trust-bar { background: var(--green-light); border-top: 1px solid #b8dfc8; border-bottom: 1px solid #b8dfc8; padding: 1rem 1.5rem; }
.trust-inner { max-width: var(--max-width); margin: 0 auto; display: flex; justify-content: center; gap: 3rem; align-items: center; }
.trust-item { display: flex; align-items: center; gap: 8px; font-size: 0.85rem; color: #0d4a2e; font-weight: 600; }

/* Category hero */
.cat-hero { background: var(--navy); color: white; padding: 3rem 1.5rem; }
.cat-hero-inner { max-width: var(--max-width); margin: 0 auto; }
.cat-hero h1 { font-family: 'Playfair Display', serif; font-size: 2.2rem; margin-bottom: 0.75rem; }
.cat-hero p { color: rgba(255,255,255,0.8); max-width: 620px; }

/* Breadcrumb */
.breadcrumb { max-width: var(--max-width); margin: 0 auto; padding: 0.75rem 1.5rem; font-size: 0.82rem; color: var(--text-muted); }
.breadcrumb a { color: var(--text-muted); }
.breadcrumb a:hover { color: var(--green); text-decoration: none; }
.breadcrumb span { margin: 0 6px; }

/* Footer */
.site-footer { background: var(--navy-dark); color: rgba(255,255,255,0.7); padding: 3rem 1.5rem 1.5rem; margin-top: 3rem; }
.footer-inner { max-width: var(--max-width); margin: 0 auto; display: grid; grid-template-columns: 2fr 1fr 1fr 1fr; gap: 2rem; margin-bottom: 2rem; }
.footer-logo { font-family: 'Playfair Display', serif; font-size: 1.2rem; color: white; margin-bottom: 0.75rem; }
.footer-logo span { color: var(--gold); }
.footer-about { font-size: 0.85rem; line-height: 1.6; }
.footer-col h4 { font-family: 'Playfair Display', serif; font-size: 0.85rem; color: var(--gold); margin-bottom: 0.75rem; text-transform: uppercase; letter-spacing: 0.05em; }
.footer-col ul { list-style: none; padding: 0; }
.footer-col li { margin-bottom: 6px; }
.footer-col a { color: rgba(255,255,255,0.65); font-size: 0.85rem; transition: color 0.15s; }
.footer-col a:hover { color: white; text-decoration: none; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.1); padding-top: 1.25rem; display: flex; justify-content: space-between; font-size: 0.8rem; color: rgba(255,255,255,0.4); flex-wrap: wrap; gap: 0.5rem; }
.footer-bottom a { color: rgba(255,255,255,0.4); }
.footer-bottom a:hover { color: rgba(255,255,255,0.7); text-decoration: none; }

/* Responsive */
@media (max-width: 900px) {
  .main-wrap { grid-template-columns: 1fr; }
  .sidebar { display: none; }
  .articles-grid { grid-template-columns: repeat(2, 1fr); }
  .sim-grid { grid-template-columns: 1fr; }
  .sim-results.active { grid-template-columns: repeat(2, 1fr); }
  .key-figures { grid-template-columns: repeat(2, 1fr); }
  .footer-inner { grid-template-columns: 1fr 1fr; }
  .cats-inner { grid-template-columns: repeat(2, 1fr); }
  .trust-inner { flex-wrap: wrap; gap: 1rem; }
  .related-grid { grid-template-columns: 1fr; }
  .hero h1 { font-size: 2rem; }
}

@media (max-width: 600px) {
  .articles-grid { grid-template-columns: 1fr; }
  .key-figures { grid-template-columns: 1fr; }
  .footer-inner { grid-template-columns: 1fr; }
  .site-nav { display: none; }
  .hero h1 { font-size: 1.65rem; }
  .article-main h1 { font-size: 1.7rem; }
  .sim-results.active { grid-template-columns: repeat(2, 1fr); }
}
