/* CLARYA, refonte 2026-10 : fonctions reprises du site en ligne V6 (fenêtres des mentions et de la fiche comptoir,
   formulaire relié au fichier clients, message furtif, impression A5). Règles copiées de la V6, variables adaptées. */
:root{--accent:var(--lilas);--ok:var(--lilas);--bad:var(--rouge);--t-sm:.95rem;--f-display:var(--f-title);--ease:cubic-bezier(.2,.7,.1,1)}
.link{color:var(--accent);font-weight:700;text-decoration:underline;text-underline-offset:.22em;text-decoration-thickness:1.5px;background:none;border:0;padding:0;font:inherit;cursor:pointer}
.link:hover{text-decoration-thickness:2.5px}
.note{font-size:var(--t-sm);color:var(--muted)}
.copy{flex:none;border:1px solid var(--line-2);background:transparent;border-radius:999px;padding:.4em .9em;font-size:.88rem;font-weight:600;color:var(--ink-2);cursor:pointer}
.copy:hover{border-color:var(--lilas);color:var(--lilas)}
.status{font-weight:600;min-height:1.4em;margin:0}
.status.ok{color:var(--ok)} .status.err{color:var(--bad)}
.fallback{display:grid;gap:10px;padding:14px;border-radius:10px;border:1px dashed var(--line-2);font-size:.95rem}
.fallback[hidden]{display:none}
.fallback pre{margin:0;white-space:pre-wrap;font-family:var(--f-body);font-size:.9rem;max-height:180px;overflow:auto;color:var(--ink-2)}
.hp{position:absolute!important;left:-9999px!important;width:1px;height:1px;overflow:hidden}
.acts{display:flex;flex-wrap:wrap;gap:10px}
/* ——— Fenêtres ——— */
dialog{border:0;padding:0;background:transparent;color:var(--ink);max-width:min(760px,calc(100vw - 24px));width:100%;max-height:calc(100dvh - 24px)}
dialog::backdrop{background:rgba(4,6,12,.78);-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px)}
.dlg{background:var(--bg);border-radius:18px;border:1px solid var(--line);display:flex;flex-direction:column;max-height:calc(100dvh - 24px);overflow:hidden}
.dlg__h{display:flex;align-items:center;gap:14px;padding:16px 18px 14px;border-bottom:1px solid var(--line);flex:none}
.dlg__h h2{font-size:1.25rem;font-weight:700;font-variation-settings:"wdth" 88;font-stretch:88%;flex:1;min-width:0}
.x{width:40px;height:40px;border-radius:50%;border:1px solid var(--line);background:transparent;cursor:pointer;display:grid;place-items:center;flex:none}
.x svg{width:18px;height:18px}
.dlg__b{flex:1;min-height:0;overflow-y:auto;padding:clamp(18px,3vw,30px);display:grid;gap:18px;align-content:start}
/* Fiche comptoir */
.sheet{background:#FBFAFE;color:#10152A;border-radius:6px;aspect-ratio:148/210;width:min(100%,420px);margin-inline:auto;padding:7% 8%;display:grid;grid-template-rows:auto auto 1fr auto;gap:5%;box-shadow:0 20px 50px -20px rgba(0,0,0,.6);font-size:clamp(9px,2.4vw,12.5px)}
.sheet__brand{display:flex;align-items:center;gap:.6em}
.sheet__brand .ic{width:2.6em;height:auto;aspect-ratio:940/840}
.sheet .wordmark{height:1.3em;fill:#10152A}
.sheet h3{font-family:var(--f-display);font-size:2.5em;font-weight:720;font-variation-settings:"wdth" 86,"opsz" 72;font-stretch:86%;line-height:1}
.sheet h3 span{color:#6C0BD6}
.sheet ul{margin:0;padding:0;list-style:none;display:grid;gap:.5em;font-size:1.15em}
.sheet li::before{content:"✕ ";color:#6C0BD6;font-weight:700}
.sheet .qr{display:grid;grid-template-columns:auto 1fr;gap:1.2em;align-items:center;align-self:end}
.sheet .qr svg{width:9em;height:9em;display:block}
.sheet .qr b{font-family:var(--f-display);font-size:1.5em;line-height:1.08;display:block;font-variation-settings:"wdth" 88;font-stretch:88%}
.sheet .qr span{display:block;margin-top:.4em;color:#475263}
.sheet .ft{display:flex;justify-content:space-between;gap:1em;border-top:1px solid #D6D2EA;padding-top:.8em;color:#475263;font-size:.92em}
/* Mentions */
.legaltxt{display:grid;gap:14px;color:var(--ink-2)}
.legaltxt h3{font-family:var(--f-body);font-size:1.02rem;color:var(--ink)}
.todo{background:rgba(248,113,113,.16);color:var(--bad);padding:0 .3em;border-radius:4px;font-weight:700}
/* Message furtif */
.flash{position:fixed;left:50%;bottom:calc(88px + env(safe-area-inset-bottom,0px));transform:translate(-50%,20px);z-index:60;background:var(--ink);color:var(--bg);padding:12px 18px;border-radius:12px;font-size:.95rem;font-weight:600;max-width:min(440px,calc(100vw - 32px));opacity:0;pointer-events:none;transition:opacity .25s,transform .3s var(--ease)}
.flash.on{opacity:1;transform:translate(-50%,0)}
@media (min-width:760px){.flash{bottom:28px}}
@media print{
  @page{size:A5 portrait;margin:0}
  html.print-sheet body *{visibility:hidden}
  html.print-sheet .sheet,html.print-sheet .sheet *{visibility:visible}
  html.print-sheet .sheet{position:fixed;inset:0;width:100%;height:100%;border-radius:0;box-shadow:none;font-size:12.5px}
  html.print-sheet dialog::backdrop{background:none}
}
