/*
 * Bandeau de Complianz (essai T10, docs/THEME.md section 10) : contrastes du second niveau, cibles et petits écrans.
 * Préfixe body pour passer devant la feuille du bandeau, chargée après celle-ci.
 */

/* Catégories sur le fond des champs (texte 9,9 pour 1, bascule inactive 5, or 8,5), au lieu d'un gris à 2,3 pour 1. */
body .cmplz-cookiebanner .cmplz-categories .cmplz-category {
	background-color: var(--wp--preset--color--anthracite, #1e1e1e);
}

/* « Toujours actif » dans la couleur du texte (vert à 1,3 pour 1 sinon) ; flèche des descriptions visible. */
body .cmplz-cookiebanner {
	--cmplz_category_header_always_active_color: var(--wp--preset--color--texte, #c7c7c7);
}

body .cmplz-cookiebanner .cmplz-category-toggle svg {
	fill: currentColor;
}

/* Anneau de focus des cases de consentement : or sur anthracite (bleu à 1,5 pour 1 sinon). */
body .cmplz-cookiebanner .cmplz-categories .cmplz-category .cmplz-banner-checkbox input.cmplz-consent-checkbox:focus-visible + .cmplz-label::before {
	box-shadow: 0 0 0 2px var(--wp--preset--color--anthracite, #1e1e1e), 0 0 0 4px var(--wp--preset--color--or, #e6b10c);
}

/* Cibles du second niveau (WCAG 2.2, 2.5.8) : bouton de la description à 24 px, écarté de la case de consentement. */
body .cmplz-cookiebanner .cmplz-category-header .cmplz-category-toggle {
	min-width: 24px;
	min-height: 24px;
}

body .cmplz-cookiebanner .cmplz-categories .cmplz-category .cmplz-category-header {
	column-gap: 14px;
}

/*
 * Moins de 400 px de haut (téléphone à l'horizontale, zoom à 200 %) : Complianz réduit le bandeau à 60 % et ses
 * boutons à 30 %, illisibles. Taille normale, défilement dans le bandeau, boutons de 44 px.
 */
@media (max-height: 400px) {
	body .cmplz-cookiebanner,
	body .cmplz-cookiebanner .cmplz-buttons .cmplz-btn,
	body .cmplz-cookiebanner .cmplz-documents,
	body .cmplz-cookiebanner .cmplz-information {
		zoom: 1 !important;
	}

	body .cmplz-cookiebanner {
		height: auto;
		max-height: calc(100vh - 20px);
		overflow-y: auto;
	}

	body .cmplz-cookiebanner .cmplz-header {
		max-height: none;
	}

	body .cmplz-cookiebanner .cmplz-buttons {
		gap: 10px !important;
	}

	body .cmplz-cookiebanner .cmplz-buttons .cmplz-btn {
		height: auto !important;
		min-height: 44px !important;
		padding: 10px !important;
		font-size: var(--cmplz_button_font_size) !important;
		line-height: 20px !important;
		white-space: normal !important;
	}
}

/*
 * Tablette et petit ordinateur (768 à 1279 px, captures du 09/11/2026) : en bandeau du bas, Complianz place ses trois
 * boutons côte à côte dans la colonne de droite ; à 1024 px, ils s'étirent sur 100 px de haut et le troisième
 * (« Personnaliser ») sort de l'écran. Boutons empilés, à la hauteur de leur texte (44 px au moins).
 */
@media (min-width: 768px) and (max-width: 1279.98px) {
	body .cmplz-cookiebanner .cmplz-buttons {
		flex-direction: column !important;
		gap: 10px !important;
	}

	body .cmplz-cookiebanner .cmplz-buttons .cmplz-btn {
		width: 100% !important;
		height: auto !important;
		min-height: 44px !important;
		padding: 10px !important;
		white-space: normal !important;
	}
}

/*
 * Bouton de l'espace réservé des vidéos bloquées (« Accepter les cookies marketing ») : fond plein et bordure, pour un
 * contraste suffisant quelle que soit la vignette dessous (Lighthouse, 08/11/2026 : contraste insuffisant relevé).
 */
body .cmplz-blocked-content-notice,
body button.cmplz-blocked-content-notice {
	background-color: var(--wp--preset--color--noir, #111111) !important;
	color: #ffffff !important;
	border: 1px solid var(--wp--preset--color--or, #d4a73c) !important;
}
