/**
 * EventSuite Booking — styles du tunnel de réservation.
 *
 * Principe d'intégration au thème : on hérite au maximum de la typographie et
 * des couleurs du thème (font: inherit, color: inherit). La seule couleur
 * imposée est l'accent (--esb-accent), réglable dans les réglages du plugin.
 * Toutes les classes sont préfixées .esb- pour ne pas entrer en conflit.
 */

.esb-widget {
	--esb-accent: #6C5CE7;
	--esb-radius: 10px;
	--esb-border: rgba(0, 0, 0, .12);
	--esb-muted: rgba(0, 0, 0, .55);
	font: inherit;
	color: inherit;
	max-width: 720px;
	margin: 0 auto;
}

.esb-widget *,
.esb-widget *::before,
.esb-widget *::after {
	box-sizing: border-box;
}

/* --- Durcissement compatibilité thèmes ------------------------------------
 * Neutralise les styles hérités agressifs de certains thèmes (boutons en
 * MAJUSCULES, ombres, puces de listes, marges de paragraphes, images qui
 * débordent…) sans toucher à l'habillage propre du widget. */
.esb-widget p { margin: 0 0 .75rem; }
.esb-widget ul,
.esb-widget ol { list-style: none; margin: 0; padding: 0; }
.esb-widget li { margin: 0; list-style: none; }
.esb-widget h1,
.esb-widget h2,
.esb-widget h3,
.esb-widget h4,
.esb-widget h5,
.esb-widget h6 { text-transform: none; letter-spacing: normal; }
.esb-widget img { max-width: 100%; height: auto; border: 0; }
.esb-widget a { box-shadow: none; }
.esb-widget button {
	text-transform: none;
	letter-spacing: normal;
	text-shadow: none;
	box-shadow: none;
	min-height: 0;
	-webkit-appearance: none;
	appearance: none;
}
.esb-widget input[type="text"],
.esb-widget input[type="email"],
.esb-widget input[type="tel"],
.esb-widget input[type="number"],
.esb-widget textarea {
	-webkit-appearance: none;
	appearance: none;
	box-shadow: none;
	min-height: 0;
	text-transform: none;
	letter-spacing: normal;
}

/* Fil d'étapes */
.esb-steps {
	display: flex;
	flex-wrap: wrap;
	gap: .5rem;
	list-style: none;
	margin: 0 0 1.5rem;
	padding: 0;
	counter-reset: esb;
}
.esb-steps li {
	flex: 1 1 auto;
	text-align: center;
	font-size: .85em;
	padding: .5rem .25rem;
	border-bottom: 3px solid var(--esb-border);
	color: var(--esb-muted);
	counter-increment: esb;
}
.esb-steps li::before {
	content: counter(esb);
	display: inline-flex;
	align-items: center;
	justify-content: center;
	width: 1.4em;
	height: 1.4em;
	margin-right: .4em;
	border-radius: 50%;
	background: var(--esb-border);
	color: #fff;
	font-size: .85em;
}
.esb-steps li.is-active {
	color: inherit;
	border-bottom-color: var(--esb-accent);
	font-weight: 600;
}
.esb-steps li.is-active::before,
.esb-steps li.is-done::before {
	background: var(--esb-accent);
}

/* Panneaux (étapes) */
.esb-panel { display: none; }
.esb-panel.is-active { display: block; animation: esb-fade .25s ease; }
@keyframes esb-fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.esb-h { margin: 0 0 1rem; font-size: 1.15em; font-family: var(--esb-heading-font, inherit); font-weight: var(--esb-heading-weight, 700); }

/* Cartes de prestations */
.esb-services {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
	gap: 1rem;
}
.esb-card {
	text-align: left;
	border: 1px solid var(--esb-border);
	border-radius: var(--esb-radius);
	padding: 0;
	overflow: hidden;
	background: transparent;
	color: inherit;
	cursor: pointer;
	font: inherit;
	display: flex;
	flex-direction: column;
	transition: border-color .15s, box-shadow .15s, transform .1s;
}
.esb-card:hover { border-color: var(--esb-accent); transform: translateY(-2px); }
.esb-card.is-selected {
	border-color: var(--esb-accent);
	box-shadow: 0 0 0 2px var(--esb-accent) inset;
}
.esb-card-img { width: 100%; aspect-ratio: 4 / 3; background-size: cover; background-position: center; background-color: rgba(0,0,0,.04); }
.esb-card-body { padding: 1rem; display: flex; flex-direction: column; flex: 1; }
.esb-card-name { font-weight: 600; margin-bottom: .35rem; }
.esb-card-price { color: var(--esb-accent); font-weight: 600; }
.esb-card-desc { color: var(--esb-muted); font-size: .9em; margin-top: .5rem; }
.esb-card-btn { align-self: flex-start; margin-top: .75rem; padding: .4rem 1rem; border-radius: 999px; background: var(--esb-accent); color: #fff; font-size: .85em; }

/* Onglets catégories */
.esb-cats { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.25rem; }
.esb-cat { font: inherit; cursor: pointer; padding: .4rem .9rem; border: 1px solid var(--esb-border); border-radius: 999px; background: transparent; color: inherit; }
.esb-cat:hover { border-color: var(--esb-accent); }
.esb-cat.is-active { background: var(--esb-accent); color: #fff; border-color: var(--esb-accent); }

/* Pagination catalogue */
.esb-pagination { display: flex; align-items: center; justify-content: center; gap: 1rem; margin-top: 1.5rem; }
.esb-page-info { color: var(--esb-muted); font-size: .9em; }

/* Fiche produit détaillée */
.esb-product-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 1.5rem; align-items: start; }
.esb-product-media { width: 100%; aspect-ratio: 4 / 3; border-radius: var(--esb-radius); background-size: cover; background-position: center; background-color: rgba(0,0,0,.04); }
.esb-product-media.esb-no-img { display: none; }
.esb-product-cat { text-transform: uppercase; letter-spacing: .04em; font-size: .75em; color: var(--esb-muted); margin-bottom: .25rem; }
.esb-product-price { color: var(--esb-accent); font-weight: 700; font-size: 1.3em; margin-bottom: 1rem; }
.esb-product-desc { color: inherit; white-space: pre-wrap; line-height: 1.6; }
@media (max-width: 640px) { .esb-product-grid { grid-template-columns: 1fr; } }
.esb-badge {
	display: inline-block;
	font-size: .7em;
	text-transform: uppercase;
	letter-spacing: .04em;
	padding: .15em .5em;
	border-radius: 999px;
	border: 1px solid var(--esb-border);
	color: var(--esb-muted);
	margin-bottom: .5rem;
}

/* Zone dates */
.esb-date-fields { display: flex; flex-wrap: wrap; gap: 1rem; margin-bottom: 1rem; }
.esb-date-fields label { display: flex; flex-direction: column; gap: .25rem; font-size: .9em; }
.esb-widget input[type="date"],
.esb-widget input[type="number"],
.esb-widget input[type="text"],
.esb-widget input[type="email"],
.esb-widget input[type="tel"],
.esb-widget textarea,
.esb-widget select {
	font: inherit;
	color: inherit;
	padding: .5rem .6rem;
	border: 1px solid var(--esb-border);
	border-radius: 8px;
	background: transparent;
	max-width: 100%;
}
.esb-widget input:focus,
.esb-widget textarea:focus,
.esb-widget select:focus {
	outline: 2px solid var(--esb-accent);
	outline-offset: 1px;
	border-color: var(--esb-accent);
}

/* Créneaux */
.esb-slots { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .5rem; }
.esb-slot {
	font: inherit;
	cursor: pointer;
	padding: .45rem .75rem;
	border: 1px solid var(--esb-border);
	border-radius: 999px;
	background: transparent;
	color: inherit;
}
.esb-slot:hover { border-color: var(--esb-accent); }
.esb-slot.is-selected { background: var(--esb-accent); color: #fff; border-color: var(--esb-accent); }
.esb-slot.is-full { opacity: .4; cursor: not-allowed; text-decoration: line-through; }

/* Message dispo */
.esb-avail { margin: .75rem 0; font-size: .95em; }
.esb-ok { color: #1a7f37; font-weight: 600; }
.esb-ko { color: #b32d2e; font-weight: 600; }

/* Formulaire coordonnées */
.esb-fields { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
.esb-field { display: flex; flex-direction: column; gap: .3rem; font-size: .9em; }
.esb-field-full { grid-column: 1 / -1; }

/* Accessoires / options */
.esb-options-box { margin: 1rem 0; }
.esb-options-title { font-weight: 600; margin-bottom: .5rem; }
.esb-option {
	display: flex;
	align-items: center;
	gap: .5rem;
	padding: .5rem .75rem;
	border: 1px solid var(--esb-border);
	border-radius: 8px;
	margin-bottom: .5rem;
	cursor: pointer;
}
.esb-option:hover { border-color: var(--esb-accent); }

/* Récap */
.esb-recap {
	border: 1px solid var(--esb-border);
	border-radius: var(--esb-radius);
	padding: 1rem;
	margin-bottom: 1rem;
}
.esb-recap-row { display: flex; justify-content: space-between; padding: .25rem 0; }
.esb-recap-row span:first-child { color: var(--esb-muted); }
.esb-pay { border: 1px solid var(--esb-border); border-radius: var(--esb-radius); padding: .75rem 1rem; margin-bottom: 1rem; }
.esb-pay legend { padding: 0 .4rem; color: var(--esb-muted); font-size: .85em; }
.esb-pay label { margin-right: 1.5rem; }
.esb-total { font-size: 1.2em; font-weight: 700; margin-bottom: 1rem; }
.esb-total small { display: block; font-size: .6em; font-weight: 400; color: var(--esb-muted); }
.esb-total .esb-total-line { font-size: .8em; font-weight: 400; color: var(--esb-muted); }
.esb-franchise { font-size: .7em; font-weight: 400; color: var(--esb-muted); margin-top: .35rem; font-style: italic; }

/* Frais de livraison */
.esb-delivery { margin: .25rem 0 1rem; font-size: .95em; min-height: 1.2em; }

/* Code promo */
.esb-promo { margin: 0 0 1rem; }
.esb-promo-label { display: block; font-size: .85em; color: var(--esb-muted); margin-bottom: .35rem; }
.esb-promo-row { display: flex; gap: .5rem; align-items: center; }
.esb-promo-row input { flex: 0 1 200px; }
.esb-promo-msg { margin-top: .35rem; font-size: .9em; }

/* Contrat de location */
.esb-contract { margin: 0 0 1rem; font-size: .95em; }
.esb-contract-check { cursor: pointer; }
.esb-contract-terms { margin-top: .5rem; padding: .75rem 1rem; border: 1px solid var(--esb-border); border-radius: 8px; max-height: 220px; overflow-y: auto; font-size: .9em; color: var(--esb-muted); }
.esb-delivery-policy { display: block; margin-top: .35rem; color: var(--esb-muted); font-size: .85em; line-height: 1.4; }

/* Mention de caution (informative) */
.esb-caution {
	border: 1px dashed var(--esb-border);
	border-radius: var(--esb-radius);
	padding: .75rem 1rem;
	margin-bottom: 1rem;
	font-size: .9em;
	color: var(--esb-muted);
	background: rgba(0, 0, 0, .02);
}

/* Boutons */
.esb-actions { display: flex; justify-content: space-between; gap: 1rem; margin-top: 1.25rem; }
.esb-btn {
	font: inherit;
	cursor: pointer;
	padding: .65rem 1.4rem;
	border-radius: 999px;
	border: 1px solid var(--esb-accent);
	background: var(--esb-accent);
	color: #fff;
	transition: opacity .15s;
}
.esb-btn:hover { opacity: .9; }
.esb-btn:disabled { opacity: .4; cursor: not-allowed; }
.esb-btn-ghost { background: transparent; color: inherit; border-color: var(--esb-border); }
.esb-btn-primary { font-weight: 600; }

.esb-msg { min-height: 1.2em; margin-bottom: .5rem; }
.esb-msg.is-error { color: #b32d2e; }
.esb-note { font-size: .8em; color: var(--esb-muted); margin-top: 1rem; }

/* Succès */
.esb-success { text-align: center; padding: 2rem 1rem; }
.esb-check {
	width: 64px; height: 64px; line-height: 64px;
	margin: 0 auto 1rem;
	border-radius: 50%;
	background: var(--esb-accent);
	color: #fff;
	font-size: 2rem;
}

/* Bannières de retour de paiement */
.esb-banner {
	padding: 1rem 1.25rem;
	border-radius: var(--esb-radius);
	margin-bottom: 1.5rem;
	border: 1px solid var(--esb-border);
}
.esb-banner-ok { border-color: #1a7f37; background: rgba(26, 127, 55, .08); }
.esb-banner-ko { border-color: #b26a00; background: rgba(178, 106, 0, .08); }

/* Responsive */
@media (max-width: 540px) {
	.esb-fields { grid-template-columns: 1fr; }
	.esb-steps li { font-size: .72em; }
	.esb-steps li::before { display: none; }
}

/* Adaptation thème sombre si le thème le signale */
@media (prefers-color-scheme: dark) {
	.esb-widget {
		--esb-border: rgba(255, 255, 255, .18);
		--esb-muted: rgba(255, 255, 255, .6);
	}
}

/* --- Panier multi-produits --------------------------------------------- */
.esb-cart {
	border: 1px solid var(--esb-border, #e6e6ef);
	border-radius: 12px;
	padding: 14px 16px;
	margin-bottom: 18px;
	background: rgba(108, 92, 231, .04);
}
.esb-cart-head {
	font-weight: 700;
	margin-bottom: 10px;
}
.esb-cart-line {
	display: flex;
	align-items: center;
	gap: 10px;
	padding: 8px 0;
	border-bottom: 1px solid var(--esb-border, #eee);
}
.esb-cart-line:last-of-type { border-bottom: 0; }
.esb-cart-line-main { flex: 1; display: flex; flex-direction: column; }
.esb-cart-line-when { font-size: .85em; color: var(--esb-muted, #777); }
.esb-cart-line-price { font-weight: 600; white-space: nowrap; }
.esb-cart-line-rm {
	border: 0;
	background: transparent;
	color: #b32d2e;
	cursor: pointer;
	font-size: 1em;
	line-height: 1;
	padding: 4px 6px;
	border-radius: 6px;
}
.esb-cart-line-rm:hover { background: rgba(179, 45, 46, .1); }
.esb-cart-foot {
	display: flex;
	justify-content: space-between;
	padding: 10px 0 4px;
	font-size: 1.05em;
}
.esb-cart-checkout { width: 100%; margin-top: 8px; }
.esb-cart-actions { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.esb-cart-actions .esb-btn { flex: 1; min-width: 160px; }

/* --- Espace client « Mes réservations » ----------------------------------- */
.esb-account .esb-note { color: var(--esb-muted); margin: 0 0 1rem; }
.esb-acc-list { display: flex; flex-direction: column; gap: 1rem; }
.esb-acc-card {
	border: 1px solid var(--esb-border);
	border-radius: var(--esb-radius);
	padding: 1rem 1.1rem;
	background: rgba(0, 0, 0, .015);
}
.esb-acc-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; }
.esb-acc-cmd { display: inline-block; background: rgba(108, 92, 231, .1); color: var(--esb-accent); border-radius: 999px; padding: .05em .55em; font-size: .78em; font-weight: 600; margin-right: .4rem; }
.esb-acc-when { color: var(--esb-muted); font-size: .9em; margin-top: .15rem; }
.esb-acc-pill { display: inline-block; padding: .1em .6em; border-radius: 999px; border: 1px solid; font-size: .8em; white-space: nowrap; }
.esb-acc-money { display: flex; flex-wrap: wrap; gap: .25rem 1.2rem; margin: .75rem 0; font-size: .92em; }
.esb-acc-docs { display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.esb-acc-doc {
	display: inline-flex; align-items: center; gap: .3rem;
	font-size: .88em; text-decoration: none;
	border: 1px solid var(--esb-border); border-radius: 8px;
	padding: .35rem .7rem; color: inherit;
}
.esb-acc-doc:hover { border-color: var(--esb-accent); }
.esb-acc-pay { padding: .4rem .9rem; font-size: .9em; }
.esb-msg.is-ok { color: #1a7f37; }

/* ---------- Avis clients ---------------------------------------------- */
.esb-stars { display: inline-flex; line-height: 1; color: #d9d9e0; white-space: nowrap; }
.esb-stars .esb-star.is-on { color: #f5a623; }
.esb-reviews { margin-top: 2.5rem; }
.esb-reviews-head { margin-bottom: 1.25rem; }
.esb-reviews-summary { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; font-size: 1.05em; }
.esb-reviews-count { color: #777; }
.esb-reviews-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; }
@media ( min-width: 640px ) { .esb-reviews-list { grid-template-columns: 1fr 1fr; } }
.esb-review-card {
	border: 1px solid var(--esb-border, #e0e0e0); border-radius: 12px;
	padding: 1rem 1.15rem; background: #fff;
}
.esb-review-top { display: flex; align-items: center; justify-content: space-between; gap: .5rem; }
.esb-review-author { font-weight: 600; }
.esb-review-badge {
	font-size: .72em; color: #1a7f37; background: rgba(26,127,55,.08);
	border-radius: 999px; padding: .12rem .5rem; white-space: nowrap;
}
.esb-review-meta { display: flex; align-items: center; gap: .5rem; margin: .35rem 0 .5rem; }
.esb-review-date { color: #999; font-size: .82em; text-transform: capitalize; }
.esb-review-title { font-weight: 600; margin-bottom: .25rem; }
.esb-review-comment { color: #444; line-height: 1.55; white-space: pre-line; }
.esb-review-reply {
	margin-top: .7rem; padding: .55rem .75rem; border-radius: 8px;
	background: rgba(108,92,231,.06); font-size: .9em; color: #444;
	border-left: 3px solid var(--esb-accent, #6C5CE7);
}

/* Formulaire de dépôt d'avis */
.esb-star-input { display: inline-flex; gap: .15rem; }
.esb-star-btn {
	background: none; border: none; cursor: pointer; padding: 0 .05rem;
	font-size: 34px; line-height: 1; color: #d9d9e0; transition: color .1s;
}
.esb-star-btn.is-on { color: #f5a623; }
.esb-field-label { display: block; font-weight: 600; margin-bottom: .3rem; }

/* ---------- Packs / kits ---------------------------------------------- */
.esb-pack-old { margin-left: .5rem; opacity: .6; font-weight: 400; font-size: .85em; }
.esb-pack-includes { margin: .5rem 0 .25rem; padding: .7rem .9rem; border-radius: 10px;
	background: rgba(108,92,231,.06); border: 1px solid var(--esb-border, #e0e0e0); }
.esb-pack-includes .esb-pack-title { font-weight: 600; font-size: .9em; margin-bottom: .35rem; }
.esb-pack-includes ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .2rem; }
.esb-pack-includes li { font-size: .9em; padding-left: 1.1rem; position: relative; }
.esb-pack-includes li::before { content: "◆"; position: absolute; left: 0;
	color: var(--esb-accent, #6C5CE7); font-size: .7em; top: .25em; }

/* ---------- Formules de durée (tarifs week-end / demi-journée) -------- */
.esb-formulas { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: .6rem; margin-bottom: 1rem; }
.esb-formula {
	display: flex; flex-direction: column; gap: .2rem; align-items: flex-start;
	border: 1.5px solid var(--esb-border, #ddd); border-radius: 12px;
	padding: .7rem .85rem; background: transparent; cursor: pointer; font: inherit; text-align: left;
	transition: border-color .12s, box-shadow .12s;
}
.esb-formula:hover { border-color: var(--esb-accent, #6C5CE7); }
.esb-formula.is-on { border-color: var(--esb-accent, #6C5CE7); box-shadow: 0 0 0 3px rgba(108,92,231,.14); }
.esb-formula-name { font-weight: 600; font-size: .92em; }
.esb-formula-price { font-weight: 800; color: var(--esb-accent, #6C5CE7); }

/* ---------- Signature manuscrite du contrat -------------------------- */
.esb-sign { margin-top: .8rem; }
.esb-sign-label { font-size: .85em; color: #555; margin-bottom: .3rem; }
.esb-sign-pad {
	border: 1.5px dashed var(--esb-border, #bbb); border-radius: 10px;
	background: #fff; width: 100%; max-width: 360px; height: 130px;
	touch-action: none; display: block; cursor: crosshair;
}
.esb-sign-clear {
	margin-top: .4rem; font-size: .82em; background: none; border: none;
	color: var(--esb-accent, #6C5CE7); cursor: pointer; text-decoration: underline; padding: 0;
}
