/* =========================================================================
   Ermite Agence — feuille « document »
   Pour les pages montrées AU CLIENT et imprimables : grille de tarifs,
   comparatif, impact sur le CA. Registre papier, toujours clair — un document
   commercial ne bascule pas en mode sombre.
   (L'application elle-même — pipeline, espace, connexion — utilise ui.css.)
   ========================================================================= */

:root{
  --bg:#F2EFE8; --paper:#FFFFFF; --card:#FFFFFF;
  --ink:#1E1B17; --muted:#6B655C; --ink3:#9A9285;
  --line:#E4DFD5; --line-fort:#D6CFC0;
  --gold:#B08A3E; --gold-fort:#8F6E2A; --gold-soft:#F7F1E2;
  --ok:#2E7D4F; --err:#B4552F;
  --serif:"Playfair Display",Georgia,serif;
  --sans:"Hanken Grotesk",system-ui,-apple-system,sans-serif;
  --mono:"JetBrains Mono",ui-monospace,SFMono-Regular,Menlo,monospace;
}

*{box-sizing:border-box;margin:0;padding:0}
html{-webkit-text-size-adjust:100%}
body{background:var(--bg);color:var(--ink);font-family:var(--sans);
  font-size:16px;line-height:1.55;-webkit-font-smoothing:antialiased;
  overflow-wrap:break-word}
a{color:inherit}
:focus-visible{outline:2px solid var(--gold);outline-offset:2px}

/* la feuille posée sur le fond, comme une page */
.sheet{max-width:840px;margin:26px auto;background:var(--paper);
  padding:48px 46px 64px;border-radius:6px;
  box-shadow:0 1px 2px rgba(30,27,23,.05), 0 24px 60px -30px rgba(30,27,23,.3)}
@media(max-width:680px){
  .sheet{margin:0;border-radius:0;padding:28px 20px 90px;box-shadow:none;min-height:100dvh}
}

/* ---- retour vers l'espace : ces pages n'ont pas la barre de navigation ---- */
.retour{display:inline-flex;align-items:center;gap:7px;margin-bottom:22px;
  padding:9px 16px 9px 13px;border-radius:999px;
  border:1px solid var(--line-fort);background:#fff;color:var(--muted);
  font-size:.85rem;font-weight:600}
.retour:hover{border-color:var(--gold);color:var(--gold-fort)}

/* ---- en-tête ---- */
header{display:flex;justify-content:space-between;align-items:flex-start;gap:18px;
  border-bottom:2px solid var(--ink);padding-bottom:20px;margin-bottom:32px}
.brand{font-family:var(--serif);font-size:1.5rem;font-weight:600;line-height:1.15}
.brand span{color:var(--gold)}
.brand small{display:block;font-family:var(--sans);font-size:.66rem;font-weight:700;
  letter-spacing:.18em;text-transform:uppercase;color:var(--muted);margin-top:6px}
.doc-meta{text-align:right;font-size:.78rem;color:var(--muted);line-height:1.7;flex:none}
@media(max-width:680px){
  header{flex-direction:column;gap:12px}
  .doc-meta{text-align:left}
}

/* ---- titres ---- */
h1{font-family:var(--serif);font-size:2.1rem;font-weight:600;line-height:1.12;
  letter-spacing:-.015em;margin-bottom:9px}
@media(max-width:680px){ h1{font-size:1.6rem} }
h2{font-family:var(--serif);font-size:1.25rem;font-weight:600;margin:40px 0 4px;
  display:flex;align-items:center;gap:11px}
h2::before{content:"";width:22px;height:2px;background:var(--gold);flex:none}
.lead{color:var(--muted);font-size:1rem;margin-bottom:36px;max-width:62ch}
.sub{font-size:.85rem;color:var(--muted);margin-bottom:18px}
.kicker{font-size:.7rem;letter-spacing:.13em;text-transform:uppercase;
  color:var(--gold-fort);font-weight:700}

/* ---- notes et sources ---- */
.note{font-size:.82rem;color:var(--muted);background:var(--gold-soft);
  border-radius:10px;padding:12px 15px;margin-top:16px;line-height:1.5}
.src{font-size:.74rem;color:var(--ink3);margin-top:8px}

footer{margin-top:44px;padding-top:18px;border-top:1px solid var(--line);
  font-size:.76rem;color:var(--muted);display:flex;justify-content:space-between;gap:14px}

/* ---- bouton d'impression flottant ---- */
.fab{position:fixed;bottom:22px;right:22px;z-index:50;display:inline-flex;align-items:center;
  gap:9px;background:var(--ink);color:#fff;border:none;border-radius:999px;
  padding:15px 24px;font-family:var(--sans);font-size:.95rem;font-weight:600;cursor:pointer;
  text-decoration:none;
  box-shadow:0 10px 30px -10px rgba(30,27,23,.6);transition:transform .12s,box-shadow .12s}
.fab:hover{transform:translateY(-2px);box-shadow:0 16px 36px -12px rgba(30,27,23,.7)}
.fab svg{width:18px;height:18px}
@media(max-width:680px){ .fab{left:16px;right:16px;bottom:16px;justify-content:center} }

/* ---- impression ---- */
@page{size:A4;margin:11mm 13mm}
@media print{
  html,body{background:#fff;font-size:10px;line-height:1.38}
  .sheet{margin:0;padding:0;max-width:none;box-shadow:none;border-radius:0}
  .fab,.no-print,.retour{display:none !important}
  header{padding-bottom:10px;margin-bottom:14px}
  .brand{font-size:1.15rem}
  h1{font-size:1.35rem;margin-bottom:5px}
  h2{font-size:1rem;margin:14px 0 3px}
  .lead{font-size:.85rem;margin-bottom:14px}
  .card,.stat,.lever,.example,.calc,h2{page-break-inside:avoid}
  *{-webkit-print-color-adjust:exact;print-color-adjust:exact}
}
