/* =============================================================================
   ConsentKit — Banner styles
   Vanilla CSS, custom properties pour la personnalisation client.
   ========================================================================== */

#consentkit-root,
#consentkit-root * {
	box-sizing: border-box;
	font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* -----------------------------------------------------------------------------
   Bandeau (mode banner)
   -------------------------------------------------------------------------- */
.consentkit-banner {
	position: fixed;
	z-index: 999999;
	background: var(--consentkit-bg, #fff);
	color: var(--consentkit-text, #1a1a1a);
	border: 1px solid var(--consentkit-border, #e5e7eb);
	box-shadow: 0 -4px 24px rgba(0, 0, 0, 0.08);
	padding: 20px 24px;
	max-width: 480px;
	width: calc(100% - 32px);
	border-radius: 12px;
	font-size: 14px;
	line-height: 1.55;
	animation: consentkit-slide-up .35s ease;
}
.consentkit-banner[data-position="bottom"] {
	bottom: 16px; left: 50%; transform: translateX(-50%); max-width: 720px;
}
.consentkit-banner[data-position="bottom-left"]  { bottom: 16px; left: 16px; }
.consentkit-banner[data-position="bottom-right"] { bottom: 16px; right: 16px; }
.consentkit-banner[data-position="center"] {
	top: 50%; left: 50%; transform: translate(-50%, -50%); max-width: 540px;
}

@keyframes consentkit-slide-up {
	from { opacity: 0; transform: translateY(20px); }
	to   { opacity: 1; transform: translateY(0); }
}
.consentkit-banner[data-position="bottom"] { animation-name: consentkit-slide-up-center; }
@keyframes consentkit-slide-up-center {
	from { opacity: 0; transform: translate(-50%, 20px); }
	to   { opacity: 1; transform: translate(-50%, 0); }
}

.consentkit-banner__head {
	display: flex; align-items: center; gap: 12px; margin-bottom: 12px;
}
.consentkit-banner__logo { max-height: 32px; max-width: 120px; }
.consentkit-banner__title {
	margin: 0; font-size: 16px; font-weight: 600;
}
.consentkit-banner__body { margin: 0 0 16px 0; color: var(--consentkit-text); opacity: .85; }
.consentkit-banner__policy {
	display: inline-block; margin-bottom: 12px;
	color: var(--consentkit-primary, #0066cc);
	text-decoration: underline; font-size: 13px;
}

.consentkit-banner__actions {
	display: flex; gap: 8px; flex-wrap: wrap;
}

/* -----------------------------------------------------------------------------
   Boutons CNIL — d'égale visibilité (CRITIQUE)
   -------------------------------------------------------------------------- */
.consentkit-btn {
	flex: 1 1 auto;
	min-width: 100px;
	padding: 10px 16px;
	border-radius: 8px;
	font-size: 14px;
	font-weight: 600;
	cursor: pointer;
	border: 1.5px solid transparent;
	transition: transform .15s ease, opacity .15s ease;
	font-family: inherit;
}
.consentkit-btn:hover { transform: translateY(-1px); }
.consentkit-btn--accept {
	background: var(--consentkit-primary); color: #fff; border-color: var(--consentkit-primary);
}
.consentkit-btn--reject {
	background: transparent; color: var(--consentkit-text); border-color: var(--consentkit-border);
}
.consentkit-btn--customize {
	background: transparent; color: var(--consentkit-primary); border-color: var(--consentkit-primary);
}

/* -----------------------------------------------------------------------------
   Modale (préférences détaillées)
   -------------------------------------------------------------------------- */
.consentkit-modal-backdrop {
	position: fixed; inset: 0; background: rgba(0, 0, 0, .55);
	z-index: 999998; backdrop-filter: blur(2px);
	animation: consentkit-fade .25s ease;
}
@keyframes consentkit-fade { from { opacity: 0 } to { opacity: 1 } }

.consentkit-modal {
	position: fixed; z-index: 999999;
	top: 50%; left: 50%; transform: translate(-50%, -50%);
	background: var(--consentkit-bg); color: var(--consentkit-text);
	border-radius: 14px; padding: 28px;
	max-width: 600px; width: calc(100% - 32px);
	max-height: 85vh; overflow-y: auto;
	box-shadow: 0 30px 80px rgba(0, 0, 0, .25);
	font-size: 14px; line-height: 1.55;
	animation: consentkit-zoom .25s ease;
}
@keyframes consentkit-zoom {
	from { opacity: 0; transform: translate(-50%, -50%) scale(.96); }
	to   { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

.consentkit-modal__header {
	display: flex; align-items: center; gap: 12px;
	padding-bottom: 16px; border-bottom: 1px solid var(--consentkit-border);
	margin-bottom: 20px;
}
.consentkit-modal__title { margin: 0; font-size: 20px; font-weight: 700; flex: 1; }
.consentkit-modal__close {
	background: none; border: none; cursor: pointer; padding: 6px;
	border-radius: 6px; color: var(--consentkit-text); opacity: .6;
	font-size: 22px; line-height: 1; transition: opacity .15s ease;
}
.consentkit-modal__close:hover { opacity: 1; }

.consentkit-modal__intro { margin: 0 0 20px 0; opacity: .8; }

.consentkit-cat {
	border: 1px solid var(--consentkit-border);
	border-radius: 10px; padding: 16px; margin-bottom: 12px;
}
.consentkit-cat__head {
	display: flex; justify-content: space-between; align-items: center;
	gap: 12px; margin-bottom: 6px;
}
.consentkit-cat__name { font-size: 15px; font-weight: 600; flex: 1; }
.consentkit-cat__desc { margin: 0; font-size: 13px; opacity: .75; }

/* Toggle switch */
.consentkit-toggle {
	position: relative; display: inline-block; width: 42px; height: 24px;
	flex-shrink: 0;
}
.consentkit-toggle input { opacity: 0; width: 0; height: 0; }
.consentkit-toggle__slider {
	position: absolute; cursor: pointer; inset: 0;
	background: #cbd5e1; border-radius: 24px;
	transition: .25s;
}
.consentkit-toggle__slider::before {
	content: ""; position: absolute; height: 18px; width: 18px;
	left: 3px; top: 3px; background: white; border-radius: 50%;
	transition: .25s; box-shadow: 0 2px 4px rgba(0, 0, 0, .2);
}
.consentkit-toggle input:checked + .consentkit-toggle__slider {
	background: var(--consentkit-primary);
}
.consentkit-toggle input:checked + .consentkit-toggle__slider::before {
	transform: translateX(18px);
}
.consentkit-toggle input:disabled + .consentkit-toggle__slider {
	background: var(--consentkit-primary); opacity: .5; cursor: not-allowed;
}

.consentkit-cat__required {
	font-size: 11px; text-transform: uppercase; letter-spacing: .5px;
	color: var(--consentkit-primary); font-weight: 700;
}

.consentkit-modal__footer {
	display: flex; gap: 8px; flex-wrap: wrap;
	padding-top: 20px; margin-top: 8px;
	border-top: 1px solid var(--consentkit-border);
}

/* -----------------------------------------------------------------------------
   Bouton flottant (réouverture)
   -------------------------------------------------------------------------- */
.consentkit-fab {
	position: fixed; bottom: 16px; left: 16px;
	z-index: 999990;
	width: 44px; height: 44px;
	background: var(--consentkit-primary);
	color: white; border: none; border-radius: 50%;
	cursor: pointer;
	box-shadow: 0 4px 12px rgba(0, 0, 0, .2);
	display: flex; align-items: center; justify-content: center;
	font-size: 20px;
	transition: transform .2s ease;
}
.consentkit-fab:hover { transform: scale(1.08); }
.consentkit-fab[hidden] { display: none; }

/* -----------------------------------------------------------------------------
   Iframe placeholder (vidéos / maps bloquées)
   -------------------------------------------------------------------------- */
.consentkit-iframe-placeholder {
	background: #f8fafc;
	border: 2px dashed #cbd5e1;
	border-radius: 12px;
	padding: 32px 24px;
	text-align: center;
	min-height: 220px;
	display: flex; align-items: center; justify-content: center;
	margin: 16px 0;
	color: #475569;
	font-size: 14px;
	line-height: 1.5;
}
.consentkit-iframe-placeholder__inner svg { margin: 0 auto 12px; opacity: .6; }
.consentkit-iframe-placeholder__cat {
	display: inline-block;
	background: #e2e8f0;
	padding: 2px 10px;
	border-radius: 12px;
	font-size: 12px;
	font-weight: 600;
	margin: 8px 0 16px;
}
.consentkit-iframe-placeholder__btn {
	background: var(--consentkit-primary, #0066cc);
	color: white; border: none; padding: 8px 16px;
	border-radius: 6px; font-size: 13px; font-weight: 600;
	cursor: pointer; font-family: inherit;
}

/* -----------------------------------------------------------------------------
   Theme dark
   -------------------------------------------------------------------------- */
#consentkit-root[data-theme="dark"] .consentkit-banner,
#consentkit-root[data-theme="dark"] .consentkit-modal {
	--consentkit-bg: #1f2937;
	--consentkit-text: #f3f4f6;
	--consentkit-border: #374151;
}

/* -----------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 600px) {
	.consentkit-banner { padding: 16px; max-width: calc(100% - 16px); }
	.consentkit-modal  { padding: 20px; }
	.consentkit-banner__actions .consentkit-btn { flex: 1 1 calc(50% - 4px); }
	.consentkit-banner__title { font-size: 15px; }
}

/* Politique cookies (page) */
.consentkit-policy__cat { margin: 24px 0; padding: 16px; border: 1px solid #e5e7eb; border-radius: 8px; }
.consentkit-policy__table { width: 100%; border-collapse: collapse; font-size: 13px; margin-top: 12px; }
.consentkit-policy__table th,
.consentkit-policy__table td { padding: 8px; border-bottom: 1px solid #e5e7eb; text-align: left; }
.consentkit-policy__table th { background: #f9fafb; font-weight: 600; }
