/* Base reprise de Rogue Frame (frame.roguestudio.ch, assets/app.css). */

:root {
	--ink: #141414;
	--paper: #ffffff;
	--muted: #8C8C86;
	--line: #2A2A28;
	--red: #EA362A;
	--panel: color-mix(in srgb, var(--paper) 8%, var(--ink));
	--field: color-mix(in srgb, var(--paper) 13%, var(--ink));
	--hair: color-mix(in srgb, var(--paper) 12%, transparent);
	--radius: 16px;
	--radius-sm: 12px;
	--radius-pill: 999px;
	--glow: 0 0 0 3px color-mix(in srgb, var(--red) 28%, transparent);
	--shadow: 0 24px 64px rgba(0, 0, 0, 0.45);
	--chrome: color-mix(in srgb, var(--ink) 92%, transparent);
	--serif: "jaf-lapture-display", "Faustina", Georgia, serif;
	--pad: clamp(20px, 5vw, 72px);
	--ease: 160ms ease;
	--ease-out: 220ms cubic-bezier(0.22, 1, 0.36, 1);
	--press: 100ms ease-out;
}

html[data-theme="day"] {
	color-scheme: light;
	--ink: #F1F1EB;
	--paper: #141414;
	--muted: #6E6E68;
	--line: #D8D8D0;
	--panel: #ffffff;
	--field: #ffffff;
	--hair: rgba(20, 20, 20, 0.12);
	--glow: 0 0 0 3px color-mix(in srgb, var(--red) 20%, transparent);
	--shadow: 0 1px 2px rgba(20, 20, 20, 0.05), 0 12px 32px rgba(20, 20, 20, 0.08);
	--chrome: color-mix(in srgb, #ffffff 90%, transparent);
}


*,
*::before,
*::after {
	box-sizing: border-box;
	margin: 0;
	padding: 0;
	border-radius: 0;
}

html {
	background: var(--ink);
	color: var(--paper);
	color-scheme: dark;
	font-family: var(--serif);
	font-size: 18px;
	line-height: 1.45;
	font-optical-sizing: auto;
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
}

body {
	background: var(--ink);
	color: var(--paper);
	font-family: var(--serif);
	min-height: 100vh;
}

img,
svg,
video {
	display: block;
	max-width: 100%;
}

button,
input,
textarea,
select {
	font: inherit;
	color: inherit;
	background: transparent;
	border: 0;
	border-radius: 0;
	appearance: none;
	-webkit-appearance: none;
}

button {
	cursor: pointer;
	touch-action: manipulation;
	-webkit-tap-highlight-color: transparent;
}

textarea {
	resize: vertical;
}

h1,
h2,
h3,
h4 {
	font-family: var(--serif);
	font-weight: 400;
	line-height: 0.95;
	letter-spacing: -0.005em;
	text-transform: uppercase;
}

h1 {
	font-size: clamp(2.4rem, 6vw, 4.8rem);
}

h2 {
	font-size: clamp(1.6rem, 3.2vw, 2.4rem);
}

a {
	color: var(--paper);
	text-decoration: none;
	transition: color var(--ease);
}

a:hover {
	color: var(--red);
}

:focus {
	outline: none;
}

:focus-visible {
	outline: 1px solid var(--red);
	outline-offset: 3px;
}

.brand {
	display: inline-flex;
	align-items: center;
	color: var(--paper);
	text-decoration: none;
	font-family: var(--serif);
	font-size: 22px;
	font-weight: 400;
	line-height: 1;
	letter-spacing: 0.04em;
	text-transform: uppercase;
	white-space: nowrap;
}

.brand:hover {
	color: var(--paper);
}

.theme-toggle {
	position: relative;
	flex: 0 0 auto;
	width: 44px;
	height: 44px;
	margin: -11px;
	padding: 0;
	color: var(--muted);
	transition: color var(--ease), transform var(--press);
}

.theme-toggle:hover {
	color: var(--red);
}

.theme-toggle svg {
	position: absolute;
	inset: 11px;
	width: 22px;
	height: 22px;
	display: block;
	transition: opacity var(--ease-out), transform var(--ease-out);
}

.theme-toggle__moon {
	opacity: 0;
	transform: scale(0.72) rotate(-18deg);
}

html[data-theme="day"] .theme-toggle__sun {
	opacity: 0;
	transform: scale(0.72) rotate(18deg);
}

html[data-theme="day"] .theme-toggle__moon {
	opacity: 1;
	transform: none;
}

.theme-toggle:active {
	transform: scale(0.92);
}

.wrap {
	width: 100%;
	padding: var(--pad);
	padding-left: max(var(--pad), env(safe-area-inset-left, 0px));
	padding-right: max(var(--pad), env(safe-area-inset-right, 0px));
}

.label {
	display: block;
	font-size: 12px;
	font-weight: 400;
	line-height: 1.2;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--muted);
}

.rule,
hr {
	border: 0;
	border-top: 1px solid var(--line);
	height: 0;
}

.btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.6em;
	padding: 0.9em 1.45em;
	border: 1px solid var(--hair);
	border-radius: var(--radius-sm);
	background: var(--field);
	color: var(--paper);
	font-family: var(--serif);
	font-size: 12px;
	font-weight: 400;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	text-decoration: none;
	cursor: pointer;
	min-height: 44px;
	touch-action: manipulation;
	-webkit-tap-highlight-color: transparent;
	transition: color var(--ease), border-color var(--ease), background-color var(--ease), transform var(--press);
}

.btn:hover {
	border-color: var(--red);
	color: var(--red);
}

.btn:active {
	transform: scale(0.98);
}

.btn:disabled {
	opacity: 0.4;
	cursor: default;
}

.btn--ghost {
	background: transparent;
	border-color: var(--hair);
	color: var(--paper);
}

.btn--ghost:hover {
	border-color: var(--paper);
	color: var(--paper);
}

label {
	display: block;
}

.label + input,
.label + textarea,
.label + select {
	margin-top: 0.55rem;
}

input[type="text"],
input[type="email"],
input[type="url"],
input[type="password"],
input[type="number"],
input[type="date"],
input[type="time"],
input[type="search"],
textarea,
select {
	display: block;
	width: 100%;
	min-height: 48px;
	padding: 0.85rem 1rem;
	border: 1px solid var(--hair);
	border-radius: var(--radius-sm);
	background: var(--field);
	color: var(--paper);
	font-family: var(--serif);
	font-size: 1rem;
	line-height: 1.4;
	transition: border-color var(--ease), box-shadow var(--ease), background-color var(--ease);
}

input::placeholder,
textarea::placeholder {
	color: var(--muted);
	opacity: 1;
}

select {
	padding-right: 2.2rem;
	background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%),
		linear-gradient(135deg, var(--muted) 50%, transparent 50%);
	background-position: calc(100% - 16px) calc(50% - 3px), calc(100% - 10px) calc(50% - 3px);
	background-size: 6px 6px, 6px 6px;
	background-repeat: no-repeat;
}

input:hover,
textarea:hover,
select:hover {
	border-color: color-mix(in srgb, var(--paper) 28%, transparent);
}

input:focus,
textarea:focus,
select:focus,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
	outline: none;
	border-color: var(--red);
	box-shadow: var(--glow);
}

@media (prefers-reduced-motion: reduce) {
	html {
		scroll-behavior: auto;
	}

	*,
	*::before,
	*::after {
		scroll-behavior: auto !important;
		transition-duration: 1ms !important;
		animation-duration: 1ms !important;
		animation-iteration-count: 1 !important;
	}

	.btn:active,
	.theme-toggle:active {
		transform: none;
	}

	:active {
		transform: none !important;
	}
}

@media (prefers-reduced-transparency: reduce) {
	:root {
		--chrome: var(--ink);
	}

	html[data-theme="day"] {
		--chrome: #ffffff;
	}
}

@media (prefers-contrast: more) {
	:root,
	html[data-theme="day"] {
		--hair: var(--paper);
		--muted: var(--paper);
		--chrome: var(--ink);
	}

	:focus-visible {
		outline-width: 2px;
	}
}

@media (forced-colors: active) {
	.btn,
	.pill span,
	.slider__box,
	.cal-check span,
	.tabs__btn.is-active,
	.client-nav__item.is-active {
		border: 1px solid ButtonText;
	}
}

@media (max-width: 860px) {
	html {
		font-size: 17px;
	}
}

@media (max-width: 640px) {
	html {
		font-size: 16px;
	}

	.btn {
		width: 100%;
	}
}

/* ---------------------------------------------------------------------------
   Rogue Réservations
   --------------------------------------------------------------------------- */

/* Connexion (repris de Rogue Frame, assets/admin.css) */
.login-body {
	min-height: 100vh;
	min-height: 100dvh;
	display: grid;
	place-items: center;
	padding: var(--pad);
	padding-top: calc(var(--pad) + env(safe-area-inset-top, 0px));
	padding-bottom: calc(var(--pad) + env(safe-area-inset-bottom, 0px));
}

.login {
	width: min(100%, 440px);
	display: grid;
	gap: 2.75rem;
}

.login .brand {
	justify-content: center;
}

.login h1 {
	text-align: center;
	font-size: clamp(2.6rem, 10vw, 4.4rem);
}

.login-frame {
	position: relative;
}

.login-frame::before {
	content: "";
	position: absolute;
	inset: 0;
	border: 1px solid var(--red);
	border-radius: var(--radius);
	transform: translate(10px, 10px);
	pointer-events: none;
}

.login-panel {
	position: relative;
	z-index: 1;
	background: var(--panel);
	border: 1px solid var(--hair);
	border-radius: var(--radius);
	box-shadow: var(--shadow);
	padding: 2rem 1.6rem 1.6rem;
}

.login-panel .btn {
	width: 100%;
	margin-top: 1.75rem;
}

.login-panel .btn + .btn,
.login-panel form + form .btn {
	margin-top: 0.75rem;
}

.login-hint {
	margin-top: 0.75rem;
	color: var(--muted);
	font-size: 0.9rem;
}

.login-alt {
	margin-top: 1.25rem;
	text-align: center;
	font-size: 12px;
	letter-spacing: 0.14em;
	text-transform: uppercase;
}

.login-alt a {
	color: var(--muted);
}

.login-alt a:hover {
	color: var(--red);
}

.form-error,
.form-notice {
	font-size: 12px;
	letter-spacing: 0.14em;
	line-height: 1.5;
	text-transform: uppercase;
	margin-bottom: 1.25rem;
}

.form-error {
	color: var(--red);
}

.form-notice {
	color: var(--muted);
}

input.code-input {
	font-size: 1.8rem;
	letter-spacing: 0.4em;
	text-align: center;
	padding-left: 1.4rem;
	font-variant-numeric: tabular-nums;
}

/* Pages de l'app */
.app-bar {
	position: sticky;
	top: 0;
	z-index: 50;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1.5rem;
	padding: 1.15rem max(var(--pad), env(safe-area-inset-right, 0px)) 1.15rem max(var(--pad), env(safe-area-inset-left, 0px));
	padding-top: calc(1.15rem + env(safe-area-inset-top, 0px));
	background: var(--chrome);
	backdrop-filter: blur(14px);
	-webkit-backdrop-filter: blur(14px);
	border-bottom: 1px solid var(--line);
}

.app-bar .btn {
	width: auto;
	max-width: 46vw;
	min-height: 40px;
	padding: 0.7em 1.1em;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.app {
	width: min(100%, 720px);
	margin: 0 auto;
	padding: 2.5rem var(--pad) calc(7rem + env(safe-area-inset-bottom, 0px));
	display: grid;
	gap: 1.5rem;
}

.app h1 {
	font-size: clamp(2.4rem, 9vw, 4rem);
}

.muted {
	color: var(--muted);
}

.card {
	position: relative;
	background: var(--panel);
	border: 1px solid var(--hair);
	border-radius: var(--radius);
	padding: 1.4rem 1.4rem 1.5rem;
	display: grid;
	gap: 0.5rem;
}

#seat,
#lounge {
	scroll-margin-top: 5.5rem;
}

.card-info {
	position: absolute;
	top: 0.85rem;
	right: 0.85rem;
	display: flex;
	align-items: center;
	justify-content: center;
	width: 32px;
	height: 32px;
	color: var(--muted);
}

.card-info .icon {
	width: 22px;
	height: 22px;
}

.card--now .card-head {
	padding-right: 2rem;
}

.card--now .more {
	justify-self: center;
}

.page-head {
	position: relative;
}

.page-head h1 {
	padding-right: 2.4rem;
}

.page-head .card-info {
	top: 0.35rem;
	right: 0;
}

.app-nav {
	position: fixed;
	z-index: 60;
	left: 50%;
	bottom: calc(0.65rem + env(safe-area-inset-bottom, 0px));
	transform: translateX(-50%);
	width: min(26rem, calc(100% - 1.3rem));
	display: flex;
	gap: 0.15rem;
	margin: 0;
	padding: 0.3rem;
	border: 1px solid color-mix(in srgb, var(--paper) 18%, transparent);
	border-radius: 28px;
	background: color-mix(in srgb, var(--ink) 58%, transparent);
	backdrop-filter: blur(28px) saturate(1.5);
	-webkit-backdrop-filter: blur(28px) saturate(1.5);
	box-shadow: 0 12px 40px rgba(0, 0, 0, 0.38);
}

.app-nav a {
	flex: 1 1 0;
	display: flex;
	flex-direction: column;
	align-items: center;
	justify-content: center;
	gap: 0.22rem;
	min-width: 0;
	padding: 0.45rem 0.15rem 0.35rem;
	border-radius: 22px;
	color: var(--muted);
	font-size: 10px;
	line-height: 1.1;
	letter-spacing: 0.02em;
	text-align: center;
}

.app-nav .icon {
	width: 22px;
	height: 22px;
}

.app-nav a[aria-current="page"] {
	color: var(--paper);
	background: color-mix(in srgb, var(--paper) 14%, transparent);
}

.icon {
	display: block;
	width: 16px;
	height: 16px;
	flex: 0 0 auto;
	color: currentColor;
}

.card-head {
	display: flex;
	align-items: flex-start;
	gap: 1.1rem;
}

.icon--hero {
	width: 64px;
	height: 64px;
	color: var(--paper);
}

.label.resource,
h1.resource {
	display: flex;
	align-items: center;
	gap: 0.5rem;
}

h1.resource .icon {
	width: 0.55em;
	height: 0.55em;
}

.status {
	font-size: 1.35rem;
	line-height: 1.2;
}

.upcoming {
	list-style: none;
	display: grid;
	gap: 0.35rem;
	color: var(--muted);
	font-size: 0.95rem;
}

.more {
	font-size: 12px;
	letter-spacing: 0.14em;
	text-transform: uppercase;
	color: var(--muted);
}

.card .btn {
	margin-top: 0.6rem;
	border-color: color-mix(in srgb, var(--paper) 35%, transparent);
}

.pager {
	display: flex;
	justify-content: space-between;
	gap: 1rem;
	font-size: 12px;
	letter-spacing: 0.14em;
	text-transform: uppercase;
}

.pager a {
	color: var(--muted);
}

.pager span {
	color: var(--line);
}

.day h2 {
	font-size: 1.35rem;
	margin-top: 0.5rem;
}

.times {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 0.8rem;
	margin-top: 1.5rem;
}

.times .label,
.app form .times .label {
	margin-top: 0;
}

.app form .btn {
	width: 100%;
}

input[type="time"] {
	color-scheme: dark;
}

.cal {
	display: grid;
	gap: 0.85rem;
}

.cal-nav {
	display: grid;
	grid-template-columns: 2.5rem 1fr 2.5rem;
	align-items: center;
	gap: 0.5rem;
}

.cal-nav p {
	text-align: center;
}

.cal-nav a,
.cal-nav span {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 2.5rem;
	height: 2.5rem;
	border-radius: 999px;
	font-size: 1.6rem;
	line-height: 1;
	color: var(--paper);
}

.cal-nav span {
	color: var(--line);
}

.cal-grid {
	display: grid;
	grid-template-columns: repeat(7, 1fr);
	gap: 0.3rem;
}

.cal-dow {
	text-align: center;
	font-size: 11px;
	letter-spacing: 0.08em;
	text-transform: uppercase;
	color: var(--muted);
	padding-bottom: 0.2rem;
}

.cal-day {
	aspect-ratio: 1;
	display: flex;
	align-items: center;
	justify-content: center;
	border-radius: 12px;
	color: var(--paper);
	text-decoration: none;
	font-size: 0.95rem;
}

.cal-day.is-out,
.cal-day.is-off {
	color: var(--line);
}

.cal-day.is-today {
	box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--paper) 45%, transparent);
}

.cal-day.is-open {
	background: var(--panel);
}

.cal-day.is-selected {
	background: var(--paper);
	color: var(--ink);
}

.choices {
	display: grid;
	gap: 0.65rem;
}

.choice {
	display: grid;
	grid-template-columns: 1.25rem 1fr auto;
	gap: 0.85rem;
	align-items: center;
	min-height: 64px;
	padding: 0.85rem 1rem;
	border: 1px solid var(--hair);
	border-radius: var(--radius-sm);
	background: var(--field);
	cursor: pointer;
}

.choice.is-off {
	opacity: 0.5;
	cursor: default;
}

.choice:has(input:checked) {
	border-color: var(--paper);
}

.choice input {
	width: 1.15rem;
	height: 1.15rem;
	margin: 0;
	accent-color: var(--red);
}

.choice__name {
	display: grid;
	gap: 0.15rem;
}

.choice__price {
	font-size: 0.95rem;
	white-space: nowrap;
}

.slot {
	display: grid;
	grid-template-columns: minmax(0, 1fr) auto;
	gap: 0.2rem 1rem;
	align-items: center;
	min-height: 52px;
	padding: 0.7rem 0;
	border-top: 1px solid var(--line);
	color: inherit;
	text-decoration: none;
}

.slot__when {
	display: grid;
}

.slot__when .muted {
	font-size: 0.85rem;
}

.slot__state {
	color: var(--muted);
	text-align: right;
}

.slot__side {
	display: grid;
	justify-items: end;
	gap: 0.15rem;
	text-align: right;
}

.slot__side a {
	font-size: 12px;
	letter-spacing: 0.1em;
	text-transform: uppercase;
}

.slot__price {
	white-space: nowrap;
}

a.slot:hover .slot__state,
a.slot:hover .slot__price {
	color: var(--red);
}

.slot.is-busy .slot__state {
	color: var(--paper);
}

.slot.is-past {
	opacity: 0.72;
}

.price {
	font-size: 2rem;
	line-height: 1;
}

.fiche {
	display: grid;
	gap: 0.35rem;
	margin: 0.4rem 0 0.8rem;
	padding-left: 1.1rem;
	color: var(--muted);
}

.rates {
	width: 100%;
	border-collapse: collapse;
	margin: 0.4rem 0 1rem;
}

.rates th,
.rates td {
	padding: 0.7rem 0;
	border-top: 1px solid var(--line);
	font-weight: 400;
	text-align: left;
}

.rates th {
	color: var(--muted);
	font-size: 12px;
	letter-spacing: 0.14em;
	text-transform: uppercase;
}

.rates td:not(:first-child),
.rates th:not(:first-child) {
	text-align: right;
}

.rates .muted {
	display: block;
	font-size: 0.85rem;
}

.estimate {
	display: grid;
	gap: 0.75rem;
}

.estimate-row {
	display: grid;
	grid-template-columns: 1fr 5.5rem;
	gap: 0.8rem;
	align-items: center;
}

.estimate-row .label,
.estimate-row input {
	margin-top: 0;
}

.estimate-row input {
	text-align: center;
}

.estimate-total {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 1rem;
	margin-top: 0.4rem;
}

.bill {
	gap: 1.15rem;
}

.bill-group {
	display: grid;
	gap: 0.15rem;
}

.bill-person {
	display: grid;
	gap: 0.35rem;
	padding-top: 0.85rem;
	margin-top: 0.35rem;
	border-top: 1px solid var(--line);
}

.bill-person__head {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 1rem;
}

.bill-person__head p:first-child,
.bill-person > p:first-child {
	font-size: 1.15rem;
	line-height: 1.2;
}

.bill-person__amount {
	white-space: nowrap;
}

.bill-stats {
	display: flex;
	flex-wrap: wrap;
	gap: 0.35rem 1.25rem;
	color: var(--muted);
}

.bill-lines {
	list-style: none;
	display: grid;
	gap: 0.3rem;
	margin: 0.15rem 0 0;
	padding: 0;
}

.bill-lines li {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 0.75rem;
	color: var(--muted);
	font-size: 0.9rem;
}

.bill-lines li span:first-child {
	min-width: 0;
}

.bill-lines li span:last-child:not(:first-child) {
	white-space: nowrap;
}

.bill-total {
	display: flex;
	justify-content: space-between;
	align-items: baseline;
	gap: 1rem;
	padding-top: 0.9rem;
	border-top: 1px solid var(--line);
}

.bill .more {
	justify-self: center;
}

.account {
	display: grid;
	gap: 0.1rem;
	padding: 0.85rem 0;
	border-top: 1px solid var(--line);
}

.account p:first-child {
	font-size: 1.1rem;
}

.invite-free {
	display: none;
}

.invite:has(input[name="role"][value="member"]:checked) .invite-free {
	display: grid;
}

.app form .label {
	margin-top: 1.25rem;
}
