/* Zfinpro Tools - styles legers, mobile-first (complement au CDN Tailwind) */
:root {
  --bg: #f6f8fb;
  --card: #ffffff;
  --ink: #0f172a;
  --muted: #64748b;
  --brand: #0f6b4b;
  --brand-2: #0b5e73;
  --accent: #c77f3c;
  --line: #e2e8f0;
  --radius: 14px;
  --shadow: 0 6px 24px rgba(15, 23, 42, 0.06);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
}
a { color: var(--brand-2); text-decoration: none; }
a:hover { text-decoration: underline; }
.container { max-width: 760px; margin: 0 auto; padding: 0 16px; }
.container-wide { max-width: 1040px; margin: 0 auto; padding: 0 16px; }

/* Header */
.site-header {
  background: var(--card);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 20;
}
.site-header .bar {
  display: flex; align-items: center; justify-content: space-between;
  gap: 12px; padding: 12px 16px; max-width: 1040px; margin: 0 auto;
}
.brand {
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: 800; font-size: 18px; color: var(--ink);
}
.brand .dot {
  width: 22px; height: 22px; border-radius: 6px;
  background: linear-gradient(135deg, var(--brand), var(--brand-2));
  display: inline-block;
}
.lang-switch { display: flex; gap: 4px; flex-wrap: wrap; }
.lang-switch a {
  font-size: 13px; font-weight: 600; padding: 5px 9px; border-radius: 8px;
  color: var(--muted); border: 1px solid var(--line); background: #fff;
}
.lang-switch a.active { color: #fff; background: var(--brand); border-color: var(--brand); }

/* Layout */
main { padding: 24px 0 40px; }
.crumbs { font-size: 13px; color: var(--muted); margin: 4px 0 14px; }
h1 { font-size: 26px; line-height: 1.25; margin: 0 0 10px; }
.intro { color: var(--muted); margin: 0 0 20px; }

/* Card + form */
.card {
  background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 20px; margin-bottom: 20px;
}
.field { margin-bottom: 14px; }
.field label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.field input, .field textarea {
  width: 100%; padding: 11px 12px; font-size: 16px;
  border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--ink);
}
.field textarea { min-height: 90px; resize: vertical; }
.field input:focus, .field textarea:focus {
  outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(15,107,75,0.12);
}
.actions { display: flex; gap: 10px; margin-top: 6px; flex-wrap: wrap; }
.btn {
  appearance: none; border: none; cursor: pointer;
  font-size: 16px; font-weight: 700; padding: 12px 20px; border-radius: 10px;
  background: var(--brand); color: #fff;
}
.btn:hover { background: #0c5a3f; }
.btn:disabled { opacity: 0.6; cursor: not-allowed; }
.btn-ghost { background: #fff; color: var(--ink); border: 1px solid var(--line); }
.btn-ghost:hover { background: #f1f5f9; }

/* Results */
.result {
  margin-top: 8px; border: 1px solid var(--line); border-radius: var(--radius);
  background: linear-gradient(180deg, #fbfdff, #f4f8ff); padding: 18px;
}
.result-grid { margin: 0; }
.result-row {
  display: flex; justify-content: space-between; align-items: baseline;
  gap: 12px; padding: 8px 0; border-bottom: 1px dashed var(--line);
}
.result-row:last-child { border-bottom: none; }
.result-row dt { color: var(--muted); font-size: 14px; margin: 0; }
.result-row dd { margin: 0; font-weight: 700; font-size: 16px; }
.result-row--big dd { font-size: 24px; color: var(--brand); }
.ai-answer h3 { font-size: 16px; margin: 14px 0 6px; }
.ai-answer p { margin: 6px 0; }
.ai-answer ul { margin: 6px 0 6px 18px; }
.ai-loading, .ai-warning { color: var(--muted); margin: 0; }

/* Ad slots */
.ad-slot {
  margin: 20px 0; padding: 10px; text-align: center;
  border: 1px dashed var(--line); border-radius: var(--radius);
  background: #fff; min-height: 100px;
  display: flex; align-items: center; justify-content: center;
}
.ad-label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.08em; color: #94a3b8; }

/* Tool grid (hub) */
.tool-grid { display: grid; grid-template-columns: 1fr; gap: 14px; margin: 8px 0 24px; }
@media (min-width: 640px) { .tool-grid { grid-template-columns: 1fr 1fr; } }
@media (min-width: 960px) { .tool-grid { grid-template-columns: 1fr 1fr 1fr; } }
.tool-card {
  display: block; background: var(--card); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 16px; box-shadow: var(--shadow); color: var(--ink);
}
.tool-card:hover { text-decoration: none; border-color: var(--brand); transform: translateY(-1px); transition: .15s; }
.tool-card h2 { font-size: 16px; margin: 0 0 6px; }
.tool-card p { font-size: 13px; color: var(--muted); margin: 0; }
.tool-card .badge {
  display: inline-block; font-size: 11px; font-weight: 700; color: var(--accent);
  border: 1px solid var(--accent); border-radius: 999px; padding: 1px 8px; margin-bottom: 8px;
}

/* Related links */
.related { margin-top: 8px; }
.related h2 { font-size: 15px; margin: 0 0 10px; }
.related ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
@media (min-width: 640px) { .related ul { grid-template-columns: 1fr 1fr; } }
.related a { font-size: 14px; }

/* Footer */
.site-footer {
  border-top: 1px solid var(--line); background: var(--card);
  padding: 22px 0; margin-top: 20px; color: var(--muted); font-size: 13px;
}
.site-footer .disclaimer { max-width: 760px; margin: 0 auto 8px; }
