/*
  Avis « arrêt de commercialisation » d'une collection (class/avis-collection.php).
  Chargé uniquement sur les pages des collections concernées.
*/

html.avis-collection-ouvert {
	overflow: hidden;
}

.avis-collection {
	box-sizing: border-box;
	width: calc(100% - 32px);
	max-width: 460px;
	margin: auto;
	padding: 0;
	border: 0;
	background: transparent;
	overflow: visible;
	color: #222;
	font-family: 'Source Sans Pro', Arial, sans-serif;
}

.avis-collection::backdrop {
	background: rgba(34, 34, 34, 0.6);
}

.avis-collection[open] .avis-collection__boite {
	animation: avis-collection-entree 0.22s ease-out;
}

.avis-collection__boite {
	position: relative;
	box-sizing: border-box;
	padding: 40px 32px 28px;
	border-top: 8px solid #fec144;
	border-radius: 20px;
	background: #fff;
	box-shadow: 0 18px 48px rgba(0, 0, 0, 0.28);
	text-align: center;
}

.avis-collection__croix {
	position: absolute;
	top: 10px;
	right: 10px;
	width: 44px;
	height: 44px;
	padding: 0;
	border: 0;
	border-radius: 50%;
	background: transparent;
	color: #555;
	font-size: 30px;
	line-height: 44px;
	cursor: pointer;
}

.avis-collection__croix:hover {
	background: #f3f3f3;
	color: #222;
}

.avis-collection__logo {
	display: block;
	width: 88px;
	height: 88px;
	margin: 0 auto 16px;
	border-radius: 50%;
	box-shadow: 0 0 0 6px #fff3d4;
}

.avis-collection__titre {
	margin: 0 0 12px;
	padding: 0;
	background: none;
	color: #222;
	font-family: inherit;
	font-size: 26px;
	font-weight: 700;
	line-height: 1.2;
	letter-spacing: normal;
	text-transform: none;
}

.avis-collection__message {
	margin: 0 0 26px;
	padding: 0;
	color: #333;
	font-size: 18px;
	line-height: 1.55;
}

.avis-collection__actions {
	display: flex;
	flex-wrap: wrap;
	justify-content: center;
	gap: 12px;
}

.avis-collection__bouton {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	min-height: 48px;
	margin: 0;
	padding: 12px 22px;
	border: 2px solid #222;
	border-radius: 999px;
	font-family: inherit;
	font-size: 17px;
	font-weight: 700;
	line-height: 1.2;
	text-decoration: none;
	cursor: pointer;
	transition: background-color 0.15s, border-color 0.15s;
}

/* préfixe .avis-collection : l'emporte sur « a:hover, a:focus, a:active { color: red } » du site */
.avis-collection .avis-collection__bouton--principal,
.avis-collection .avis-collection__bouton--principal:link,
.avis-collection .avis-collection__bouton--principal:visited,
.avis-collection .avis-collection__bouton--principal:focus,
.avis-collection .avis-collection__bouton--principal:active {
	border-color: #fec144;
	background: #fec144;
	color: #222;
	text-decoration: none;
}

.avis-collection .avis-collection__bouton--principal:hover {
	border-color: #f7ae16;
	background: #f7ae16;
	color: #222;
	text-decoration: none;
}

/* la boîte reçoit le focus à l'ouverture, sans contour */
.avis-collection__boite:focus {
	outline: none;
}

.avis-collection__bouton--secondaire {
	background: #fff;
	color: #222;
}

.avis-collection__bouton--secondaire:hover {
	background: #f3f3f3;
}

.avis-collection__croix:focus-visible,
.avis-collection__bouton:focus-visible {
	outline: 3px solid #f37320;
	outline-offset: 3px;
}

@keyframes avis-collection-entree {
	from {
		opacity: 0;
		transform: translateY(12px);
	}
	to {
		opacity: 1;
		transform: none;
	}
}

@media (prefers-reduced-motion: reduce) {
	.avis-collection[open] .avis-collection__boite {
		animation: none;
	}
}

/* Téléphone */
@media (max-width: 480px) {
	.avis-collection__boite {
		padding: 34px 20px 20px;
	}

	.avis-collection__logo {
		width: 72px;
		height: 72px;
	}

	.avis-collection__titre {
		font-size: 22px;
	}

	.avis-collection__message {
		font-size: 17px;
	}

	.avis-collection__actions {
		flex-direction: column;
	}

	.avis-collection__bouton {
		width: 100%;
	}
}
