/* Bandeau d'acceptation CGU */
.tic-legal-consent {
	position: fixed;
	inset: 0;
	z-index: 100000;
	display: none;
	align-items: flex-end;
	justify-content: center;
	padding: 1rem;
	pointer-events: none;
}

.tic-legal-consent.is-visible {
	display: flex;
	pointer-events: auto;
}

.tic-legal-consent[hidden] {
	display: none !important;
}

.tic-legal-consent__backdrop {
	position: absolute;
	inset: 0;
	background: rgba(4, 8, 18, 0.72);
	backdrop-filter: blur(4px);
}

.tic-legal-consent__dialog {
	position: relative;
	width: min(100%, 40rem);
	padding: clamp(1.25rem, 4vw, 1.75rem);
	border-radius: calc(var(--tic-radius-card, 0.75rem) * 1.25);
	background: var(--tic-surface-bg);
	border: 1px solid var(--tic-surface-border);
	box-shadow: 0 24px 64px rgba(0, 0, 0, 0.45);
	overflow: hidden;
}

.tic-legal-consent__accent {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 3px;
	background: linear-gradient(90deg, var(--tic-brand, #f79007), var(--tic-accent-light, #38bdf8));
}

.tic-legal-consent__header {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	margin-bottom: 0.75rem;
}

.tic-legal-consent__icon {
	display: flex;
	align-items: center;
	justify-content: center;
	width: 2.5rem;
	height: 2.5rem;
	border-radius: 0.625rem;
	background: rgba(247, 144, 7, 0.15);
	border: 1px solid rgba(247, 144, 7, 0.3);
	color: var(--tic-brand);
}

.tic-legal-consent__icon svg {
	width: 1.2rem;
	height: 1.2rem;
}

.tic-legal-consent__title {
	margin: 0;
	font-size: 1.125rem;
	font-weight: 600;
	color: var(--tic-text-primary);
}

.tic-legal-consent__text {
	margin: 0 0 0.75rem;
	font-size: 0.9rem;
	line-height: 1.65;
	color: var(--tic-text-body);
}

.tic-legal-consent__links {
	margin: 0 0 1.25rem;
	font-size: 0.875rem;
}

.tic-legal-consent__link {
	color: var(--tic-accent-light);
	text-decoration: none;
}

.tic-legal-consent__link:hover {
	text-decoration: underline;
}

.tic-legal-consent__sep {
	margin: 0 0.5rem;
	color: var(--tic-text-muted, rgba(255, 255, 255, 0.35));
}

.tic-legal-consent__actions {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem;
}

.tic-legal-consent__actions .tic-btn--brand {
	background: linear-gradient(90deg, #f79007, #f5c842);
	color: #0a0f1e;
	font-weight: 600;
	border: none;
	box-shadow: 0 4px 16px rgba(247, 144, 7, 0.32);
}

.tic-legal-consent__actions .tic-btn--brand svg {
	width: 1rem;
	height: 1rem;
}

.tic-legal-consent__decline-msg {
	display: none;
}

.tic-legal-consent__note {
	margin: 1rem 0 0;
	padding-top: 1rem;
	border-top: 1px solid rgba(255, 255, 255, 0.08);
	font-size: 0.8125rem;
	line-height: 1.55;
	color: var(--tic-text-body);
	opacity: 0.9;
}

/* Mode consultation — navigation libre, rappel discret en bas */
.tic-legal-consent-bar {
	position: fixed;
	bottom: 0;
	left: 0;
	right: 0;
	z-index: 99990;
	height: auto;
	max-height: min(42vh, 20rem);
	overflow: auto;
	padding: 0;
	background: rgba(8, 12, 24, 0.97);
	border-top: 1px solid rgba(255, 255, 255, 0.08);
	box-shadow:
		0 -12px 40px rgba(0, 0, 0, 0.4),
		0 -1px 0 rgba(247, 144, 7, 0.12);
	backdrop-filter: blur(12px);
	-webkit-backdrop-filter: blur(12px);
}

.tic-legal-consent-bar[hidden] {
	display: none !important;
}

.tic-legal-consent-bar__accent {
	height: 3px;
	background: linear-gradient(90deg, var(--tic-brand, #f79007) 0%, var(--tic-accent-light, #38bdf8) 55%, rgba(56, 189, 248, 0.35) 100%);
}

.tic-legal-consent-bar__inner {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 0.875rem 1.25rem;
	max-width: var(--tic-container-max, 72rem);
	margin: 0 auto;
	padding: 0.875rem clamp(1rem, 3vw, 1.5rem) calc(0.875rem + env(safe-area-inset-bottom, 0px));
}

.tic-legal-consent-bar__content {
	display: flex;
	align-items: flex-start;
	gap: 0.875rem;
	flex: 1 1 18rem;
	min-width: 0;
}

.tic-legal-consent-bar__icon {
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	width: 2.5rem;
	height: 2.5rem;
	border-radius: 0.625rem;
	background: rgba(247, 144, 7, 0.12);
	border: 1px solid rgba(247, 144, 7, 0.28);
	color: var(--tic-brand, #f79007);
}

.tic-legal-consent-bar__icon svg {
	width: 1.25rem;
	height: 1.25rem;
}

.tic-legal-consent-bar__text-wrap {
	display: flex;
	flex-direction: column;
	gap: 0.25rem;
	min-width: 0;
	text-align: left;
}

.tic-legal-consent-bar__label {
	margin: 0;
	font-size: 0.6875rem;
	font-weight: 700;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--tic-brand, #f79007);
	line-height: 1.3;
}

.tic-legal-consent-bar__text {
	margin: 0;
	font-size: 0.8125rem;
	line-height: 1.5;
	color: var(--tic-text-body, rgba(226, 232, 240, 0.88));
}

.tic-legal-consent-bar__actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.625rem 0.875rem;
	flex: 0 0 auto;
}

.tic-legal-consent-bar__links {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 0.5rem 0.875rem;
}

.tic-legal-consent-bar__link {
	font-size: 0.8125rem;
	font-weight: 600;
	color: var(--tic-accent-light, #38bdf8);
	text-decoration: none;
	white-space: nowrap;
	transition: color 0.15s ease;
}

.tic-legal-consent-bar__link:hover {
	color: #7dd3fc;
	text-decoration: underline;
}

.tic-legal-consent-bar__link--muted {
	color: rgba(226, 232, 240, 0.72);
	font-weight: 500;
}

.tic-legal-consent-bar__link--muted:hover {
	color: rgba(226, 232, 240, 0.95);
}

.tic-legal-consent-bar__accept {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	gap: 0.375rem;
	padding: 0.5625rem 1.125rem;
	font-size: 0.8125rem;
	background: linear-gradient(90deg, #f79007, #f5c842);
	color: #0a0f1e;
	font-weight: 700;
	border: none;
	border-radius: var(--tic-radius-btn, 0.5rem);
	box-shadow: 0 2px 12px rgba(247, 144, 7, 0.32);
	white-space: nowrap;
	transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.tic-legal-consent-bar__accept:hover {
	transform: translateY(-1px);
	box-shadow: 0 4px 16px rgba(247, 144, 7, 0.4);
}

.tic-legal-consent-bar__accept svg {
	width: 0.875rem;
	height: 0.875rem;
}

html.tic-legal-consent-bar-visible #tic-chatbot {
	bottom: calc(6.25rem + env(safe-area-inset-bottom, 0px));
}

@media (max-width: 640px) {
	.tic-legal-consent-bar {
		max-height: none;
	}

	.tic-legal-consent-bar__inner {
		flex-direction: column;
		align-items: stretch;
		justify-content: flex-start;
		gap: 0.75rem;
		padding: 0.75rem 1rem calc(0.75rem + env(safe-area-inset-bottom, 0px));
	}

	.tic-legal-consent-bar__content {
		flex: 0 0 auto;
		width: 100%;
		align-items: flex-start;
		gap: 0.75rem;
	}

	.tic-legal-consent-bar__icon {
		width: 2.25rem;
		height: 2.25rem;
		margin-top: 0.05rem;
	}

	.tic-legal-consent-bar__text-wrap {
		flex: 1 1 auto;
		gap: 0.2rem;
	}

	.tic-legal-consent-bar__label {
		font-size: 0.625rem;
	}

	.tic-legal-consent-bar__text {
		font-size: 0.8125rem;
		line-height: 1.45;
	}

	.tic-legal-consent-bar__actions {
		display: flex;
		flex-direction: column;
		align-items: stretch;
		gap: 0.75rem;
		width: 100%;
		padding-top: 0.75rem;
		border-top: 1px solid rgba(255, 255, 255, 0.08);
	}

	.tic-legal-consent-bar__links {
		display: flex;
		flex-wrap: wrap;
		justify-content: flex-start;
		gap: 0.35rem 1rem;
		width: 100%;
	}

	.tic-legal-consent-bar__link {
		display: inline-flex;
		align-items: center;
		min-height: 2.25rem;
		padding: 0.25rem 0;
		white-space: normal;
		line-height: 1.3;
	}

	.tic-legal-consent-bar__accept {
		width: 100%;
		margin: 0;
		min-height: 2.75rem;
		padding: 0.75rem 1rem;
	}

	html.tic-legal-consent-bar-visible #tic-chatbot {
		bottom: calc(11.5rem + env(safe-area-inset-bottom, 0px));
	}
}

html.tic-legal-consent-limited .forminator-custom-form,
html.tic-legal-consent-limited #tic-chatbot-launcher {
	/* Pas de blocage visuel global — seulement à l'interaction */
}

/* Panneau d'acceptation (page CGU) */
.tic-legal-accept {
	position: relative;
	border-radius: calc(var(--tic-radius-card, 0.75rem) * 1.25);
	background: var(--tic-surface-bg);
	border: 1px solid rgba(247, 144, 7, 0.22);
	overflow: hidden;
	box-shadow: 0 16px 48px rgba(0, 0, 0, 0.28);
}

.tic-legal-accept__accent {
	position: absolute;
	top: 0;
	left: 0;
	right: 0;
	height: 3px;
	background: linear-gradient(90deg, var(--tic-brand, #f79007), var(--tic-accent-light, #38bdf8));
}

.tic-legal-accept__inner {
	padding: clamp(1.5rem, 4vw, 2rem);
}

.tic-legal-accept__header {
	display: flex;
	align-items: flex-start;
	gap: 1rem;
	margin-bottom: 1rem;
}

.tic-legal-accept__icon {
	display: flex;
	flex-shrink: 0;
	align-items: center;
	justify-content: center;
	width: 3rem;
	height: 3rem;
	border-radius: 0.875rem;
	background: rgba(247, 144, 7, 0.14);
	border: 1px solid rgba(247, 144, 7, 0.28);
	color: var(--tic-brand);
}

.tic-legal-accept__icon svg {
	width: 1.35rem;
	height: 1.35rem;
}

.tic-legal-accept__title {
	margin: 0 0 0.5rem;
	font-size: 1.25rem;
	font-weight: 600;
	color: var(--tic-text-primary);
}

.tic-legal-accept__description {
	margin: 0;
	font-size: 0.9375rem;
	line-height: 1.65;
	color: var(--tic-text-body);
}

.tic-legal-accept__links {
	display: flex;
	flex-wrap: wrap;
	gap: 0.75rem 1.25rem;
	margin-bottom: 1.25rem;
}

.tic-legal-accept__doc-link {
	font-size: 0.875rem;
	font-weight: 600;
	color: var(--tic-accent-light);
	text-decoration: none;
}

.tic-legal-accept__doc-link:hover {
	text-decoration: underline;
}

.tic-legal-accept__form {
	display: grid;
	gap: 1rem;
}

.tic-legal-accept__form[hidden] {
	display: none !important;
}

.tic-legal-accept__checkbox {
	display: flex;
	align-items: flex-start;
	gap: 0.75rem;
	cursor: pointer;
	user-select: none;
}

.tic-legal-accept__checkbox input {
	position: absolute;
	opacity: 0;
	width: 1px;
	height: 1px;
	pointer-events: none;
}

.tic-legal-accept__checkbox-box {
	flex-shrink: 0;
	width: 1.25rem;
	height: 1.25rem;
	margin-top: 0.15rem;
	border-radius: 0.35rem;
	border: 2px solid rgba(255, 255, 255, 0.25);
	background: rgba(255, 255, 255, 0.04);
	transition: border-color 0.2s ease, background 0.2s ease;
}

.tic-legal-accept__checkbox input:checked + .tic-legal-accept__checkbox-box {
	background: var(--tic-brand);
	border-color: var(--tic-brand);
	box-shadow: inset 0 0 0 2px #0a0f1e;
}

.tic-legal-accept__checkbox-text {
	font-size: 0.9rem;
	line-height: 1.55;
	color: var(--tic-text-primary);
}

.tic-legal-accept__submit {
	justify-self: start;
}

.tic-legal-accept__submit:disabled {
	opacity: 0.45;
	cursor: not-allowed;
}

.tic-legal-accept__submit:not(:disabled) {
	background: linear-gradient(90deg, #f79007, #f5c842);
	color: #0a0f1e;
	font-weight: 600;
	border: none;
	box-shadow: 0 4px 16px rgba(247, 144, 7, 0.32);
}

.tic-legal-accept__submit svg {
	width: 1rem;
	height: 1rem;
}

.tic-legal-accept__success {
	display: flex;
	align-items: center;
	gap: 0.75rem;
	margin: 0;
	padding: 1rem 1.125rem;
	border-radius: 0.75rem;
	font-size: 0.9375rem;
	color: #34d399;
	background: rgba(16, 185, 129, 0.1);
	border: 1px solid rgba(16, 185, 129, 0.25);
}

.tic-legal-accept__success[hidden] {
	display: none !important;
}

.tic-legal-accept__success-icon svg {
	width: 1.125rem;
	height: 1.125rem;
}

.tic-legal-page__version {
	margin-left: 0.5rem;
	opacity: 0.75;
}

.tic-terms-page .tic-cta .tic-btn--brand {
	background: linear-gradient(90deg, #f79007, #f5c842);
	color: #0a0f1e;
	font-weight: 600;
	border: none;
	box-shadow: 0 4px 16px rgba(247, 144, 7, 0.32);
}

@media (max-width: 767px) {
	.tic-legal-consent__actions .tic-btn {
		flex: 1 1 100%;
	}

	.tic-legal-accept__submit {
		width: 100%;
	}
}

@media (min-width: 768px) {
	.tic-legal-consent {
		align-items: center;
	}
}
