:root {
	--p243c-primary: #e63946;
}

/* ==========================================================================
   Widget (commun au shortcode et au flottant)
   ========================================================================== */

.p243c-widget {
	max-width: 720px;
	margin: 0 auto;
	padding: 24px;
	border-radius: 14px;
	background: #ffffff;
	box-shadow: 0 4px 20px rgba( 0, 0, 0, 0.08 );
	font-family: inherit;
	box-sizing: border-box;
}

.p243c-widget * {
	box-sizing: border-box;
}

.p243c-widget__header .p243c-greeting {
	display: block;
	font-size: 0.95em;
	font-weight: 700;
	color: var( --p243c-primary );
	margin-bottom: 2px;
}

.p243c-widget__header h3 {
	margin: 0 0 4px;
	font-size: 1.3em;
}

.p243c-widget__header p {
	margin: 0 0 16px;
	color: #666;
	font-size: 0.95em;
}

.p243c-widget__search {
	display: flex;
	gap: 8px;
	margin-bottom: 12px;
}

.p243c-widget__search input[type="text"] {
	flex: 1;
	padding: 12px 14px;
	border: 1px solid #ddd;
	border-radius: 8px;
	font-size: 1em;
	min-width: 0;
}

.p243c-widget__search button,
.p243c-widget__filters button {
	padding: 12px 20px;
	border: none;
	border-radius: 8px;
	background: var( --p243c-primary );
	color: #fff;
	font-weight: 600;
	cursor: pointer;
	white-space: nowrap;
}

.p243c-widget__search button:hover,
.p243c-widget__filters button:hover {
	filter: brightness( 0.92 );
}

.p243c-widget__filters {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	margin-bottom: 16px;
}

.p243c-widget__filters select {
	padding: 10px 12px;
	border: 1px solid #ddd;
	border-radius: 8px;
}

.p243c-widget__message {
	margin: 8px 0 16px;
	font-weight: 600;
	color: #333;
	min-height: 1.2em;
}

.p243c-results {
	list-style: none;
	margin: 0;
	padding: 0;
	display: grid;
	gap: 14px;
}

.p243c-card {
	display: flex;
	gap: 14px;
	padding: 12px;
	border: 1px solid #eee;
	border-radius: 10px;
	transition: box-shadow 0.15s ease;
}

.p243c-card:hover {
	box-shadow: 0 2px 10px rgba( 0, 0, 0, 0.08 );
}

.p243c-card__thumb img {
	width: 84px;
	height: 84px;
	object-fit: cover;
	border-radius: 8px;
	display: block;
}

.p243c-card__body {
	flex: 1;
	min-width: 0;
}

.p243c-card__title {
	display: block;
	font-weight: 700;
	font-size: 1.05em;
	color: #1d1d1d;
	text-decoration: none;
	margin-bottom: 4px;
}

.p243c-card__title:hover {
	text-decoration: underline;
}

.p243c-card__meta {
	display: flex;
	align-items: center;
	flex-wrap: wrap;
	gap: 8px;
	font-size: 0.85em;
	color: #555;
	margin-bottom: 4px;
}

.p243c-stars {
	color: #f4b400;
	letter-spacing: 1px;
}

.p243c-badge {
	padding: 2px 8px;
	border-radius: 999px;
	font-size: 0.75em;
	font-weight: 600;
}

.p243c-badge--verified {
	background: #e6f4ea;
	color: #1e7e34;
}

.p243c-badge--featured {
	background: #fff3cd;
	color: #8a6d3b;
}

.p243c-badge--promoted {
	background: #fde2e2;
	color: #b02a2a;
}

.p243c-card__excerpt {
	margin: 4px 0 0;
	font-size: 0.9em;
	color: #666;
}

.p243c-branding {
	display: flex;
	align-items: center;
	gap: 6px;
	margin-top: 18px;
	padding-top: 14px;
	border-top: 1px solid #eee;
	text-decoration: none;
	font-size: 0.75em;
	color: #999;
}

.p243c-branding img {
	width: 18px;
	height: 18px;
	border-radius: 4px;
}

.p243c-branding:hover {
	color: var( --p243c-primary );
}

/* ==========================================================================
   Bulle flottante
   ========================================================================== */

.p243c-fab-root {
	position: fixed;
	bottom: 24px;
	z-index: 99999;
	--p243c-primary: #e63946;
}

.p243c-fab-root--right,
.p243c-fab-root.p243c-fab--right {
	right: 24px;
}

.p243c-fab-root--left,
.p243c-fab-root.p243c-fab--left {
	left: 24px;
}

.p243c-fab-bubble,
.p243c-fab-close {
	width: 60px;
	height: 60px;
	border-radius: 50%;
	border: none;
	background: var( --p243c-primary );
	color: #fff;
	box-shadow: 0 6px 18px rgba( 0, 0, 0, 0.25 );
	display: flex;
	align-items: center;
	justify-content: center;
	cursor: pointer;
	font-size: 1.3em;
	transition: transform 0.15s ease;
}

.p243c-fab-bubble:hover,
.p243c-fab-close:hover {
	transform: scale( 1.06 );
}

.p243c-fab-bubble img {
	width: 32px;
	height: 32px;
	border-radius: 50%;
	object-fit: cover;
}

.p243c-fab-panel {
	position: absolute;
	bottom: 76px;
	width: min( 380px, calc( 100vw - 32px ) );
	max-height: min( 640px, calc( 100vh - 120px ) );
	overflow-y: auto;
	border-radius: 16px;
	box-shadow: 0 12px 40px rgba( 0, 0, 0, 0.25 );
	animation: p243c-pop-in 0.18s ease;
}

.p243c-fab-root--right .p243c-fab-panel,
.p243c-fab-root.p243c-fab--right .p243c-fab-panel {
	right: 0;
}

.p243c-fab-root--left .p243c-fab-panel,
.p243c-fab-root.p243c-fab--left .p243c-fab-panel {
	left: 0;
}

.p243c-fab-panel .p243c-widget {
	box-shadow: none;
	max-width: none;
	margin: 0;
	border-radius: 16px;
}

@keyframes p243c-pop-in {
	from {
		opacity: 0;
		transform: translateY( 12px ) scale( 0.98 );
	}
	to {
		opacity: 1;
		transform: translateY( 0 ) scale( 1 );
	}
}

@media ( max-width: 480px ) {
	.p243c-fab-root {
		bottom: 16px;
	}
	.p243c-fab-root--right,
	.p243c-fab-root.p243c-fab--right {
		right: 16px;
	}
	.p243c-fab-root--left,
	.p243c-fab-root.p243c-fab--left {
		left: 16px;
	}
}

/* ==========================================================================
   Écran d'administration
   ========================================================================== */

.p243c-admin__brand {
	display: flex;
	align-items: center;
	margin: 16px 0;
}

.p243c-tab-panel {
	background: #fff;
	padding: 12px 20px 4px;
	border: 1px solid #ccd0d4;
	border-top: none;
}
