/* FreeCookie — bandeau de consentement. Neutre, accessible, sobre. */

#freecookie-root[hidden],
#freecookie-badge[hidden],
.fc-prefs[hidden],
.fc-about[hidden] { display: none !important; }

/* Texte réservé aux lecteurs d'écran (annonces aria-live). */
.fc-sr { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

.fc-banner {
	position: fixed;
	left: 50%;
	bottom: 20px;
	transform: translateX(-50%);
	width: min(680px, calc(100% - 32px));
	max-height: calc(100vh - 40px);
	/* Les boutons Accepter/Refuser restent TOUJOURS visibles : c'est la liste
	   des catégories qui défile à l'intérieur si l'écran est bas. */
	display: flex;
	flex-direction: column;
	overflow-y: auto;
	z-index: 2147483000;
	background: var(--fc-bg, #ffffff);
	color: var(--fc-text, #1a2430);
	border: 1px solid var(--fc-border, #e2e6ea);
	border-radius: 12px;
	box-shadow: 0 12px 40px rgba(20, 32, 45, .18);
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
	font-size: 15px;
	line-height: 1.55;
}

.fc-inner { padding: 22px 24px; display: flex; flex-direction: column; gap: 16px; flex: 1 1 auto; min-height: 0; }
.fc-title { margin: 0; font-size: 17px; font-weight: 700; letter-spacing: -.01em; }
.fc-desc { margin: 0; color: var(--fc-muted, #46535f); }

.fc-actions { display: flex; flex-wrap: wrap; gap: 10px; }
.fc-actions .fc-btn { flex: 1 1 auto; }

.fc-btn {
	appearance: none;
	border: 1.5px solid transparent;
	border-radius: 8px;
	padding: 11px 18px;
	font: inherit;
	font-weight: 600;
	line-height: 1.2;
	cursor: pointer;
	text-transform: none;
	letter-spacing: normal;
	text-align: center;
	transition: background-color .15s ease, border-color .15s ease, color .15s ease;
}
.fc-btn:focus-visible { outline: 2px solid var(--fc-accent, #1c7a6b); outline-offset: 2px; }

/* Même forme pour les trois ; Accepter et Refuser IDENTIQUES (parité CNIL),
   Personnaliser en contour. Id-scopé pour passer devant le style du thème. */
#freecookie-banner .fc-btn--primary { background: var(--fc-accent, #1c7a6b); color: var(--fc-accent-text, #fff); border-color: var(--fc-accent, #1c7a6b); }
#freecookie-banner .fc-btn--primary:hover { background: var(--fc-accent-deep, #124c43); border-color: var(--fc-accent-deep, #124c43); }
#freecookie-banner .fc-btn--secondary, #freecookie-banner .fc-btn--ghost { background: transparent; color: var(--fc-accent-deep, #124c43); border-color: var(--fc-accent, #1c7a6b); }
#freecookie-banner .fc-btn--secondary:hover, #freecookie-banner .fc-btn--ghost:hover { background: var(--fc-secondary-bg, #eef1f3); }

/* Préférences */
.fc-prefs { border-top: 1px solid var(--fc-border, #edf0f2); padding: 20px 24px 22px; display: flex; flex-direction: column; gap: 14px; }
.fc-prefs__title { margin: 0; font-size: 15px; font-weight: 700; }

/* Insularité : on empêche le thème du site de recolorer/agrandir les titres du
   bandeau. Le titre des préférences prend la couleur dominante (accent). */
#freecookie-banner .fc-title {
	color: var(--fc-text, #1a2430); font-size: 17px; line-height: 1.3; font-weight: 700;
	margin: 0; text-transform: none; letter-spacing: normal;
}
#freecookie-banner .fc-prefs__title {
	color: var(--fc-accent, #1c7a6b); font-size: 15px; line-height: 1.3; font-weight: 700;
	margin: 0; text-transform: none; letter-spacing: normal;
}
.fc-cats { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; overflow-y: auto; min-height: 0; flex: 1 1 auto; scrollbar-width: thin; }
.fc-cat { border: 1px solid var(--fc-border, #edf0f2); border-radius: 8px; padding: 12px 14px; }
.fc-cat__row { display: flex; align-items: center; justify-content: space-between; gap: 12px; cursor: pointer; }
.fc-cat__name { font-weight: 600; }
.fc-cat__lock { font-size: 12px; color: var(--fc-accent, #1c7a6b); font-weight: 600; margin-left: auto; margin-right: 10px; }
.fc-cat__desc { margin: 6px 0 0; font-size: 13px; color: var(--fc-muted, #6b7784); }
.fc-cat input[type="checkbox"] { width: 18px; height: 18px; accent-color: var(--fc-accent, #1c7a6b); flex: none; }

/* Services individuels (transparence + note + interrupteur) */
.fc-svcs { list-style: none; margin: 10px 0 0; padding: 0 0 0 12px; display: flex; flex-direction: column; gap: 10px; border-left: 2px solid var(--fc-border, #edf0f2); }
.fc-svc__row { display: flex; align-items: center; justify-content: space-between; gap: 10px; cursor: pointer; }
.fc-svc__main { display: flex; align-items: center; gap: 8px; min-width: 0; }
.fc-svc__name { font-weight: 600; font-size: 14px; }
.fc-svc__desc { margin: 3px 0 0; font-size: 12.5px; color: var(--fc-muted, #6b7784); }
.fc-svc input[type="checkbox"] { width: 16px; height: 16px; accent-color: var(--fc-accent, #1c7a6b); flex: none; }
.fc-svc input[disabled] { opacity: .45; }
.fc-score { font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: 100px; color: #fff; white-space: nowrap; }
/* La pastille est un bouton : clic → volet « Comprendre les cookies ». */
button.fc-score { border: 0; cursor: pointer; font-family: inherit; line-height: 1.5; }
button.fc-score:hover { box-shadow: 0 0 0 2px rgba(0, 0, 0, .12); }
button.fc-score:focus-visible { outline: 2px solid var(--fc-accent, #1c7a6b); outline-offset: 2px; }
.fc-score--green { background: #1f9d55; }
.fc-score--orange { background: #cf8500; }
.fc-score--red { background: #d64545; }

/* Note « site propre » : le scan a tourné, aucun traceur tiers trouvé. */
.fc-note { display: flex; align-items: center; gap: 8px; margin: 0; padding: 9px 12px; border-radius: 8px; background: rgba(31, 157, 85, .09); color: var(--fc-text, #1a2430); font-size: 13px; line-height: 1.45; }
.fc-note__dot { flex: none; width: 9px; height: 9px; border-radius: 50%; background: #1f9d55; }

/* Fiches de détail par cookie (nom, durée, description) */
.fc-ck-details { margin-top: 6px; }
.fc-ck-details summary { cursor: pointer; font-size: 12.5px; font-weight: 600; color: var(--fc-accent-deep, #124c43); }
.fc-ck-details summary:hover { text-decoration: underline; }
.fc-ck { background: var(--fc-secondary-bg, #f3f5f7); border-radius: 8px; padding: 10px 12px; margin: 8px 0 0; font-size: 12.5px; line-height: 1.5; }
.fc-ck > div { display: grid; grid-template-columns: 92px 1fr; gap: 10px; padding: 2px 0; }
.fc-ck dt { font-weight: 700; color: var(--fc-muted, #6b7784); margin: 0; }
.fc-ck dd { margin: 0; }
.fc-ck code { font-size: 12px; background: rgba(0, 0, 0, .06); padding: 0 5px; border-radius: 4px; }
@media (max-width: 560px) { .fc-ck > div { grid-template-columns: 78px 1fr; } }
.fc-prefs__actions { display: flex; gap: 10px; justify-content: flex-end; }

/* Lien « À propos » (discret) + volet références / réseaux / don */
.fc-foot { margin-top: 4px; display: flex; gap: 16px; justify-content: flex-end; }
.fc-link { background: none; border: none; padding: 0; font: inherit; font-size: 11px; color: var(--fc-muted, #6b7784); opacity: .6; text-decoration: none; cursor: pointer; }
.fc-link:hover { opacity: 1; text-decoration: underline; text-underline-offset: 2px; }

/* Volet pédagogique « À quoi servent les cookies ? » (utile / mitigé / dangereux) */
.fc-edu[hidden] { display: none !important; }
.fc-edu { border-top: 1px solid var(--fc-border, #edf0f2); padding: 18px 24px 20px; display: flex; flex-direction: column; gap: 12px; }
#freecookie-banner .fc-edu__title { margin: 0; font-size: 15px; line-height: 1.3; font-weight: 700; color: var(--fc-accent, #1c7a6b); text-transform: none; letter-spacing: normal; }
.fc-edu__intro { margin: 0; color: var(--fc-muted, #46535f); font-size: 13.5px; line-height: 1.55; }
.fc-edu__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.fc-edu__item { display: flex; gap: 11px; align-items: flex-start; }
.fc-edu__item strong { display: block; font-size: 13.5px; margin-bottom: 2px; }
.fc-edu__item p { margin: 0; font-size: 12.5px; line-height: 1.5; color: var(--fc-muted, #6b7784); }
.fc-edu__dot { flex: none; width: 12px; height: 12px; border-radius: 50%; margin-top: 3px; }
.fc-edu__item--useful .fc-edu__dot { background: #1f9d55; }
.fc-edu__item--mixed .fc-edu__dot { background: #cf8500; }
.fc-edu__item--danger .fc-edu__dot { background: #d64545; }
.fc-edu__actions { display: flex; justify-content: flex-end; }

.fc-about { border-top: 1px solid var(--fc-border, #edf0f2); padding: 18px 24px 20px; display: flex; flex-direction: column; gap: 10px; }
#freecookie-banner .fc-about__title { margin: 0; font-size: 15px; line-height: 1.3; font-weight: 700; color: var(--fc-accent, #1c7a6b); text-transform: none; letter-spacing: normal; }
.fc-about__promo { margin: 0; color: var(--fc-muted, #46535f); font-size: 13.5px; line-height: 1.5; }
.fc-about__social { display: flex; flex-wrap: wrap; gap: 8px 14px; }
.fc-about__social a { color: var(--fc-accent-deep, #124c43); font-size: 14px; font-weight: 600; text-underline-offset: 2px; }
.fc-about__coffee { margin-top: 4px; }
.fc-about__coffee .fc-btn { display: inline-block; text-decoration: none; }
.fc-about__actions { margin-top: 4px; }
.fc-about__actions .fc-btn { align-self: flex-start; }

/* Badge de réouverture */
.fc-badge {
	position: fixed;
	left: 20px;
	bottom: 20px;
	z-index: 2147482000;
	width: 35px; height: 35px;
	padding: 0;
	border: none;
	background: none;
	cursor: pointer;
	line-height: 0;
	/* PAS de filter ici : sur iOS, un filter posé sur un élément position:fixed
	   casse son ancrage (bug WebKit) — l'ombre est portée par le SVG enfant. */
	opacity: 1;
	transition: transform .15s ease, opacity .3s ease;
}
.fc-badge .fc-cookie { filter: drop-shadow(0 4px 10px rgba(20, 32, 45, .28)); }
.fc-badge:hover { transform: translateY(-2px) rotate(-5deg); }
/* Estompé après un délai d'inactivité ; plein à l'approche / survol / focus. */
.fc-badge--dim { opacity: .5; }
#freecookie-badge:hover, #freecookie-badge:focus, #freecookie-badge.fc-badge--near { opacity: 1; }
/* On neutralise toute bordure/fond/outline que le thème appliquerait aux <button>,
   sans supprimer l'anneau de focus clavier (accessibilité). */
#freecookie-badge { border: none !important; background: none !important; padding: 0 !important; box-shadow: none; -webkit-tap-highlight-color: transparent; }
/* …et on blinde AUSSI les dimensions : les styles globaux de boutons de
   certains kits (Elementor « Boutons » : largeur/hauteur minimales, width 100%)
   gonflaient le badge en un grand rectangle — le cookie semblait alors flotter
   au milieu de l'écran. */
#freecookie-badge {
	width: 35px !important;
	height: 35px !important;
	min-width: 0 !important;
	min-height: 0 !important;
	max-width: 35px !important;
	max-height: 35px !important;
	display: block !important;
	box-sizing: border-box !important;
}
#freecookie-badge:focus:not(:focus-visible) { outline: none !important; box-shadow: none !important; border: none !important; }
#freecookie-badge:focus { box-shadow: none !important; }
#freecookie-badge:focus-visible { outline: 2px solid var(--fc-accent, #1c7a6b); outline-offset: 3px; border-radius: 50%; }
.fc-badge .fc-cookie { width: 100%; height: 100%; display: block; }
.fc-cookie__disc { fill: var(--fc-badge-solid, #1c7a6b); }
.fc-cookie__hole { fill: var(--fc-badge-hole, #bfe0d9); }
/* Pastilles multicolores : couleurs détectées du site (repli : dérivés de l'accent). */
.fc-cookie__c1 { fill: var(--fc-c1, var(--fc-badge-solid, #1c7a6b)); }
.fc-cookie__c2 { fill: var(--fc-c2, var(--fc-badge-hole, #bfe0d9)); }
.fc-cookie__c3 { fill: var(--fc-c3, var(--fc-badge-solid, #1c7a6b)); }
.fc-cookie__c4 { fill: var(--fc-c4, var(--fc-badge-hole, #bfe0d9)); }
.fc-cookie__line { fill: none; stroke: var(--fc-badge-solid, #1c7a6b); stroke-width: 3; stroke-linejoin: round; }
.fc-cookie__ring { fill: none; stroke: var(--fc-badge-hole, #bfe0d9); stroke-width: 3; opacity: .6; }

/* Placeholder d'embed bloqué (iframe neutralisée) */
iframe.fc-blocked-embed {
	min-height: 160px;
	background: repeating-linear-gradient(45deg, #f3f5f7, #f3f5f7 10px, #eceff2 10px, #eceff2 20px);
	border: 1px dashed #cfd6dc;
}

@media (max-width: 560px) {
	.fc-banner { left: 8px; right: 8px; bottom: 8px; transform: none; width: auto; }
	.fc-inner { padding: 18px; }
	.fc-prefs, .fc-about { padding-left: 18px; padding-right: 18px; }
	.fc-badge { left: 12px; bottom: 12px; }
	.fc-actions { flex-direction: column; }
	.fc-actions .fc-btn { width: 100%; flex: 1 1 auto; }
	.fc-svc__desc, .fc-cat__desc { font-size: 12px; }
}

/* ---- Écrans BAS (petits portables, fenêtres réduites) : la typographie et
   les espacements se compactent selon la hauteur, pour que tout tienne sans
   défilement de page — et si la liste déborde malgré tout, c'est ELLE qui
   défile, jamais les boutons. ---- */
@media (max-height: 860px) {
	.fc-inner { padding: 16px 20px; gap: 12px; }
	.fc-banner { font-size: 14px; }
	.fc-title { font-size: 16px; }
	.fc-cats { gap: 8px; }
	.fc-cat { padding: 9px 12px; }
	.fc-cat__desc { margin-top: 4px; font-size: 12px; }
	.fc-svcs { gap: 7px; margin-top: 7px; }
	.fc-svc__desc { font-size: 12px; }
	.fc-btn { padding: 9px 14px; }
	.fc-edu, .fc-about { padding: 14px 20px 16px; gap: 9px; }
}
@media (max-height: 700px) {
	.fc-banner { bottom: 12px; max-height: calc(100vh - 24px); font-size: 13px; }
	.fc-inner { padding: 12px 16px; gap: 9px; }
	.fc-title { font-size: 15px; }
	.fc-desc { font-size: 12.5px; line-height: 1.45; }
	.fc-cat { padding: 7px 10px; }
	.fc-cat__desc { font-size: 11.5px; }
	.fc-svc__name { font-size: 13px; }
	.fc-btn { padding: 8px 12px; font-size: 13px; }
	.fc-note { padding: 7px 10px; font-size: 12px; }
	.fc-ck { padding: 8px 10px; font-size: 12px; }
}

@media (prefers-reduced-motion: reduce) {
	.fc-btn, .fc-badge { transition: none; }
}

/* Liste de cookies (shortcode [freecookie_cookies]) */
.fc-cookie-list { font-size: 15px; }
.fc-cl__cat { margin: 24px 0 8px; font-size: 18px; font-weight: 700; }
.fc-cl__note { margin: 0 0 12px; color: #6b7784; }
.fc-cl__scroll { overflow-x: auto; }
.fc-cl__table { border-collapse: collapse; width: 100%; min-width: 520px; }
.fc-cl__table th, .fc-cl__table td { text-align: left; padding: 9px 12px; border-bottom: 1px solid #edf0f2; vertical-align: top; }
.fc-cl__table thead th { font-size: 12px; letter-spacing: .04em; text-transform: uppercase; color: #6b7784; }
.fc-cl__table code { font-size: 13px; background: #f3f5f7; padding: 1px 6px; border-radius: 4px; }

/* Les couleurs de la bannière sont pilotées par l'administration (variables --fc-*),
   on ne force donc pas de thème sombre automatique qui les écraserait. */
