/* ===========================
   FINANCE PRATIQUE — style.css
   =========================== */

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

/* ── Variables ── */
:root {
  --navy:       #0C1C3A;
  --navy-light: #1A2F55;
  --green:      #1A6B47;
  --green-dark: #145838;
  --gold:       #C8922A;
  --gold-light: #F5E6C8;
  --cream:      #F6F4EE;
  --gray-light: #E8E5DD;
  --gray-mid:   #8B8578;
  --text:       #1C1A15;
  --white:      #FFFFFF;
  --border:     #D9D5CC;
  --shadow-sm:  0 1px 4px rgba(12,28,58,0.08);
  --shadow-md:  0 4px 16px rgba(12,28,58,0.12);
  --shadow-lg:  0 8px 32px rgba(12,28,58,0.16);
  --radius:     6px;
  --radius-lg:  12px;
  --font-title: 'Playfair Display', Georgia, serif;
  --font-body:  'Source Serif 4', Georgia, serif;
}

/* ── Reset ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; }
body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.75;
  color: var(--text);
  background: var(--cream);
}
img { max-width: 100%; display: block; }
a { color: var(--green); text-decoration: none; }
a:hover { text-decoration: underline; color: var(--green-dark); }

/* ── Typography ── */
h1, h2, h3, h4 {
  font-family: var(--font-title);
  color: var(--navy);
  line-height: 1.25;
}
h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); font-weight: 700; }
h2 { font-size: clamp(1.4rem, 3vw, 2rem); font-weight: 600; margin-bottom: 1rem; }
h3 { font-size: clamp(1.1rem, 2.5vw, 1.4rem); font-weight: 600; margin-bottom: 0.75rem; }
h4 { font-size: 1.1rem; font-weight: 600; }
p { margin-bottom: 1.1rem; }
ul, ol { padding-left: 1.4rem; margin-bottom: 1.1rem; }
li { margin-bottom: 0.35rem; }

/* ── Layout ── */
.container { max-width: 1100px; margin: 0 auto; padding: 0 1.25rem; }
.container-narrow { max-width: 760px; margin: 0 auto; padding: 0 1.25rem; }

/* ── HEADER ── */
header {
  background: var(--navy);
  border-bottom: 3px solid var(--gold);
  position: sticky;
  top: 0;
  z-index: 100;
  box-shadow: var(--shadow-md);
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.9rem 1.25rem;
  max-width: 1100px;
  margin: 0 auto;
}
.logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  text-decoration: none;
}
.logo-icon {
  width: 36px;
  height: 36px;
  background: var(--gold);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 1.1rem;
  color: var(--navy);
  flex-shrink: 0;
}
.logo-text {
  font-family: var(--font-title);
  font-size: 1.2rem;
  font-weight: 700;
  color: var(--white);
  letter-spacing: 0.01em;
}
.logo-text span { color: var(--gold); }

nav { display: flex; gap: 0.25rem; align-items: center; }
nav a {
  color: rgba(255,255,255,0.85);
  font-family: var(--font-body);
  font-size: 0.9rem;
  padding: 0.45rem 0.9rem;
  border-radius: var(--radius);
  transition: all 0.2s;
  text-decoration: none;
}
nav a:hover { color: var(--white); background: rgba(255,255,255,0.12); }
nav a.active { color: var(--gold); font-weight: 600; }

/* ── HERO ── */
.hero {
  background: var(--navy);
  padding: 4rem 0 3rem;
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  top: -60px; right: -60px;
  width: 380px; height: 380px;
  background: radial-gradient(circle, rgba(200,146,42,0.12) 0%, transparent 70%);
  pointer-events: none;
}
.hero-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.25rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: center;
}
.hero-badge {
  display: inline-block;
  background: var(--gold);
  color: var(--navy);
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.3rem 0.75rem;
  border-radius: 20px;
  margin-bottom: 1.2rem;
}
.hero h1 { color: var(--white); margin-bottom: 1rem; }
.hero h1 span { color: var(--gold); }
.hero-subtitle {
  color: rgba(255,255,255,0.75);
  font-size: 1.05rem;
  line-height: 1.65;
  margin-bottom: 1.8rem;
}
.hero-stats {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
}
.hero-stat {
  display: flex;
  flex-direction: column;
}
.hero-stat strong {
  font-family: var(--font-title);
  font-size: 1.6rem;
  color: var(--gold);
  line-height: 1;
}
.hero-stat span {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.6);
  margin-top: 0.2rem;
}

/* ── SIMULATOR CARD ── */
.simulator-card {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow-lg);
}
.simulator-card h2 {
  font-size: 1.2rem;
  margin-bottom: 1.25rem;
  color: var(--navy);
  padding-bottom: 0.75rem;
  border-bottom: 2px solid var(--gold-light);
}
.sim-field { margin-bottom: 1rem; }
.sim-field label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--navy);
  margin-bottom: 0.35rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}
.sim-field input,
.sim-field select {
  width: 100%;
  padding: 0.6rem 0.85rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-size: 0.95rem;
  color: var(--text);
  background: var(--white);
  transition: border-color 0.2s;
}
.sim-field input:focus,
.sim-field select:focus {
  outline: none;
  border-color: var(--green);
}
.sim-row { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
.btn-simulate {
  width: 100%;
  padding: 0.85rem;
  background: var(--green);
  color: var(--white);
  border: none;
  border-radius: var(--radius);
  font-family: var(--font-title);
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, transform 0.1s;
  margin-top: 0.5rem;
}
.btn-simulate:hover { background: var(--green-dark); transform: translateY(-1px); }
.sim-result {
  margin-top: 1.1rem;
  padding: 1.1rem;
  background: var(--cream);
  border-radius: var(--radius);
  border-left: 4px solid var(--green);
  display: none;
}
.sim-result.visible { display: block; }
.sim-result-main {
  font-family: var(--font-title);
  font-size: 1.5rem;
  color: var(--navy);
  font-weight: 700;
}
.sim-result-sub { font-size: 0.85rem; color: var(--gray-mid); margin-top: 0.5rem; }
.sim-result-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.5rem;
  margin-top: 0.75rem;
}
.sim-result-item { background: var(--white); padding: 0.5rem 0.65rem; border-radius: 4px; }
.sim-result-item .label { font-size: 0.75rem; color: var(--gray-mid); }
.sim-result-item .value { font-weight: 600; color: var(--navy); font-size: 0.9rem; }

/* ── SECTION TITLES ── */
.section-header { text-align: center; margin-bottom: 2.5rem; }
.section-label {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--green);
  margin-bottom: 0.5rem;
}
.section-header h2 { margin-bottom: 0.6rem; }
.section-header p { color: var(--gray-mid); max-width: 540px; margin: 0 auto; }

/* ── ARTICLE CARDS ── */
.articles-section { padding: 4rem 0; }
.cards-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }

.card {
  background: var(--white);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: box-shadow 0.25s, transform 0.25s;
  display: flex;
  flex-direction: column;
  border: 1px solid var(--gray-light);
}
.card:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); }

.card-header {
  padding: 1.25rem 1.25rem 0;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}
.card-tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.07em;
  padding: 0.25rem 0.6rem;
  border-radius: 20px;
}
.tag-impots { background: #E8F0FF; color: #2456C3; }
.tag-epargne { background: #E8F5EE; color: var(--green-dark); }
.tag-budget { background: #FFF3E0; color: #BF6B00; }

.card-body { padding: 0.75rem 1.25rem 1.25rem; flex: 1; display: flex; flex-direction: column; }
.card-body h3 { font-size: 1rem; margin-bottom: 0.5rem; line-height: 1.4; }
.card-body h3 a { color: var(--navy); text-decoration: none; }
.card-body h3 a:hover { color: var(--green); }
.card-body p { font-size: 0.88rem; color: var(--gray-mid); line-height: 1.55; flex: 1; margin-bottom: 0.85rem; }
.card-link {
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--green);
  display: flex;
  align-items: center;
  gap: 0.3rem;
}
.card-link::after { content: '→'; }
.card-link:hover { text-decoration: none; color: var(--green-dark); }

/* ── CATEGORIES SECTION ── */
.categories-section { background: var(--white); padding: 3.5rem 0; }
.cat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.25rem; }
.cat-card {
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  text-align: center;
  border: 2px solid transparent;
  transition: all 0.25s;
  cursor: pointer;
}
.cat-card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.cat-impots { background: #EEF3FF; border-color: #C5D5FF; }
.cat-epargne { background: #EAF7F0; border-color: #B3DFC6; }
.cat-budget { background: #FFF8EC; border-color: #F5DAA0; }
.cat-icon { font-size: 2.2rem; margin-bottom: 0.75rem; }
.cat-card h3 { font-size: 1.1rem; margin-bottom: 0.4rem; }
.cat-card p { font-size: 0.85rem; color: var(--gray-mid); margin: 0; }

/* ── TRUST BANNER ── */
.trust-banner {
  background: var(--navy);
  padding: 2rem 0;
}
.trust-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.25rem;
  display: flex;
  justify-content: center;
  gap: 3rem;
  flex-wrap: wrap;
}
.trust-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  color: rgba(255,255,255,0.85);
  font-size: 0.88rem;
}
.trust-icon { font-size: 1.2rem; }

/* ── ARTICLE PAGE LAYOUT ── */
.article-page { padding: 2.5rem 0 4rem; }
.article-layout { display: grid; grid-template-columns: 1fr 280px; gap: 2.5rem; align-items: start; }

.article-header { margin-bottom: 2rem; }
.article-meta {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
  flex-wrap: wrap;
}
.article-meta .tag { font-size: 0.78rem; }
.article-date { font-size: 0.82rem; color: var(--gray-mid); }
.article-header h1 { margin-bottom: 1rem; }
.article-intro {
  font-size: 1.1rem;
  color: var(--gray-mid);
  line-height: 1.65;
  padding: 1.25rem;
  background: var(--cream);
  border-left: 4px solid var(--gold);
  border-radius: 0 var(--radius) var(--radius) 0;
  margin-bottom: 1.5rem;
}

/* Breadcrumb */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  font-size: 0.82rem;
  color: var(--gray-mid);
  margin-bottom: 1.5rem;
  flex-wrap: wrap;
}
.breadcrumb a { color: var(--green); }
.breadcrumb-sep { color: var(--border); }

/* Article body */
.article-body h2 {
  margin-top: 2rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--gray-light);
}
.article-body h2:first-child { margin-top: 0; padding-top: 0; border-top: none; }
.article-body h3 { margin-top: 1.5rem; }

/* Tables */
.data-table { width: 100%; border-collapse: collapse; margin: 1.5rem 0; font-size: 0.92rem; }
.data-table th {
  background: var(--navy);
  color: var(--white);
  padding: 0.65rem 0.85rem;
  text-align: left;
  font-weight: 600;
  font-size: 0.85rem;
}
.data-table td { padding: 0.6rem 0.85rem; border-bottom: 1px solid var(--gray-light); }
.data-table tr:last-child td { border-bottom: none; }
.data-table tr:nth-child(even) td { background: var(--cream); }
.data-table tr:hover td { background: var(--gold-light); }

/* Infobox */
.infobox {
  padding: 1.25rem 1.25rem 1.25rem 1.5rem;
  border-radius: var(--radius);
  margin: 1.5rem 0;
  border-left: 4px solid;
}
.infobox-info { background: #EEF3FF; border-color: #5B8AF5; }
.infobox-warning { background: #FFF8E1; border-color: var(--gold); }
.infobox-success { background: #EAF7F0; border-color: var(--green); }
.infobox strong { display: block; margin-bottom: 0.4rem; font-size: 0.88rem; text-transform: uppercase; letter-spacing: 0.04em; }
.infobox p { margin: 0; font-size: 0.93rem; }

/* FAQ */
.faq-section { margin-top: 2.5rem; }
.faq-item { border-bottom: 1px solid var(--gray-light); }
.faq-question {
  width: 100%;
  text-align: left;
  background: none;
  border: none;
  padding: 1rem 0;
  font-family: var(--font-title);
  font-size: 1rem;
  font-weight: 600;
  color: var(--navy);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
}
.faq-question::after { content: '+'; font-size: 1.3rem; color: var(--green); flex-shrink: 0; transition: transform 0.2s; }
.faq-item.open .faq-question::after { content: '−'; }
.faq-answer { display: none; padding: 0 0 1rem; font-size: 0.95rem; }
.faq-item.open .faq-answer { display: block; }

/* Sidebar */
.sidebar { position: sticky; top: 80px; }
.sidebar-box {
  background: var(--white);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  box-shadow: var(--shadow-sm);
  border: 1px solid var(--gray-light);
  margin-bottom: 1.25rem;
}
.sidebar-box h4 {
  font-size: 0.9rem;
  margin-bottom: 0.85rem;
  padding-bottom: 0.6rem;
  border-bottom: 2px solid var(--gold-light);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.sidebar-links { list-style: none; padding: 0; }
.sidebar-links li { padding: 0.3rem 0; border-bottom: 1px solid var(--gray-light); }
.sidebar-links li:last-child { border-bottom: none; }
.sidebar-links a { font-size: 0.88rem; color: var(--navy); }
.sidebar-links a:hover { color: var(--green); }
.sidebar-ad {
  background: var(--gold-light);
  border: 1px dashed var(--gold);
  border-radius: var(--radius);
  padding: 1rem;
  text-align: center;
  font-size: 0.78rem;
  color: var(--gray-mid);
  min-height: 200px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Key numbers highlight */
.key-numbers {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin: 1.5rem 0;
}
.key-number {
  background: var(--white);
  border: 1px solid var(--gray-light);
  border-radius: var(--radius);
  padding: 1rem;
  text-align: center;
  box-shadow: var(--shadow-sm);
}
.key-number strong {
  display: block;
  font-family: var(--font-title);
  font-size: 1.5rem;
  color: var(--navy);
  line-height: 1.1;
}
.key-number span { font-size: 0.8rem; color: var(--gray-mid); }

/* Steps */
.steps { list-style: none; padding: 0; counter-reset: step; }
.steps li {
  counter-increment: step;
  padding: 0.85rem 0.85rem 0.85rem 3.5rem;
  margin-bottom: 0.75rem;
  background: var(--white);
  border-radius: var(--radius);
  border: 1px solid var(--gray-light);
  position: relative;
}
.steps li::before {
  content: counter(step);
  position: absolute;
  left: 0.85rem;
  top: 50%;
  transform: translateY(-50%);
  width: 1.8rem;
  height: 1.8rem;
  background: var(--navy);
  color: var(--white);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-title);
  font-weight: 700;
  font-size: 0.85rem;
}

/* Related articles */
.related-articles { margin-top: 3rem; padding-top: 2rem; border-top: 2px solid var(--gray-light); }
.related-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-top: 1rem; }
.related-card {
  background: var(--white);
  border-radius: var(--radius);
  padding: 1rem;
  border: 1px solid var(--gray-light);
  box-shadow: var(--shadow-sm);
  font-size: 0.88rem;
}
.related-card .tag { margin-bottom: 0.5rem; }
.related-card a { color: var(--navy); font-weight: 600; display: block; line-height: 1.4; }
.related-card a:hover { color: var(--green); }

/* ── FOOTER ── */
footer {
  background: var(--navy);
  color: rgba(255,255,255,0.7);
  padding: 3rem 0 1.5rem;
  margin-top: 3rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 2rem;
  margin-bottom: 2rem;
}
.footer-brand .logo-text { font-size: 1.1rem; margin-bottom: 0.75rem; }
.footer-desc { font-size: 0.85rem; line-height: 1.65; color: rgba(255,255,255,0.55); }
.footer-col h4 {
  font-family: var(--font-title);
  color: var(--white);
  font-size: 0.95rem;
  margin-bottom: 0.85rem;
}
.footer-links { list-style: none; padding: 0; }
.footer-links li { margin-bottom: 0.4rem; }
.footer-links a { color: rgba(255,255,255,0.6); font-size: 0.85rem; }
.footer-links a:hover { color: var(--gold); 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;
  align-items: center;
  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.5); }
.footer-bottom a:hover { color: var(--gold); text-decoration: none; }

/* ── AD CONTAINERS ── */
.ad-top, .ad-mid, .ad-bottom {
  background: var(--white);
  border: 1px dashed var(--border);
  border-radius: var(--radius);
  min-height: 90px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  color: var(--gray-mid);
  text-align: center;
  margin: 1.5rem 0;
}
.ad-top, .ad-bottom { min-height: 90px; }
.ad-mid { min-height: 250px; }

/* ── MENTIONS LEGALES ── */
.legal-page { padding: 3rem 0 5rem; }
.legal-page h1 { margin-bottom: 2rem; }
.legal-page h2 { font-size: 1.2rem; margin: 2rem 0 0.75rem; }
.legal-page p, .legal-page li { font-size: 0.95rem; }

/* ── RESPONSIVE ── */
@media (max-width: 900px) {
  .hero-inner { grid-template-columns: 1fr; gap: 2rem; }
  .cards-grid { grid-template-columns: repeat(2, 1fr); }
  .cat-grid { grid-template-columns: repeat(3, 1fr); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .article-layout { grid-template-columns: 1fr; }
  .sidebar { position: static; }
  .key-numbers { grid-template-columns: repeat(2, 1fr); }
  .related-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .cards-grid { grid-template-columns: 1fr; }
  .cat-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .trust-inner { flex-direction: column; gap: 1rem; }
  .hero-stats { gap: 1rem; }
  .sim-row { grid-template-columns: 1fr; }
  .key-numbers { grid-template-columns: 1fr 1fr; }
  .related-grid { grid-template-columns: 1fr; }
  nav { display: none; }
}

/* ── UTILITIES ── */
.text-center { text-align: center; }
.mt-1 { margin-top: 1rem; }
.mt-2 { margin-top: 2rem; }
.mb-2 { margin-bottom: 2rem; }
.highlight { background: var(--gold-light); padding: 0.1em 0.3em; border-radius: 3px; }
