/* ===== FacturCheck — mobile-first, zéro dépendance ===== */
:root {
  --navy: #0f172a;
  --navy-2: #1e293b;
  --ink: #26313f;
  --muted: #64748b;
  --accent: #ea580c;
  --accent-dark: #c2410c;
  --green: #16a34a;
  --bg: #fdfbf7;
  --bg-alt: #f4efe6;
  --card: #ffffff;
  --radius: 14px;
  --shadow: 0 4px 20px rgba(15, 23, 42, .08);
}

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

body {
  font-family: Georgia, 'Times New Roman', serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, .btn, .brand, .countdown, nav, .kpi, .badge, .q-num, table, .topbar, input, button, .hero-badge, .price, small {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Arial, sans-serif;
}

h1 { font-size: clamp(1.7rem, 5vw, 2.9rem); line-height: 1.15; color: var(--navy); letter-spacing: -.02em; }
h2 { font-size: clamp(1.35rem, 3.5vw, 1.9rem); color: var(--navy); margin-bottom: .8em; letter-spacing: -.01em; }
h3 { font-size: 1.1rem; color: var(--navy); margin-bottom: .4em; }
p { margin-bottom: .8em; }
a { color: var(--accent-dark); }
.accent { color: var(--accent); }
.center { text-align: center; }
.mt { margin-top: 1.4rem; }

.container { max-width: 1060px; margin: 0 auto; padding: 0 20px; }
.container.narrow { max-width: 720px; }

/* --- Topbar --- */
.topbar { background: var(--navy); position: sticky; top: 0; z-index: 50; }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; padding: 12px 20px; }
.brand { color: #fff; text-decoration: none; font-weight: 700; font-size: 1.1rem; }

/* --- Boutons --- */
.btn {
  display: inline-block; border: 0; cursor: pointer; text-decoration: none; text-align: center;
  border-radius: 10px; font-weight: 700; transition: transform .12s, background .12s;
  padding: 12px 22px; font-size: 1rem;
}
.btn:active { transform: scale(.98); }
.btn-primary { background: var(--accent); color: #fff; box-shadow: 0 4px 14px rgba(234, 88, 12, .35); }
.btn-primary:hover { background: var(--accent-dark); }
.btn-light { background: #fff; color: var(--navy); }
.btn-ghost { background: transparent; color: var(--muted); }
.btn-sm { padding: 8px 14px; font-size: .9rem; }
.btn-xl { padding: 17px 34px; font-size: 1.15rem; border-radius: 12px; }
.btn-block { display: block; width: 100%; }

/* --- Hero --- */
.hero { background: linear-gradient(180deg, var(--navy) 0%, var(--navy-2) 100%); color: #cbd5e1; text-align: center; padding: 56px 0 64px; }
.hero h1 { color: #fff; margin: 14px 0 18px; }
.hero-sub { font-size: 1.1rem; max-width: 640px; margin: 0 auto 26px; }
.hero-sub strong { color: #fecaca; }
.hero-badge {
  display: inline-block; background: rgba(234, 88, 12, .16); color: #fdba74;
  border: 1px solid rgba(234, 88, 12, .45); padding: 6px 14px; border-radius: 999px; font-size: .85rem; font-weight: 600;
}
.section .hero-badge { background: #fff3e9; color: var(--accent-dark); border-color: #fbcfa8; }
.hero-note { margin-top: 14px; font-size: .9rem; color: #94a3b8; }

/* --- Compte à rebours --- */
.countdown { display: flex; justify-content: center; gap: 10px; margin: 0 0 30px; }
.cd-box {
  background: rgba(255, 255, 255, .07); border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 12px; padding: 12px 8px; min-width: 74px;
}
.cd-box span { display: block; font-size: 1.9rem; font-weight: 800; color: #fff; font-variant-numeric: tabular-nums; }
.cd-box small { color: #94a3b8; font-size: .75rem; text-transform: uppercase; letter-spacing: .06em; }

/* --- Sections & cartes --- */
.section { padding: 56px 0; }
.section-alt { background: var(--bg-alt); }
.cards { display: grid; gap: 18px; grid-template-columns: 1fr; margin-top: 10px; }
.card { background: var(--card); border-radius: var(--radius); padding: 26px 22px; box-shadow: var(--shadow); }
.card-icon { font-size: 34px; margin-bottom: 10px; }

.steps { display: grid; gap: 22px; grid-template-columns: 1fr; margin: 24px 0 30px; }
.step-num {
  display: inline-flex; align-items: center; justify-content: center;
  width: 40px; height: 40px; border-radius: 50%; background: var(--accent); color: #fff;
  font-weight: 800; font-size: 1.2rem; margin-bottom: 10px;
}

details { background: var(--card); border-radius: 10px; padding: 14px 18px; margin-bottom: 10px; box-shadow: var(--shadow); }
details summary { cursor: pointer; font-weight: 700; color: var(--navy); font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; }
details p { margin: 10px 0 2px; }

.cta-final { background: linear-gradient(135deg, var(--accent-dark), var(--accent)); color: #fff; padding: 56px 0; }
.cta-final h2 { color: #fff; }

.checklist { list-style: none; }
.checklist li { padding-left: 30px; position: relative; margin-bottom: 10px; }
.checklist li::before { content: '✔'; position: absolute; left: 0; color: var(--green); font-weight: 700; }

/* --- Diagnostic --- */
.diag-head { text-align: center; margin-bottom: 26px; }
.progress { height: 8px; background: #e6e0d4; border-radius: 999px; overflow: hidden; margin-bottom: 26px; }
.progress-bar { height: 100%; width: 5%; background: var(--accent); border-radius: 999px; transition: width .3s; }
fieldset.diag-step { border: 0; }
legend { font-size: 1.25rem; font-weight: 700; color: var(--navy); margin-bottom: 18px; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; }
.q-num { display: block; font-size: .8rem; color: var(--accent-dark); text-transform: uppercase; letter-spacing: .08em; margin-bottom: 6px; }
.options { display: grid; gap: 10px; margin-bottom: 18px; }
.option {
  display: flex; align-items: center; gap: 12px; background: var(--card);
  border: 2px solid #e6e0d4; border-radius: 12px; padding: 15px 16px; cursor: pointer;
  transition: border-color .12s, background .12s; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}
.option:hover { border-color: #fbbf88; }
.option:has(input:checked) { border-color: var(--accent); background: #fff5ec; }
.option input { accent-color: var(--accent); width: 18px; height: 18px; flex: none; }

.field { margin-bottom: 16px; }
.field label { display: block; font-weight: 700; margin-bottom: 6px; color: var(--navy); font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; }
.field input, .sale-form input {
  width: 100%; padding: 13px 14px; border: 2px solid #e6e0d4; border-radius: 10px; font-size: 1rem;
}
.field input:focus { outline: 0; border-color: var(--accent); }
.consent { display: flex; gap: 10px; align-items: flex-start; font-size: .9rem; color: var(--muted); margin: 14px 0 20px; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; }
.consent input { margin-top: 3px; accent-color: var(--accent); flex: none; width: 17px; height: 17px; }
.hp { position: absolute; left: -9999px; opacity: 0; }
.diag-error { color: #dc2626; font-weight: 600; margin-top: 12px; }
.diag-email-note { color: var(--muted); }
.diag-back { margin-top: 10px; }

/* --- Résultat --- */
.score-ring {
  --score: 50; --ring-color: var(--accent);
  width: 190px; height: 190px; border-radius: 50%; margin: 26px auto;
  background: conic-gradient(var(--ring-color) calc(var(--score) * 1%), #e6e0d4 0);
  display: flex; align-items: center; justify-content: center;
}
.score-ring::before { content: ''; position: absolute; width: 150px; height: 150px; border-radius: 50%; background: var(--bg); }
.score-value { position: relative; font-size: 3rem; font-weight: 800; color: var(--navy); font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; }
.score-value small { font-size: 1.2rem; color: var(--muted); }
.score-headline { margin-bottom: 12px; }
.notice { background: #fff; border-left: 4px solid var(--accent); border-radius: 10px; padding: 16px 18px; margin-top: 22px; text-align: left; box-shadow: var(--shadow); }

/* --- Tarifs --- */
.pricing { display: grid; gap: 20px; grid-template-columns: 1fr; margin: 20px 0; }
.price-card { background: var(--card); border-radius: var(--radius); padding: 28px 24px; box-shadow: var(--shadow); position: relative; display: flex; flex-direction: column; }
.price-card.popular { border: 3px solid var(--accent); }
.popular-tag {
  position: absolute; top: -14px; left: 50%; transform: translateX(-50%);
  background: var(--accent); color: #fff; border-radius: 999px; padding: 4px 16px; font-size: .8rem; font-weight: 700;
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; white-space: nowrap;
}
.price { font-size: 2.4rem; font-weight: 800; color: var(--navy); margin: 6px 0; }
.price small { font-size: 1rem; color: var(--muted); font-weight: 400; }
.price-pitch { color: var(--muted); min-height: 44px; }
.price-card ul { list-style: none; margin: 12px 0 20px; flex: 1; }
.price-card li { padding-left: 26px; position: relative; margin-bottom: 9px; font-size: .95rem; }
.price-card li::before { content: '✔'; position: absolute; left: 0; color: var(--green); font-weight: 700; }

.price-hero { margin: 18px 0 24px; }
.price-old { text-decoration: line-through; color: var(--muted); font-size: 1.4rem; margin-right: 14px; }
.price-new { font-size: 2.6rem; font-weight: 800; color: var(--accent-dark); font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; }
.price-new small { font-size: 1rem; color: var(--muted); font-weight: 400; }

/* --- Footer --- */
.footer { background: var(--navy); color: #94a3b8; padding: 34px 0; text-align: center; font-size: .9rem; }
.footer a { color: #cbd5e1; }
.footer-small { font-size: .8rem; color: var(--muted); }

/* --- Bandeau consentement --- */
.consent-banner {
  position: fixed; bottom: 16px; left: 16px; right: 16px; z-index: 100;
  background: #fff; color: var(--ink); border-radius: 12px; padding: 16px 18px;
  box-shadow: 0 8px 30px rgba(15, 23, 42, .25); font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}
.consent-banner p { font-size: .9rem; }
.consent-actions { display: flex; gap: 10px; }

/* --- Admin --- */
.admin { background: #f1f5f9; font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; }
.admin-head { margin-bottom: 22px; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(140px, 1fr)); gap: 12px; margin-bottom: 26px; }
.kpi { background: #fff; border-radius: 12px; padding: 16px; text-align: center; box-shadow: var(--shadow); }
.kpi-num { display: block; font-size: 1.9rem; font-weight: 800; color: var(--navy); }
.kpi small { color: var(--muted); font-size: .78rem; }
.kpi-ca .kpi-num { color: var(--green); }
.admin-grid { display: grid; gap: 26px; grid-template-columns: 1fr; }
.table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 10px; overflow: hidden; box-shadow: var(--shadow); margin-bottom: 24px; font-size: .88rem; }
.table th, .table td { padding: 9px 12px; text-align: left; border-bottom: 1px solid #f1f5f9; }
.table th { background: var(--navy); color: #fff; }
.badge { display: inline-block; border-radius: 999px; padding: 2px 10px; color: #fff; font-weight: 700; font-size: .8rem; }
.badge-vert { background: var(--green); }
.badge-orange { background: var(--accent); }
.badge-rouge { background: #dc2626; }
.sale-form { display: grid; gap: 8px; margin-bottom: 14px; }

/* --- Légal --- */
.legal h2 { margin-top: 1.4em; font-size: 1.2rem; }

/* --- Desktop --- */
@media (min-width: 720px) {
  .cards, .steps { grid-template-columns: repeat(3, 1fr); }
  .pricing { grid-template-columns: repeat(3, 1fr); }
  .admin-grid { grid-template-columns: 3fr 2fr; }
  .cd-box { min-width: 92px; padding: 16px 10px; }
  .cd-box span { font-size: 2.4rem; }
  .consent-banner { left: auto; max-width: 380px; }
  .sale-form { grid-template-columns: 2fr 1fr 2fr auto; }
}
