/* SYNESS 360 — aide intégrée, conditions légales, personnalisation et « voir en tant que » (lot 5) */

/* ---------- Bouton Aide de la barre du haut ---------- */
header.top .help-btn { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 12px; border: 1px solid var(--line); background: var(--surface); border-radius: var(--radius); color: var(--ink-2); font: inherit; font-weight: 600; cursor: pointer; }
header.top .help-btn:hover { background: var(--surface-2); }
header.top .help-btn:focus-visible { outline: none; box-shadow: var(--ring); }
header.top .help-btn i { color: var(--brand-ink); }
@media (max-width: 900px) { header.top .help-btn { padding: 0 10px; } header.top .help-btn span { display: none; } }

/* ---------- Panneau d'aide ---------- */
.help-scrim { position: fixed; inset: 0; background: rgba(16,24,22,.28); z-index: 80; }
.help-panel { position: fixed; top: 0; right: 0; bottom: 0; width: min(440px, 100vw); background: var(--surface); box-shadow: var(--shadow-3); z-index: 81; display: flex; flex-direction: column; animation: help-in .18s var(--ease); }
@keyframes help-in { from { transform: translateX(24px); opacity: 0; } to { transform: none; opacity: 1; } }
.help-panel .hp-h { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.help-panel .hp-h .t { font-weight: 800; flex: 1; min-width: 0; }
.help-panel .hp-h .k { font-size: .72rem; color: var(--muted); border: 1px solid var(--line); border-radius: 4px; padding: 1px 6px; }
.help-panel .hp-b { flex: 1; overflow-y: auto; padding: 16px; }
.help-panel .hp-f { border-top: 1px solid var(--line); padding: 10px 16px; display: flex; gap: 8px; justify-content: space-between; flex-wrap: wrap; }
.help-sheet h2 { font-size: 1.15rem; margin-bottom: 6px; }
.help-sheet .lead { color: var(--ink-2); margin: 0 0 14px; }
.help-sheet h3 { font-size: .8rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); margin: 18px 0 8px; }
.help-sheet ol.steps { list-style: none; margin: 0; padding: 0; counter-reset: st; }
.help-sheet ol.steps li { counter-increment: st; position: relative; padding: 0 0 12px 34px; }
.help-sheet ol.steps li::before { content: counter(st); position: absolute; left: 0; top: 0; width: 24px; height: 24px; border-radius: 50%; background: var(--brand-tint); color: var(--brand-ink); font-weight: 700; font-size: .8rem; display: flex; align-items: center; justify-content: center; }
.help-sheet ol.steps b { display: block; margin-bottom: 2px; }
.help-sheet ul.tips { margin: 0; padding-left: 18px; }
.help-sheet ul.tips li { margin-bottom: 6px; }
.help-sheet details { border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 6px; background: var(--surface); }
.help-sheet summary { cursor: pointer; padding: 9px 12px; font-weight: 600; list-style: none; display: flex; gap: 8px; align-items: flex-start; }
.help-sheet summary::-webkit-details-marker { display: none; }
.help-sheet summary::before { content: "\f054"; font-family: "Font Awesome 6 Free"; font-weight: 900; font-size: .7rem; color: var(--muted); margin-top: 4px; transition: transform .15s; }
.help-sheet details[open] summary::before { transform: rotate(90deg); }
.help-sheet details > div { padding: 0 12px 10px 28px; color: var(--ink-2); }
.help-sheet .related a { display: inline-flex; align-items: center; gap: 6px; margin: 0 8px 6px 0; padding: 4px 10px; border: 1px solid var(--line); border-radius: 999px; font-size: .85rem; }
.help-note { border: 1px solid #E8D28E; background: #FFF9E8; border-radius: var(--radius); padding: 10px 12px; margin-bottom: 14px; }
.help-note .h { font-weight: 700; font-size: .85rem; color: var(--warn); display: flex; align-items: center; gap: 6px; margin-bottom: 4px; }
.help-note p { margin: 0 0 6px; }
.help-note p:last-child { margin-bottom: 0; }

/* ---------- Centre d'aide ---------- */
.help-center .hc-search { position: relative; max-width: 620px; }
.help-center .hc-search input { height: 46px; padding-left: 40px; font-size: 1rem; }
.help-center .hc-search i { position: absolute; left: 14px; top: 15px; color: var(--muted); }
.help-center .hc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 12px; }
.help-center .hc-card { display: block; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 14px; color: inherit; }
.help-center .hc-card:hover { border-color: var(--brand); text-decoration: none; box-shadow: var(--shadow-1); }
.help-center .hc-card b { display: block; margin-bottom: 4px; }
.help-center .hc-card .s { font-size: .85rem; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.help-center .hc-card.mine { border-color: var(--brand); background: var(--brand-soft); }
.help-center .hc-grp { margin: 22px 0 10px; font-size: .8rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 700; }
.help-center mark { background: #FCEFC3; color: inherit; padding: 0 1px; border-radius: 2px; }
.gloss dt { font-weight: 700; margin-top: 12px; }
.gloss dd { margin: 2px 0 0; color: var(--ink-2); }

/* ---------- Bandeau « voir en tant que » ---------- */
.imp-banner { position: sticky; top: 0; z-index: 35; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 8px 16px; background: #7A3E00; color: #fff; font-size: .9rem; }
.imp-banner i { color: #FFD9A8; }
.imp-banner b { font-weight: 700; }
.imp-banner .sp { flex: 1; min-width: 10px; }
.imp-banner button { border: 1px solid rgba(255,255,255,.6); background: #fff; color: #5B2E00; border-radius: var(--radius); padding: 5px 12px; font: inherit; font-weight: 700; cursor: pointer; }
.imp-banner button:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
body.imp-on header.top { top: 0; }

/* ---------- Porte d'acceptation des conditions légales ---------- */
.legal-gate { min-height: 100vh; background: var(--bg); display: flex; justify-content: center; padding: 32px 16px; }
.legal-gate .lg-box { width: 100%; max-width: 860px; }
.legal-gate .lg-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.legal-gate .lg-head img { width: 40px; height: 40px; }
.legal-doc { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); margin-bottom: 14px; }
.legal-doc .ld-h { padding: 12px 16px; border-bottom: 1px solid var(--line); display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.legal-doc .ld-h b { flex: 1; min-width: 200px; }
.legal-doc .ld-text { max-height: 340px; overflow-y: auto; padding: 14px 18px; font-size: .92rem; border-bottom: 1px solid var(--line); }
.legal-doc .ld-f { padding: 12px 16px; }
.legal-text h1 { font-size: 1.25rem; } .legal-text h2 { font-size: 1.05rem; margin: 16px 0 6px; } .legal-text h3 { font-size: .98rem; margin: 12px 0 4px; }
.legal-text table { border-collapse: collapse; width: 100%; margin: 8px 0; } .legal-text td, .legal-text th { border: 1px solid var(--line); padding: 5px 8px; text-align: left; vertical-align: top; }
.legal-text .todo, .legal-todo { background: #FCEFC3; color: #6B4700; border-radius: 3px; padding: 0 3px; }
.legal-gate .lg-actions { position: sticky; bottom: 0; background: var(--bg); padding: 12px 0; display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }

/* ---------- Personnalisation ---------- */
.pz-swatch { display: inline-flex; align-items: center; justify-content: center; min-width: 120px; height: 40px; padding: 0 14px; border-radius: var(--radius); font-weight: 700; border: 1px solid var(--line); }
.pz-ratio { font-variant-numeric: tabular-nums; font-weight: 800; font-size: 1.4rem; }
.pz-diff { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.pz-diff pre { margin: 0; white-space: pre-wrap; word-break: break-word; font-size: .78rem; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 6px 8px; max-height: 220px; overflow: auto; }
.pz-diff .b { border-left: 3px solid var(--bad); } .pz-diff .a { border-left: 3px solid var(--ok); }
.pz-vars button { margin: 0 6px 6px 0; }
.pz-rules td .seg { display: inline-flex; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.pz-rules td .seg label { padding: 4px 10px; cursor: pointer; font-size: .85rem; border-right: 1px solid var(--line); }
.pz-rules td .seg label:last-child { border-right: 0; }
.pz-rules td .seg input { position: absolute; opacity: 0; pointer-events: none; }
.pz-rules td .seg label:has(input:checked) { background: var(--brand-tint); color: var(--brand-ink); font-weight: 700; }
.cf-ro { padding: 8px 10px; background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--radius); min-height: var(--ctl-h); }
body.s360-large { font-size: 16px; }
@media (max-width: 620px) { .pz-diff { grid-template-columns: 1fr; } .legal-doc .ld-text { max-height: 260px; } }
