/* =====================================================================
   Workshop guide · Express mode · Dossier · Glossary · Settings · a11y
   ===================================================================== */

/* ----------------------------------------------------------- workshop guide */
.join-card { display: grid; grid-template-columns: auto 1fr; gap: 24px; align-items: center; margin-top: 6px; }
.join-card .qr, .facil-qr { background: #fff; border-radius: 12px; padding: 10px; line-height: 0; }
.join-card .qr svg { width: 200px; height: 200px; display: block; }
.join-card h3 { font-size: 26px; }
.warn-note { color: var(--amber); font-size: 14px; line-height: 1.5; background: rgba(255, 179, 71, 0.08); border-left: 3px solid var(--amber); padding: 8px 12px; border-radius: 0 8px 8px 0; }
.formats { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 18px; }
.fmt-head { display: flex; gap: 12px; align-items: center; margin-bottom: 10px; }
.fmt-ico { font-size: 34px; }
.format p { margin-bottom: 12px; }
.agenda { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; }
.agenda li { display: grid; grid-template-columns: 56px 1fr; gap: 10px; font-size: 14px; line-height: 1.45; padding-top: 10px; border-top: 1px dashed var(--line); }
.agenda .t { font-family: var(--type); color: var(--amber); }
.outcomes { display: grid; gap: 10px; padding-left: 22px; font-size: 16px; line-height: 1.55; max-width: 900px; }
.outcomes li::marker { color: var(--amber); font-family: var(--type); }
.table-wrap { overflow-x: auto; border-radius: 12px; border: 1px solid var(--line); }
table.digcomp { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 560px; }
.digcomp th, .digcomp td { padding: 10px 12px; border-bottom: 1px solid var(--line); text-align: center; }
.digcomp th:first-child, .digcomp td:first-child { text-align: left; }
.digcomp thead th { font-family: var(--type); font-weight: 400; color: var(--amber); background: rgba(255, 255, 255, 0.03); letter-spacing: 0.08em; }
.digcomp .dot-on { color: #ffcc00; font-size: 16px; }
ul.clean { margin: 0; padding-left: 18px; display: grid; gap: 8px; line-height: 1.5; color: #d6cfc0; }

/* ----------------------------------------------------------- express mode */
.xp-progress { height: 8px; border-radius: 4px; background: rgba(255, 255, 255, 0.08); overflow: hidden; margin-top: 18px; max-width: 620px; }
.xp-progress i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--amber-2), #ffe14d); transition: width 0.5s cubic-bezier(0.2, 0.8, 0.2, 1); }
.xp-round { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.xp-card { max-width: 460px; margin: 0 auto; border-radius: 16px; overflow: hidden; box-shadow: var(--shadow); background: #000; }
.xp-card img { width: 100%; max-height: 420px; object-fit: contain; }
.xp-done { text-align: center; max-width: 640px; margin: 0 auto; }
.badge-big { font-size: 72px; line-height: 1; animation: pop 0.6s cubic-bezier(0.2, 1.6, 0.4, 1); }
@keyframes pop { from { transform: scale(0.2) rotate(-20deg); opacity: 0; } to { transform: none; opacity: 1; } }
.pause-rule { background: var(--paper); color: var(--paper-ink); padding: 12px 16px; border-radius: 10px; margin: 16px 0; }

/* ----------------------------------------------------------- dossier */
.stat .v small { font-size: 0.45em; color: #8fa0cc; margin-left: 4px; }
.mini-steps { display: inline-flex; gap: 3px; }
.mini-steps i { width: 14px; height: 8px; border-radius: 3px; background: rgba(255, 255, 255, 0.12); }
.mini-steps i.on { background: var(--ok); }
.progress-table td { vertical-align: middle; }
.badges { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.badge { text-align: center; padding: 16px 10px; border-radius: 14px; border: 1px dashed var(--line); color: var(--muted); filter: grayscale(1); opacity: 0.55; transition: transform 0.3s; }
.badge.on { filter: none; opacity: 1; border: 1px solid rgba(255, 204, 0, 0.5); background: radial-gradient(circle at 50% 0%, rgba(255, 204, 0, 0.14), transparent 70%); color: var(--text); }
.badge.on:hover { transform: translateY(-3px) rotate(-1deg); }
.badge .b-ico { font-size: 34px; }
.badge b { display: block; margin: 6px 0 2px; font-family: var(--type); font-weight: 400; color: var(--paper); }
.badge small { font-size: 12px; line-height: 1.35; display: block; }

/* ----------------------------------------------------------- glossary */
.glossary { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.g-item { padding: 16px 18px; border-radius: 12px; background: rgba(255, 255, 255, 0.03); border: 1px solid var(--line); display: flex; flex-direction: column; gap: 6px; }
.g-item h3 { margin: 0; font-family: var(--serif); color: var(--paper); font-size: 19px; }
.g-item p { margin: 0; color: #d6cfc0; line-height: 1.5; font-size: 14.5px; flex: 1; }
.g-item .pill { align-self: flex-start; text-decoration: none; }

/* ----------------------------------------------------------- settings panel */
#settings { position: fixed; top: calc(var(--hud-h) + 6px); right: 12px; z-index: 96; width: min(340px, calc(100vw - 24px)); background: rgba(14, 14, 18, 0.98); border: 1px solid rgba(255, 179, 71, 0.45); border-radius: 14px; padding: 14px; box-shadow: var(--shadow); animation: pageIn 0.25s ease; }
#settings[hidden] { display: none; }
#settings h4 { margin: 0 0 8px; font-family: var(--type); font-weight: 400; letter-spacing: 0.15em; color: var(--amber); display: flex; justify-content: space-between; align-items: center; }
.set-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 10px 2px; border-bottom: 1px solid var(--line); cursor: pointer; }
.set-row.col { flex-direction: column; align-items: flex-start; cursor: default; }
.set-row b { display: block; font-weight: 600; font-size: 14px; }
.set-row small { color: var(--muted); font-size: 12px; }
.switch { appearance: none; -webkit-appearance: none; width: 44px; height: 24px; border-radius: 12px; background: rgba(255, 255, 255, 0.15); position: relative; cursor: pointer; flex: none; transition: background 0.25s; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform 0.25s cubic-bezier(0.2, 0.8, 0.2, 1); }
.switch:checked { background: var(--amber); }
.switch:checked::after { transform: translateX(20px); }
.agent-chip { text-decoration: none; }
.agent-chip:hover { border-color: var(--amber); }
.facil-qr { margin: 8px auto 4px; width: max-content; text-align: center; }
.facil-qr svg { width: 150px; height: 150px; }
.facil-qr small { display: block; line-height: 1.3; margin-top: 4px; color: #333; font-size: 11px; }

/* ----------------------------------------------------------- accessibility modes */
body.large #app { zoom: 1.15; }
body.large .bubble { font-size: 17px; }
body.hc { --muted: #d9d3c6; --line: rgba(239, 230, 210, 0.38); --text: #ffffff; }
body.hc .card, body.hc .g-item, body.hc .step { border-width: 2px; }
body.hc .grain, body.hc .vignette { display: none; }
body.hc #app a { text-decoration: underline; }
body.hc #app .btn, body.hc #app .notecard, body.hc #app .casefile, body.hc #app .pill { text-decoration: none; }
body.rm *, body.rm *::before, body.rm *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
body.rm .reveal { opacity: 1; transform: none; }

@media (max-width: 760px) { .join-card { grid-template-columns: 1fr; justify-items: center; text-align: center; } .agenda li { grid-template-columns: 48px 1fr; } }
@media print {
  .join-card { break-inside: avoid; }
  .card, .format { background: #fff !important; color: #111 !important; border: 1px solid #999 !important; box-shadow: none !important; }
  .card h3, .g-item h3, .page-head h1 { color: #111 !important; }
  .muted, .card p, ul.clean { color: #333 !important; }
  .digcomp th, .digcomp td { color: #111 !important; border-color: #999 !important; }
}
