/* ════════════════════════════════════════════════════════════════
   PAGES NOTIONS — /consolidation-des-comptes, /audit-legal,
   /controle-de-gestion, /analyse-financiere (+ compte à rebours).
   Pages statiques : tout le texte est dans le code source, lisible
   par Google. Charte Grand Livre : ivoire, vert profond, or.
   ════════════════════════════════════════════════════════════════ */
:root { --bg:#F7F3EA; --bg2:#F1ECDD; --ink:#1B2A22; --text2:#5E6659; --green:#2F6B4F; --green2:rgba(47,107,79,.1); --gold:#C9962C; --gold-soft:#E7C98A; --red:#B5442E; --surface:#fff; --border:rgba(27,42,34,.12); }
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { font-family: 'Plus Jakarta Sans', system-ui, sans-serif; background: var(--bg); color: var(--ink); line-height: 1.72; font-size: 16.5px; }
a { color: var(--green); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

.top { background: var(--ink); }
.top-in { max-width: 1100px; margin: 0 auto; padding: 0 22px; height: 58px; display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.logo { font-family: 'Fraunces', serif; font-style: italic; font-size: 1.35rem; color: var(--gold-soft); text-decoration: none; }
.top-links { display: flex; gap: 18px; align-items: center; font-size: 14px; }
.top-links a { color: #F7F3EA; text-decoration: none; }
.top-links a:hover { color: var(--gold-soft); }
.top-links a.cta { background: var(--gold-soft); color: var(--ink); padding: 7px 14px; border-radius: 8px; font-weight: 600; }

.n-hero { background: linear-gradient(135deg, #16241D 0%, #1B2A22 55%, #22362B 100%); color: #F7F3EA; border-bottom: 3px solid var(--gold); }
.n-hero-in { max-width: 1100px; margin: 0 auto; padding: 46px 22px 40px; }
.crumbs { font-size: 13px; color: rgba(247,243,234,.7); margin-bottom: 14px; }
.crumbs a { color: rgba(247,243,234,.85); }
.n-hero h1 { font-family: 'Fraunces', serif; font-weight: 400; font-size: clamp(2rem, 5vw, 3.1rem); line-height: 1.1; max-width: 20ch; }
.n-hero .lead { color: rgba(247,243,234,.86); font-size: 1.08rem; max-width: 62ch; margin-top: 14px; }
.n-for { margin-top: 18px; font-size: 14px; color: var(--gold-soft); }

.n-layout { max-width: 1100px; margin: 0 auto; padding: 38px 22px 70px; display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 46px; }
.toc { position: sticky; top: 20px; align-self: start; font-size: 14px; }
.toc p { font-family: 'Fraunces', serif; font-size: 1.05rem; margin-bottom: 8px; }
.toc ol { list-style: none; border-left: 2px solid var(--border); }
.toc li a { display: block; padding: 5px 0 5px 14px; color: var(--text2); text-decoration: none; line-height: 1.4; }
.toc li a:hover { color: var(--green); }

article { max-width: 70ch; }
article > section { scroll-margin-top: 20px; }
article h2 { font-family: 'Fraunces', serif; font-weight: 500; font-size: 1.65rem; line-height: 1.2; margin: 46px 0 12px; }
article > section:first-child h2 { margin-top: 0; }
article h3 { font-family: 'Fraunces', serif; font-weight: 500; font-size: 1.2rem; margin: 26px 0 8px; }
article p { margin-bottom: 14px; }
article ul, article ol { margin: 0 0 16px 22px; }
article li { margin-bottom: 7px; }
.table-wrap { overflow-x: auto; margin: 6px 0 18px; }
table { border-collapse: collapse; width: 100%; font-size: 15px; background: var(--surface); }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--border); vertical-align: top; }
th { font-weight: 600; background: var(--bg2); }
.note { font-size: 14px; color: var(--text2); }

.formula { background: var(--ink); color: #F7F3EA; border-left: 4px solid var(--gold); border-radius: 8px; padding: 14px 18px; margin: 10px 0 6px; font-family: 'JetBrains Mono', monospace; font-size: 15px; overflow-x: auto; }
.legend { font-size: 14px; color: var(--text2); margin-bottom: 16px; }
.exemple { border: 2px dotted var(--green); outline: 1px solid rgba(201,150,44,.35); outline-offset: 3px; border-radius: 10px; padding: 16px 18px; margin: 14px 0 20px; background: var(--surface); }
.ex-title { font-weight: 700; margin-bottom: 6px; }
.ex-calc { font-family: 'JetBrains Mono', monospace; font-size: 14px; line-height: 1.8; overflow-x: auto; }
.ex-res { display: inline-block; margin-top: 8px; background: var(--green); color: #fff; border-radius: 6px; padding: 4px 10px; font-weight: 600; font-size: 14px; }

.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; margin: 10px 0 18px; align-items: start; }
.card { background: var(--surface); border: 1px solid var(--border); border-top: 3px solid var(--gold); border-radius: 10px; }
.card summary { list-style: none; cursor: pointer; padding: 14px 16px; font-family: 'Fraunces', serif; font-size: 1.05rem; font-weight: 500; }
.card summary::-webkit-details-marker { display: none; }
.card summary::after { content: 'Retourner'; display: block; font-family: 'Plus Jakarta Sans', sans-serif; font-size: 12px; color: var(--text2); margin-top: 4px; }
.card[open] summary { background: var(--green2); }
.card[open] summary::after { content: 'Masquer'; }
.card div { padding: 12px 16px 14px; font-size: 14.5px; line-height: 1.6; }

.quiz { margin: 10px 0 20px; }
.q { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 16px 18px; margin-bottom: 12px; }
.q-text { font-weight: 600; margin-bottom: 10px; }
.q-opts { display: grid; gap: 7px; }
.q-opt { text-align: left; background: var(--bg); border: 1px solid var(--border); border-radius: 8px; padding: 9px 12px; font: 15px 'Plus Jakarta Sans', sans-serif; color: var(--ink); cursor: pointer; }
.q-opt:hover:not(:disabled) { border-color: var(--green); }
.q-opt.ok { background: var(--green2); border-color: var(--green); font-weight: 600; }
.q-opt.ko { background: rgba(181,68,46,.1); border-color: var(--red); }
.q-opt:disabled { cursor: default; }
.q-exp { margin-top: 10px; font-size: 14.5px; color: var(--text2); }
.q-score { font-family: 'JetBrains Mono', monospace; font-size: 14px; color: var(--text2); }

details.faq { border-bottom: 1px solid var(--border); padding: 12px 0; }
details.faq summary { cursor: pointer; font-weight: 600; }
details.faq p { margin: 8px 0 0; }

.cta-box { margin: 46px 0 10px; padding: 26px; border-radius: 14px; background: var(--surface); border: 1px solid rgba(201,150,44,.5); }
.cta-box h2 { margin-top: 0 !important; }
.btn { display: inline-block; background: var(--green); color: #fff; text-decoration: none; padding: 12px 20px; border-radius: 8px; font-weight: 600; margin: 6px 10px 0 0; }
.btn:hover { background: #255a42; }
.btn.ghost { background: transparent; color: var(--green); border: 1px solid rgba(47,107,79,.4); }
.related { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 10px; margin-top: 10px; }
.related a { display: block; padding: 12px 14px; background: var(--surface); border: 1px solid var(--border); border-radius: 8px; text-decoration: none; color: var(--ink); font-weight: 600; font-size: 14.5px; }
.related a:hover { border-color: var(--gold); }
.related small { display: block; font-weight: 400; color: var(--text2); font-size: 13px; }

footer { border-top: 1px solid var(--border); padding: 24px 22px 40px; text-align: center; font-size: 13.5px; color: var(--text2); }
footer a { margin: 0 8px; }

@media (max-width: 860px) {
  .n-layout { grid-template-columns: minmax(0, 1fr); gap: 18px; }   /* minmax : un tableau large défile au lieu d’élargir la page */
  .toc { position: static; }
}
@media (max-width: 560px) { .top-links a:not(.cta) { display: none; } }
