/*
 * Binomm : bandeau de consentement à la mesure d'audience (mesure.php, consentement.js).
 * Carte sombre du pied de page, en bas à gauche : le diagnostic garde le coin droit. Boutons de même taille, comme
 * ceux de la fenêtre de diagnostic : refuser est aussi simple qu'accepter (CNIL).
 */

.bnm-cookies {
	--bnm-focus: var(--bnm-creme);
	position: fixed;
	left: max(16px, calc(40px * var(--bnm-s)));
	bottom: max(16px, calc(40px * var(--bnm-s)));
	z-index: 90;
	box-sizing: border-box;
	width: min(440px, calc(100vw - 2 * max(16px, calc(40px * var(--bnm-s)))));
	margin: 0;
	padding: max(20px, calc(30px * var(--bnm-s)));
	border-radius: max(10px, calc(16px * var(--bnm-s)));
	background: var(--bnm-sombre);
	color: var(--bnm-creme);
	box-shadow: 0 18px 50px rgba(38, 20, 23, .22);
	opacity: 0;
	transform: translateY(12px);
	transition: opacity .35s ease, transform .5s var(--bnm-expo);
}
.bnm-cookies[hidden] { display: none; }
.bnm-cookies.est-ouvert { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
	.bnm-cookies { transform: none; transition: opacity .2s ease; }
}

/* Le rideau d'ouverture passe devant ; menu ou fenêtre de diagnostic ouverts : le bandeau s'efface. */
html.bnm-charge .bnm-cookies { visibility: hidden; }
html:is(.bnm-menu-ouvert, .bnm-diag-ouvert) .bnm-cookies { opacity: 0; visibility: hidden; }

.bnm-cookies .bnm-cookies__titre {
	margin: 0 0 8px;
	font: 700 max(18px, calc(24px * var(--bnm-s)))/1.2 var(--e-global-typography-bnmh3-font-family, "alverata"), Georgia, serif;
	color: inherit;
}
.bnm-cookies .bnm-cookies__texte {
	margin: 0;
	font: 400 15px/1.5 var(--e-global-typography-bnmtexte-font-family, "Helvetica Neue"), "Helvetica Neue", Helvetica, Arial, sans-serif;
	color: inherit;
}
.bnm-cookies .bnm-cookies__texte a {
	color: inherit;
	text-decoration: underline;
	text-underline-offset: .18em;
}
.bnm-cookies .bnm-cookies__actions {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 10px;
	margin-top: max(16px, calc(24px * var(--bnm-s)));
}

/* Boutons : mesures et typographie des boutons pleins du diagnostic. Sélecteurs à trois niveaux : reset-neutre.css
   rend les boutons transparents au survol et au focus avec [type=button]:focus. */
.bnm-cookies .bnm-cookies__actions .bnm-cookies__bouton,
.bnm-legal .bnm-legal__choix[type] {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	box-sizing: border-box;
	height: max(44px, calc(56px * var(--bnm-s)));
	padding: 0 max(18px, calc(28px * var(--bnm-s)));
	border: 1px solid var(--bnm-bleu);
	border-radius: 100px;
	background: var(--bnm-bleu);
	color: var(--bnm-creme);
	font: 500 max(14px, calc(18px * var(--bnm-s)))/1.25 var(--e-global-typography-bnmbouton-font-family, "Helvetica Neue"), "Helvetica Neue", Helvetica, Arial, sans-serif;
	white-space: nowrap;
	cursor: pointer;
	-webkit-tap-highlight-color: transparent;
	transition: background-color .3s ease, border-color .3s ease, color .3s ease, scale .2s var(--button-004-ease-click, ease);
}
.bnm-cookies .bnm-cookies__actions .bnm-cookies__bouton:active,
.bnm-legal .bnm-legal__choix[type]:active { scale: .96; }
.bnm-cookies .bnm-cookies__actions .bnm-cookies__bouton.bnm-cookies__bouton--contour {
	background: transparent;
	border-color: var(--bnm-filet-creme);
	color: var(--bnm-creme);
}
.bnm-cookies .bnm-cookies__actions .bnm-cookies__bouton:is(:hover, :focus-visible) {
	background: var(--bnm-creme);
	border-color: var(--bnm-creme);
	color: var(--bnm-sombre);
}
.bnm-cookies .bnm-cookies__actions .bnm-cookies__bouton:focus-visible,
.bnm-legal .bnm-legal__choix[type]:focus-visible {
	outline: 2px solid var(--bnm-focus);
	outline-offset: 3px;
}

/* Charte des cookies : « Modifier mon choix ». */
.bnm-legal .bnm-legal__choix[type] { margin: .4em 0 1.2em; }
.bnm-legal .bnm-legal__choix[type]:is(:hover, :focus-visible) {
	background: var(--bnm-sombre);
	border-color: var(--bnm-sombre);
	color: var(--bnm-creme);
}
