/* ===== Reset & Base ===== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; scroll-behavior: smooth; }
body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  color: #1a1a2e; background: #f4f7fb; line-height: 1.7;
}

/* ===== Colors ===== */
:root {
  --primary-dark: #1a3a5c;
  --primary: #2a5a8c;
  --primary-light: #4a7ab0;
  --bg-light: #e8f0f8;
  --bg-card: #ffffff;
  --text: #1a1a2e;
  --text-light: #4a5568;
  --border: #d0dce8;
  --accent: #2a5a8c;
}

/* ===== Layout ===== */
.container { max-width: 1200px; margin: 0 auto; padding: 0 1.5rem; }

/* ===== Header ===== */
.site-header {
  background: var(--primary-dark); color: #fff; padding: 1rem 0;
  position: sticky; top: 0; z-index: 100; box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.site-header .container { display: flex; align-items: center; justify-content: space-between; }
.site-header h1 { font-size: 1.25rem; font-weight: 600; }
.site-header h1 a { color: #fff; text-decoration: none; }
.site-header nav a { color: rgba(255,255,255,0.85); text-decoration: none; font-size: 0.9rem; margin-left: 1.5rem; transition: color 0.2s; }
.site-header nav a:hover { color: #fff; }

/* ===== Hero ===== */
.hero {
  background: linear-gradient(135deg, var(--primary-dark) 0%, var(--primary) 100%);
  color: #fff; padding: 4rem 0; text-align: center;
}
.hero h2 { font-size: 2.2rem; font-weight: 700; margin-bottom: 0.75rem; }
.hero p { font-size: 1.15rem; opacity: 0.9; max-width: 700px; margin: 0 auto; line-height: 1.6; }

/* ===== Section ===== */
.section { padding: 3rem 0; }
.section-title { font-size: 1.6rem; color: var(--primary-dark); margin-bottom: 2rem; text-align: center; }

/* ===== Grid ===== */
.module-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 1.5rem; }

/* ===== Card ===== */
.module-card {
  background: var(--bg-card); border-radius: 10px; overflow: hidden;
  box-shadow: 0 2px 12px rgba(0,0,0,0.06); transition: transform 0.2s, box-shadow 0.2s;
  display: flex; flex-direction: column;
}
.module-card:hover { transform: translateY(-3px); box-shadow: 0 6px 20px rgba(0,0,0,0.1); }
.module-card-header {
  background: var(--primary); color: #fff; padding: 1rem 1.25rem;
  font-size: 1.1rem; font-weight: 600;
}
.module-card-body { padding: 1.25rem; flex: 1; display: flex; flex-direction: column; }
.module-card-body p { color: var(--text-light); font-size: 0.95rem; margin-bottom: 1.25rem; flex: 1; }
.module-card-actions { display: flex; gap: 0.75rem; }
.module-card-actions .btn { flex: 1; text-align: center; }

/* ===== Buttons ===== */
.btn {
  display: inline-block; padding: 0.6rem 1.2rem; border-radius: 6px;
  font-size: 0.9rem; font-weight: 500; text-decoration: none; cursor: pointer;
  transition: background 0.2s, color 0.2s; border: none;
}
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); }
.btn-outline { background: transparent; color: var(--primary); border: 1.5px solid var(--primary); }
.btn-outline:hover { background: var(--bg-light); }
.btn-download { background: #e8f0f8; color: var(--primary-dark); }
.btn-download:hover { background: #d0dce8; }

/* ===== Footer ===== */
.site-footer {
  background: var(--primary-dark); color: rgba(255,255,255,0.7);
  text-align: center; padding: 1.5rem 0; font-size: 0.85rem; margin-top: 2rem;
}

/* ===== Module Page ===== */
.module-page { padding: 2.5rem 0; }
.module-page-header {
  background: var(--primary); color: #fff; padding: 2rem 0; margin-bottom: 2rem;
}
.module-page-header h1 { font-size: 1.8rem; font-weight: 700; margin-bottom: 0.5rem; }
.module-page-header .breadcrumb { font-size: 0.9rem; opacity: 0.85; }
.module-page-header .breadcrumb a { color: #fff; text-decoration: underline; }
.module-page .content { max-width: 900px; margin: 0 auto; }
.module-page .content h2 { color: var(--primary-dark); font-size: 1.4rem; margin: 2rem 0 1rem; padding-bottom: 0.5rem; border-bottom: 2px solid var(--bg-light); }
.module-page .content h3 { color: var(--primary); font-size: 1.15rem; margin: 1.5rem 0 0.75rem; }
.module-page .content p { margin-bottom: 0.75rem; color: var(--text); }
.module-page .content ul, .module-page .content ol { margin: 0.5rem 0 1rem 1.5rem; }
.module-page .content li { margin-bottom: 0.4rem; color: var(--text); }
.module-page .content strong { color: var(--primary-dark); }
.module-page .content .highlight-box {
  background: var(--bg-light); border-left: 4px solid var(--primary);
  padding: 1rem 1.25rem; margin: 1.25rem 0; border-radius: 0 6px 6px 0;
}
.module-page .content .highlight-box p:last-child { margin-bottom: 0; }

/* ===== Tables ===== */
.table-wrap { overflow-x: auto; margin: 1rem 0 1.5rem; }
table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
thead { background: var(--primary); color: #fff; }
th, td { padding: 0.6rem 0.75rem; text-align: left; border: 1px solid var(--border); }
tbody tr:nth-child(even) { background: #f8fafc; }
tbody tr:hover { background: var(--bg-light); }

/* ===== Download bar ===== */
.download-bar {
  background: var(--bg-light); border: 1px solid var(--border); border-radius: 8px;
  padding: 1.25rem; text-align: center; margin: 2rem 0;
}
.download-bar p { margin-bottom: 0.75rem; font-weight: 500; color: var(--primary-dark); }
.download-bar .btn { font-size: 1rem; padding: 0.75rem 2rem; }

/* ===== Fiche (sub-page) ===== */
.fiche { padding: 2.5rem 0 3rem; }
.fiche-header {
  background: var(--primary); color: #fff;
  padding: 2rem 1.5rem; border-radius: 10px; margin-bottom: 2rem;
  box-shadow: 0 4px 16px rgba(26,58,92,0.12);
}
.fiche-tag {
  display: inline-block; background: rgba(255,255,255,0.15);
  padding: 0.25rem 0.75rem; border-radius: 999px;
  font-size: 0.8rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em;
  margin-bottom: 0.75rem;
}
.fiche-header h1 { font-size: 1.9rem; font-weight: 700; margin-bottom: 0.5rem; }
.fiche-lead { font-size: 1.05rem; opacity: 0.95; margin-bottom: 1.25rem; max-width: 800px; }

.fiche-section {
  background: var(--bg-card); border: 1px solid var(--border); border-radius: 10px;
  padding: 1.75rem 1.5rem; margin-bottom: 1.5rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.04);
}
.fiche-section h2 {
  color: var(--primary-dark); font-size: 1.35rem; font-weight: 700;
  margin-bottom: 1rem; padding-bottom: 0.5rem;
  border-bottom: 2px solid var(--bg-light);
}
.fiche-section h3 { color: var(--primary); font-size: 1.1rem; font-weight: 600; margin: 1.25rem 0 0.6rem; }
.fiche-section p { margin-bottom: 0.85rem; color: var(--text); }
.fiche-section strong { color: var(--primary-dark); }

.bullet-list { margin: 0.5rem 0 1rem 1.25rem; }
.bullet-list li { margin-bottom: 0.5rem; color: var(--text); line-height: 1.6; }
.bullet-list ol, .fiche-section ol.bullet-list { list-style: decimal; }

.piliers-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 1rem; margin: 1rem 0 1.25rem; }
.pilier {
  background: var(--bg-light); border-left: 4px solid var(--primary);
  padding: 1rem 1.1rem; border-radius: 0 6px 6px 0;
}
.pilier h3 { margin-top: 0; color: var(--primary-dark); font-size: 1.05rem; }
.pilier p { margin-bottom: 0; font-size: 0.95rem; }

.chiffres-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 0.75rem; margin: 1rem 0 1.25rem; }
.chiffre {
  background: var(--bg-light); border: 1px solid var(--border);
  border-radius: 8px; padding: 1rem; text-align: center;
}
.chiffre-value { display: block; font-size: 1.4rem; font-weight: 700; color: var(--primary-dark); margin-bottom: 0.25rem; }
.chiffre-label { display: block; font-size: 0.82rem; color: var(--text-light); }

.data-table { width: 100%; border-collapse: collapse; font-size: 0.92rem; margin: 0.75rem 0 1.25rem; }
.data-table th { background: var(--primary); color: #fff; padding: 0.65rem 0.8rem; text-align: left; font-weight: 600; }
.data-table td { padding: 0.6rem 0.8rem; border: 1px solid var(--border); color: var(--text); vertical-align: top; }
.data-table tbody tr:nth-child(even) { background: #f8fafc; }
.data-table tbody tr:hover { background: var(--bg-light); }

.fiche-nav { display: flex; gap: 0.75rem; flex-wrap: wrap; justify-content: center; margin-top: 2rem; }
.btn-secondary { background: var(--bg-light); color: var(--primary-dark); border: 1px solid var(--border); }
.btn-secondary:hover { background: #d0dce8; }

/* ===== Responsive ===== */
@media (max-width: 768px) {
  .hero h2 { font-size: 1.6rem; }
  .hero p { font-size: 1rem; }
  .module-grid { grid-template-columns: 1fr; }
  .site-header .container { flex-direction: column; gap: 0.5rem; }
  .site-header nav a { margin: 0 0.75rem; }
  .module-page-header h1 { font-size: 1.4rem; }
  .module-card-actions { flex-direction: column; }
}
