/* Compta Uno - the "?" help mark and its panel (M32 v1.0, 07/11/2026). ONE file for the app and the public site.
   Markup:  <span class="cs-term">avis d’impôt<a class="cs-help" href="...#avis-impot" title="phrase courte" data-example="img/exemples/avis-impot.svg" aria-label="Aide : avis d’impôt">?</a></span>
   Works without JavaScript (the "?" is a normal link); js/cs-help.js turns it into a panel. */
.cs-term { text-decoration: underline dotted var(--blue, #1f5eff); text-decoration-thickness: 1.5px; text-underline-offset: 4px; white-space: nowrap; cursor: help; }
.cs-term .cs-help { margin-left: 3px; }
.cs-help { position: relative; display: inline-grid; place-items: center; width: 20px; height: 20px; flex: 0 0 auto; border-radius: 50%; background: var(--blue-soft, #eaf0ff); color: var(--blue, #1f5eff); font: 800 12px/1 var(--font, system-ui, sans-serif); text-decoration: none; vertical-align: 2px; white-space: nowrap; transition: background .15s, color .15s; }
.cs-help::after { content: ""; position: absolute; inset: -12px; }
.cs-help:hover, .cs-help:focus-visible, .cs-help[aria-expanded="true"] { background: var(--blue, #1f5eff); color: #fff; }
h1 .cs-help, h2 .cs-help, h3 .cs-help { vertical-align: 4px; }

.cs-tip { position: absolute; z-index: 1000; width: min(340px, calc(100vw - 32px)); background: #fff; color: var(--ink, #14203f); border: 1px solid var(--line, #eceae4); border-radius: 18px; box-shadow: 0 18px 44px rgba(13,24,52,.18); padding: 16px 18px 14px; font: 400 15px/1.5 var(--font, system-ui, sans-serif); text-align: left; white-space: normal; animation: cs-tip-in .14s ease-out; }
.cs-tip::before { content: ""; position: absolute; top: -7px; left: var(--arrow, 24px); width: 12px; height: 12px; background: #fff; border-left: 1px solid var(--line, #eceae4); border-top: 1px solid var(--line, #eceae4); transform: rotate(45deg); }
.cs-tip.is-up::before { top: auto; bottom: -7px; transform: rotate(225deg); }
.cs-tip__k { display: block; font-size: 12px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; color: var(--blue, #1f5eff); margin: 0 28px 2px 0; }
.cs-tip__t { display: block; font-size: 17px; font-weight: 800; color: var(--navy, #0d1834); margin: 0 28px 6px 0; line-height: 1.25; }
.cs-tip__s { margin: 0; color: var(--text, #4a5571); }
.cs-tip__a { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 10px; padding-top: 10px; border-top: 1px solid var(--line, #eceae4); }
.cs-tip__a a { display: inline-flex; align-items: center; gap: 6px; min-height: 36px; font-weight: 700; font-size: 15px; color: var(--blue, #1f5eff); text-decoration: none; }
.cs-tip__a a:hover { text-decoration: underline; }
.cs-tip__x { position: absolute; top: 8px; right: 8px; width: 36px; height: 36px; border: 0; border-radius: 50%; background: none; color: var(--muted, #5a6478); font: 400 24px/1 system-ui, sans-serif; cursor: pointer; }
.cs-tip__x:hover { background: var(--cream, #f7f6f2); }
@keyframes cs-tip-in { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: none; } }
@media (max-width: 640px) {
  .cs-tip { position: fixed; left: 0 !important; right: 0; top: auto !important; bottom: 0; width: auto; border-radius: 22px 22px 0 0; padding: 22px 20px calc(18px + env(safe-area-inset-bottom)); animation-name: cs-sheet-in; }
  .cs-tip::before { display: none; }
  .cs-tip__a a { min-height: 44px; }
}
@keyframes cs-sheet-in { from { transform: translateY(100%); } to { transform: none; } }
.cs-tipback { position: fixed; inset: 0; z-index: 999; background: rgba(13,24,52,.35); }
@media (min-width: 641px) { .cs-tipback { display: none; } }

/* "Voir un exemple": full-screen viewer for a sample image (official model or M32's "Exemple fictif" drawing). */
.cs-lightbox { position: fixed; inset: 0; z-index: 1001; background: rgba(13,24,52,.95); display: flex; flex-direction: column; align-items: center; padding: 16px; overflow: auto; }
.cs-lightbox__bar { width: 100%; max-width: 760px; display: flex; align-items: center; justify-content: space-between; gap: 12px; color: #fff; font: 700 16px/1.3 var(--font, system-ui, sans-serif); margin-bottom: 12px; }
.cs-lightbox__bar button { width: 44px; height: 44px; border: 0; border-radius: 50%; background: rgba(255,255,255,.14); color: #fff; font: 400 26px/1 system-ui, sans-serif; cursor: pointer; flex: none; }
.cs-lightbox img { width: 100%; max-width: 760px; height: auto; background: #fff; border-radius: 14px; box-shadow: 0 18px 44px rgba(0,0,0,.35); }
.cs-lightbox__open { color: #fff; margin-top: 12px; font: 600 14px/1.4 var(--font, system-ui, sans-serif); }

/* A sample shown inside a page (guide "Vos documents", help articles). */
.cs-sample { margin: 16px 0 0; max-width: 560px; }
.cs-sample img { display: block; width: 100%; height: auto; border: 1px solid var(--line, #eceae4); border-radius: 14px; background: #fff; }
.cs-sample figcaption { font-size: 14px; color: var(--muted, #5a6478); margin-top: 6px; }
@media print { .cs-help, .cs-tip, .cs-lightbox { display: none !important; } .cs-term { text-decoration: none; } }
