/*
 * Styles front-office soirées — dioqa-cdc-soirees
 *
 * Thème : Picostrap5 Child (Bootstrap 5.3.6)
 * Variables réutilisées : --primary #22261F, --secondary #F7E1C8,
 *   --bg-lighter #FFF6EB, --mid #50564C, --text-light #C3B19D
 * Fonts : 'Poppins' (global), 'Expressway ExtraBold' (titres)
 *
 * Figma node 2074:1168 — mesures exactes :
 *   section bg #f7e1c8, py 75px, gap 35px entre blocs
 *   filter bar : bg #fff6eb, p 25px, gap 24px, rounded 4px, max-w 1320px
 *   filter items : bg #f7e1c8, h 48px, px 25px, py 12px, rounded 6px, gap 15px
 *   grille : max-w 1320px, gap 24px, 3 colonnes
 *   carte : bg #fff6eb, p 25px, gap 15px, border-bottom 10px
 *   triangle coin : 42×42px top-left, même couleur que border-bottom
 */

/* ── Section wrapper (fond saumon pleine largeur) ────────────────────────── */

.cdc-soirees-wrapper {
	background: var(--secondary, #f7e1c8);
	padding: 75px 24px;
	display: flex;
	flex-direction: column;
	align-items: center;
	gap: 35px;
	width: 100%;
	box-sizing: border-box;
}

/* Escape du container Bootstrap si le shortcode est dans un .container */
.entry-content .cdc-soirees-wrapper,
.container .cdc-soirees-wrapper,
.wp-block-group .cdc-soirees-wrapper {
	width: calc(100% + 48px);
	margin-left: -24px;
	padding-left: 24px;
	padding-right: 24px;
}

/* ── Filtres ─────────────────────────────────────────────────────────────── */

.cdc-filter-bar {
	background: var(--bg-lighter, #fff6eb);
	border-radius: 4px;
	padding: 25px;
	display: flex;
	flex-wrap: wrap;
	gap: 24px;
	align-items: center;
	width: 100%;
	max-width: 1320px;
	box-sizing: border-box;
}

.cdc-filter-field {
	flex-shrink: 0;
}

.cdc-filter-field select {
	appearance: none;
	-webkit-appearance: none;
	background-color: var(--secondary, #f7e1c8);
	background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1L5 5L9 1' stroke='%2350564c' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
	background-repeat: no-repeat;
	background-position: right 16px center;
	border: none;
	border-radius: 6px;
	padding: 12px 42px 12px 25px;
	height: 48px;
	font-family: 'Poppins', sans-serif;
	font-size: 14px;
	color: var(--mid, #50564c);
	cursor: pointer;
	min-width: 160px;
	outline: none;
	transition: opacity 0.2s ease;
	line-height: normal;
}

.cdc-filter-field select:focus {
	outline: none;
	box-shadow: 0 0 0 3px rgba(34, 38, 31, 0.1);
}

/* ── Grille ──────────────────────────────────────────────────────────────── */

.cdc-soirees-grid {
	display: grid;
	grid-template-columns: repeat(3, 1fr);
	gap: 24px;
	width: 100%;
	max-width: 1320px;
	box-sizing: border-box;
}

@media (max-width: 1199px) {
	.cdc-soirees-grid {
		grid-template-columns: repeat(2, 1fr);
	}
}

@media (max-width: 767px) {
	.cdc-soirees-wrapper {
		padding: 50px 16px;
	}

	.cdc-soirees-grid {
		grid-template-columns: 1fr;
	}

	.cdc-filter-bar {
		flex-direction: column;
		align-items: stretch;
	}

	.cdc-filter-field select {
		width: 100%;
	}
}

/* ── État chargement ─────────────────────────────────────────────────────── */

.cdc-soirees-grid.cdc-loading {
	opacity: 0.5;
	pointer-events: none;
}

/* ── Message vide ────────────────────────────────────────────────────────── */

.cdc-no-results {
	grid-column: 1 / -1;
	text-align: center;
	color: var(--mid, #50564c);
	font-size: 16px;
	padding: 40px 0;
	margin: 0;
}

/* ── Carte ───────────────────────────────────────────────────────────────── */

.cdc-soiree-card {
	position: relative;
	background: var(--bg-lighter, #fff6eb);
	padding: 25px;
	border-bottom: 10px solid var(--primary, #22261f);
	display: flex;
	flex-direction: column;
	gap: 15px;
	box-sizing: border-box;
}

/* Triangle décoratif coin haut-gauche — même couleur que border-bottom via JS */
.cdc-card-corner {
	position: absolute;
	top: 0;
	left: 0;
	width: 0;
	height: 0;
	border-style: solid;
	border-width: 42px 42px 0 0;
	border-color: var(--primary, #22261f) transparent transparent transparent;
	pointer-events: none;
}

/* ── En-tête carte ───────────────────────────────────────────────────────── */

.cdc-card-header {
	display: flex;
	flex-direction: column;
	gap: 5px;
}

.cdc-card-title {
	font-family: 'Expressway ExtraBold', sans-serif;
	font-size: 24px;
	color: var(--primary, #22261f);
	margin: 0;
	line-height: 1.2;
}

.cdc-card-subtitle {
	font-family: 'Poppins', sans-serif;
	font-size: 16px;
	color: var(--primary, #22261f);
	margin: 0;
	font-style: normal;
}

/* ── Image ───────────────────────────────────────────────────────────────── */

.cdc-card-image {
	width: 100%;
	aspect-ratio: 655 / 415;
	overflow: hidden;
	flex-shrink: 0;
}

.cdc-card-image img {
	width: 100%;
	height: 100%;
	object-fit: cover;
	display: block;
}

/* ── Badges ──────────────────────────────────────────────────────────────── */

.cdc-card-badges {
	display: flex;
	flex-wrap: wrap;
	gap: 15px;
	padding-bottom: 15px;
	border-bottom: 1px solid var(--secondary, #f7e1c8);
}

.cdc-badge {
	display: inline-flex;
	align-items: center;
	gap: 10px;
	background: var(--secondary, #f7e1c8);
	border-radius: 4px;
	padding: 5px 12px;
	font-family: 'Poppins', sans-serif;
	font-size: 16px;
	color: var(--primary, #22261f);
	white-space: nowrap;
	line-height: normal;
}

.cdc-badge svg {
	flex-shrink: 0;
	width: 14px;
	height: 14px;
}

/* ── Prix + badge stock ──────────────────────────────────────────────────── */

.cdc-card-price-row {
	display: flex;
	flex-direction: row;
	align-items: center;
	justify-content: space-between;
	gap: 10px;
}

.cdc-card-price {
	font-family: 'Expressway ExtraBold', sans-serif;
	font-size: 32px;
	color: var(--primary, #22261f);
	margin: 0;
	line-height: 1;
	display: flex;
	align-items: baseline;
	gap: 4px;
}

/* WooCommerce injecte des <span> dans get_price_html() */
.cdc-card-price .woocommerce-Price-amount,
.cdc-card-price bdi,
.cdc-card-price .amount {
	font-family: inherit;
	font-size: inherit;
	color: inherit;
}

.cdc-price-unit {
	font-family: 'Expressway ExtraBold', sans-serif;
	font-size: 16px;
	color: var(--primary, #22261f);
	white-space: nowrap;
}

.cdc-stock-badge {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	background: var(--primary, #22261f);
	border-radius: 4px;
	padding: 5px 12px;
	font-family: 'Poppins', sans-serif;
	font-size: 12px;
	font-weight: 500;
	color: var(--text-light, #c3b19d);
	white-space: nowrap;
	flex-shrink: 0;
}

/* ── Pagination ──────────────────────────────────────────────────────────── */

#cdc-pagination {
	margin-top: 40px;
}

.cdc-pagination {
	display: flex;
	justify-content: center;
	align-items: center;
	gap: 8px;
	flex-wrap: wrap;
}

.cdc-page-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	min-width: 40px;
	height: 40px;
	padding: 0 10px;
	border: 2px solid var(--primary, #22261f);
	background: transparent;
	color: var(--primary, #22261f);
	font-family: 'Expressway ExtraBold', sans-serif;
	font-size: 16px;
	font-weight: 800;
	border-radius: 4px;
	cursor: pointer;
	transition: background 0.2s, color 0.2s;
}

.cdc-page-btn:hover {
	background: var(--primary, #22261f);
	color: var(--bg-lighter, #fff6eb);
}

.cdc-page-btn.cdc-page-active {
	background: var(--primary, #22261f);
	color: var(--bg-lighter, #fff6eb);
	pointer-events: none;
}

.cdc-page-prev,
.cdc-page-next {
	font-size: 20px;
}

/* ── Boutons ─────────────────────────────────────────────────────────────── */

.cdc-card-actions {
	display: flex;
	gap: 15px;
	align-items: stretch;
	margin-top: auto;
}

.cdc-btn {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 12px 24px;
	border-radius: 4px;
	font-family: 'Poppins', sans-serif;
	font-size: 16px;
	font-weight: 500;
	text-decoration: none !important;
	border: 1px solid transparent;
	cursor: pointer;
	transition: background 0.2s ease, color 0.2s ease, border-color 0.2s ease;
	line-height: 1;
	white-space: nowrap;
}

.cdc-btn-reserve {
	flex: 1 0 0;
	min-width: 0;
	background: var(--primary, #22261f);
	border-color: var(--primary, #22261f);
	color: var(--secondary, #f7e1c8) !important;
}

.cdc-btn-reserve:hover {
	background: #2f3626;
	border-color: #2f3626;
	color: var(--secondary, #f7e1c8) !important;
}

.cdc-btn-complet {
	flex: 1 0 0;
	min-width: 0;
	background: rgba(34, 38, 31, 0.15);
	border-color: rgba(188, 188, 188, 0.15);
	color: var(--primary, #22261f) !important;
	cursor: not-allowed;
}

.cdc-btn-detail {
	flex-shrink: 0;
	background: var(--secondary, #f7e1c8);
	border-color: var(--secondary, #f7e1c8);
	color: var(--primary, #22261f) !important;
}

.cdc-btn-detail:hover {
	background: #eacfaf;
	border-color: #eacfaf;
	color: var(--primary, #22261f) !important;
}
