/**
 * awesome-pvc-builder/assets/css/apvcb-frontend.css
 * Styles frontend APVCB — dashboard type application + formulaires.
 */

@font-face {
	font-family: 'Gabarito';
	font-style: normal;
	font-weight: 400;
	font-display: swap;
	src: url('../../fonts/gabaritot/gabarito-400.ttf') format('truetype');
}
@font-face {
	font-family: 'Gabarito';
	font-style: normal;
	font-weight: 500;
	font-display: swap;
	src: url('../../fonts/gabaritot/gabarito-500.ttf') format('truetype');
}
@font-face {
	font-family: 'Gabarito';
	font-style: normal;
	font-weight: 600;
	font-display: swap;
	src: url('../../fonts/gabaritot/gabarito-600.ttf') format('truetype');
}
@font-face {
	font-family: 'Gabarito';
	font-style: normal;
	font-weight: 700;
	font-display: swap;
	src: url('../../fonts/gabaritot/gabarito-700.ttf') format('truetype');
}

:root {
	--apvcb-bg: #f4f6fb;
	--apvcb-surface: #ffffff;
	--apvcb-border: #e8ecf4;
	--apvcb-text: #1a1d26;
	--apvcb-muted: #6b7280;
	--apvcb-primary: #5b4dff;
	--apvcb-primary-dark: #4338ca;
	--apvcb-success: #059669;
	--apvcb-success-bg: #ecfdf5;
	--apvcb-muted-bg: #f3f4f6;
	--apvcb-radius: 16px;
	--apvcb-radius-sm: 12px;
	--apvcb-shadow: 0 1px 2px rgba(16, 24, 40, 0.04), 0 8px 24px rgba(16, 24, 40, 0.06);
	--apvcb-font: system-ui, -apple-system, "Segoe UI", Roboto, Ubuntu, sans-serif;
}

/*==================================
// APP SHELL
// Conteneur principal des écrans APVCB (dashboard, wizard, portefeuille).
//=================================*/
.apvcb-app,
.apvcb-dashboard {
	font-family: var(--apvcb-font);
	color: var(--apvcb-text);
	margin: 0 auto;
	padding: 0 !important;
	box-sizing: border-box;
}

.apvcb-app *,
.apvcb-dashboard * {
	box-sizing: border-box;
}

.apvcb-app-header {
	margin-bottom: 20px;
}

.apvcb-app-eyebrow {
	margin: 0px;
	font-size: 12px;
	font-weight: 600;
	letter-spacing: 0.06em;
	text-transform: uppercase;
	color: var(--apvcb-primary);
}

.apvcb-app-title {
	margin: 0 0 8px;
	font-size: 1.75rem;
	font-weight: 700;
	line-height: 1.2;
	color: var(--apvcb-text);
}

.apvcb-app-subtitle {
	margin: 0;
	font-size: 0.95rem;
	color: var(--apvcb-muted);
	max-width: 560px;
}

/*==================================
// WRAPPER UNIFIÉ
// Surface carte partagée (panneaux, stats, blocs wizard). À combiner avec une classe métier.
//=================================*/
.apvcb-wrapper {
	background: var(--apvcb-surface);
	border: 1px solid var(--apvcb-border);
	border-radius: var(--apvcb-radius);
	box-shadow: var(--apvcb-shadow);
	padding: 18px 16px;
}

/*==================================
// BALANCE BANNER
// Bandeau dégradé du solde Wallet.
//=================================*/
.apvcb-balance-banner {
	margin-bottom: 20px;
}

.apvcb-balance-banner-inner {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px 24px;
	padding: 22px 26px;
	border-radius: var(--apvcb-radius);
	background: linear-gradient(135deg, #5b4dff 0%, #7c3aed 55%, #4f46e5 100%);
	color: #fff;
	box-shadow: var(--apvcb-shadow);
}

.apvcb-balance-label {
	font-size: 0.8rem;
	font-weight: 600;
	opacity: 0.9;
	text-transform: uppercase;
	letter-spacing: 0.04em;
	width: 100%;
}

.apvcb-balance-value {
	font-size: 1.85rem;
	font-weight: 700;
	letter-spacing: -0.02em;
	line-height: 1.1;
}

.apvcb-balance-link {
	margin-left: auto;
	color: #fff;
	font-size: 0.875rem;
	font-weight: 600;
	text-decoration: none;
	padding: 8px 14px;
	border-radius: 999px;
	background: rgba(255, 255, 255, 0.18);
	border: 1px solid rgba(255, 255, 255, 0.28);
	transition: background 0.15s ease;
}

.apvcb-balance-link:hover,
.apvcb-balance-link:focus {
	background: rgba(255, 255, 255, 0.28);
	color: #fff;
}

/*==================================
// STATS GRID
// Grille des indicateurs du dashboard.
//=================================*/
.apvcb-stats-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 14px;
	margin-bottom: 28px;
}

.apvcb-stat-card {
	display: flex;
	align-items: center;
	gap: 14px;
}

.apvcb-stat-icon {
	width: 42px;
	height: 42px;
	border-radius: 12px;
	flex-shrink: 0;
	background: var(--apvcb-muted-bg);
	position: relative;
}

.apvcb-stat-icon::after {
	content: "";
	position: absolute;
	inset: 12px;
	border-radius: 4px;
	background: var(--apvcb-primary);
	opacity: 0.85;
}

.apvcb-stat-icon-ok::after { background: var(--apvcb-success); }
.apvcb-stat-icon-draft::after { background: #f59e0b; }
.apvcb-stat-icon-entity::after { background: #0ea5e9; }

.apvcb-stat-body {
	display: flex;
	flex-direction: column;
	gap: 2px;
	min-width: 0;
}

.apvcb-stat-label {
	font-size: 0.78rem;
	font-weight: 600;
	color: var(--apvcb-muted);
	text-transform: uppercase;
	letter-spacing: 0.03em;
}

.apvcb-stat-value {
	font-size: 1.45rem;
	font-weight: 700;
	line-height: 1.15;
	color: var(--apvcb-text);
}

/*==================================
// QUICK ACTIONS
// Cartes d’actions rapides du dashboard.
//=================================*/
.apvcb-section-title {
	margin: 0 0 14px;
	font-size: 1.05rem;
	font-weight: 700;
	color: var(--apvcb-text);
}

.apvcb-quick-actions {
	margin-bottom: 28px;
}

.apvcb-action-grid {
	display: grid;
	grid-template-columns: repeat(4, 1fr);
	gap: 14px;
}

.apvcb-action-card {
	display: flex;
	flex-direction: column;
	gap: 6px;
	text-decoration: none !important;
	color: var(--apvcb-text) !important;
	transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.apvcb-action-card:hover,
.apvcb-action-card:focus {
	transform: translateY(-2px);
	border-color: #c7d2fe;
	box-shadow: 0 12px 28px rgba(91, 77, 255, 0.12);
}

.apvcb-action-primary {
	background: linear-gradient(160deg, #5b4dff 0%, #6366f1 100%);
	border-color: transparent;
	color: #fff !important;
}

.apvcb-action-primary.apvcb-wrapper {
	background: linear-gradient(160deg, #5b4dff 0%, #6366f1 100%);
	border-color: transparent;
}

.apvcb-action-primary .apvcb-action-desc {
	color: rgba(255, 255, 255, 0.85) !important;
}

.apvcb-action-primary:hover,
.apvcb-action-primary:focus {
	border-color: transparent;
	box-shadow: 0 12px 28px rgba(91, 77, 255, 0.28);
}

.apvcb-action-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 36px;
	height: 36px;
	border-radius: 10px;
	background: rgba(91, 77, 255, 0.1);
	font-size: 1.1rem;
	font-weight: 700;
	margin-bottom: 4px;
}

.apvcb-action-primary .apvcb-action-icon {
	background: rgba(255, 255, 255, 0.2);
	color: #fff;
}

.apvcb-action-title {
	font-size: 0.98rem;
	font-weight: 700;
}

.apvcb-action-desc {
	font-size: 0.8rem;
	line-height: 1.35;
	color: var(--apvcb-muted);
}

/*==================================
// PANELS / LISTS
// Panneaux listes (cartes récentes, établissements).
//=================================*/
.apvcb-panels {
	display: grid;
	grid-template-columns: 1.2fr 1fr;
	gap: 16px;
}

.apvcb-panel {
	/* surface via .apvcb-wrapper */
}

.apvcb-panel-head {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	margin-bottom: 8px;
}

.apvcb-panel-head .apvcb-section-title {
	margin: 0;
}

.apvcb-panel-link {
	font-size: 0.85rem;
	font-weight: 600;
	color: var(--apvcb-primary);
	text-decoration: none;
}

.apvcb-panel-link:hover {
	color: var(--apvcb-primary-dark);
	text-decoration: underline;
}

.apvcb-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.apvcb-list-item {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 12px 4px;
	border-top: 1px solid var(--apvcb-border);
}

.apvcb-list-item:first-child {
	border-top: 0;
}

.apvcb-list-main {
	flex: 1;
	min-width: 0;
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.apvcb-list-title {
	font-weight: 600;
	font-size: 0.92rem;
	white-space: nowrap;
	overflow: hidden;
	text-overflow: ellipsis;
}

.apvcb-list-meta {
	font-size: 0.78rem;
	color: var(--apvcb-muted);
}

.apvcb-badge {
	display: inline-flex;
	align-items: center;
	padding: 4px 10px;
	border-radius: 999px;
	font-size: 0.72rem;
	font-weight: 700;
	white-space: nowrap;
}

.apvcb-badge-success {
	background: var(--apvcb-success-bg);
	color: var(--apvcb-success);
}

.apvcb-badge-muted {
	background: var(--apvcb-muted-bg);
	color: var(--apvcb-muted);
}

.apvcb-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 8px 14px;
	border-radius: 10px;
	font-size: 0.85rem;
	font-weight: 600;
	text-decoration: none !important;
	border: 1px solid transparent;
	cursor: pointer;
	line-height: 1.2;
}

.apvcb-btn-primary {
	background: var(--apvcb-primary);
	color: #fff !important;
}

.apvcb-btn-primary:hover {
	background: var(--apvcb-primary-dark);
}

.apvcb-btn-ghost {
	background: transparent;
	border-color: var(--apvcb-border);
	color: var(--apvcb-text) !important;
}

.apvcb-btn-ghost:hover {
	border-color: #c7d2fe;
	background: #f5f3ff;
}

.apvcb-empty {
	padding: 24px 8px;
	text-align: center;
	color: var(--apvcb-muted);
}

.apvcb-empty p {
	margin: 0 0 14px;
}

/*==================================
// FORMS / NOTICES
// Formulaires et messages partagés.
//=================================*/
.apvcb-notice {
	padding: 12px 14px;
	border-radius: var(--apvcb-radius-sm);
	background: #eef2ff;
	border: 1px solid #c7d2fe;
	margin: 0 0 16px;
	font-size: 0.9rem;
}

.apvcb-notice-error {
	background: #fef2f2;
	border-color: #fecaca;
	color: #991b1b;
}

.apvcb-notice-warning {
	background: #fffbeb;
	border-color: #fde68a;
	color: #92400e;
}

.apvcb-card-editor,
.apvcb-entity-form,
.apvcb-cards {
	font-family: var(--apvcb-font);
	max-width: 720px;
	margin: 0 auto;
}

.apvcb-cards {
	max-width: 960px;
}

.apvcb-card-editor input[type="text"],
.apvcb-card-editor input[type="search"],
.apvcb-card-editor select,
.apvcb-card-editor textarea,
.apvcb-entity-form input[type="text"],
.apvcb-entity-form select,
.apvcb-cards-filters input,
.apvcb-cards-filters select {
	width: 100%;
	max-width: 100%;
	padding: 10px 12px;
	border: 1px solid var(--apvcb-border);
	border-radius: 10px;
	font-size: 0.95rem;
}

.apvcb-card-editor-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 10px;
	margin-top: 16px;
}

/*==================================
// WIZARD
// Assistant création carte (entité + titulaire).
//=================================*/
.apvcb-wizard-header {
	margin-bottom: 20px;
}

.apvcb-wizard-header .apvcb-context-chip {
	margin: 8px 0 12px;
}

.apvcb-wizard-block {
	margin-bottom: 16px;
}

.apvcb-wizard-block h3 {
	margin: 0 0 12px;
	font-size: 1rem;
}

.apvcb-context-chip {
	display: inline-flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px 10px;
	padding: 8px 12px;
	background: #f5f3ff;
	border-radius: 999px;
	font-size: 0.9rem;
}

.apvcb-context-change {
	margin-left: 6px;
	font-size: 0.82rem;
	font-weight: 600;
	color: var(--apvcb-primary);
}

.apvcb-radio-row {
	display: flex;
	flex-wrap: wrap;
	gap: 12px 20px;
	margin-bottom: 12px;
}

.apvcb-radio-row label {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	font-weight: 600;
	cursor: pointer;
}

/*==================================
// WOOCOMMERCE MY ACCOUNT
// Ajustements dans l’espace Mon compte.
//=================================*/
.woocommerce-account .apvcb-myaccount {
	width: 100%;
	max-width: 100%;
}

.woocommerce-account .apvcb-app,
.woocommerce-account .apvcb-dashboard {
	max-width: 100%;
	padding-left: 0;
	padding-right: 0;
}
 
.apvcb-wallet-topup {
	margin-top: 20px;
	padding: clamp(20px, 3vw, 32px);
	border: 1px solid #e5e7eb;
	border-radius: 20px;
	background: linear-gradient(135deg, #fff 0%, #f8faff 100%);
	box-shadow: 0 14px 38px rgba(20, 35, 70, 0.07);
}

.apvcb-wallet-topup-heading {
	display: flex;
	align-items: flex-start;
	justify-content: space-between;
	gap: 18px;
	margin-bottom: 24px;
}

.apvcb-wallet-topup-heading .apvcb-app-eyebrow {
	margin: 0 0 6px;
	color: var(--apvcb-primary, #3155c6);
	font-size: 0.78rem;
	font-weight: 700;
	letter-spacing: 0.08em;
	text-transform: uppercase;
}

.apvcb-wallet-topup-heading h2 {
	margin: 0 0 8px;
	font-size: clamp(1.25rem, 2.4vw, 1.7rem);
	line-height: 1.2;
}

.apvcb-wallet-topup-heading p:last-child {
	max-width: 620px;
	margin: 0;
	color: #647084;
}

.apvcb-wallet-topup-icon {
	display: grid;
	width: 48px;
	height: 48px;
	flex: 0 0 48px;
	place-items: center;
	border-radius: 15px;
	background: #eaf0ff;
	color: var(--apvcb-primary, #3155c6);
	font-size: 1.8rem;
	font-weight: 500;
}

.apvcb-wallet-topup-form {
	display: flex;
	align-items: flex-end;
	gap: 14px;
}

.apvcb-wallet-topup-input-wrap {
	width: min(100%, 460px);
}

.apvcb-wallet-topup-input-wrap > label {
	display: block;
	margin-bottom: 8px;
	font-weight: 700;
}

.apvcb-wallet-topup-input-row {
	display: flex;
	min-height: 54px;
	align-items: center;
	border: 1px solid #cbd3df;
	border-radius: 12px;
	background: #fff;
	transition: border-color 150ms ease, box-shadow 150ms ease;
}

.apvcb-wallet-topup-input-row:focus-within {
	border-color: var(--apvcb-primary, #3155c6);
	box-shadow: 0 0 0 3px rgba(49, 85, 198, 0.13);
}

.apvcb-wallet-topup-currency {
	padding: 0 14px;
	color: #667085;
	font-weight: 700;
}

.apvcb-wallet-topup-input-row input {
	width: 100%;
	min-width: 0;
	min-height: 52px;
	margin: 0;
	border: 0;
	background: transparent;
	box-shadow: none;
	font-size: 1.2rem;
	font-weight: 700;
}

.apvcb-wallet-topup-input-row input:focus {
	border: 0;
	box-shadow: none;
	outline: 0;
}

.apvcb-wallet-topup-hint,
.apvcb-wallet-topup-notice {
	margin: 8px 0 0;
	color: #687386;
	font-size: 0.88rem;
}

.apvcb-wallet-topup-submit {
	min-height: 54px;
	white-space: nowrap;
}

.apvcb-wallet-topup-submit span {
	margin-left: 8px;
	font-size: 1.15em;
}

.apvcb-wallet-topup-notice {
	margin-top: 18px;
}

.apvcb-wallet-topup-unavailable {
	padding: 14px 16px;
	border: 1px solid #f0d7a7;
	border-radius: 10px;
	background: #fff9ec;
	color: #744d00;
}

/*==================================
// RESPONSIVE
// Grilles adaptatives mobile / tablette.
//=================================*/
@media (max-width: 900px) {
	.apvcb-stats-grid,
	.apvcb-action-grid {
		grid-template-columns: repeat(2, 1fr);
	}

	.apvcb-panels {
		grid-template-columns: 1fr;
	}
}

@media (max-width: 560px) {
	.apvcb-stats-grid,
	.apvcb-action-grid {
		grid-template-columns: 1fr;
	}

	.apvcb-balance-value {
		font-size: 1.5rem;
	}

	.apvcb-balance-link {
		margin-left: 0;
	}

	.apvcb-list-item {
		flex-wrap: wrap;
	}
}


/*==================================
// VISIBILITY HELPERS
// Affichage conditionnel wizard (évite les soucis d'attribut hidden).
//=================================*/
.apvcb-is-hidden {
	display: none !important;
}


/*==================================
// CARDS LIST
// Desktop : rangées soft-card. Mobile : carte empilée.
//=================================*/
.apvcb-cards-header {
	display: flex;
	flex-wrap: wrap;
	align-items: flex-end;
	justify-content: space-between;
	gap: 12px 20px;
	margin-bottom: 16px;
}

.apvcb-cards-header-cta {
	margin: 0;
}

.apvcb-cards-filters {
	margin-bottom: 16px;
	padding: 14px 16px 6px;
}

.apvcb-filters-grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr)) auto;
	gap: 10px 12px;
	align-items: end;
}

.apvcb-filter-field {
	margin: 0 0 10px;
}

.apvcb-filter-field label {
	display: block;
	margin-bottom: 4px;
	font-size: 0.8rem;
	color: var(--apvcb-muted);
}

.apvcb-filter-field input,
.apvcb-filter-field select,
.apvcb-cards-filters input,
.apvcb-cards-filters select {
	width: 100%;
	max-width: 100%;
	padding: 8px 10px;
	border: 1px solid var(--apvcb-border);
	border-radius: 10px;
	font-size: 0.95rem;
	background: #fff;
}

.apvcb-filter-actions {
	margin: 0 0 10px;
}

.apvcb-cards-bulk-bar {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
	margin-bottom: 12px;
	padding: 12px 16px;
}

.apvcb-cards-list {
	display: flex;
	flex-direction: column;
	gap: 10px;
}

.apvcb-card-row {
	display: flex;
	flex-wrap: nowrap;
	align-items: center;
	gap: 14px;
	padding: 14px 16px;
	margin: 0;
}

.apvcb-card-row-check {
	flex: 0 0 auto;
	margin: 0;
}

.apvcb-card-row-avatar {
	flex: 0 0 56px;
	width: 56px;
	height: 56px;
	border-radius: 14px;
	overflow: hidden;
	background: #ede9fe;
	display: flex;
	align-items: center;
	justify-content: center;
}

.apvcb-card-row-avatar img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

.apvcb-card-row-initials {
	font-weight: 700;
	font-size: 1rem;
	color: var(--apvcb-primary);
}

.apvcb-card-row-body {
	flex: 1 1 auto;
	min-width: 0;
}

.apvcb-card-row-title {
	font-weight: 700;
	font-size: 1rem;
	line-height: 1.25;
	margin: 0 0 2px;
	color: var(--apvcb-text);
}

.apvcb-card-row-meta {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 2px 6px;
	font-size: 0.85rem;
	line-height: 1.25;
	color: var(--apvcb-muted);
}

.apvcb-card-row-status {
	margin-top: 4px;
	line-height: 1;
}

.apvcb-dot {
	opacity: 0.6;
}

.apvcb-card-row-hint {
	margin: 6px 0 0;
	font-size: 0.82rem;
	color: #b45309;
}

.apvcb-card-row-side {
	flex: 0 0 auto;
	display: flex;
	flex-direction: column;
	align-items: flex-end;
	gap: 8px;
}

.apvcb-card-row-actions {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 6px;
	justify-content: flex-end;
}

.apvcb-badge-status {
	display: inline-flex;
	align-items: center;
	padding: 4px 10px;
	border-radius: 999px;
	font-size: 0.75rem;
	font-weight: 600;
	line-height: 1.2;
}

.apvcb-badge-status.is-generated {
	background: #ecfdf5;
	color: #059669;
}

.apvcb-badge-status.is-draft {
	background: var(--apvcb-muted-bg);
	color: var(--apvcb-muted);
}

.apvcb-badge-status.is-stale {
	background: #fff7ed;
	color: #c2410c;
}

.apvcb-btn-ghost {
	background: #fff !important;
	border: 1px solid var(--apvcb-border) !important;
	color: var(--apvcb-text) !important;
}

.apvcb-cards-empty {
	text-align: center;
	padding: 32px 20px;
}

.apvcb-cards-empty-title {
	margin: 0 0 8px;
	font-size: 1.1rem;
	font-weight: 700;
}

.apvcb-cards-empty-text {
	margin: 0 0 16px;
	color: var(--apvcb-muted);
}

.apvcb-cards-pagination {
	margin-top: 18px;
}

.apvcb-cards-pagination ul {
	display: flex;
	flex-wrap: wrap;
	gap: 6px;
	list-style: none;
	margin: 0;
	padding: 0;
}

.apvcb-cards-pagination li {
	margin: 0;
}

/* Mobile : carte empilée */
@media (max-width: 720px) {
	.apvcb-filters-grid {
		grid-template-columns: 1fr 1fr;
	}

	.apvcb-card-row {
		flex-wrap: wrap;
		align-items: flex-start;
	}

	.apvcb-card-row-check {
		order: 0;
		padding-top: 4px;
	}

	.apvcb-card-row-avatar {
		order: 1;
	}

	.apvcb-card-row-body {
		order: 2;
		flex: 1 1 calc(100% - 90px);
	}

	.apvcb-card-row-side {
		order: 3;
		flex: 1 1 100%;
		flex-direction: row;
		align-items: center;
		justify-content: flex-start;
		margin-top: 6px;
		padding-top: 10px;
		border-top: 1px solid var(--apvcb-border);
	}

	.apvcb-card-row-actions {
		justify-content: flex-start;
		width: 100%;
	}

	.apvcb-card-row-actions .apvcb-card-more {
		margin-left: auto;
	}
}

@media (max-width: 480px) {
	.apvcb-filters-grid {
		grid-template-columns: 1fr;
	}

	.apvcb-cards-header {
		align-items: stretch;
	}

	.apvcb-cards-header-cta .button {
		width: 100%;
		text-align: center;
	}
}


/*==================================
// CARD ROW ACTIONS MENU
// Menu ⋯ + formulaires inline liste.
//=================================*/
.apvcb-inline-form {
	display: inline;
	margin: 0;
	padding: 0;
}

.apvcb-card-more {
	position: relative;
	display: inline-block;
}

.apvcb-card-more-toggle {
	list-style: none;
	cursor: pointer;
	user-select: none;
	width: 36px;
	height: 36px;
	display: inline-flex;
	align-items: center;
	justify-content: center;
	border: 1px solid var(--apvcb-border);
	border-radius: 10px;
	background: #fff;
	font-size: 1.15rem;
	line-height: 1;
	color: var(--apvcb-text);
}

.apvcb-card-more-toggle::-webkit-details-marker {
	display: none;
}

.apvcb-card-more[open] .apvcb-card-more-toggle {
	border-color: var(--apvcb-primary);
	color: var(--apvcb-primary);
}

.apvcb-card-more-menu {
	position: absolute;
	right: 0;
	top: calc(100% + 6px);
	min-width: 160px;
	padding: 6px;
	background: #fff;
	border: 1px solid var(--apvcb-border);
	border-radius: 12px;
	box-shadow: var(--apvcb-shadow);
	z-index: 20;
	display: flex;
	flex-direction: column;
	gap: 2px;
}

.apvcb-card-more-item {
	display: block;
	width: 100%;
	text-align: left;
	padding: 8px 12px;
	border: 0;
	background: transparent;
	border-radius: 8px;
	font-size: 0.9rem;
	color: var(--apvcb-text);
	cursor: pointer;
	text-decoration: none;
	box-sizing: border-box;
}

.apvcb-card-more-item:hover {
	background: #f5f3ff;
	color: var(--apvcb-primary);
}

.apvcb-card-more-item.is-danger {
	color: #b91c1c;
}

.apvcb-card-more-item.is-danger:hover {
	background: #fef2f2;
	color: #991b1b;
}

.apvcb-notice {
	margin: 0 0 14px;
	padding: 12px 14px;
	border-radius: 12px;
	background: var(--apvcb-success-bg);
	color: var(--apvcb-success);
	font-size: 0.92rem;
}

.apvcb-notice-error {
	background: #fef2f2;
	color: #b91c1c;
}

.apvcb-notice-warning {
	background: #fff7ed;
	color: #c2410c;
}


/*==================================
// LIST ACTION PILLS
// Boutons type badges soft (capture Profile Fields).
//=================================*/
.apvcb-card-row-actions .apvcb-btn,
.apvcb-card-row-actions .button,
.apvcb-card-row-actions a.apvcb-btn,
.apvcb-card-row-actions button.apvcb-btn {
	display: inline-flex !important;
	align-items: center !important;
	justify-content: center !important;
	gap: 4px;
	box-sizing: border-box !important;
	padding: 0 12px !important;
	height: 28px !important;
	min-height: 28px !important;
	max-height: 28px !important;
	line-height: 28px !important;
	border-radius: 999px !important;
	border: none !important;
	font-size: 0.75rem !important;
	font-weight: 600 !important;
	box-shadow: none !important;
	text-decoration: none !important;
	cursor: pointer;
	white-space: nowrap;
	transition: background 0.15s ease;
}

.apvcb-card-row-actions .apvcb-btn-generate {
	background: #f5f3ff !important;
	border: none !important;
	color: #6d28d9 !important;
}

.apvcb-card-row-actions .apvcb-btn-generate:hover {
	background: #ede9fe !important;
	color: #5b21b6 !important;
}

.apvcb-card-row-actions .apvcb-btn-download {
	background: #eff6ff !important;
	border: none !important;
	color: #1d4ed8 !important;
}

.apvcb-card-row-actions .apvcb-btn-download:hover {
	background: #dbeafe !important;
}

.apvcb-card-row-actions .apvcb-btn-edit {
	background: #eef2ff !important;
	border: none !important;
	color: #0060ff !important;
}

.apvcb-card-row-actions .apvcb-btn-edit:hover {
	background: #dbe4ff !important;
	color: #0052d9 !important;
}

.apvcb-card-row-actions .apvcb-btn-print {
	background: #f0fdfa !important;
	border: none !important;
	color: #0f766e !important;
}

.apvcb-card-row-actions .apvcb-btn-regen {
	background: #fff7ed !important;
	border: none !important;
	color: #c2410c !important;
}

.apvcb-card-row-actions .apvcb-btn-delete {
	background: #fef2f2 !important;
	border: none !important;
	color: #b91c1c !important;
}

.apvcb-card-row .apvcb-badge-status {
	padding: 2px 8px;
	font-size: 0.7rem;
}

.apvcb-card-row-side {
	justify-content: center;
	gap: 0;
}

.apvcb-card-more-toggle {
	width: 28px !important;
	height: 28px !important;
	min-height: 28px !important;
	border-radius: 999px !important;
	background: #f3f4f6 !important;
	border: none !important;
	font-size: 0.95rem !important;
	line-height: 28px !important;
}


/*==================================
// STATUS ICONS
// Brouillon = point plein · Générée = coche.
//=================================*/
.apvcb-badge-status {
	display: inline-flex;
	align-items: center;
	gap: 5px;
}

.apvcb-status-icon {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
	width: 0.85em;
	height: 0.85em;
	line-height: 1;
}

/* Brouillon — rond plein */
.apvcb-badge-status.is-draft .apvcb-status-icon::before {
	content: "";
	display: block;
	width: 0.45em;
	height: 0.45em;
	border-radius: 50%;
	background: currentColor;
}

/* Générée — coche */
.apvcb-badge-status.is-generated .apvcb-status-icon::before {
	content: "✓";
	font-size: 0.85em;
	font-weight: 700;
	line-height: 1;
}

/* À régénérer — point d'attention (optionnel, reste distinct) */
.apvcb-badge-status.is-stale .apvcb-status-icon::before {
	content: "!";
	font-size: 0.75em;
	font-weight: 700;
	line-height: 1;
}


/*==================================
// ENTITY LIST
// Placeholder d'identité de l'établissement (Heroicons outline).
//=================================*/
.apvcb-entity-placeholder {
	width: 28px;
	height: 28px;
	color: var(--apvcb-primary);
}


.apvcb-card-row-meta-sub {
	margin-top: 1px;
}


/*==================================
// LIVE CARD PREVIEW
// Aperçu recto/verso à l’échelle du gabarit béninois du secondaire.
//=================================*/
.apvcb-live-preview {
	margin-top: 28px;
}

.apvcb-live-preview-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 20px;
	align-items: start;
}

.apvcb-live-preview-block {
	margin: 0;
	min-width: 0;
}

.apvcb-live-preview-block h3 {
	margin: 0 0 10px;
	font-size: 1rem;
}

.apvcb-live-preview-stage {
	width: 100%;
	max-width: 100%;
	aspect-ratio: 1012 / 638;
	height: auto;
	overflow: hidden;
	background: #fff;
	border-radius: 10px;
	border: 1px solid var(--apvcb-border);
	position: relative;
	container-type: inline-size;
}
.apvcb-wysiwyg-host {
	position: absolute;
	top: 0;
	left: 0;
	width: 1012px;
	height: 638px;
	transform-origin: top left;
	transform: scale(calc(100cqi / 1012));
	background: #fff;
}


/* Côte à côte seulement si chaque carte reste assez large pour lire. */
@media (min-width: 1400px) {
	.apvcb-live-preview-grid {
		grid-template-columns: 1fr 1fr;
	}
}

.apvcb-live-preview-generated img {
	max-width: 100%;
	height: auto;
	border-radius: 12px;
	border: 1px solid var(--apvcb-border);
}


/*================================== holder-upshot
// EIDT CARD PREVIUM SHOT UPLOAD PHOTO FIELD
// Capture, import, vignette. Pas dans le CSS Chromium.
//=================================*/
.apvcb-media-field {
	margin: 0 0 16px;
}
.apvcb-photo-box {
	display: block;
	margin-top: 8px;
}
.apvcb-photo-frame {
	width: 130px;
	aspect-ratio: 3 / 4;
	object-fit: cover;
	object-position: center top;
	border-radius: 12px;
	border: 1px dashed var(--apvcb-border, #d5dbe7);
	background: #f4f6fb;
	overflow: hidden;
	display: flex;
	align-items: center;
	justify-content: center;
	position: relative;
	margin-bottom: 15px;
}
.apvcb-photo-box.has-photo .apvcb-photo-frame {
	border-style: solid;
	background: #111;
}
.apvcb-photo-thumb,
.apvcb-photo-live {
	width: 100%;
	height: 100%;
	object-fit: cover;
	object-position: center top;
	display: block;
}
.apvcb-photo-live[hidden],
.apvcb-photo-thumb[hidden] {
	display: none !important;
}
.apvcb-photo-box.is-capturing .apvcb-photo-frame {
	border-style: solid;
	background: #111;
}
.apvcb-photo-placeholder {
	position: absolute;
	/*inset: 0;*/
	display: flex;
	align-items: center;
	justify-content: center;
	font-size: 12px;
	color: #7a8494;
	padding: 8px;
	text-align: center;
}
.apvcb-photo-actions {
	display: flex;
	flex-wrap: wrap;
	gap: 8px;
	align-items: center;
}
.apvcb-photo-hint {
	margin: 8px 0 0;
	font-size: 13px;
	color: #667085;
}

.apvcb-country-identity {
	display: flex;
	flex-wrap: wrap;
	gap: 16px;
	margin: 0 0 18px;
	padding: 14px;
	border: 1px solid var(--apvcb-border, #d5dbe7);
	border-radius: 12px;
	background: #f8f9fc;
}
.apvcb-country-identity-item {
	display: flex;
	flex-direction: column;
	align-items: flex-start;
	gap: 8px;
	min-width: 160px;
}
.apvcb-country-identity-image {
	width: 96px;
	height: 96px;
	object-fit: contain;
	background: #fff;
	border: 1px solid var(--apvcb-border, #d5dbe7);
	border-radius: 8px;
}

/* Composant photo partagé : holder, signature et médias d'entité. */
.apvcb-photo-picker {
	margin: 0 0 18px;
}
.apvcb-photo-picker [hidden] {
	display: none !important;
}
.apvcb-photo-picker .apvcb-file-picker-label {
	display: block;
	margin-bottom: 7px;
}
.apvcb-photo-picker .apvcb-photo-box {
	margin-top: 0;
}
.apvcb-photo-picker .apvcb-photo-frame {
	width: 150px;
	aspect-ratio: 3 / 4;
	height: auto;
}
.apvcb-photo-picker--landscape .apvcb-photo-frame {
	width: 220px;
	aspect-ratio: 16 / 9;
}
.apvcb-photo-picker--square .apvcb-photo-frame {
	width: 160px;
	aspect-ratio: 1;
}
.apvcb-photo-picker--contain .apvcb-photo-thumb {
	object-fit: contain;
	object-position: center;
	background: #fff;
}
.apvcb-photo-picker .apvcb-photo-placeholder {
	inset: 0;
	width: 100%;
	box-sizing: border-box;
}

.apvcb-sign-frame {
	width: 220px;
	aspect-ratio: 16 / 9;
	border-radius: 12px;
	border: 1px dashed var(--apvcb-border, #d5dbe7);
	background: #f4f6fb;
	overflow: hidden;
	display: flex;
	align-items: center;
	justify-content: center;
}
.apvcb-sign-box.has-photo .apvcb-sign-frame {
	border-style: solid;
	background: #fff;
}
.apvcb-sign-thumb {
	max-width: 100%;
	max-height: 100%;
	object-fit: contain;
	display: block;
}


/*======================================
// IMPORT APP
// Styles de l'application frontend d'import des apprenants.
//======================================*/
.apvcb-import-app {
    margin: 0 auto;
    color: #172033;
}

.apvcb-import-header {
    display: flex;
    justify-content: space-between;
    gap: 24px;
    align-items: center;
    margin-bottom: 28px;
}

.apvcb-import-eyebrow {
    display: block;
    text-transform: uppercase;
    letter-spacing: .12em;
    font-size: 11px;
    font-weight: 700;
    color: #667085;
    margin-bottom: 8px;
}

.apvcb-import-header h1 {
    margin: 0;
    font-size: 34px;
    line-height: 1.1;
    letter-spacing: -.03em;
}

.apvcb-import-header p {
    margin: 9px 0 0;
    color: #667085;
    font-size: 15px;
}

.apvcb-import-header-icon {
    width: 52px;
    height: 52px;
    border-radius: 16px;
    background: #172033;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    box-shadow: 0 10px 24px rgba(23, 32, 51, .14);
}

.apvcb-import-steps {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 8px;
    margin-bottom: 18px;
}

.apvcb-import-step {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border-bottom: 2px solid #e8ebf2;
    color: #98a2b3;
    font-size: 13px;
}

.apvcb-import-step span {
    width: 26px;
    height: 26px;
    border-radius: 50%;
    background: #f2f4f7;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 700;
}

.apvcb-import-step.is-active {
    color: #172033;
    border-color: #172033;
}

.apvcb-import-step.is-active span {
    background: #172033;
    color: #fff;
}

.apvcb-import-card {
    background: #fff;
    border: 1px solid #e5e7ec;
    border-radius: 20px;
    padding: 26px;
    box-shadow: 0 8px 28px rgba(16, 24, 40, .05);
    margin-top: 16px;
}

.apvcb-import-card-head {
    display: flex;
    justify-content: space-between;
    gap: 30px;
    align-items: flex-start;
    margin-bottom: 24px;
}

.apvcb-import-card-head>div {
    display: flex;
    align-items: center;
    gap: 12px;
}

.apvcb-import-number {
    font-size: 12px;
    font-weight: 800;
    color: #667085;
}

.apvcb-import-card h2 {
    font-size: 20px;
    margin: 0;
    letter-spacing: -.02em;
}

.apvcb-import-card-head p {
    margin: 2px 0 0;
    color: #667085;
    font-size: 13px;
    max-width: 420px;
    text-align: right;
}

.apvcb-import-context-form {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 22px;
}

.apvcb-import-field {
    display: flex;
    flex-direction: column;
}

.apvcb-import-field label {
    font-weight: 700;
    font-size: 13px;
    margin-bottom: 8px;
}

.apvcb-import-field small {
    margin-top: 8px;
    color: #98a2b3;
}

.apvcb-import-select,
.apvcb-import-field input {
    height: 48px;
    border: 1px solid #d9dee8;
    border-radius: 11px;
    background: #fff;
    padding: 0 13px;
    font: inherit;
    color: #172033;
}

.apvcb-import-inline-action {
    border: 0;
    background: none;
    padding: 9px 0 0;
    text-align: left;
    color: #475467;
    font-size: 12px;
    cursor: pointer;
}

.apvcb-import-inline-form {
    padding-top: 9px;
}

.apvcb-import-inline-form input {
    width: 100%;
    box-sizing: border-box;
}

.apvcb-import-primary {
    grid-column: 1/-1;
    justify-self: end;
    border: 0;
    border-radius: 11px;
    background: #172033;
    color: #fff;
    padding: 13px 18px;
    font-weight: 700;
    cursor: pointer;
    transition: transform .15s, opacity .15s;
}

.apvcb-import-primary:hover {
    transform: translateY(-1px);
}

.apvcb-import-primary span {
    margin-left: 8px;
}

.apvcb-import-upload-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.apvcb-import-dropzone {
    border: 1.5px dashed #cbd2df;
    border-radius: 16px;
    min-height: 220px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 7px;
    background: #fafbfc;
    cursor: pointer;
    text-align: center;
}

.apvcb-import-dropzone:hover {
    background: #f6f8fb;
    border-color: #98a2b3;
}

.apvcb-import-dropzone input {
    display: none;
}

.apvcb-import-file-icon {
    font-size: 22px;
    font-weight: 800;
    color: #217346;
}

.apvcb-import-dropzone strong {
    font-size: 15px;
}

.apvcb-import-dropzone span {
    font-size: 13px;
    color: #667085;
}

.apvcb-import-dropzone small {
    font-size: 11px;
    color: #98a2b3;
}

.apvcb-import-destination {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 14px;
    border-radius: 12px;
    background: #f7f8fa;
    margin-bottom: 18px;
    font-size: 13px;
}

.apvcb-import-destination span {
    color: #98a2b3;
}

.apvcb-import-alert {
    border-radius: 11px;
    padding: 12px 14px;
    font-size: 13px;
    margin: 12px 0;
}

.apvcb-import-alert.is-success {
    background: #ecfdf3;
    color: #027a48;
}

.apvcb-import-alert.is-error {
    background: #fef3f2;
    color: #b42318;
}

.apvcb-import-mapping {
    border: 1px solid #e5e7ec;
    border-radius: 14px;
    overflow: hidden;
}

.apvcb-import-map-row {
    display: grid;
    grid-template-columns: 1fr 28px 1fr;
    align-items: center;
    gap: 12px;
    padding: 13px 15px;
    border-bottom: 1px solid #eef0f4;
}

.apvcb-import-map-row:last-child {
    border-bottom: 0;
}

.apvcb-import-map-row>div:first-child {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
}

.apvcb-import-map-row em {
    font-style: normal;
    font-size: 10px;
    color: #667085;
    background: #f2f4f7;
    border-radius: 99px;
    padding: 3px 6px;
}

.apvcb-import-map-row em.is-optional {
    background: #fff7ed;
    color: #c2410c;
}

.apvcb-import-map-arrow {
    text-align: center;
    color: #98a2b3;
}

.apvcb-import-map-source {
    padding: 9px 11px;
    border-radius: 9px;
    font-size: 12px;
    background: #f2f4f7;
    color: #667085;
}

.apvcb-import-map-source.is-found {
    background: #ecfdf3;
    color: #027a48;
}

.apvcb-import-map-source.is-empty {
    background: #fef3f2;
    color: #b42318;
}

.apvcb-import-preview-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 24px 0 10px;
}

.apvcb-import-preview-head h3 {
    margin: 0;
    font-size: 15px;
}

.apvcb-import-preview-head span {
    font-size: 12px;
    color: #667085;
}

.apvcb-import-table-wrap {
    overflow: auto;
    border: 1px solid #e5e7ec;
    border-radius: 12px;
}

.apvcb-import-table {
    border-collapse: collapse;
    width: 100%;
    font-size: 12px;
    min-width: 760px;
}

.apvcb-import-table th,
.apvcb-import-table td {
    padding: 10px 12px;
    border-bottom: 1px solid #eef0f4;
    text-align: left;
    white-space: nowrap;
}

.apvcb-import-table th {
    background: #f8f9fb;
    color: #667085;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.apvcb-import-confirm {
    display: flex;
    justify-content: flex-end;
    margin-top: 18px;
}

@media(max-width:720px) {
    .apvcb-import-header,
    .apvcb-import-card-head {
        flex-direction: column;
    }

    .apvcb-import-card-head p {
        text-align: left;
    }

    .apvcb-import-context-form {
        grid-template-columns: 1fr;
    }

    .apvcb-import-step strong {
        display: none;
    }

    .apvcb-import-card {
        padding: 18px;
    }

    .apvcb-import-map-row {
        grid-template-columns: 1fr;
    }

    .apvcb-import-map-arrow {
        display: none;
    }

    .apvcb-import-primary {
        grid-column: auto;
        width: 100%;
    }

    .apvcb-import-confirm .apvcb-import-primary {
        width: 100%;
    }
}






/*======================================= 
// ENDPOINT WALLET
// Wallet Topup
//=====================================*/
input#apvcb-wallet-topup-amount {
    border: none !important;
}
#apvcb-wallet-topup-amount:focus,
#apvcb-wallet-topup-amount:focus-visible {
    outline: none !important;
    box-shadow: none !important;
    border-color: inherit; 
}

@media (min-width: 641px) {
    .apvcb-wallet-topup-input-container {
        display: flex;
        gap: 10px;
    }
}

@media (max-width: 640px) {
	.apvcb-wallet-topup-form {
		align-items: stretch;
		flex-direction: column;
	}

	.apvcb-wallet-topup-input-wrap {
		width: 100%;
	}

	.apvcb-wallet-topup-submit {
		width: 100%;
		margin-top: 10px;
		justify-content: center;
	}

	.apvcb-wallet-topup-icon {
		width: 40px;
		height: 40px;
		flex-basis: 40px;
		border-radius: 12px;
	}
}
