/**
 * Bandeau de revendication et sa fenêtre.
 *
 * Aucune couleur n'est écrite en dur : tout reprend les variables de
 * l'habillage posées par le plugin principal sur la page. Le bandeau suit donc
 * la fiche — clair sur « Papier », sombre sur « Nuit » — et le bouton emprunte
 * l'encre du texte sur le fond de la page, ce qui garantit son contraste quel
 * que soit l'accent choisi.
 */

body.aai-unclaimed {
	/* Le bandeau est fixe : la fin de page doit pouvoir passer dessous. */
	padding-bottom: 6rem;
}

.aai-bar {
	position: fixed;
	left: 0;
	right: 0;
	bottom: 0;
	z-index: 900;
	background: var(--surface, #fff);
	border-top: 1px solid var(--rule, #e2e2e2);
	box-shadow: 0 -12px 32px rgba(0, 0, 0, .07);
	padding: .9rem clamp(1.15rem, 5vw, 4rem);
	animation: aai-rise .5s cubic-bezier(.2, .8, .3, 1) both;
	animation-delay: .8s;
}

@keyframes aai-rise {
	from { transform: translateY(100%); }
	to   { transform: translateY(0); }
}

.aai-bar__inner {
	max-width: 52rem;
	margin-inline: auto;
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1rem 1.5rem;
	flex-wrap: wrap;
}

.aai-bar__text {
	margin: 0;
	display: flex;
	flex-wrap: wrap;
	align-items: baseline;
	gap: .45rem;
	font-family: var(--body, system-ui, sans-serif);
	line-height: 1.4;
}

/* La provenance reste une note de bas de page : discrète, jamais un titre. */
.aai-bar__from {
	color: var(--muted, #6c6862);
	font-size: .82rem;
}

.aai-bar__ask {
	color: var(--text, #191a1c);
	font-size: .95rem;
}

/* Bouton : l'encre de la page sur le fond de la page, donc lisible partout. */
.aai-btn {
	display: inline-block;
	background: var(--text, #1e1e1e);
	color: var(--bg, #fff);
	border: 0;
	border-radius: var(--radius, 6px);
	padding: .7rem 1.4rem;
	font-family: var(--display, system-ui, sans-serif);
	font-size: .88rem;
	font-weight: 600;
	letter-spacing: .01em;
	cursor: pointer;
	white-space: nowrap;
	transition: opacity .18s ease, transform .18s ease;
}

.aai-btn:hover,
.aai-btn:focus-visible {
	opacity: .85;
	transform: translateY(-1px);
}

.aai-btn--full {
	width: 100%;
	margin-top: .4rem;
	padding: .85rem 1.4rem;
}

/* Fenêtre. */

.aai-modal {
	position: fixed;
	inset: 0;
	z-index: 1000;
	display: grid;
	place-items: center;
	padding: 1.25rem;
}

.aai-modal[hidden] {
	display: none;
}

.aai-modal__scrim {
	position: absolute;
	inset: 0;
	background: rgba(10, 10, 12, .55);
	backdrop-filter: blur(3px);
}

.aai-modal__panel {
	position: relative;
	width: min(28rem, 100%);
	max-height: 90vh;
	overflow-y: auto;
	background: var(--surface, #fff);
	color: var(--text, #191a1c);
	border-radius: calc(var(--radius, 6px) * 2);
	padding: 2.25rem clamp(1.5rem, 5vw, 2.25rem) 1.75rem;
	box-shadow: 0 24px 60px rgba(0, 0, 0, .28);
	animation: aai-pop .28s cubic-bezier(.2, .8, .3, 1) both;
}

@keyframes aai-pop {
	from { opacity: 0; transform: translateY(10px) scale(.98); }
	to   { opacity: 1; transform: none; }
}

.aai-modal__close {
	position: absolute;
	top: .6rem;
	right: .8rem;
	background: none;
	border: 0;
	font-size: 1.6rem;
	line-height: 1;
	color: var(--muted, #6c6862);
	cursor: pointer;
	padding: .2rem .4rem;
}

.aai-modal__title {
	margin: 0 0 .5rem;
	font-family: var(--display, system-ui, sans-serif);
	font-size: 1.4rem;
	font-weight: var(--display-weight, 700);
	letter-spacing: var(--display-tracking, -.02em);
	color: var(--text, #191a1c);
}

.aai-modal__lead {
	margin: 0 0 1.25rem;
	font-family: var(--body, system-ui, sans-serif);
	font-size: .9rem;
	line-height: 1.55;
	color: var(--muted, #6c6862);
}

.aai-modal__error {
	margin: 0 0 1rem;
	padding: .65rem .8rem;
	border-radius: var(--radius, 6px);
	background: rgba(214, 54, 56, .1);
	color: #b32d2e;
	font-size: .85rem;
}

.aai-field {
	display: block;
	margin-bottom: 1rem;
	font-family: var(--body, system-ui, sans-serif);
}

.aai-field > span {
	display: block;
	margin-bottom: .35rem;
	font-size: .82rem;
	color: var(--text, #191a1c);
}

.aai-field input {
	width: 100%;
	box-sizing: border-box;
	appearance: none;
	background: var(--bg, #fff);
	color: var(--text, #191a1c);
	border: 1px solid var(--rule, #dfdace);
	border-radius: var(--radius, 6px);
	padding: .7rem .85rem;
	font: inherit;
	font-size: .95rem;
}

.aai-field input:focus {
	outline: 2px solid var(--text, #191a1c);
	outline-offset: 1px;
}

.aai-field small {
	display: block;
	margin-top: .3rem;
	font-size: .75rem;
	color: var(--muted, #6c6862);
}

.aai-modal__foot {
	margin: 1rem 0 0;
	font-family: var(--body, system-ui, sans-serif);
	font-size: .8rem;
	line-height: 1.5;
	color: var(--muted, #6c6862);
	text-align: center;
}

.aai-modal__foot a {
	color: inherit;
}

/* Champ leurre : hors écran, jamais masqué par « display:none » — certains
   robots ignorent ce qui est vraiment caché, et rempliraient tout le reste. */
.aai-hp {
	position: absolute;
	left: -9999px;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

@media (max-width: 34rem) {
	.aai-bar__inner {
		justify-content: center;
		text-align: center;
	}

	.aai-bar__text {
		justify-content: center;
	}

	.aai-btn {
		width: 100%;
	}
}

@media (prefers-reduced-motion: reduce) {
	.aai-bar,
	.aai-modal__panel {
		animation: none;
	}

	.aai-btn:hover,
	.aai-btn:focus-visible {
		transform: none;
	}
}
