/* poteaubois v2 — bandeau de consentement Complianz aux couleurs du site, et page « Politique de cookies ».
   HORS COUCHES volontairement : la feuille de Complianz n'est pas dans une couche, elle l'emporterait sur nos couches.
   Règles CNIL respectées : « Accepter » et « Refuser » identiques (même couleur, même taille, même place, côte à côte),
   refus en un clic, préférences en lien discret. Réglages du bandeau posés en production le 13/10/2026 (POT-04) ; cette
   feuille n'ajoute que la typographie, les rayons, le focus, la compacité et les cibles tactiles de la charte.
   Audit design 14/10/2026 : DSA-44 (bandeau à 40 % de l'écran au plus à 375 px : texte de 14 px, croix sortie du flux,
   Accepter / Refuser / préférences sur une seule rangée, marges réduites) et DSA-45 (interrupteurs de la politique de
   cookies en cibles de 44 px, « Toujours activé » en vert forêt, fonds bois clair).
   Les couleurs viennent des jetons --pb-* de base.css (chargée sur toutes les pages du thème). */

html:root { --cmplz_category_header_always_active_color: var(--pb-foret); }

/* ---------- Bandeau : habillage ---------- */
body .cmplz-cookiebanner {
	box-sizing: border-box !important;
	font-family: var(--pb-police) !important;
	font-variant-numeric: lining-nums;
	color: var(--pb-encre) !important;
	background: var(--pb-blanc) !important;
	border: 1px solid var(--pb-ligne) !important;
	border-top: 4px solid var(--pb-bois) !important;
	border-radius: 16px !important;
	box-shadow: var(--pb-ombre-2) !important;
	max-height: calc(100vh - 2rem) !important; max-height: calc(100dvh - 2rem) !important; overflow-y: auto !important; /* panneau « préférences » ouvert : le bandeau défile, il ne déborde pas */
}
body .cmplz-cookiebanner .cmplz-title { font-weight: 800 !important; font-size: 1.0625rem !important; color: var(--pb-encre) !important; }

/* ---------- Bandeau : compacité (DSA-44) ----------
   Les rangées du bandeau sont rapprochées : plus d'écart entre elles, marges latérales de 14 px, filets supprimés. */
body .cmplz-cookiebanner { padding: 10px 14px 6px !important; gap: 0 !important; row-gap: 0 !important; }
body .cmplz-cookiebanner .cmplz-header,
body .cmplz-cookiebanner .cmplz-body,
body .cmplz-cookiebanner .cmplz-links,
body .cmplz-cookiebanner .cmplz-buttons,
body .cmplz-cookiebanner .cmplz-documents { margin: 0 !important; padding: 0 !important; }
body .cmplz-cookiebanner .cmplz-divider { display: none !important; }
/* En-tête réduit à rien quand il n'a ni logo ni titre : la croix de fermeture en sort (voir plus bas) */
body .cmplz-cookiebanner .cmplz-header { min-height: 0 !important; height: auto !important; padding-right: 44px !important; }
body .cmplz-cookiebanner .cmplz-logo:empty,
body .cmplz-cookiebanner .cmplz-title:empty { display: none !important; }
body .cmplz-cookiebanner .cmplz-body { max-height: none !important; overflow: visible !important; }
/* Texte du réglage Complianz (non modifié) : 14 px. La croix flotte en haut à droite : une encoche de la hauteur de deux
   lignes lui laisse la place sans réserver une rangée entière. */
body .cmplz-cookiebanner .cmplz-message,
body .cmplz-cookiebanner .cmplz-message p { font-size: 0.875rem !important; line-height: 1.4 !important; color: var(--pb-encre) !important; font-weight: 500 !important; margin: 0 !important; }
body .cmplz-cookiebanner .cmplz-message::before { content: ""; float: right; width: 36px; height: 38px; }
body .cmplz-cookiebanner .cmplz-message p + p { margin-top: 0.5em !important; }
body .cmplz-cookiebanner .cmplz-close {
	position: absolute !important; top: 2px !important; right: 2px !important; z-index: 2;
	min-width: 44px; min-height: 44px; margin: 0 !important; padding: 0 !important;
	display: inline-grid !important; place-items: center; color: var(--pb-encre) !important;
}

/* Boutons : « Accepter » et « Refuser » côte à côte, mêmes dimensions (flex égal), cibles de 44 px ; « Voir les préférences »
   en lien discret à droite, sur deux lignes ; « Enregistrer les préférences » (panneau ouvert) sur une rangée à part. */
body .cmplz-cookiebanner .cmplz-buttons { display: flex !important; flex-direction: row !important; flex-wrap: wrap !important; align-items: stretch !important; gap: 8px !important; margin-top: 8px !important; }
body .cmplz-cookiebanner .cmplz-buttons .cmplz-btn {
	width: auto !important; max-width: none !important; margin: 0 !important;
	min-height: 44px !important;
	padding: 6px 10px !important;
	border-radius: 10px !important;
	font-family: inherit !important;
	font-weight: 750 !important;
	font-size: 0.875rem !important;
	line-height: 1.2 !important;
	letter-spacing: 0 !important;
}
body .cmplz-cookiebanner .cmplz-buttons .cmplz-btn.cmplz-accept,
body .cmplz-cookiebanner .cmplz-buttons .cmplz-btn.cmplz-deny { flex: 1 1 0 !important; min-width: 0 !important; }
body .cmplz-cookiebanner .cmplz-buttons .cmplz-btn.cmplz-save-preferences { flex: 1 1 100% !important; }
body .cmplz-cookiebanner .cmplz-buttons .cmplz-btn.cmplz-view-preferences {
	flex: 0 0 6rem !important; min-width: 0 !important; padding: 4px !important;
	font-size: 0.8125rem !important; white-space: normal; text-align: center;
	text-decoration: underline; text-underline-offset: 0.2em;
}
body .cmplz-cookiebanner .cmplz-btn.cmplz-accept,
body .cmplz-cookiebanner .cmplz-btn.cmplz-deny {
	background: var(--pb-action) !important;
	border: 2px solid var(--pb-action) !important;
	color: var(--pb-blanc) !important;
}
body .cmplz-cookiebanner .cmplz-btn.cmplz-accept:hover,
body .cmplz-cookiebanner .cmplz-btn.cmplz-deny:hover { background: var(--pb-action-survol) !important; border-color: var(--pb-action-survol) !important; }
body .cmplz-cookiebanner .cmplz-btn.cmplz-save-preferences,
body .cmplz-cookiebanner .cmplz-btn.cmplz-manage-options {
	background: var(--pb-blanc) !important;
	border: 2px solid var(--pb-encre) !important;
	color: var(--pb-encre) !important;
}
body .cmplz-cookiebanner .cmplz-btn.cmplz-view-preferences {
	background: transparent !important;
	border: 0 !important;
	color: var(--pb-action) !important;
}
body .cmplz-cookiebanner .cmplz-btn.cmplz-view-preferences:hover { background: var(--pb-bois-clair) !important; }
body .cmplz-cookiebanner .cmplz-btn:focus-visible,
body .cmplz-cookiebanner a:focus-visible,
body .cmplz-cookiebanner .cmplz-close:focus-visible { outline: 3px solid var(--pb-encre) !important; outline-offset: 2px !important; }

/* Liens du bas (politique de cookies, mentions légales) : une seule ligne, centrés */
body .cmplz-cookiebanner .cmplz-documents { margin-top: 0 !important; }
body .cmplz-cookiebanner .cmplz-documents ul { display: flex !important; flex-wrap: wrap; justify-content: center; gap: 0 16px; margin: 0 !important; padding: 0 !important; list-style: none; }
body .cmplz-cookiebanner .cmplz-links a,
body .cmplz-cookiebanner .cmplz-documents a { color: var(--pb-action) !important; font-size: 0.8125rem !important; font-weight: 650 !important; display: inline-flex; align-items: center; min-height: 44px; white-space: nowrap; text-underline-offset: 0.2em; }

/* Catégories (panneau « préférences » ouvert) et interrupteurs */
body .cmplz-cookiebanner .cmplz-categories .cmplz-category { border-radius: 10px !important; background: var(--pb-bois-clair) !important; }
body .cmplz-cookiebanner .cmplz-category-title { font-weight: 750 !important; }
body .cmplz-cookiebanner .cmplz-banner-checkbox input:checked + .cmplz-label::before { background-color: var(--pb-action) !important; }

/* ---------- Mobile : feuille collée au bas de l'écran, pleine largeur (DSA-44) ---------- */
@media (max-width: 599px) {
	body .cmplz-cookiebanner {
		left: 0 !important; right: 0 !important; bottom: 0 !important;
		width: 100% !important; max-width: none !important;
		border-radius: 16px 16px 0 0 !important;
	}
	/* Garde-fou : le reste du bandeau (rangées de boutons et de liens, marges) mesure environ 7,5 rem ; le texte défile dans son cadre
	   plutôt que de pousser le bandeau au-delà de 40 % de la hauteur de l'écran (jamais moins de 9,5 rem, soit 7 à 8 lignes). */
	body .cmplz-cookiebanner .cmplz-message { max-height: max(9.5rem, calc(40vh - 7.5rem)); overflow: auto; }
}

/* ---------- Page « Politique de cookies » (DSA-45, partie interrupteurs) ---------- */
/* Interrupteurs des catégories : cibles de 44 px au lieu de 25 */
.cmplz-category-toggle { min-width: 44px !important; min-height: 44px !important; display: inline-flex !important; align-items: center; justify-content: center; }
.cmplz-category-toggle:focus-visible { outline: 3px solid var(--pb-encre) !important; outline-offset: 2px !important; }
/* « Toujours activé » : vert forêt, 14 px (jamais moins de 13 px), à la place du vert pur sur gris */
.cmplz-always-active { color: var(--pb-foret) !important; font-size: 0.875rem !important; font-weight: 700 !important; }
/* Fonds des catégories : bois clair uni, au lieu des gris translucides de Complianz */
.cmplz-manage-consent-container .cmplz-category,
.cmplz-document .cmplz-category { background: var(--pb-bois-clair) !important; border: 1px solid var(--pb-ligne) !important; border-radius: var(--pb-r-m) !important; }
.cmplz-manage-consent-container .cmplz-category-header,
.cmplz-document .cmplz-category-header { background: transparent !important; }

/* ---------- Préférences du bandeau (TAL-36, 14/10/2026) : panneau compact, cases de 44 px ---------- */
body .cmplz-cookiebanner .cmplz-categories { gap: 4px !important; margin: 6px 0 2px !important; }
body .cmplz-cookiebanner .cmplz-categories .cmplz-category { padding: 0 6px 0 10px !important; margin: 0 !important; }
body .cmplz-cookiebanner .cmplz-categories .cmplz-category .cmplz-category-header { min-height: 44px !important; padding: 0 !important; gap: 4px !important; align-items: center !important; }
body .cmplz-cookiebanner .cmplz-categories .cmplz-category-title { font-size: 0.875rem !important; }
body .cmplz-cookiebanner .cmplz-categories .cmplz-always-active { font-size: 0.8125rem !important; }
body .cmplz-cookiebanner .cmplz-categories .cmplz-description { font-size: 0.8125rem !important; line-height: 1.4 !important; padding: 0 0 8px !important; }
/* zone tactile de la case : le bloc entier (44 × 44), la case invisible de Complianz l'occupe tout entière. « Fonctionnel »
   (toujours activé, sans case) garde le rendu de Complianz. */
body .cmplz-cookiebanner .cmplz-categories .cmplz-category:not(.cmplz-functional) .cmplz-banner-checkbox { position: relative !important; display: inline-flex !important; align-items: center !important; justify-content: center !important; min-width: 44px !important; min-height: 44px !important; }
body .cmplz-cookiebanner .cmplz-categories .cmplz-category:not(.cmplz-functional) .cmplz-banner-checkbox input.cmplz-consent-checkbox { position: absolute !important; inset: 0 !important; width: 100% !important; height: 100% !important; margin: 0 !important; z-index: 1 !important; }
body .cmplz-cookiebanner .cmplz-categories .cmplz-category .cmplz-banner-checkbox input.cmplz-consent-checkbox:focus-visible + .cmplz-label::before { box-shadow: 0 0 0 3px var(--pb-encre) !important; }
body .cmplz-cookiebanner .cmplz-categories .cmplz-category .cmplz-category-toggle { min-width: 44px !important; min-height: 44px !important; }
/* préférences ouvertes sur téléphone : le texte d'introduction se réduit pour laisser la place aux catégories */
@media (max-width: 599px) {
	body .cmplz-cookiebanner.cmplz-categories-visible .cmplz-message { max-height: 4.2rem; overflow: auto; }
}

/* ---------- Onglet « Gérer le consentement » : masqué partout (16/10/2026, demande d'Édouard) ----------
   L'onglet flottant n'apparaît qu'une fois le choix fait (avant, c'est le bandeau qui s'affiche). Il est masqué à toutes
   les largeurs (Complianz : « hide-everywhere », bandeau v3) ; le retrait du consentement passe par le bouton « Gérer mes
   cookies » du pied de page, présent sur toutes les pages, tunnel de commande compris (footer.php), qui rouvre le bandeau
   (classe cmplz-manage-consent, gestionnaire de Complianz). Remplace l'onglet toujours visible de TAL-32 (14/10/2026). */
#cmplz-manage-consent { display: none !important; }

@media (prefers-reduced-motion: reduce) {
	.cmplz-cookiebanner { transition: none !important; animation: none !important; }
}

/* Mobile, éléments flottants (14/10/2026, capture d'Édouard : consentement, discussion, barre d'achat et message d'ajout
   superposés). Sous 900 px : la bulle de discussion Zoho perd son message d'accueil et remonte au-dessus de la barre
   d'achat des fiches (l'onglet « Gérer le consentement » est masqué à toutes les largeurs, voir plus haut). */
@media (max-width: 899px) {
	.zsiq_cnt, #titlediv, .zsiq-newtheme .zsiq_cnt { display: none !important; }
	body:has(.pb-barre-achat) .zsiq_floatmain,
	body:has(.pb-barre-achat) #zsiq_float { bottom: calc(5.25rem + env(safe-area-inset-bottom, 0px)) !important; }
}
