/**
 * NuCom Bookings — CSS frontend minimal.
 * Volontairement neutre : structure + états uniquement.
 * Tout est surchargeable via Elementor / CSS custom (classes préfixées « ncb- »).
 */

.ncb-bookings {
	display: block;
}

/* --- Grille : 4 colonnes (bureau) / 3 (tablette) / 1 (mobile) --- */
.ncb-grid {
	display: grid;
	grid-template-columns: repeat(4, minmax(0, 1fr));
	gap: 16px;
	margin: 0 0 24px;
	padding: 0;
	list-style: none;
}

@media (max-width: 999px) {
	.ncb-grid {
		grid-template-columns: repeat(3, minmax(0, 1fr));
	}
}

@media (max-width: 600px) {
	.ncb-grid {
		grid-template-columns: 1fr;
	}
}

/*
 * Carte = 3 zones empilées (flex colonne, hauteur 100 %) :
 *   1. header  : titre (hauteur réservée 2 lignes)
 *   2. content : description courte (2 lignes) + description complète — zone extensible
 *   3. meta    : tarif, places, bouton — toujours collés en bas et alignés entre cartes
 * Les cartes d'une même ligne ont la même hauteur (grille), donc la zone « meta »
 * s'aligne horizontalement d'une carte à l'autre.
 * Une fine séparation est posée entre chaque élément.
 */
.ncb-card {
	display: flex;
	flex-direction: column;
	height: 100%;
	box-sizing: border-box;
	margin: 0;
	border: 1px solid #e0e0e0;
	border-radius: 6px;
	padding: 16px;
	background: #fff;
}

.ncb-card__header {
	margin: 0;
}

.ncb-card__title {
	margin: 0;
	font-size: 1.1em;
	line-height: 1.3;
	min-height: 2.6em; /* 2 lignes réservées */
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

/* Zone centrale extensible : pousse « meta » vers le bas. */
.ncb-card__content {
	flex: 1 1 auto;
	margin-top: 12px;
	padding-top: 12px;
	border-top: 1px solid #ececec;
}

.ncb-card__desc {
	margin: 0;
	min-height: 2.8em; /* 2 lignes réservées */
	display: -webkit-box;
	-webkit-line-clamp: 2;
	-webkit-box-orient: vertical;
	overflow: hidden;
}

.ncb-card__full {
	margin-top: 12px;
	padding-top: 12px;
	border-top: 1px solid #ececec;
	font-size: 0.95em;
}

/* Neutralise les marges des paragraphes/listes générés par l'éditeur enrichi. */
.ncb-card__full > :first-child {
	margin-top: 0;
}

.ncb-card__full > :last-child {
	margin-bottom: 0;
}

/*
 * Variante facultative : n'afficher la description complète que lorsque
 * la carte est sélectionnée (clic). Pour l'activer, retirez le commentaire :
 *
 * .ncb-card__full { display: none; }
 * .ncb-card--selected .ncb-card__full { display: block; }
 */

/* Bloc bas : toujours collé en bas de la carte. */
.ncb-card__meta {
	margin-top: 12px;
	padding-top: 12px;
	border-top: 1px solid #ececec;
}

.ncb-card__price {
	margin: 0;
	font-weight: 600;
}

.ncb-status {
	margin: 10px 0 0;
	padding-top: 10px;
	border-top: 1px solid #ececec;
	font-size: 0.9em;
}

.ncb-card__footer {
	margin-top: 10px;
	padding-top: 10px;
	border-top: 1px solid #ececec;
}

/* --- États des cartes --- */
.ncb-card--selected {
	border-color: #2271b1;
	box-shadow: inset 0 0 0 1px #2271b1;
}

.ncb-card--full {
	opacity: 0.6;
}

.ncb-card--incompatible {
	opacity: 0.5;
}

.ncb-status--full .ncb-status__full {
	color: #b32d2e;
	font-weight: 600;
}

/* --- Boutons --- */
.ncb-button {
	display: inline-block;
	cursor: pointer;
	border: 1px solid #333;
	background: #f5f5f5;
	color: inherit;
	padding: 8px 14px;
	border-radius: 4px;
	font: inherit;
	line-height: 1.2;
	text-align: center;
}

.ncb-button:hover {
	background: #ececec;
}

.ncb-button[disabled] {
	opacity: 0.5;
	cursor: not-allowed;
}

.ncb-button--primary {
	background: #222;
	color: #fff;
	border-color: #222;
}

.ncb-button--primary:hover {
	background: #000;
}

.ncb-button--remove {
	padding: 4px 8px;
	font-size: 0.85em;
}

/* --- Formulaire --- */
.ncb-form {
	border: 1px solid #e0e0e0;
	border-radius: 6px;
	padding: 20px;
	background: #fff;
}

.ncb-form__title {
	margin-top: 0;
}

.ncb-form__intro {
	margin: 0 0 16px;
}

.ncb-form__intro > :first-child {
	margin-top: 0;
}

.ncb-form__intro > :last-child {
	margin-bottom: 0;
}

.ncb-selection {
	margin: 0 0 16px;
}

.ncb-selection__list {
	list-style: none;
	margin: 0 0 12px;
	padding: 0;
}

.ncb-selection__item {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 12px;
	padding: 6px 0;
	border-bottom: 1px solid #f0f0f0;
}

.ncb-total {
	display: flex;
	justify-content: space-between;
	font-weight: 700;
	padding-top: 8px;
}

.ncb-fields {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
	gap: 12px;
	margin: 0 0 16px;
}

.ncb-field {
	display: flex;
	flex-direction: column;
}

.ncb-field--full {
	grid-column: 1 / -1;
}

.ncb-field__label {
	margin-bottom: 4px;
	font-size: 0.9em;
}

.ncb-field__input,
.ncb-field__textarea {
	width: 100%;
	box-sizing: border-box;
	padding: 8px;
	border: 1px solid #ccc;
	border-radius: 4px;
	font: inherit;
}

.ncb-required {
	color: #b32d2e;
}

.ncb-form__actions {
	margin-top: 8px;
}

/* --- Messages --- */
.ncb-messages {
	margin: 0 0 16px;
}

.ncb-message {
	padding: 10px 14px;
	border-radius: 4px;
	border: 1px solid transparent;
}

.ncb-message--info {
	background: #f0f6fc;
	border-color: #c5d9ed;
}

.ncb-message--success {
	background: #edfaef;
	border-color: #b7e0bf;
	color: #1a7f37;
}

.ncb-message--error {
	background: #fcf0f1;
	border-color: #f0c2c4;
	color: #b32d2e;
}

/* --- États de chargement --- */
.ncb-form--loading {
	opacity: 0.7;
	pointer-events: none;
}

/* --- Honeypot anti-spam (masqué visuellement et aux lecteurs d'écran) --- */
.ncb-hp {
	position: absolute !important;
	left: -9999px !important;
	width: 1px;
	height: 1px;
	overflow: hidden;
}

/* --- Lignes par jour --- */
.ncb-day {
	margin: 0 0 24px;
}

.ncb-day__title {
	margin: 0 0 12px;
	font-size: 1.2em;
}

/* --- Case à cocher de sélection (vignette) --- */
.ncb-card__check {
	display: flex;
	align-items: center;
	gap: 8px;
	cursor: pointer;
	font-weight: 600;
}

.ncb-card__checkbox {
	width: 18px;
	height: 18px;
	margin: 0;
	flex: 0 0 auto;
	cursor: pointer;
}

.ncb-card__checkbox:disabled {
	cursor: not-allowed;
}

.ncb-card--full .ncb-card__check,
.ncb-card--incompatible .ncb-card__check {
	cursor: not-allowed;
	opacity: 0.7;
}

/* --- Prix d'origine barré (quand une remise s'applique) --- */
.ncb-total__original {
	margin-left: auto;
	margin-right: 10px;
	text-decoration: line-through;
	opacity: 0.6;
	font-weight: 400;
}

/* --- Bouton « Choisir » + panneau des entraînements compatibles (dans la vignette) --- */
.ncb-card__choose {
	width: 100%;
}

.ncb-card--primary .ncb-card__choose {
	background: #2271b1;
	color: #fff;
	border-color: #2271b1;
}

.ncb-card__compat {
	margin-top: 12px;
	padding-top: 12px;
	border-top: 1px solid #ececec;
}

.ncb-card__compat[hidden] {
	display: none;
}

.ncb-card__compat-title {
	margin: 0 0 8px;
	font-size: 0.9em;
	font-weight: 600;
}

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

.ncb-compat-item {
	padding: 8px 0;
	border-bottom: 1px solid #f0f0f0;
}

.ncb-compat-item:last-child {
	padding-bottom: 0;
	border-bottom: 0;
}

.ncb-compat-row {
	display: flex;
	align-items: center;
	gap: 8px;
	cursor: pointer;
}

.ncb-compat-row input[type="checkbox"] {
	flex: 0 0 auto;
	margin: 0;
}

.ncb-compat-name {
	flex: 1 1 auto;
}

.ncb-compat-price {
	flex: 0 0 auto;
	font-weight: 700;
}

/* Total des 2, sous la ligne, aligné avec le titre. */
.ncb-compat-total {
	margin-top: 4px;
	padding-left: 26px;
	font-size: 0.85em;
	opacity: 0.85;
}

.ncb-compat-row input:disabled ~ .ncb-compat-name,
.ncb-compat-row input:disabled ~ .ncb-compat-price {
	opacity: 0.5;
}

/* Jour non cumulable avec le principal choisi : grisé. */
.ncb-card--incompatible {
	opacity: 0.45;
	filter: grayscale(1);
}

/* ===================================================================
 * Formulaire multi-étapes (assistant)
 * =================================================================== */
.ncb-step__title {
	margin: 0 0 14px;
}

.ncb-step .ncb-field {
	display: block;
	margin: 0 0 14px;
}

.ncb-field__radios {
	display: flex;
	flex-wrap: wrap;
	gap: 12px 18px;
}

.ncb-radio {
	display: inline-flex;
	align-items: center;
	gap: 6px;
	cursor: pointer;
}

.ncb-field__help {
	margin: 4px 0 0;
	font-size: 0.85em;
	opacity: 0.75;
}

.ncb-field__error {
	min-height: 1em;
	margin-top: 4px;
	font-size: 0.85em;
	color: #b32d2e;
}

.ncb-field--invalid .ncb-field__input,
.ncb-field--invalid .ncb-field__textarea,
.ncb-field--invalid select {
	border-color: #b32d2e;
}

.ncb-field__block {
	margin: 0 0 10px;
	padding: 10px 12px;
	background: #f6f7f9;
	border-radius: 6px;
	font-size: 0.95em;
}

.ncb-consent {
	display: flex;
	align-items: flex-start;
	gap: 8px;
	cursor: pointer;
}

.ncb-consent input {
	margin-top: 3px;
	flex: 0 0 auto;
}

.ncb-wizard__nav {
	display: flex;
	align-items: center;
	gap: 10px;
	margin-top: 18px;
	padding-top: 14px;
	border-top: 1px solid #ececec;
}

.ncb-wizard__count {
	margin: 0 auto;
	opacity: 0.7;
	font-size: 0.9em;
}
