/* Ateliers Cuisine – Réservations. Les couleurs reprennent celles du thème quand c'est possible. */
.atres {
	--atres-accent: var(--wp--preset--color--primary, currentColor);
	--atres-border: rgba(0, 0, 0, .12);
	--atres-muted: rgba(0, 0, 0, .6);
	--atres-radius: 10px;
}

/* Photo principale */
.atres-main-image { margin: 0 0 1.5em; }
.atres-main-image a { display: block; }
.atres-main-image img {
	display: block;
	width: 100%;
	height: auto;
	max-height: 520px;
	object-fit: cover;
	border-radius: var(--atres-radius);
}

/* Encadré infos */
.atres-summary {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
	gap: 12px;
	margin: 0 0 1.5em;
	padding: 16px 18px;
	border: 1px solid var(--atres-border);
	border-radius: var(--atres-radius);
}
.atres-summary-item { margin: 0; }
.atres-summary dt {
	font-size: .78em;
	text-transform: uppercase;
	letter-spacing: .05em;
	color: var(--atres-muted);
	margin: 0 0 2px;
}
.atres-summary dd { margin: 0; font-weight: 600; }

/* Galerie */
.atres-gallery {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
	gap: 10px;
	margin: 1.5em 0;
}
.atres-gallery-item { display: block; overflow: hidden; border-radius: 8px; aspect-ratio: 4 / 3; }
.atres-gallery-item img { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .3s ease; }
.atres-gallery-item:hover img { transform: scale(1.04); }

.atres-lightbox {
	position: fixed; inset: 0; z-index: 99999;
	display: flex; align-items: center; justify-content: center;
	background: rgba(0, 0, 0, .88);
}
.atres-lightbox img { max-width: 92vw; max-height: 88vh; border-radius: 6px; }
.atres-lightbox button {
	position: absolute; background: none; border: 0; color: #fff; cursor: pointer;
	font-size: 42px; line-height: 1; padding: 12px 16px;
}
.atres-lightbox .atres-lb-close { top: 8px; right: 8px; }
.atres-lightbox .atres-lb-prev { left: 4px; top: 50%; transform: translateY(-50%); }
.atres-lightbox .atres-lb-next { right: 4px; top: 50%; transform: translateY(-50%); }

/* Formulaire */
.atres-booking {
	margin: 2em 0;
	padding: 22px 24px;
	border: 1px solid var(--atres-border);
	border-radius: var(--atres-radius);
	scroll-margin-top: 90px;
}
.atres-booking-title { margin-top: 0; }
.atres-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 0 18px; }
.atres-field { margin: 0 0 14px; }
.atres-field label { display: block; font-weight: 600; margin-bottom: 4px; }
.atres-field input,
.atres-field select,
.atres-field textarea {
	width: 100%;
	box-sizing: border-box;
	padding: 10px 12px;
	border: 1px solid var(--atres-border);
	border-radius: 6px;
	font: inherit;
	background: #fff;
}
.atres-gateways { border: 0; padding: 0; margin: 0 0 14px; }
.atres-gateways legend { font-weight: 600; margin-bottom: 6px; padding: 0; }
.atres-gateway {
	display: inline-flex; align-items: center; gap: 8px;
	margin: 0 10px 8px 0; padding: 10px 14px;
	border: 1px solid var(--atres-border); border-radius: 6px; cursor: pointer;
}
.atres-gateway:has(input:checked) { border-color: var(--atres-accent); box-shadow: 0 0 0 1px var(--atres-accent); }
.atres-total { font-size: 1.15em; margin: 8px 0 12px; }
/*
 * Boutons : ils portent les classes des boutons WordPress (wp-block-button__link, wp-element-button)
 * pour reprendre le style des boutons de votre thème. Les valeurs ci-dessous ne servent que si le thème
 * n'en définit pas : :where() leur donne une priorité nulle, le thème l'emporte toujours.
 */
:where(.atres) :where(.atres-button) {
	display: inline-block;
	box-sizing: border-box;
	padding: .8em 1.6em;
	border: 0;
	border-radius: 6px;
	background-color: #1e1e1e;
	color: #fff;
	font: inherit;
	font-weight: 600;
	line-height: 1.2;
	text-align: center;
	text-decoration: none;
	cursor: pointer;
}
:where(.atres) :where(.atres-button):hover,
:where(.atres) :where(.atres-button):focus { opacity: .9; }
.atres .atres-button[disabled] { opacity: .6; cursor: wait; }
.atres .wp-block-button { margin: 0; }
.atres .atres-submit { margin: 4px 0 0; }
.atres-secure, .atres-admin-hint { font-size: .85em; color: var(--atres-muted); margin: 6px 0 0; }
.atres-closed { font-weight: 600; }
.atres-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }

.atres-notice { padding: 12px 16px; border-radius: 6px; margin: 0 0 16px; border-left: 4px solid; }
.atres-notice-success { background: #edf7ed; border-color: #2e7d32; }
.atres-notice-error { background: #fdecea; border-color: #c62828; }
.atres-notice-info { background: #eef4fb; border-color: #1565c0; }

/* Liste [ateliers] */
.atres-list {
	display: grid;
	grid-template-columns: repeat(var(--atres-columns, 3), minmax(0, 1fr));
	gap: 24px;
	margin: 1.5em 0;
}
@media (max-width: 900px) { .atres-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .atres-list { grid-template-columns: 1fr; } }
.atres-card {
	display: flex; flex-direction: column;
	border: 1px solid var(--atres-border); border-radius: var(--atres-radius);
	overflow: hidden; background: #fff;
}
.atres-card-image { position: relative; display: block; aspect-ratio: 4 / 3; background: #f3efe9; }
.atres-card-image img { width: 100%; height: 100%; object-fit: cover; display: block; }
.atres-badge {
	position: absolute; top: 12px; left: 12px;
	background: rgba(0, 0, 0, .75); color: #fff;
	padding: 4px 10px; border-radius: 20px; font-size: .8em; font-weight: 600;
}
.atres-card-body { display: flex; flex-direction: column; flex: 1; padding: 16px 18px 18px; }
.atres-card-date { margin: 0 0 4px; font-size: .85em; font-weight: 600; color: var(--atres-accent); }
.atres-card-title { margin: 0 0 8px; font-size: 1.2em; }
.atres-card-title a { text-decoration: none; color: inherit; }
.atres-card-excerpt { margin: 0 0 12px; font-size: .92em; color: var(--atres-muted); }
.atres-card-meta { display: flex; justify-content: space-between; gap: 8px; margin: auto 0 12px; font-size: .92em; }
.atres-card-price { font-weight: 700; }
.atres-card-seats { color: var(--atres-muted); }
.atres-card-cta { margin: 0; }
.atres .atres-card-cta .atres-button { width: 100%; text-align: center; box-sizing: border-box; }
.atres-card-full .atres-card-image img, .atres-card-closed .atres-card-image img { filter: grayscale(.6); }

/* Encart [atelier_mini] */
.atres-mini {
	display: flex;
	flex-wrap: wrap;
	align-items: center;
	gap: 12px 16px;
	margin: 1.5em 0;
	padding: 12px 14px;
	border: 1px solid var(--atres-border);
	border-radius: var(--atres-radius);
	background: #fff;
}
.atres-mini-image { flex: 0 0 84px; display: block; }
.atres-mini-image img { display: block; width: 84px; height: 84px; object-fit: cover; border-radius: 8px; }
.atres-mini-body { flex: 1 1 150px; min-width: 0; }
.atres-mini-body p { margin: 0; }
.atres-mini-date { font-size: .85em; font-weight: 600; color: var(--atres-accent); }
.atres-mini-title { font-size: 1.1em; font-weight: 700; line-height: 1.3; margin: 2px 0 4px !important; }
.atres-mini-title a { color: inherit; text-decoration: none; }
.atres-mini-meta { display: flex; flex-wrap: wrap; gap: 4px 14px; font-size: .92em; }
.atres-mini-price { font-weight: 700; }
.atres-mini-seats { color: var(--atres-muted); }
.atres-mini-seats.is-low { color: var(--atres-accent); font-weight: 600; }
.atres-mini-cta { flex: 0 0 auto; }
.atres-mini-full .atres-mini-image img, .atres-mini-closed .atres-mini-image img { filter: grayscale(.6); }
