/* =========================================================================
   Calendrier formations — espace Gestionnaire (Mon compte)
   Système de design compact : tokens, composants, responsive.
   ========================================================================= */

.vvae-account-wrap {
	--vvae-ink: #16212B;
	--vvae-slate: #5B6B7A;
	--vvae-slate-light: #8A97A3;
	--vvae-border: #E2E7EC;
	--vvae-surface: #FFFFFF;
	--vvae-surface-subtle: #F6F8FA;
	--vvae-accent: #1D4E89;
	--vvae-accent-hover: #163D6C;
	--vvae-success: #1F7A4D;
	--vvae-success-bg: #E7F5EC;
	--vvae-danger: #B3261E;
	--vvae-danger-bg: #FBEAEA;
	--vvae-radius: 10px;
	--vvae-radius-sm: 7px;
	--vvae-shadow: 0 1px 2px rgba(16,24,32,.04), 0 1px 10px rgba(16,24,32,.05);

	max-width: 100%;
	color: var(--vvae-ink);
}

/* --- En-tête de page : titre à gauche, actions à droite, une seule ligne --- */
.vvae-page-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	flex-wrap: wrap;
	gap: 0.75rem 1rem;
	margin-bottom: 1.25rem;
}

.vvae-page-title {
	margin: 0;
	font-size: 1.35rem;
	line-height: 1.2;
	font-weight: 700;
	color: var(--vvae-ink);
}

.vvae-page-actions {
	display: flex;
	align-items: center;
	gap: 0.6rem;
	flex-wrap: wrap;
}

/* --- Boutons --- */
.vvae-btn {
	display: inline-flex;
	align-items: center;
	gap: 0.4em;
	padding: 0.55em 1.1em;
	border-radius: var(--vvae-radius-sm);
	border: 1px solid transparent;
	font-size: 0.88rem;
	font-weight: 600;
	line-height: 1.2;
	text-decoration: none;
	cursor: pointer;
	white-space: nowrap;
	transition: background-color .15s ease, border-color .15s ease, box-shadow .15s ease;
}

.vvae-btn-primary {
	background: var(--vvae-accent);
	color: #fff;
	box-shadow: var(--vvae-shadow);
}

.vvae-btn-primary:hover,
.vvae-btn-primary:focus {
	background: var(--vvae-accent-hover);
	color: #fff;
}

.vvae-btn-secondary {
	background: var(--vvae-surface);
	color: var(--vvae-ink);
	border-color: var(--vvae-border);
}

.vvae-btn-secondary:hover {
	background: var(--vvae-surface-subtle);
	color: var(--vvae-ink);
}

.vvae-btn-ghost {
	background: transparent;
	color: var(--vvae-slate);
	border-color: var(--vvae-border);
}

.vvae-btn-ghost:hover {
	background: var(--vvae-surface-subtle);
	color: var(--vvae-ink);
}

/* --- Contrôle segmenté (À venir / Passées) --- */
.vvae-segmented {
	display: inline-flex;
	padding: 3px;
	background: var(--vvae-surface-subtle);
	border: 1px solid var(--vvae-border);
	border-radius: var(--vvae-radius-sm);
}

.vvae-segmented a {
	padding: 0.45em 0.9em;
	border-radius: 5px;
	font-size: 0.86rem;
	font-weight: 600;
	text-decoration: none;
	color: var(--vvae-slate);
	line-height: 1.2;
	transition: background-color .15s ease, color .15s ease;
}

.vvae-segmented a.is-active {
	background: var(--vvae-accent);
	color: #fff;
}

.vvae-segmented a:not(.is-active):hover {
	color: var(--vvae-ink);
}

/* --- État vide --- */
.vvae-empty-state {
	padding: 2.5rem 1.5rem;
	text-align: center;
	color: var(--vvae-slate);
	background: var(--vvae-surface-subtle);
	border: 1px dashed var(--vvae-border);
	border-radius: var(--vvae-radius);
}

.vvae-empty-state p {
	margin: 0;
}

/* --- Tableau --- */
.vvae-table-card {
	background: var(--vvae-surface);
	border: 1px solid var(--vvae-border);
	border-radius: var(--vvae-radius);
	box-shadow: var(--vvae-shadow);
	overflow-x: auto;
}

.vvae-sessions-table {
	width: 100%;
	border-collapse: collapse;
	font-size: 0.88rem;
}

.vvae-sessions-table th {
	text-align: left;
	padding: 0.7em 1em;
	font-size: 0.72rem;
	text-transform: uppercase;
	letter-spacing: 0.05em;
	font-weight: 700;
	color: var(--vvae-slate);
	background: var(--vvae-surface-subtle);
	border-bottom: 1px solid var(--vvae-border);
	white-space: nowrap;
}

.vvae-col-formation {
	width: 26%;
}

.vvae-col-actions-col {
	width: 108px;
}

.vvae-sessions-table td {
	padding: 0.8em 1em;
	border-bottom: 1px solid var(--vvae-border);
	vertical-align: middle;
}

.vvae-sessions-table tbody tr:last-child td {
	border-bottom: none;
}

.vvae-sessions-table tbody tr:hover {
	background: var(--vvae-surface-subtle);
}

.vvae-cell-title {
	display: block;
	font-weight: 600;
	color: var(--vvae-ink);
}

.vvae-meta-info {
	display: block;
	font-size: 0.76rem;
	color: var(--vvae-slate-light);
	margin-top: 1px;
}

/* Badges (places restantes) */
.vvae-chip {
	display: inline-block;
	padding: 0.22em 0.7em;
	border-radius: 999px;
	font-size: 0.76rem;
	font-weight: 700;
	white-space: nowrap;
}

.vvae-chip-neutral {
	background: var(--vvae-surface-subtle);
	color: var(--vvae-slate);
}

.vvae-chip-ok {
	background: var(--vvae-success-bg);
	color: var(--vvae-success);
}

.vvae-chip-danger {
	background: var(--vvae-danger-bg);
	color: var(--vvae-danger);
}

/* Actions de ligne */
.vvae-col-actions {
	text-align: right;
}

.vvae-row-actions {
	display: flex;
	gap: 0.3em;
	justify-content: flex-end;
}

.vvae-icon-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 28px;
	height: 28px;
	border-radius: var(--vvae-radius-sm);
	color: var(--vvae-slate);
	text-decoration: none;
	transition: background-color .15s ease, color .15s ease;
}

.vvae-icon-btn:hover,
.vvae-icon-btn:focus {
	background: var(--vvae-surface-subtle);
	color: var(--vvae-accent);
}

.vvae-icon-btn-danger:hover,
.vvae-icon-btn-danger:focus {
	background: var(--vvae-danger-bg);
	color: var(--vvae-danger);
}

.vvae-icon-link {
	font-size: 0.82rem;
	font-weight: 600;
	color: var(--vvae-accent);
	text-decoration: none;
}

.vvae-icon-link:hover {
	text-decoration: underline;
}

.vvae-icon-link-danger {
	color: var(--vvae-danger);
}

/* --- Carte de formulaire --- */
.vvae-form-card {
	max-width: 640px;
	background: var(--vvae-surface);
	border: 1px solid var(--vvae-border);
	border-radius: var(--vvae-radius);
	box-shadow: var(--vvae-shadow);
	padding: 1.75rem 2rem;
}

.vvae-form-section {
	padding-bottom: 1.4rem;
	margin-bottom: 1.4rem;
	border-bottom: 1px solid var(--vvae-border);
}

.vvae-form-section-last {
	padding-bottom: 0;
	margin-bottom: 0;
	border-bottom: none;
}

.vvae-section-eyebrow {
	margin: 0 0 0.9em;
	padding-bottom: 0px !important;
	font-size: 0.72rem;
	text-transform: uppercase;
	letter-spacing: 0.06em;
	font-weight: 700;
	color: var(--vvae-accent);
}

.vvae-field {
	margin-bottom: 1em;
}

.vvae-field:last-child {
	margin-bottom: 0;
}

.vvae-field label {
	display: block;
	margin-bottom: 0.35em;
	font-size: 0.85rem;
	font-weight: 600;
	color: var(--vvae-ink);
}

.vvae-required {
	color: var(--vvae-danger);
}

.vvae-field input[type="date"],
.vvae-field input[type="number"],
.vvae-field input[type="text"],
.vvae-field select {
	width: 100%;
	padding: 0.6em 0.75em;
	font-size: 0.9rem;
	color: var(--vvae-ink);
	background: #fff;
	border: 1px solid var(--vvae-border);
	border-radius: var(--vvae-radius-sm);
	transition: border-color .15s ease, box-shadow .15s ease;
}

.vvae-field input:focus,
.vvae-field select:focus {
	outline: none;
	border-color: var(--vvae-accent);
	box-shadow: 0 0 0 3px rgba(29,78,137,0.14);
}

.vvae-field-row {
	display: grid;
	grid-template-columns: 1fr 1fr;
	gap: 1em;
}

.vvae-field-hint {
	margin: 1em 0 0;
	line-height: 1rem;
	font-size: 0.78rem;
	color: var(--vvae-slate);
}

.vvae-field-warning {
	margin: 0.6em 0 0;
	padding: 0.55em 0.8em;
	font-size: 0.8rem;
	line-height: 1.35;
	color: #92400E;
	background: #FEF3E2;
	border: 1px solid #FBD9A6;
	border-radius: var(--vvae-radius-sm);
}

.vvae-field-checkbox {
	display: flex;
}

.vvae-checkbox-label {
	display: flex !important;
	align-items: center;
	gap: 0.6em;
	font-weight: 500 !important;
	font-size: 0.9rem;
	cursor: pointer;
}

.vvae-checkbox-label input[type="checkbox"] {
	width: 18px;
	height: 18px;
	accent-color: var(--vvae-accent);
	cursor: pointer;
}

.vvae-form-actions {
	display: flex;
	gap: 0.75em;
	margin-top: 1.6rem;
	padding-top: 1.2rem;
	border-top: 1px solid var(--vvae-border);
}

/* --- Harmonisation du champ de recherche produit (Select2/SelectWoo) --- */
.vvae-form-card .select2-container--default .select2-selection--single {
	height: auto;
	padding: 0.6em 0.75em;
	border: 1px solid var(--vvae-border);
	border-radius: var(--vvae-radius-sm);
}

.vvae-form-card .select2-container--default .select2-selection--single .select2-selection__rendered {
	padding: 0;
	line-height: 1.4;
	color: var(--vvae-ink);
}

.vvae-form-card .select2-container--default .select2-selection--single .select2-selection__arrow {
	height: 100%;
	top: 0;
	right: 8px;
}

.vvae-form-card .select2-container--default.select2-container--focus .select2-selection--single,
.vvae-form-card .select2-container--default .select2-selection--single:focus {
	border-color: var(--vvae-accent);
	box-shadow: 0 0 0 3px rgba(29,78,137,0.14);
}

/* --- Corbeille (formations supprimées récemment) --- */
.vvae-trash {
	margin-top: 1.5rem;
	border: 1px solid var(--vvae-border);
	border-radius: var(--vvae-radius);
	background: var(--vvae-surface);
}

.vvae-trash summary {
	cursor: pointer;
	padding: 0.85em 1.1em;
	font-size: 0.86rem;
	font-weight: 600;
	color: var(--vvae-slate);
	list-style: none;
}

.vvae-trash summary::-webkit-details-marker {
	display: none;
}

.vvae-trash summary::before {
	content: '▸';
	display: inline-block;
	margin-right: 0.5em;
	transition: transform .15s ease;
}

.vvae-trash[open] summary::before {
	transform: rotate(90deg);
}

.vvae-trash-content {
	padding: 0 1.1em 1.1em;
	border-top: 1px solid var(--vvae-border);
}

.vvae-trash-list {
	list-style: none;
	margin: 0.5em 0 0;
	padding: 0;
}

.vvae-trash-list li {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1em;
	padding: 0.6em 0;
	border-bottom: 1px solid var(--vvae-border);
}

.vvae-trash-list li:last-child {
	border-bottom: none;
}

.vvae-trash-item-label {
	display: flex;
	flex-direction: column;
	gap: 2px;
	font-size: 0.86rem;
	color: var(--vvae-ink);
}

/* --- Fiche produit (select de session) --- */
.vvae-session-select-wrap {
	margin: 1em 0;
}

.vvae-session-select-wrap select {
	display: block;
	width: 100%;
	max-width: 420px;
	padding: 0.5em;
}

/* --- Shortcode [vvae_formation] (affichage public) --- */
.vvae-sessions-list {
	list-style: none;
	margin: 0;
	padding: 0;
}

.vvae-session-item {
	padding: 0.75em 0;
	border-bottom: 1px solid #e2e2e2;
	display: flex;
	align-items: center;
	gap: 0.75em;
	flex-wrap: wrap;
}

.vvae-session-item:last-child {
	border-bottom: none;
}

/* --- Mise en page de la page "Mon compte" --- */
.woocommerce-account .woocommerce-MyAccount-navigation {
	width: 22%;
}

.woocommerce-account .woocommerce-MyAccount-content {
	width: 77%;
}

/* --- Responsive --- */
@media (max-width: 782px) {
	.vvae-page-header {
		flex-direction: column;
		align-items: flex-start;
	}

	.vvae-page-actions {
		width: 100%;
		justify-content: space-between;
	}

	.vvae-form-card {
		padding: 1.25rem;
	}

	.vvae-field-row {
		grid-template-columns: 1fr;
	}

	.vvae-sessions-table thead {
		display: none;
	}

	.vvae-sessions-table,
	.vvae-sessions-table tbody,
	.vvae-sessions-table tr,
	.vvae-sessions-table td {
		display: block;
		width: 100%;
	}

	.vvae-sessions-table tr {
		padding: 0.6em 0;
		border-bottom: 1px solid var(--vvae-border);
	}

	.vvae-sessions-table td {
		display: flex;
		justify-content: space-between;
		align-items: center;
		gap: 1em;
		padding: 0.3em 1em;
		border-bottom: none;
	}

	.vvae-sessions-table td::before {
		content: attr(data-title);
		font-weight: 600;
		color: var(--vvae-slate);
		flex-shrink: 0;
	}

	.vvae-col-actions {
		text-align: left;
	}

	.vvae-row-actions {
		justify-content: flex-end;
	}
}
