/**
 * ADN - Sortie rapide : styles du front.
 *
 * Personnalisation : variables --adn-sr-bg, --adn-sr-fg, --adn-sr-bg-hover,
 * --adn-sr-focus, --adn-sr-floating-space (à définir dans les Codes
 * personnalisés du plugin ADN, ou avec les contrôles du widget Elementor).
 *
 * @since 1.0.0
 */

:root {
	--adn-sr-bg: #9b111e; /* Contraste 8,4:1 avec du blanc. */
	--adn-sr-bg-hover: #6f0c15;
	--adn-sr-fg: #ffffff;
	--adn-sr-focus: #000000;
	--adn-sr-focus-ring: #ffffff;
	--adn-sr-floating-space: 96px;
}

/* Masqué à l'écran, lu par les technologies d'assistance. */
.adn-sr-visually-hidden {
	position: absolute !important;
	width: 1px !important;
	height: 1px !important;
	padding: 0 !important;
	margin: -1px !important;
	overflow: hidden !important;
	clip: rect(0, 0, 0, 0) !important;
	white-space: nowrap !important;
	border: 0 !important;
}

/* Bouton */
.adn-sr-exit {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 4px;
}

.adn-sr-exit__button,
.adn-sr-exit__button:visited {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	min-width: 44px;
	min-height: 44px;
	padding: 12px 20px;
	border: 2px solid transparent; /* Visible en mode contraste élevé. */
	border-radius: 6px;
	background-color: var(--adn-sr-bg);
	color: var(--adn-sr-fg);
	font-weight: 700;
	line-height: 1.2;
	text-align: center;
	text-decoration: none;
	cursor: pointer;
	transition: background-color 0.15s ease;
}

.adn-sr-exit__button:hover {
	background-color: var(--adn-sr-bg-hover);
	color: var(--adn-sr-fg);
}

.adn-sr-exit__button:focus-visible,
.adn-sr-skip:focus-visible,
.adn-sr-embed button:focus-visible,
.adn-sr-shake-enable:focus-visible {
	outline: 3px solid var(--adn-sr-focus);
	outline-offset: 2px;
	box-shadow: 0 0 0 5px var(--adn-sr-focus-ring);
}

.adn-sr-exit__help,
.adn-sr-exit__more {
	margin: 0;
	font-size: 0.875rem;
	line-height: 1.4;
}

.adn-sr-shake-enable {
	min-height: 44px;
	padding: 8px 12px;
	font-size: 0.875rem;
	cursor: pointer;
}

.adn-sr-shake-enable[hidden] {
	display: none;
}

/* Bouton flottant */
.adn-sr-floating {
	position: fixed;
	bottom: 16px;
	z-index: 2147483000; /* Au-dessus des bandeaux de cookies et des popups. */
	max-width: calc(100vw - 32px);
}

.adn-sr-floating--right {
	right: 16px;
}

.adn-sr-floating--left {
	left: 16px;
}

.adn-sr-floating--center {
	left: 50%;
	transform: translateX(-50%);
}

.adn-sr-floating .adn-sr-exit {
	align-items: center;
	padding: 6px 8px;
	border-radius: 8px;
	background: rgba(255, 255, 255, 0.95);
	box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25);
	color: #1a1a1a;
}

.adn-sr-floating .adn-sr-exit__more,
.adn-sr-floating .adn-sr-exit__more:visited {
	color: #1a1a1a;
}

body.adn-sr-has-floating {
	padding-bottom: var(--adn-sr-floating-space);
}

/* Lien d'évitement */
.adn-sr-skip,
.adn-sr-skip:visited {
	position: absolute;
	top: -200px;
	left: 8px;
	z-index: 2147483001;
	padding: 12px 20px;
	border-radius: 0 0 6px 6px;
	background-color: var(--adn-sr-bg);
	color: var(--adn-sr-fg);
	font-weight: 700;
	text-decoration: none;
}

.adn-sr-skip:focus {
	position: fixed;
	top: 0;
}

/* Contenus intégrés « charger au clic » */
.adn-sr-embed {
	box-sizing: border-box;
	padding: 20px;
	border: 1px solid #767676;
	border-radius: 6px;
	background: #f6f6f6;
	color: #1a1a1a;
}

.adn-sr-embed__text {
	margin: 0 0 12px;
}

.adn-sr-embed__actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px;
	margin: 0;
}

.adn-sr-embed__load {
	min-height: 44px;
	padding: 10px 16px;
	border: 2px solid #1a1a1a;
	border-radius: 4px;
	background: #ffffff;
	color: #1a1a1a;
	font-weight: 700;
	cursor: pointer;
}

.adn-sr-embed__open,
.adn-sr-embed__open:visited {
	color: #1a1a1a;
	text-decoration: underline;
}

.adn-sr-embed__frame {
	display: block;
	width: 100%;
	max-width: 100%;
	aspect-ratio: 16 / 9;
	border: 0;
}

/* Avertissement de contraste (éditeur Elementor seulement) */
.adn-sr-contrast-warning {
	margin-top: 6px;
	padding: 6px 10px;
	border-left: 4px solid #d63638;
	background: #fcf0f1;
	color: #1a1a1a;
	font-size: 12px;
}

@media (prefers-reduced-motion: reduce) {
	.adn-sr-exit__button {
		transition: none;
	}
}

@media print {
	.adn-sr-floating,
	.adn-sr-skip {
		display: none !important;
	}

	body.adn-sr-has-floating {
		padding-bottom: 0;
	}
}
