/* Naked Truth : interface de jeu. Autonome, sombre, mobile d'abord. Tout est scope sous .nt-app-root. */
.nt-app-root {
	--nt-bg: #171220;
	--nt-bg2: #1f1829;
	--nt-text: #f3eef9;
	--nt-muted: #a79bb8;
	--nt-line: rgba(255, 255, 255, .12);
	--nt-brand: #b03fe8;
	--nt-brand-soft: #7a2fb0;
	--nt-fun: #f2ae3d;
	--nt-soft: #3dd9a0;
	--nt-hot: #ff4c86;
	--nt-hard: #e12138;
	--nt-extreme: #4a0f22;
	--nt-ok: #3dd9a0;
	--nt-err: #ff6b81;
	color: var(--nt-text);
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
	line-height: 1.5;
	max-width: 880px;
	margin: 0 auto;
}
.nt-app-root *, .nt-app-root *::before, .nt-app-root *::after { box-sizing: border-box; }
.nt-app-root h2, .nt-app-root h3 { font-family: Georgia, "Iowan Old Style", serif; font-style: italic; font-weight: 400; margin: 0 0 12px; }
.nt-app-root h2 { font-size: 26px; }
.nt-app-root h3 { font-size: 19px; }
.nt-app-root p { margin: 0 0 12px; }
.nt-app-root a { color: var(--nt-brand); }

.nt-card { background: var(--nt-bg); border: 1px solid var(--nt-line); border-radius: 20px; padding: 24px; margin-bottom: 18px; }
.nt-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.nt-grid .nt-card { margin-bottom: 0; }
.nt-auth { max-width: 460px; margin-left: auto; margin-right: auto; }
.nt-head { display: flex; flex-wrap: wrap; gap: 14px; align-items: center; justify-content: space-between; }
.nt-actions, .nt-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; }
.nt-muted { color: var(--nt-muted); font-size: 14px; }
.nt-warn { color: var(--nt-err); font-size: 14px; }
.nt-warn[hidden], .nt-check[hidden], .nt-banner[hidden], .nt-alert[hidden] { display: none; }

.nt-field { display: block; margin: 0 0 14px; }
.nt-field > span { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.nt-field small { display: block; color: var(--nt-muted); margin-top: 4px; font-size: 12px; }
.nt-app-root input[type="text"], .nt-app-root input[type="email"], .nt-app-root input[type="password"], .nt-app-root input[type="tel"], .nt-app-root input[type="number"], .nt-app-root input[type="date"], .nt-app-root select, .nt-app-root textarea {
	width: 100%;
	padding: 12px 14px;
	border-radius: 12px;
	border: 1px solid var(--nt-line);
	background: var(--nt-bg2);
	color: var(--nt-text);
	font: 15px/1.4 inherit;
	font-family: inherit;
}
.nt-check { display: flex; gap: 10px; align-items: flex-start; margin: 0 0 14px; font-size: 14px; }
.nt-check input { margin-top: 4px; }

.nt-btn {
	display: inline-block;
	border: 1.5px solid var(--nt-line);
	border-radius: 999px;
	background: var(--nt-bg2);
	color: var(--nt-text);
	font: 700 15px/1.4 inherit;
	font-family: inherit;
	padding: 12px 22px;
	cursor: pointer;
	text-decoration: none;
	text-align: center;
	min-height: 44px;
}
.nt-btn:hover { border-color: var(--nt-brand); }
.nt-btn[disabled] { opacity: .5; cursor: not-allowed; }
.nt-primary { background: var(--nt-brand); border-color: var(--nt-brand); color: #fff; }
.nt-primary:hover { background: var(--nt-brand-soft); }
.nt-ghost { background: transparent; }
.nt-danger { background: var(--nt-hard); border-color: var(--nt-hard); color: #fff; }
.nt-big { font-size: 18px; padding: 16px 30px; }
.nt-link { background: none; border: 0; color: var(--nt-brand); text-decoration: underline; cursor: pointer; font: inherit; padding: 4px 0; min-height: 32px; }
.nt-app-root :focus-visible { outline: 2px solid var(--nt-brand); outline-offset: 2px; }

.nt-alert, .nt-banner { border-radius: 12px; padding: 12px 16px; margin: 0 0 14px; font-size: 14px; }
.nt-alert.err { background: rgba(255, 107, 129, .14); border: 1px solid var(--nt-err); }
.nt-alert.ok { background: rgba(61, 217, 160, .12); border: 1px solid var(--nt-ok); }
.nt-banner { background: rgba(242, 174, 61, .14); border: 1px solid var(--nt-fun); }

.nt-levels { border: 0; padding: 0; margin: 0 0 14px; display: grid; grid-template-columns: repeat(auto-fit, minmax(110px, 1fr)); gap: 8px; }
.nt-levels legend { font-size: 13px; font-weight: 600; margin-bottom: 8px; padding: 0; }
.nt-level { position: relative; display: block; border: 1.5px solid var(--nt-line); border-radius: 14px; padding: 12px 10px; text-align: center; cursor: pointer; font-weight: 700; font-size: 13px; }
.nt-level input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.nt-level:has(input:checked) { border-color: var(--nt-brand); background: rgba(176, 63, 232, .2); }
.nt-level:has(input:focus-visible) { outline: 2px solid var(--nt-brand); }
.nt-level.off { opacity: .4; cursor: not-allowed; }
.nt-level small { display: block; font-weight: 400; font-size: 11px; color: var(--nt-muted); margin-top: 4px; }

.nt-roomhead { display: flex; flex-wrap: wrap; gap: 14px; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.nt-code { font: 700 34px/1.1 ui-monospace, Menlo, Consolas, monospace; letter-spacing: 6px; }
.nt-timer { font-size: 16px; margin-bottom: 12px; }
.nt-timer b.low { color: var(--nt-err); }
.nt-turnline { color: var(--nt-muted); }
.nt-your { color: var(--nt-brand); font-weight: 700; }
.nt-pause { border: 1.5px solid var(--nt-fun); border-radius: 16px; padding: 18px; background: rgba(242, 174, 61, .1); margin-bottom: 12px; }

.nt-players { list-style: none; padding: 0; margin: 0 0 16px; display: grid; gap: 8px; }
.nt-player { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; background: var(--nt-bg2); border: 1px solid var(--nt-line); border-radius: 12px; padding: 10px 14px; }
.nt-player.active { border-color: var(--nt-brand); box-shadow: 0 0 0 2px rgba(176, 63, 232, .35); }
.nt-player.left { opacity: .5; }
.nt-pname { font-weight: 700; }
.nt-pstats { margin-left: auto; color: var(--nt-muted); font-size: 13px; }
.nt-badge { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; padding: 2px 8px; border-radius: 999px; background: var(--nt-brand); color: #fff; }
.nt-badge.me { background: var(--nt-soft); color: #1b1330; }
.nt-badge.off { background: var(--nt-line); color: var(--nt-muted); }

.nt-gamecard { border-radius: 22px; padding: 26px 22px; margin: 6px 0 14px; min-height: 180px; display: flex; flex-direction: column; justify-content: space-between; background: var(--nt-fun); color: #1b1330; box-shadow: 0 18px 44px rgba(0, 0, 0, .35); }
.nt-gamecard.lvl-2 { background: var(--nt-soft); }
.nt-gamecard.lvl-3 { background: var(--nt-hot); color: #fff; }
.nt-gamecard.lvl-4 { background: var(--nt-hard); color: #fff; }
.nt-gamecard.lvl-5 { background: var(--nt-extreme); color: #fff; }
.nt-cardkind { font: 700 12px/1 inherit; letter-spacing: 2.5px; text-transform: uppercase; opacity: .8; }
.nt-cardtext { font-family: Georgia, serif; font-style: italic; font-size: 24px; line-height: 1.25; margin: 12px 0 0; }

.nt-wheel-wrap { position: relative; width: min(260px, 78vw); margin: 8px auto 16px; }
.nt-wheel-pointer { position: absolute; left: 50%; top: -10px; transform: translateX(-50%); width: 0; height: 0; border-left: 11px solid transparent; border-right: 11px solid transparent; border-top: 22px solid var(--nt-text); z-index: 2; }
.nt-wheel { position: relative; width: 100%; aspect-ratio: 1; border-radius: 50%; border: 4px solid var(--nt-bg2); overflow: hidden; transition: transform 3.2s cubic-bezier(.12, .7, .1, 1); }
.nt-wl { position: absolute; left: 50%; top: 50%; width: 0; height: 0; transform: rotate(var(--a)); }
.nt-wl > span { position: absolute; left: 0; top: -88px; transform: translate(-50%, -50%); white-space: nowrap; font: 700 12px/1 inherit; color: #fff; max-width: 84px; overflow: hidden; text-overflow: ellipsis; text-shadow: 0 1px 2px rgba(0, 0, 0, .5); }

.nt-overlay { position: fixed; inset: 0; background: rgba(0, 0, 0, .6); display: flex; align-items: center; justify-content: center; z-index: 9999; padding: 16px; }
.nt-dialog { background: var(--nt-bg); border: 1px solid var(--nt-line); border-radius: 18px; padding: 22px; max-width: 420px; width: 100%; }
.nt-dialog textarea { margin-bottom: 12px; }
.nt-config-missing { padding: 18px; text-align: center; }


/* Chat de salon */
.nt-roomlevel { margin: 6px 0; } .nt-invite { margin: 8px 0; display: flex; flex-wrap: wrap; gap: 6px; align-items: center; } .nt-invite a.nt-btn { text-decoration: none; }
.nt-sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.nt-chat { margin-top: 18px; border-top: 1px solid var(--nt-line); padding-top: 14px; }
.nt-chat-head { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.nt-chat-head h3 { margin: 0; }
.nt-chat-head .nt-link { margin-left: auto; }
.nt-chat-note { margin: 8px 0; font-size: 12px; }
.nt-chat-log { list-style: none; margin: 0 0 10px; padding: 8px; max-height: 280px; overflow-y: auto; background: var(--nt-bg2); border: 1px solid var(--nt-line); border-radius: 14px; display: grid; gap: 8px; }
.nt-msg { padding: 8px 12px; border-radius: 12px; background: rgba(255, 255, 255, .05); max-width: 92%; justify-self: start; overflow-wrap: anywhere; }
.nt-msg.mine { justify-self: end; background: rgba(176, 63, 232, .22); }
.nt-msg.is-hidden { opacity: .7; }
.nt-msg-meta { font-size: 12px; }
.nt-msg-body { margin: 2px 0 0; font-size: 15px; }
.nt-msg-acts { display: flex; gap: 12px; margin-top: 2px; }
.nt-msg-acts .nt-link { font-size: 12px; min-height: 24px; }
.nt-msg.is-private { border: 1px dashed var(--nt-hot); }
.nt-msg-priv { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: var(--nt-hot); }
.nt-chat-to { margin-bottom: 8px; }
.nt-chat-to select { max-width: 100%; }
.nt-chat-privnote { margin: 4px 0 0; font-size: 12px; }
.nt-chat-form { display: flex; flex-wrap: wrap; gap: 8px; }
.nt-chat-form .nt-chat-to { flex: 0 0 100%; margin: 0; }
.nt-chat-form .nt-chat-to[hidden] { display: none; }
.nt-chat-form input { flex: 1; min-width: 0; }
.nt-chat-empty { text-align: center; padding: 10px; }

@media (max-width: 720px) {
	.nt-app-root .nt-grid { grid-template-columns: 1fr; }
	.nt-app-root .nt-card { padding: 18px; }
	.nt-app-root .nt-code { font-size: 28px; }
	.nt-app-root .nt-pstats { margin-left: 0; width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
	.nt-app-root *, .nt-app-root *::before, .nt-app-root *::after { animation: none !important; transition: none !important; }
}

/* Mode un seul telephone */
.nt-phone { margin: 14px 0; padding: 14px; border: 1px dashed var(--nt-line); border-radius: 14px; }
.nt-phone h3 { margin-bottom: 6px; }
.nt-guests { list-style: none; margin: 0 0 10px; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.nt-guests li { background: var(--nt-bg2); border: 1px solid var(--nt-line); border-radius: 999px; padding: 4px 12px; }
.nt-guestform { display: grid; gap: 8px; }
.nt-gate { background: var(--nt-bg); z-index: 10000; }
.nt-gate .nt-dialog { text-align: center; max-width: 480px; }
.nt-gate h3 { font-size: 24px; }
.nt-hostbar { margin: 12px 0 6px; }

/* Photos du chat */
.nt-app-root .nt-msg-photo { display: block; margin: 4px 0; }
.nt-app-root .nt-msg-photo img { max-width: 100%; max-height: 260px; border-radius: 10px; display: block; }
.nt-app-root .nt-photo-preview { max-width: 100%; max-height: 40vh; border-radius: 10px; display: block; margin: 8px auto; }
.nt-app-root .nt-chat-form { flex-wrap: wrap; }
.nt-app-root [hidden] { display: none !important; }
.nt-app-root .nt-danger { color: #ff6b8b; border-color: rgba(255,107,139,.5); }

/* Mobile : 16 px minimum dans les champs (sinon iOS zoome la page au focus) ; boutons herites de la police du jeu. */
.nt-app-root input, .nt-app-root select, .nt-app-root textarea { font-size: 16px; font-family: inherit; }
.nt-app-root button, .nt-app-root .nt-btn { font-size: 15px; font-family: inherit; }

/* Bouton photo : toujours visible, grise quand indisponible (un clic explique pourquoi) */
#nt-chat-photobtn { min-width: 44px; min-height: 44px; font-size: 20px; line-height: 1; padding: 0 10px; }
#nt-chat-photobtn.is-off { opacity: .5; }

.nt-rename, .nt-refhave { margin-top: 6px; }
.nt-rename summary, .nt-refhave summary { cursor: pointer; min-height: 44px; display: flex; align-items: center; }
.nt-rename input, .nt-refhave input { font-size: 16px; min-height: 44px; }
.nt-party { margin: 6px 0; } .nt-partyon { font-weight: 600; } .nt-refcode { font-size: 1.4em; letter-spacing: .12em; padding: 2px 8px; border: 1px dashed currentColor; border-radius: 6px; } #nt-ref[hidden] { display: none; }

.nt-badges { list-style: none; margin: 8px 0; padding: 0; display: grid; gap: 8px; }
.nt-badge { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border: 1px solid currentColor; border-radius: 10px; opacity: .6; }
.nt-badge.is-earned { opacity: 1; }
.nt-badge.is-new { border-width: 2px; }
.nt-badge-ico { font-size: 1.6em; line-height: 1; }
.nt-badge-txt { flex: 1; min-width: 0; }
.nt-badge-state { font-weight: 600; white-space: nowrap; }
.nt-badges-new { font-weight: 700; }
#nt-badges[hidden] { display: none; }

/* Theme clair : le theme du site pose body[data-theme="light"] ; l'application suit (l'app mobile reste sombre). */
body[data-theme="light"] .nt-app-root {
	--nt-bg: #ffffff;
	--nt-bg2: #f1eaf8;
	--nt-text: #211735;
	--nt-muted: #5c5170;
	--nt-line: rgba(33, 23, 53, .18);
	--nt-brand: #8a2bc9;
	--nt-brand-soft: #6e1fa8;
	--nt-fun: #f2ae3d;
	--nt-soft: #3dd9a0;
	--nt-ok: #0f7a55;
	--nt-err: #c0213a;
}
body[data-theme="light"] .nt-app-root .nt-msg { background: rgba(33, 23, 53, .06); }
body[data-theme="light"] .nt-app-root .nt-danger { color: #fff; border-color: var(--nt-hard); }
body[data-theme="light"] .nt-app-root .nt-gamecard { box-shadow: 0 12px 28px rgba(33, 23, 53, .18); }
body[data-theme="light"] .nt-app-root .nt-alert.ok { background: rgba(15, 122, 85, .1); }
body[data-theme="light"] .nt-app-root .nt-alert.err { background: rgba(192, 33, 58, .08); }
body[data-theme="light"] .nt-app-root .nt-level:has(input:checked) { background: rgba(138, 43, 201, .12); }
