/* Pages ajoutées (js/plus.js) : cartes des symboles, impression recto verso, plan, progression, synchro, signalements */

/* ---------- Mode rédaction ---------- */
.write-in { width: 100%; min-height: 110px; padding: 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--text); font: inherit; resize: vertical; }
.write-cmp { padding: 12px 16px; border: 1px solid var(--border); border-radius: 12px; background: var(--surface-2); }
.kw { display: inline-block; margin: 2px 2px 0 0; padding: 1px 8px; border-radius: 999px; border: 1px solid var(--border); color: var(--muted); font-size: .85rem; }
.kw.on { background: var(--good-bg); border-color: var(--good); color: var(--good); font-weight: 700; }
.report-btn { margin: 8px 0 0; }

/* ---------- Plan et progression ---------- */
.plan-date { display: inline-flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-right: 8px; }
.plan-date input { padding: 8px 12px; border: 1px solid var(--border); border-radius: 8px; background: var(--surface); color: var(--text); font: inherit; }
.plan-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin: 12px 0; }
.plan-tile { display: flex; flex-direction: column; gap: 2px; text-align: center; }
.plan-tile b { font: 700 1.6rem/1.2 var(--font-d); }
.prog-bars { display: grid; grid-template-columns: repeat(10, 1fr); gap: 8px; height: 150px; align-items: end; }
.pb { display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 2px; }
.pb span { width: 70%; min-height: 2px; background: var(--primary); border-radius: 4px 4px 0 0; }
.pb small { font-size: .72rem; color: var(--muted); }
.pb em { font-style: normal; font-size: .7rem; color: var(--muted); }
.prog-list { display: grid; gap: 8px; }
.prog-row { display: grid; grid-template-columns: minmax(120px, 1.2fr) 2fr 56px; align-items: center; gap: 12px; }
.pr-name { font-weight: 600; font-size: .92rem; }
.pr-last { text-align: right; }
.spark { width: 100%; height: 46px; }

/* ---------- Synchro ---------- */
.sync-code { font: 700 1.25rem/1.4 ui-monospace, Consolas, monospace; letter-spacing: .5px; padding: 12px 16px; border-radius: 10px; background: var(--surface-2); word-break: break-word; }
.sync-in { width: 100%; padding: 12px; margin: 8px 0 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--text); font: inherit; }

/* ---------- Signalements ---------- */
.report-dlg { width: min(560px, calc(100vw - 32px)); border: 1px solid var(--border); border-radius: 14px; background: var(--surface); color: var(--text); padding: 20px; }
.report-dlg::backdrop { background: rgba(10, 15, 30, .55); }
.report-dlg textarea { width: 100%; padding: 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--surface); color: var(--text); font: inherit; }

/* ---------- Paquets de cartes ---------- */
.deck-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 12px; margin: 12px 0; }
.deck { border-top: 4px solid var(--c); }

/* Carte qui se retourne (jeu) */
.flip-card { display: block; width: min(330px, 100%, calc((100dvh - 310px) * 63 / 88)); aspect-ratio: 63 / 88; margin: 16px auto; padding: 0; border: 0; background: none; perspective: 1200px; cursor: pointer; font: inherit; color: var(--text); }
.fc-inner { position: relative; display: block; width: 100%; height: 100%; transition: transform .45s; transform-style: preserve-3d; }
.flip-card.flipped .fc-inner { transform: rotateY(180deg); }
.fc-face { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; padding: 20px; border: 2px solid var(--border); border-radius: 18px; background: var(--surface); box-shadow: var(--shadow); backface-visibility: hidden; -webkit-backface-visibility: hidden; }
.fc-back { transform: rotateY(180deg); border-color: var(--primary); }
.fc-hint { position: absolute; bottom: 12px; color: var(--muted); }
.cf-sym { width: 100%; flex: 1; display: flex; align-items: center; justify-content: center; }
.cf-sym svg, .cf-sym img { width: 100%; max-height: 100%; }
.fc-front .cf-sym img { background: #fff; border-radius: 10px; padding: 8px; }
.cf-text { font: 700 2.4rem/1.1 var(--font-d); text-align: center; word-break: break-word; }
.cf-back { display: flex; flex-direction: column; gap: 12px; text-align: center; }
.cf-des { font-size: 1.15rem; line-height: 1.3; }
.cf-role { color: var(--muted); line-height: 1.45; }
.judge { flex-wrap: nowrap; } .judge .btn { flex: 1; min-width: 0; margin-top: 0; }
@media (prefers-reduced-motion: reduce) { .fc-inner { transition: none; } }

/* ---------- Planches d'impression (63 × 88 mm, recto verso) ---------- */
.sheets { display: flex; flex-direction: column; align-items: safe center; gap: 16px; margin: 16px 0; overflow-x: auto; }
.sheet { position: relative; flex: none; background: #fff; color: #111; box-shadow: 0 2px 10px rgba(0, 0, 0, .25); }
.pc { position: absolute; width: 63mm; height: 88mm; box-sizing: border-box; border: .2mm dashed #bbb; padding: 5mm 4.5mm; display: flex; flex-direction: column; overflow: hidden; }
.pc-deck { font: 600 2.6mm/1 system-ui, sans-serif; color: #666; text-transform: uppercase; letter-spacing: .3mm; }
.pc-num { position: absolute; right: 4mm; bottom: 3mm; font: 600 2.6mm/1 system-ui, sans-serif; color: #888; }
.pc .cf-sym { flex: 1; padding: 2mm 0 4mm; }
.pc .cf-sym svg, .pc .cf-sym img { width: 100%; height: 100%; max-height: 66mm; object-fit: contain; color: #111; }
.pc .cf-text { font-size: 9mm; color: #111; }
.pc .cf-back { flex: 1; justify-content: center; gap: 3mm; padding-bottom: 3mm; }
.pc .cf-des { font: 700 4.2mm/1.25 system-ui, sans-serif; color: #111; }
.pc .cf-role { font: 3.3mm/1.4 system-ui, sans-serif; color: #333; }
.pc-test { margin: auto; font: 700 8mm/1 system-ui, sans-serif; color: #111; }
.cm { position: absolute; background: #000; }
.cm.v { width: .2mm; }
.cm.h { height: .2mm; }
.sheet-lab { position: absolute; left: 50%; bottom: 2mm; transform: translateX(-50%); font: 2.4mm/1 system-ui, sans-serif; color: #999; }
@media screen and (max-width: 900px) { .sheets { zoom: .45; } }

@media print {
  body.printing-cards { background: #fff !important; }
  body.printing-cards .no-print, body.printing-cards .print-tools { display: none !important; }
  body.printing-cards .main { max-width: none !important; padding: 0 !important; margin: 0 !important; }
  body.printing-cards .sheets { display: block; margin: 0; gap: 0; zoom: 1; overflow: visible; }
  body.printing-cards .sheet { box-shadow: none; break-after: page; page-break-after: always; }
  body.printing-cards .sheet:last-child { break-after: auto; page-break-after: auto; }
  body.printing-cards .pc { border-color: transparent; } /* on coupe sur les traits de coupe, pas sur le pointillé */
  .no-print { display: none !important; }
}
/* Lisibilité : texte d'aide des champs contrasté, introductions moins larges */
.sync-in::placeholder, .write-in::placeholder, .report-dlg textarea::placeholder { color: var(--muted); opacity: 1; }
#main > p.muted { max-width: 70ch; }
.rep-done { opacity: .65; }
.admin-pw { display: inline-block; }
.admin-pw[open] { display: block; width: 100%; }
.notif-box summary { cursor: pointer; }
.notif-box label { display: block; margin: 8px 0; }
/* Confort : thème, retour en haut, barre de lecture, œil, version */
.theme-btn { flex: none; width: 40px; height: 40px; border: 0; border-radius: 10px; background: rgba(255, 255, 255, .1); color: #fff; font-size: 1.1rem; cursor: pointer; }
.theme-btn:hover { background: rgba(255, 255, 255, .2); }
.theme-btn:focus-visible, .to-top:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.read-bar { position: fixed; top: 0; left: 0; right: 0; z-index: 30; height: 3px; background: var(--accent); transform: scaleX(0); transform-origin: 0 50%; pointer-events: none; }
.to-top { position: fixed; right: 16px; bottom: calc(var(--bottom) + 16px + env(safe-area-inset-bottom)); z-index: 19; width: 48px; height: 48px; border: 1px solid var(--border); border-radius: 50%; background: var(--surface); color: var(--primary); font-size: 1.4rem; font-weight: 700; box-shadow: var(--shadow); cursor: pointer; }
.to-top[hidden] { display: none; }
@media (min-width: 900px) { .to-top { bottom: 24px; right: 24px; } }
.pw-wrap { display: flex; gap: 8px; align-items: center; }
.pw-wrap .sync-in { flex: 1; }
.pw-eye { flex: none; min-width: 48px; min-height: 48px; margin: 8px 0 12px; }
.pw-eye[aria-pressed="true"] { background: var(--info-bg); }
.site-ver { text-align: center; margin: 28px 0 8px; }
@media print { .read-bar, .to-top, .theme-btn { display: none !important; } }
/* Provenance : badges « non vérifié » et avertissement d'accueil */
.disclaimer { margin: 0 0 16px; padding: 12px 16px; border-radius: 10px; background: var(--info-bg); color: var(--text); font-size: .9rem; line-height: 1.45; }
.disclaimer a { color: var(--primary); font-weight: 600; white-space: nowrap; }
.vbadge { margin: 12px 0; padding: 8px 12px; border-radius: 8px; border-left: 4px solid var(--mid); background: var(--mid-bg); color: var(--text); font-size: .9rem; }
.vbadge.v-conf { border-left-color: var(--primary); background: var(--info-bg); }
.cf-ai { display: block; margin-top: 8px; font-size: .72rem; color: var(--mid); font-weight: 600; }
