/* Tik-Pass – Espace organisateur v1.4 (thème sombre). Tout est préfixé .tpd pour ne pas heurter le thème. */
body.tpd-body { margin: 0; background: #0d0b14; }
body.tpd-body-login, body.tpd-body-register { background: #fff; }

.tpd, .tpd-modal, .tpd-toast {
	/* Charte Tik-Pass : violet du logo #8652EA + noir */
	--bg: #0d0b14;
	--side: #13101c;
	--card: #191523;
	--card2: #221c31;
	--line: #2b2540;
	--ink: #f4f2fa;
	--muted: #9a93ad;
	--field: #0f0c18;
	--accent: #8652ea;           /* violet Tik-Pass */
	--accent-d: #6d3fd1;         /* survol / textes sur fond clair */
	--accent-l: #b79cff;         /* textes et liens sur fond sombre */
	--navy: #0d0b14;             /* bandeau de la page de connexion */
	font-family: Roboto, system-ui, -apple-system, "Segoe UI", sans-serif;
	color: var(--ink);
	box-sizing: border-box;
	color-scheme: dark;
}
.tpd *, .tpd *::before, .tpd *::after, .tpd-modal *, .tpd-modal *::before, .tpd-modal *::after { box-sizing: border-box; }

.tpd { display: grid; grid-template-columns: 270px 1fr; min-height: 700px; background: var(--bg); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; line-height: 1.45; font-size: 15px; }
.tpd.tpd-collapsed { grid-template-columns: 76px 1fr; }
.tpd.tpd-full { height: 100vh; height: 100dvh; border: 0; border-radius: 0; }
.tpd-loading { padding: 40px; grid-column: 1/-1; color: var(--muted); }
.tpd h2, .tpd h3, .tpd h4 { font-family: inherit; color: var(--ink); }
.tpd p { margin: 0 0 10px; }
.tpd a { color: var(--accent-l); }
.tpd input[type=checkbox] { accent-color: var(--accent); }
.tpd a.tpd-nav { color: #aaa3bf; text-decoration: none; }
.tpd a.tpd-nav:hover { color: #fff; }

/* ---------- Sidebar ---------- */
.tpd-side { background: var(--side); border-right: 1px solid var(--line); display: flex; flex-direction: column; min-width: 0; overflow: hidden; }
.tpd-sidetop { height: 78px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; padding: 0 18px 0 22px; flex: none; }
.tpd-brand { display: inline-flex; align-items: center; gap: 10px; font-weight: 700; font-size: 24px; color: #fff !important; text-decoration: none; min-width: 0; }
.tpd-brand img { height: 44px; width: auto; max-width: 200px; object-fit: contain; display: block; margin: 0; }
.tpd-brand b { color: var(--accent-l); }
.tpd-brand span { display: inline; }
.tpd-tgl { all: unset; box-sizing: border-box; width: 38px; height: 38px; display: grid; place-items: center; border-radius: 10px; cursor: pointer; color: #fff; flex: none; }
.tpd-tgl:hover { background: rgba(255,255,255,.08); }
.tpd-tgl svg { width: 22px; height: 22px; }
.tpd-tgl.mob { display: none; }
.tpd-navs { padding: 18px 13px; display: flex; flex-direction: column; gap: 4px; overflow-y: auto; }
.tpd-lbl { font-size: 12.5px; letter-spacing: .6px; color: var(--muted); padding: 22px 8px 8px; text-transform: uppercase; }
.tpd-nav { all: unset; box-sizing: border-box; display: flex; align-items: center; gap: 14px; height: 48px; padding: 0 14px; border-radius: 10px; cursor: pointer; color: #aaa3bf; font-size: 16.5px; font-weight: 500; font-family: inherit; white-space: nowrap; }
.tpd-nav:hover { background: rgba(255,255,255,.06); color: #fff; }
.tpd-nav[aria-current=page] { background: #2c2347; color: #fff; }
.tpd-nav.cta { background: var(--accent); color: #fff; margin: 4px 0; }
.tpd-nav.cta:hover { background: var(--accent-d); }
.tpd-nav svg { width: 24px; height: 24px; flex: none; }
.tpd-collapsed .tpd-lbl, .tpd-collapsed .tpd-nav .lb, .tpd-collapsed .tpd-brand { display: none; }
.tpd-collapsed .tpd-sidetop { justify-content: center; padding: 0; }
.tpd-collapsed .tpd-nav { justify-content: center; padding: 0; }
.tpd-collapsed .tpd-tgl svg { transform: rotate(180deg); }
.tpd-bd { display: none; }

/* ---------- Colonne principale ---------- */
.tpd-col { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.tpd-topbar { height: 78px; flex: none; display: flex; align-items: center; gap: 14px; padding: 0 0 0 16px; background: var(--side); border-bottom: 1px solid var(--line); }
.tpd-spacer { flex: 1; }
.tpd-ctl { all: unset; box-sizing: border-box; display: flex; align-items: center; gap: 12px; height: 78px; padding: 0 26px; border-left: 1px solid var(--line); border-right: 1px solid var(--line); cursor: pointer; color: #fff; font-weight: 500; font-size: 16.5px; font-family: inherit; }
.tpd-ctl:hover { background: rgba(255,255,255,.05); }
.tpd-ctl svg { width: 22px; height: 22px; }
.tpd-um { position: relative; height: 78px; }
.tpd-um summary { list-style: none; display: flex; align-items: center; gap: 14px; height: 78px; padding: 0 22px; cursor: pointer; }
.tpd-um summary::-webkit-details-marker { display: none; }
.tpd-um .av { width: 52px; height: 52px; border-radius: 50%; background: linear-gradient(135deg, var(--accent), #4c1d95); display: grid; place-items: center; font-weight: 700; font-size: 20px; color: #fff; flex: none; }
.tpd-um .who { display: grid; line-height: 1.25; min-width: 0; }
.tpd-um .who b { font-size: 17px; font-weight: 500; }
.tpd-um .who small { color: #b7c0c9; font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 240px; }
.tpd-um .menu { position: absolute; right: 12px; top: 74px; background: var(--card2); border: 1px solid var(--line); border-radius: 12px; padding: 6px; min-width: 190px; z-index: 50; box-shadow: 0 12px 30px rgba(0,0,0,.45); }
.tpd-um .menu a, .tpd-um .menu button { all: unset; box-sizing: border-box; display: block; width: 100%; padding: 10px 12px; border-radius: 8px; color: #fff !important; cursor: pointer; font-size: 15px; text-decoration: none; font-family: inherit; }
.tpd-um .menu a:hover, .tpd-um .menu button:hover { background: rgba(255,255,255,.08); }

.tpd-main { flex: 1; overflow: auto; padding: 28px 30px; min-width: 0; }
.tpd-foot { flex: none; text-align: center; padding: 14px; font-size: 15px; border-top: 1px solid var(--line); color: #e5e9ee; }
.tpd-top { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; justify-content: space-between; margin-bottom: 22px; }
.tpd-top h2 { margin: 0; font-size: 24px; line-height: 1.2; font-weight: 500; }
.tpd-top p { margin: 2px 0 0; color: var(--muted); font-size: 14px; }

.tpd-btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--line); background: var(--card2); color: var(--ink); padding: 10px 16px; border-radius: 10px; cursor: pointer; font: inherit; font-size: 14.5px; font-weight: 500; text-decoration: none; line-height: 1.2; text-transform: none; letter-spacing: normal; box-shadow: none; }
.tpd-btn:hover { border-color: #38424d; color: var(--ink); }
.tpd-btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 700; }
.tpd-btn.primary:hover { background: var(--accent-d); color: #fff; }
.tpd-btn.danger { color: #f87171; }
.tpd-btn.block { width: 100%; padding: 13px; }
.tpd-btn.sm { padding: 6px 11px; font-size: 13px; }
.tpd-btn:disabled { opacity: .5; cursor: not-allowed; }

.tpd-demo { background: rgba(251,191,36,.1); border: 1px solid rgba(251,191,36,.35); color: #fbbf24; padding: 10px 14px; border-radius: 10px; margin-bottom: 18px; font-size: 13.5px; }

.tpd-grid { display: grid; gap: 22px; align-items: start; }
.tpd-kpis { grid-template-columns: repeat(4, 1fr); margin-bottom: 30px; }
.tpd-kpis.three { grid-template-columns: repeat(3, 1fr); }
.tpd-two { grid-template-columns: 2fr 1fr; margin-top: 22px; }
.tpd-card { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 20px; min-width: 0; }
.tpd-card h3 { margin: 0 0 14px; font-size: 17px; font-weight: 500; }
.tpd-card + .tpd-card { margin-top: 20px; }
.tpd-grid > .tpd-card + .tpd-card { margin-top: 0; }

.tpd-kpi { display: flex; align-items: center; gap: 18px; padding: 20px; }
.tpd-kpi .ic { width: 56px; height: 56px; border-radius: 14px; display: grid; place-items: center; flex: none; color: #fff; }
.tpd-kpi .ic svg { width: 26px; height: 26px; }
.tpd-kpi .g1 { background: linear-gradient(135deg, #8652ea, #5b2bc9); }
.tpd-kpi .g2 { background: linear-gradient(135deg, #f472b6, #be3ba6); }
.tpd-kpi .g3 { background: linear-gradient(135deg, #38bdf8, #6366f1); }
.tpd-kpi .g4 { background: linear-gradient(135deg, #a78bfa, #7c3aed); }
.tpd-kpi small { display: block; color: #e8edf2; font-size: 16.5px; text-transform: uppercase; letter-spacing: .1px; line-height: 1.25; }
.tpd-kpi strong { display: block; font-size: 34px; font-weight: 500; margin-top: 4px; line-height: 1.1; white-space: nowrap; }
.tpd-kpi strong em { font-style: normal; font-size: .55em; color: #c3ccd5; margin-left: 2px; }

/* ---------- Graphique ---------- */
.tpd-chart svg { width: 100%; height: 330px; display: block; }
.tpd-chart .ax { fill: var(--muted); font-size: 12px; }
.tpd-chart .tip { font-size: 12.5px; fill: #fff; }
.tpd-chart .tipbg { fill: #2a2440; }
.tpd-chart .bar { fill: var(--accent); }
.tpd-chart .bar:hover { fill: #a78bfa; }
.tpd-legend { text-align: center; color: var(--muted); font-size: 14px; margin-bottom: 4px; }
.tpd-legend i { display: inline-block; width: 54px; height: 18px; background: var(--accent); vertical-align: middle; margin-right: 6px; }
.tpd-range { display: inline-flex; gap: 4px; }
.tpd-range button { border: 0; background: transparent; padding: 5px 11px; border-radius: 8px; cursor: pointer; color: var(--muted); font: inherit; font-weight: 500; font-size: 13px; box-shadow: none; text-transform: none; }
.tpd-range button[aria-pressed=true] { background: rgba(134,82,234,.22); color: #c4b5fd; }

/* ---------- Tables ---------- */
.tpd-tools { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 16px; }
.tpd-tools input, .tpd-tools select, .tpd-form input, .tpd-form select, .tpd-form textarea {
	border: 1px solid #2c353e; border-radius: 10px; padding: 10px 12px; font: inherit; font-size: 14.5px; background: var(--field); color: var(--ink); min-width: 0; width: 100%; height: auto; box-shadow: none;
}
.tpd-form input:focus, .tpd-form select:focus, .tpd-form textarea:focus, .tpd-tools input:focus, .tpd-tools select:focus { outline: 2px solid rgba(134,82,234,.55); border-color: var(--accent); }
.tpd-form input[readonly] { opacity: .65; }
.tpd-tools input, .tpd-tools select { width: auto; flex: 1 1 200px; }
.tpd-tablewrap { overflow-x: auto; }
.tpd table { width: 100%; border-collapse: collapse; font-size: 14.5px; margin: 0; border: 0; color: var(--ink); }
.tpd th { text-align: left; color: var(--muted); font-weight: 500; font-size: 13px; padding: 9px 10px; border: 0; border-bottom: 1px solid var(--line); white-space: nowrap; background: transparent; }
.tpd td { padding: 12px 10px; border: 0; border-bottom: 1px solid var(--line); vertical-align: middle; background: transparent; color: var(--ink); }
.tpd tr:last-child td { border-bottom: 0; }
.tpd td.r, .tpd th.r { text-align: right; }
.tpd .t-title { font-weight: 500; }
.tpd .t-sub { color: var(--muted); font-size: 12.5px; }

.tpd-chip { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 500; background: rgba(148,163,184,.16); color: #b6c0ca; }
.tpd-chip.ok { background: rgba(34,197,94,.16); color: #4ade80; }
.tpd-chip.warn { background: rgba(251,191,36,.16); color: #fbbf24; }
.tpd-chip.bad { background: rgba(248,113,113,.16); color: #f87171; }
.tpd-chip.mute { background: rgba(148,163,184,.16); color: #b6c0ca; }

.tpd-bar { height: 7px; background: #2a2440; border-radius: 99px; overflow: hidden; min-width: 80px; }
.tpd-bar i { display: block; height: 100%; background: var(--accent); border-radius: 99px; }

/* ---------- Cartes événements ---------- */
.tpd-evgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 20px; }
.tpd-ev { background: var(--card); border: 1px solid var(--line); border-radius: 14px; overflow: hidden; display: flex; flex-direction: column; }
.tpd-evimg { position: relative; aspect-ratio: 16/9; background: linear-gradient(135deg, #2a1659, var(--accent)); display: grid; place-items: center; color: rgba(255,255,255,.85); font-size: 44px; font-weight: 700; overflow: hidden; }
.tpd-evimg img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; margin: 0; max-width: none; }
.tpd-evimg .tpd-chip { position: absolute; top: 10px; left: 10px; z-index: 1; }
.tpd-evb { padding: 14px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.tpd-evb h4 { margin: 0; font-size: 16.5px; line-height: 1.25; font-weight: 500; }
.tpd-evstats { display: flex; justify-content: space-between; font-size: 13px; color: var(--muted); }
.tpd-evstats b { color: var(--ink); font-weight: 500; }
.tpd-evact { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; padding-top: 4px; }

/* ---------- Formulaires ---------- */
.tpd-formgrid { display: grid; grid-template-columns: 1fr 320px; gap: 22px; align-items: start; }
.tpd-form { display: grid; gap: 12px; }
.tpd-form label { font-size: 13px; font-weight: 500; display: grid; gap: 5px; margin: 0; color: #cfd6dd; }
.tpd-form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.tpd-form textarea { resize: vertical; }
.tpd-drop { border: 2px dashed #3d3560; border-radius: 12px; text-align: center; color: var(--muted); cursor: pointer; background: var(--field); overflow: hidden; position: relative; min-height: 150px; display: grid; place-items: center; }
.tpd-drop:hover, .tpd-drop.over { border-color: var(--accent); }
.tpd-drop img { width: 100%; aspect-ratio: 16/9; object-fit: cover; display: block; margin: 0; max-width: none; }
.tpd-drop .in { padding: 22px; font-size: 14px; }
.tpd-drop .in b { display: block; color: var(--ink); margin-bottom: 4px; font-weight: 500; }
.tpd-tk { display: grid; grid-template-columns: 1.6fr 1fr 0.8fr auto; gap: 8px; align-items: end; }
.tpd-tk label span { font-size: 12px; font-weight: 500; color: var(--muted); }
.tpd-tkrow { margin-bottom: 8px; }
.tpd-prev { position: sticky; top: 0; }
.tpd-prev small { color: var(--muted); display: block; margin-bottom: 8px; font-weight: 500; }

/* ---------- Modal / toast ---------- */
.tpd-modal { position: fixed; inset: 0; background: rgba(0,0,0,.65); display: grid; place-items: center; z-index: 99999; padding: 16px; }
.tpd-modal > div { background: var(--card); border: 1px solid var(--line); border-radius: 16px; padding: 24px; width: min(480px, 100%); max-height: 92vh; overflow: auto; }
.tpd-modal h3 { margin: 0 0 14px; font-size: 18px; color: var(--ink); font-weight: 500; }
.tpd-modal .tpd-form input, .tpd-modal .tpd-form select { border: 1px solid #2c353e; border-radius: 10px; padding: 10px 12px; font: inherit; background: var(--field); color: var(--ink); width: 100%; }
.tpd-modal .tpd-form { display: grid; gap: 12px; }
.tpd-modal .tpd-form label { font-size: 13px; display: grid; gap: 5px; color: #cfd6dd; }
.tpd-modal .tpd-form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.tpd-modal .tpd-btn { border: 1px solid var(--line); background: var(--card2); color: var(--ink); padding: 10px 16px; border-radius: 10px; cursor: pointer; font: inherit; font-size: 14.5px; }
.tpd-modal .tpd-btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 700; }
.tpd-toast { position: fixed; right: 18px; bottom: 18px; background: #2a2440; color: #fff; padding: 12px 16px; border-radius: 10px; z-index: 100000; font-size: 14px; max-width: 340px; box-shadow: 0 8px 24px rgba(0,0,0,.4); }
.tpd-toast.bad { background: #b91c1c; }
.tpd-toast.ok { background: #15803d; }

/* ---------- Scan ---------- */
.tpd-scan { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.tpd-scan video { width: 100%; border-radius: 12px; background: #000; aspect-ratio: 4/3; object-fit: cover; }
.tpd-result { margin-top: 12px; padding: 14px; border-radius: 12px; font-weight: 500; display: none; }
.tpd-result.ok { display: block; background: rgba(34,197,94,.16); color: #4ade80; }
.tpd-result.bad { display: block; background: rgba(248,113,113,.16); color: #f87171; }
.tpd-empty { text-align: center; color: var(--muted); padding: 34px 10px; }
.tpd-center { max-width: 520px; margin: 12vh auto; padding: 36px 28px; text-align: center; background: var(--card); border: 1px solid var(--line); border-radius: 16px; grid-column: 1/-1; align-self: start; }
.tpd-center h2 { margin: 0 0 8px; font-weight: 500; }

/* ================= Pages de connexion / inscription (thème clair) ================= */
.tpd.tpd-guest { display: block; background: #fff; color: #1b1f2a; color-scheme: light; border: 0; border-radius: 0; }
.tpd.tpd-guest.tpd-full { height: auto; min-height: 100vh; }
.tpd-ahead { background: var(--navy); height: 128px; display: flex; align-items: center; justify-content: space-between; padding: 0 56px; }
.tpd-ahead .tpd-brand img { height: 58px; max-width: 280px; }
.tpd-ahead { border-bottom: 3px solid var(--accent); }
.tpd-ahead nav { display: flex; gap: 40px; }
.tpd-ahead nav a { color: #fff !important; font-weight: 700; font-size: 18px; text-transform: uppercase; text-decoration: none; letter-spacing: .2px; }
.tpd-ahead nav a:hover { color: var(--accent-l) !important; }
.tpd-auth { display: grid; grid-template-columns: 1.4fr 1fr; min-height: 640px; }
.tpd-full .tpd-auth { min-height: calc(100vh - 128px); }
.tpd-aform { display: flex; align-items: center; justify-content: center; padding: 40px 24px; }
.tpd-aform > div { width: 100%; max-width: 450px; }
.tpd-aform h2 { margin: 0 0 14px; font-size: 40px; line-height: 1.12; font-weight: 700; color: #1b1f2a; }
.tpd-aform .sub { color: #1b1f2a; margin: 0 0 24px; font-size: 16.5px; }
.tpd-aform .tpd-form label { color: #1b1f2a; font-weight: 500; font-size: 14.5px; gap: 8px; }
.tpd-aform .tpd-form { gap: 16px; }
.tpd-aform input, .tpd-aform select { border: 1px solid #cdd3da !important; border-radius: 6px !important; padding: 0 14px !important; height: 62px !important; font-size: 17px !important; background: #fff !important; color: #1b1f2a !important; }
.tpd-aform input:focus, .tpd-aform select:focus { border-color: var(--accent) !important; outline: none !important; box-shadow: 0 0 0 2px rgba(134,82,234,.25) !important; }
.tpd-aform input::placeholder { color: #8b95a1; }
.tpd-phone { display: grid; grid-template-columns: 112px 1fr; border: 1px solid #cdd3da; border-radius: 6px; overflow: hidden; }
.tpd-phone select, .tpd-phone input { border: 0 !important; border-radius: 0 !important; box-shadow: none !important; }
.tpd-phone select { background: #eef0f3 !important; padding: 0 8px !important; }
.tpd-aform .tpd-phone:focus-within { border-color: var(--accent); box-shadow: 0 0 0 2px rgba(134,82,234,.25); }
.tpd-aform .row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.tpd-aform .forgot { text-align: right; margin: -6px 0 0; }
.tpd-aform .forgot a, .tpd-aform .alt a { color: var(--accent-d) !important; }
.tpd-aform .btn-pill { height: 66px; border: 0; border-radius: 999px; background: var(--accent); color: #fff; font: inherit; font-weight: 700; font-size: 20px; cursor: pointer; box-shadow: 0 12px 26px rgba(134,82,234,.4); width: 100%; margin-top: 6px; }
.tpd-aform .btn-pill:hover { background: var(--accent-d); }
.tpd-aform .btn-pill:disabled { opacity: .6; cursor: wait; }
.tpd-aform .swap { text-align: center; margin: 26px 0 0; font-size: 17px; color: #1b1f2a; }
.tpd-aform .swap a { color: var(--accent-d) !important; font-weight: 700; text-decoration: none; margin-left: 10px; cursor: pointer; }
.tpd-aform .alt { text-align: center; margin: 14px 0 0; font-size: 14.5px; }
.tpd-aform .tpd-check { display: flex !important; flex-direction: row; align-items: flex-start; gap: 8px; font-size: 14px !important; color: #3b4452 !important; }
.tpd-aform .tpd-check input { width: 18px !important; height: 18px !important; margin-top: 2px; flex: none; padding: 0 !important; }
.tpd-passwrap { position: relative; display: block; }
.tpd-passwrap input { padding-right: 90px !important; }
.tpd-passwrap button { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); border: 0; background: transparent; color: var(--accent-d); font-weight: 700; font-size: 13.5px; cursor: pointer; padding: 6px 8px; box-shadow: none; text-transform: none; }
.tpd-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }
.tpd-msg { padding: 12px 14px; border-radius: 8px; font-size: 15px; margin-bottom: 16px; }
.tpd-msg.bad { background: #fee2e2; color: #991b1b; }
.tpd-msg.ok { background: #dcfce7; color: #166534; }

.tpd-ahero { position: relative; color: #fff; padding: 64px 56px; display: flex; flex-direction: column; justify-content: center; gap: 30px; overflow: hidden;
	background: linear-gradient(180deg, rgba(13,11,20,.45), rgba(13,11,20,.88)),
	radial-gradient(ellipse at 25% 0%, rgba(134,82,234,.85), transparent 60%),
	radial-gradient(ellipse at 90% 80%, rgba(224,82,208,.35), transparent 55%), #1a1033; background-size: cover; background-position: center; }
.tpd-ahero .tpd-brand { display: block; }
.tpd-ahero .tpd-brand img { height: 68px; max-width: 320px; }
.tpd-ahero .bar { width: 138px; height: 6px; border-radius: 6px; background: var(--accent); margin-top: -14px; }
.tpd-ahero h3 { color: #fff; font-size: 26px; line-height: 1.3; font-weight: 400; margin: 0; max-width: 470px; }
.tpd-perks { list-style: none; margin: 0; padding: 0; display: grid; gap: 22px; }
.tpd-perks li { display: flex; gap: 16px; align-items: flex-start; font-size: 25px; line-height: 1.3; color: #fff; margin: 0; padding: 0; }
.tpd-perks li::before { content: ""; flex: none; width: 32px; height: 32px; margin-top: 3px; background: no-repeat center / contain url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23b79cff' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='M22 11.1V12a10 10 0 1 1-5.9-9.1'/><path d='M22 4 12 14l-3-3'/></svg>"); }

/* ---------- Responsive ---------- */
@media (max-width: 1200px) {
	.tpd-kpis { grid-template-columns: repeat(2, 1fr); }
	.tpd-ctl span { display: none; }
	.tpd-ctl { padding: 0 20px; }
}
@media (max-width: 960px) {
	.tpd-two, .tpd-scan, .tpd-formgrid { grid-template-columns: 1fr; }
	.tpd-prev { position: static; }
	.tpd-auth { grid-template-columns: 1fr; }
	.tpd-ahero { padding: 40px 28px; }
	.tpd-perks li { font-size: 19px; }
	.tpd-ahead { height: 88px; padding: 0 20px; }
	.tpd-ahead .tpd-brand img { height: 40px; max-width: 190px; }
	.tpd-ahead nav { gap: 18px; }
	.tpd-ahead nav a { font-size: 13px; }
	.tpd-aform h2 { font-size: 32px; }
	.tpd-full .tpd-auth { min-height: 0; }
}
@media (max-width: 900px) {
	.tpd, .tpd.tpd-collapsed { grid-template-columns: 1fr; }
	.tpd-side { position: fixed; left: 0; top: 0; bottom: 0; width: 280px; z-index: 1000; transform: translateX(-100%); transition: transform .2s; }
	.tpd-open .tpd-side { transform: none; }
	.tpd-open .tpd-bd { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.6); z-index: 999; }
	.tpd-collapsed .tpd-lbl, .tpd-collapsed .tpd-nav .lb { display: revert; }
	.tpd-collapsed .tpd-nav { justify-content: flex-start; padding: 0 14px; }
	.tpd-collapsed .tpd-brand { display: inline-flex; }
	.tpd-tgl.mob { display: grid; }
	.tpd-sidetop .tpd-tgl { display: none; }
	.tpd-um .who { display: none; }
	.tpd-um summary { padding: 0 14px; }
	.tpd-main { padding: 18px 14px; }
}
@media (max-width: 640px) {
	.tpd-kpis, .tpd-kpis.three { grid-template-columns: 1fr; }
	.tpd-kpi strong { font-size: 28px; }
	.tpd-form .row, .tpd-aform .row, .tpd-modal .tpd-form .row { grid-template-columns: 1fr; }
	.tpd-tk { grid-template-columns: 1fr 1fr; }
	.tpd-tk label:first-child { grid-column: 1 / -1; }
	.tpd-ahead nav a:first-child { display: none; }
}

/* ---------- Contrôleur de scan (v1.4) ---------- */
.tpd .sc-wrap { padding: 16px; }
.tpd .sc { --sc-ok: #22c55e; --sc-dup: #f59e0b; --sc-bad: #ef4444; max-width: 720px; margin: 0 auto; position: relative; }
.tpd .sc-bar { display: flex; gap: 10px; align-items: center; margin-bottom: 12px; }
.tpd .sc-bar select { flex: 1; min-width: 0; background: var(--field); color: var(--ink); border: 1px solid var(--line); border-radius: 10px; padding: 11px 12px; font: inherit; font-size: 14.5px; }
.tpd .sc-net { flex: none; display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; padding: 7px 11px; border-radius: 999px; background: var(--card2); border: 1px solid var(--line); color: var(--muted); white-space: nowrap; }
.tpd .sc-net i { width: 8px; height: 8px; border-radius: 50%; background: var(--sc-ok); }
.tpd .sc-net.off { color: #fbbf24; border-color: rgba(245,158,11,.5); }
.tpd .sc-net.off i { background: var(--sc-dup); }
.tpd .sc-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 14px; }
.tpd .sc-stats > div:not(.sc-barp) { background: var(--card2); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; text-align: center; }
.tpd .sc-stats b { display: block; font-size: 26px; line-height: 1.1; font-weight: 700; }
.tpd .sc-stats div:first-child b { color: #4ade80; }
.tpd .sc-stats span { font-size: 12px; color: var(--muted); }
.tpd .sc-barp { grid-column: 1/-1; height: 6px; border-radius: 6px; background: var(--card2); overflow: hidden; }
.tpd .sc-barp i { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), #4ade80); transition: width .3s; }
.tpd .sc-tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--line); margin-bottom: 14px; overflow-x: auto; }
.tpd .sc-tabs button { background: none; border: 0; border-bottom: 2px solid transparent; color: var(--muted); font: inherit; font-size: 14.5px; font-weight: 500; padding: 10px 14px; cursor: pointer; white-space: nowrap; text-transform: none; letter-spacing: normal; }
.tpd .sc-tabs button[aria-selected=true] { color: #fff; border-bottom-color: var(--accent); }
.tpd .sc-tabs em { font-style: normal; font-size: 11px; background: var(--accent); color: #fff; border-radius: 999px; padding: 1px 7px; margin-left: 4px; }
.tpd .sc-view { position: relative; background: #000; border-radius: 16px; overflow: hidden; aspect-ratio: 1 / 1; max-height: 62vh; width: 100%; display: flex; align-items: center; justify-content: center; border: 1px solid var(--line); }
.tpd .sc-view video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: none; }
.tpd .sc-view.live video { display: block; }
.tpd .sc-frame { position: absolute; inset: 14%; border-radius: 18px; pointer-events: none; box-shadow: 0 0 0 999px rgba(0,0,0,.45); border: 3px solid rgba(255,255,255,.9); }
.tpd .sc-idle { padding: 24px; text-align: center; color: var(--muted); max-width: 340px; }
.tpd .sc-idle svg { width: 54px; height: 54px; color: var(--accent-l); margin-bottom: 10px; }
.tpd .sc-tools { position: absolute; right: 10px; top: 10px; display: flex; flex-direction: column; gap: 8px; }
.tpd .sc-tools button { width: 44px; height: 44px; border-radius: 50%; border: 0; background: rgba(13,11,20,.7); color: #fff; display: grid; place-items: center; cursor: pointer; padding: 0; }
.tpd .sc-tools button.on { background: var(--accent); }
.tpd .sc-manual { display: flex; gap: 8px; margin-top: 14px; }
.tpd .sc-manual input, .tpd .sc-search input { flex: 1; min-width: 0; background: var(--field); color: var(--ink); border: 1px solid var(--line); border-radius: 10px; padding: 12px; font: inherit; font-size: 16px; }
.tpd .sc-search input { width: 100%; margin-bottom: 10px; }
.tpd .sc-hint { color: var(--muted); font-size: 12.5px; text-align: center; margin: 12px 0 0; }
.tpd .sc-empty { text-align: center; color: var(--muted); padding: 34px 10px; }
.tpd .sc-empty b { color: var(--ink); display: block; margin-bottom: 6px; }
.tpd .sc-rows { display: flex; flex-direction: column; gap: 8px; }
.tpd .sc-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; background: var(--card2); border: 1px solid var(--line); border-radius: 12px; padding: 10px 12px; }
.tpd .sc-row > div:first-child { min-width: 0; }
.tpd .sc-row b { display: block; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tpd .sc-row small { color: var(--muted); font-size: 12.5px; }
.tpd .sc-row.done b { color: var(--muted); }
.tpd .sc-row .pill { font-size: 12px; padding: 4px 10px; border-radius: 999px; background: var(--card); color: var(--muted); white-space: nowrap; }
.tpd .sc-row .pill.ok { background: rgba(34,197,94,.16); color: #4ade80; }
.tpd .sc-row .pill.dup { background: rgba(245,158,11,.16); color: #fbbf24; }
.tpd .sc-row .pill.bad { background: rgba(248,113,113,.16); color: #f87171; }
.tpd .sc-row.team { flex-wrap: wrap; }
.tpd .sc-row .btns { display: flex; gap: 6px; flex-wrap: wrap; }
.tpd .sc-tf { display: grid; gap: 10px; background: var(--card2); border: 1px solid var(--line); border-radius: 12px; padding: 14px; margin-bottom: 14px; }
.tpd .sc-tf input[name=name] { background: var(--field); color: var(--ink); border: 1px solid var(--line); border-radius: 10px; padding: 11px 12px; font: inherit; }
.tpd .sc-chk { display: grid; gap: 6px; max-height: 150px; overflow: auto; font-size: 14px; }
.tpd .sc-chk label { display: flex; gap: 8px; align-items: center; }
/* Écran de résultat plein écran : vert = entrée, orange = déjà validé, rouge = invalide */
.tpd .sc-res { position: fixed; inset: 0; z-index: 99990; display: flex; align-items: center; justify-content: center; padding: 20px; background: rgba(0,0,0,.7); }
.tpd .sc-res[hidden] { display: none; }
.tpd .sc-card { width: min(420px, 100%); border-radius: 22px; padding: 30px 22px 22px; text-align: center; color: #fff; box-shadow: 0 20px 60px rgba(0,0,0,.5); }
.tpd .sc-res.ok .sc-card { background: #15803d; }
.tpd .sc-res.dup .sc-card { background: #b45309; }
.tpd .sc-res.bad .sc-card { background: #b91c1c; }
.tpd .sc-big { width: 84px; height: 84px; margin: 0 auto 12px; border-radius: 50%; background: rgba(255,255,255,.18); display: grid; place-items: center; }
.tpd .sc-big svg { width: 46px; height: 46px; stroke-width: 2.6; }
.tpd .sc-card h3 { margin: 0 0 8px; font-size: 24px; color: #fff; }
.tpd .sc-card p { margin: 0 0 4px; }
.tpd .sc-card .nm { font-size: 22px; font-weight: 700; }
.tpd .sc-card .tk { font-size: 16px; opacity: .9; }
.tpd .sc-card .sb { font-size: 14px; opacity: .9; margin-top: 6px; }
.tpd .sc-card .act { display: flex; gap: 8px; margin-top: 20px; justify-content: center; flex-wrap: wrap; }
.tpd .sc-card .tpd-btn { background: rgba(255,255,255,.16); border-color: rgba(255,255,255,.35); color: #fff; }
.tpd .sc-card .tpd-btn.primary { background: #fff; color: #111; border-color: #fff; }
/* Page autonome /organizer/scan */
.tpd.tpd-scanpage { display: flex; flex-direction: column; min-height: 100vh; min-height: 100dvh; }
.tpd .sc-head { display: flex; align-items: center; gap: 12px; padding: 12px 16px; background: var(--side); border-bottom: 1px solid var(--line); }
.tpd .sc-head .tpd-brand { font-size: 20px; }
.tpd .sc-head .tpd-brand img { height: 28px; width: auto; }
.tpd .sc-head .t { flex: 1; color: var(--muted); font-size: 14px; }
.tpd .sc-main { flex: 1; padding: 16px; overflow: auto; }
.tpd .sc-gate { margin: auto; max-width: 360px; padding: 30px 20px; text-align: center; }
.tpd .sc-gate p { color: var(--muted); }
@media (max-width: 640px) { .tpd .sc-wrap { padding: 10px; } .tpd .sc-stats b { font-size: 22px; } }
.tpd .sc-tools[hidden], .tpd .sc-tools button[hidden], .tpd .sc-frame[hidden], .tpd .sc-idle[hidden] { display: none; }
