/*
 Theme Name:   Bricks Child Theme
 Theme URI:    https://bricksbuilder.io/
 Description:  Thème enfant de booking.explore.brussels — habillage accordé à explore.brussels.
 Author:       Butterfly Pixel
 Template:     bricks
 Version:      1.2
 Text Domain:  bricks
*/

/* ═══════════════════════════════════════════════════════════════════════════════════════
   Le langage visuel est celui d'explore.brussels : DM Sans pour le texte, « halyard-display »
   pour les titres (police Adobe, servie seulement si le domaine est ajouté au kit — à défaut,
   DM Sans), or #866D4B, boutons à angles droits, pied noir.
   Les structures (en-tête, pied, boutique, fiche) sont des gabarits Bricks ; cette feuille
   ne porte que ce qu'un gabarit ne peut pas régler : les listes et tableaux produits par
   WooCommerce et par l'extension de réservation.
   ═══════════════════════════════════════════════════════════════════════════════════════ */

:root {
	--bx-or: #866d4b;
	--bx-or-fonce: #6e583b;
	--bx-encre: #252324;
	--bx-texte: #585b5d;
	--bx-fond: #f8f8ff;
	--bx-filet: #e7e2d9;
	--bx-titres: "halyard-display", "DM Sans", sans-serif;
	--bx-large: 1290px;
}

body { background: var(--bx-fond); }
h1, h2, h3, h4, h5, h6 { font-family: var(--bx-titres); font-weight: 500; color: var(--bx-encre); }
#brx-content a:not([class]) { color: var(--bx-or); }
#brx-content a:not([class]):hover { color: var(--bx-or-fonce); }
:focus-visible { outline: 2px solid var(--bx-or); outline-offset: 2px; }

/* ── Boutons : ceux de WooCommerce et de l'extension prennent la forme de ceux d'explore ── */
.woocommerce a.button, .woocommerce button.button, .woocommerce input.button, .woocommerce #respond input#submit,
.woocommerce a.button.alt, .woocommerce button.button.alt,
.beb-reserve-btn, .beb-back-btn {
	border: 1px solid var(--bx-or); border-radius: 0; background: var(--bx-or); color: #fff;
	font-family: inherit; font-size: 15px; font-weight: 700; line-height: 1.2; letter-spacing: .02em;
	padding: 10px 20px; box-shadow: none; text-decoration: none; transition: background .2s ease, border-color .2s ease, color .2s ease;
}
.woocommerce a.button:hover, .woocommerce button.button:hover, .woocommerce input.button:hover,
.woocommerce a.button.alt:hover, .woocommerce button.button.alt:hover,
.beb-reserve-btn:hover {
	background: var(--bx-or-fonce); border-color: var(--bx-or-fonce); color: #fff;
}
/* Bouton de retour : contour, comme « ← Toutes les visites » sur explore. */
.beb-back-btn, .bx-bouton-contour {
	background: transparent; color: var(--bx-or); font-size: 12px; letter-spacing: .08em; text-transform: uppercase; padding: 10px 16px;
}
.beb-back-btn:hover, .bx-bouton-contour:hover { background: var(--bx-or); color: #fff; }

/* ── Liste des visites : une case par visite, photo en fond, titre et bouton par-dessus ── */
.brxe-woocommerce-products ul.products,
.woocommerce ul.products {
	display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px;
	margin: 0; padding: 0; list-style: none;
}
.woocommerce ul.products::before, .woocommerce ul.products::after { content: none; }
.woocommerce ul.products li.product {
	position: relative; float: none; width: auto; margin: 0; padding: 0;
	aspect-ratio: 1.13; overflow: hidden; background: #000;
}
.woocommerce ul.products li.product .woocommerce-loop-product__link {
	position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
	padding: 20px 18px 78px; text-align: center; color: #fff; text-decoration: none;
}
.woocommerce ul.products li.product .woocommerce-loop-product__link > img:not(.beb-sold-out) {
	position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; object-fit: cover; z-index: 0;
}
.woocommerce ul.products li.product .woocommerce-loop-product__link::after {
	content: ""; position: absolute; inset: 0; z-index: 1; background: rgb(0 0 0 / .42); transition: background .25s ease;
}
.woocommerce ul.products li.product:hover .woocommerce-loop-product__link::after { background: rgb(0 0 0 / .27); }
.woocommerce ul.products li.product .woocommerce-loop-product__title {
	position: relative; z-index: 2; margin: 0; padding: 0;
	font-family: var(--bx-titres); font-size: 22px; font-weight: 600; line-height: 1.2; color: #fff; text-wrap: balance;
}
/* Le prix affiché serait celui du catalogue, pas le prix unique calculé au panier : on ne le montre pas. */
.woocommerce ul.products li.product .price { display: none; }
.woocommerce ul.products li.product a.button {
	position: absolute; z-index: 3; left: 50%; bottom: 28px; transform: translateX(-50%);
	margin: 0; white-space: nowrap;
}
.woocommerce ul.products li.product:hover a.button { background: var(--bx-or-fonce); border-color: var(--bx-or-fonce); }

/* Visite complète : pas de bouton. L'emblème « sold out » (image 600 × 400, avec ses marges)
   occupe les deux tiers hauts de la case et le titre passe dessous.
   L'image est écrite dans le titre : celui-ci ne doit pas être positionné, sans quoi elle se
   placerait par rapport à lui et non par rapport à la case. Élément d'un conteneur flex, le
   titre garde son rang au-dessus du voile sans avoir besoin de l'être. */
.woocommerce ul.products li.product.beb-prod-sold-out a.button { display: none; }
.woocommerce ul.products li.product.beb-prod-sold-out .woocommerce-loop-product__link { justify-content: flex-end; padding: 0 16px 18px; }
.woocommerce ul.products li.product.beb-prod-sold-out .woocommerce-loop-product__link::after { background: rgb(0 0 0 / .55); }
.woocommerce ul.products li.product.beb-prod-sold-out .woocommerce-loop-product__title { position: static; font-size: 18px; }
.woocommerce ul.products li.product img.beb-sold-out {
	position: absolute !important; z-index: 2 !important; top: 3% !important; left: 50% !important; right: auto !important; bottom: auto !important;
	transform: translateX(-50%) !important; width: auto !important; max-width: 92% !important; height: auto !important; max-height: 68% !important; margin: 0 !important;
}

@media (max-width: 1100px) { .brxe-woocommerce-products ul.products, .woocommerce ul.products { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 767px)  { .brxe-woocommerce-products ul.products, .woocommerce ul.products { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
	.woocommerce ul.products li.product .woocommerce-loop-product__title { font-size: 18px; } }
@media (max-width: 478px)  { .brxe-woocommerce-products ul.products, .woocommerce ul.products { grid-template-columns: minmax(0, 1fr); } }
@media (prefers-reduced-motion: reduce) { .woocommerce ul.products li.product .woocommerce-loop-product__link::after { transition: none; } }

/* ── Fil d'Ariane ── */
.woocommerce-breadcrumb, .brxe-woocommerce-breadcrumbs {
	font-family: var(--bx-titres); font-size: 13px; line-height: 1.4; color: var(--bx-encre);
}
.woocommerce-breadcrumb a, .brxe-woocommerce-breadcrumbs a { color: var(--bx-encre); text-decoration: none; }
.woocommerce-breadcrumb a:hover, .brxe-woocommerce-breadcrumbs a:hover { color: var(--bx-or); }
.woocommerce-breadcrumb span { margin: 0 6px; }
.brxe-woocommerce-breadcrumbs .separator::before { content: "/"; margin: 0 6px; }

/* ── Fiche d'une visite : tableau des créneaux, à la manière du tableau d'horaires d'explore ── */
.beb-table-wrap { width: 100%; }
@media (max-width: 600px) { .beb-table-wrap { overflow-x: auto; } }
.beb-table-wrap .beb-variants-table {
	width: 100%; margin: 0; border-collapse: collapse; border: 1px solid var(--bx-or); background: #fff; font-size: 15px;
}
.beb-table-wrap .beb-variants-table th {
	padding: 12px 14px; border: 0; background: var(--bx-or); color: #fff;
	font-family: var(--bx-titres); font-size: 15px; font-weight: 600; text-align: left;
}
.beb-table-wrap .beb-variants-table td { padding: 10px 14px; border: 0; border-bottom: 1px solid #ece8e2; color: #333; vertical-align: middle; }
.beb-table-wrap .beb-variants-table tbody tr:nth-child(even) td { background: #f6f3ef; }
.beb-table-wrap .beb-variants-table tbody tr:last-child td { border-bottom: 0; }
.beb-reserve-btn { padding: 7px 16px; font-size: 14px; cursor: pointer; }
.beb-reserve-btn.beb-btn-disabled { border-color: #e0e0e0; }

/* Galerie et lien vers la carte. */
.brxe-product-gallery .woocommerce-product-gallery { width: 100%; float: none; margin: 0; }
.brxe-product-gallery img { border-radius: 0; }

/* ── Messages de WooCommerce ── */
body .woocommerce-message, body .woocommerce-info, body .woocommerce-error { border-radius: 0; }
body .woocommerce-message, body .woocommerce-info { border-top-color: var(--bx-or); background: #fff; }
body .woocommerce-info a, body .woocommerce-message a { color: var(--bx-encre); }
.woocommerce-message::before, .woocommerce-info::before { color: var(--bx-or); }

/* ── Espace client : mêmes tableaux et même menu que sur explore ── */
.woocommerce-account .woocommerce-MyAccount-navigation ul { margin: 0; padding: 0; list-style: none; border: 1px solid #e6e2dc; background: #fff; }
.woocommerce-account .woocommerce-MyAccount-navigation li { margin: 0; border-bottom: 1px solid #ece8e2; }
.woocommerce-account .woocommerce-MyAccount-navigation li:last-child { border-bottom: 0; }
.woocommerce-account .woocommerce-MyAccount-navigation li a { display: block; padding: 12px 16px; color: #333; text-decoration: none; }
.woocommerce-account .woocommerce-MyAccount-navigation li.is-active a,
.woocommerce-account .woocommerce-MyAccount-navigation li a:hover { background: #f6f3ef; color: var(--bx-or); font-weight: 700; }
.woocommerce-account table.shop_table { width: 100%; border-collapse: collapse; border: 1px solid #e6e2dc; background: #fff; font-size: 15px; }
.woocommerce-account table.shop_table thead th {
	padding: 14px 16px; background: #f6f3ef; border: 0; border-bottom: 2px solid var(--bx-or);
	color: #111; font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; text-align: left;
}
.woocommerce-account table.shop_table tbody td, .woocommerce-account table.shop_table tbody th {
	padding: 14px 16px; background: #fff; border: 0; border-bottom: 1px solid #ece8e2; color: #333; vertical-align: middle; text-align: left; font-weight: 400;
}
.woocommerce-account table.shop_table tbody tr:last-child td { border-bottom: 0; }

/* ── Champs de formulaire ── */
.woocommerce form .form-row input.input-text, .woocommerce form .form-row textarea, .woocommerce form .form-row select {
	border: 1px solid #ccc; border-radius: 0; background: #fff; padding: 11px 12px; font: inherit; font-size: 15px;
}
.woocommerce form .form-row input.input-text:focus, .woocommerce form .form-row textarea:focus { border-color: var(--bx-or); outline: 2px solid rgb(134 109 75 / .25); outline-offset: 0; }

/* ── En-tête collant ──
   Celui de Bricks est en position fixe et recouvre le haut de la page (il est pensé pour un
   bandeau transparent). Ici, il garde sa place dans la page et reste accroché en haut. */
#brx-header.brx-sticky { position: sticky; }
/* Outils de l'en-tête : le compteur de visites (panier) a la hauteur et la forme du bouton
   « Site de l'ANTE » — il gardait la pastille de l'ancien thème, 25 px contre 42 (demande
   d'Olivier, 16/11/2026). La hauteur est posée sur les deux pour qu'ils ne divergent plus. */
#brx-header .brxe-button, #brx-header .beb-cart-counter { height: 42px; box-sizing: border-box; }
#brx-header .beb-cart-counter { padding: 0 16px; margin-left: 4px; border-radius: 0; gap: 7px; }

/* ── Le cœur de la mention « butterfly pixel » ──
   Celui d'explore.brussels : même tracé (SVG 24 × 24), 18 px, or, battement « bp-heartbeat ».
   Il est dessiné en masque pour ne pas avoir à écrire de SVG dans le texte du pied. */
@keyframes bp-heartbeat { 0% { transform: scale(1); } 10% { transform: scale(1.28); } 20% { transform: scale(1); } 30% { transform: scale(1.22); } 42% { transform: scale(1); } 100% { transform: scale(1); } }
.bx-coeur {
	display: inline-block; width: 18px; height: 18px; vertical-align: text-bottom; background: #866d4b;
	-webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 21.35l-1.45-1.32C5.4 15.36 2 12.28 2 8.5 2 5.42 4.42 3 7.5 3c1.74 0 3.41 0.81 4.5 2.09C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.42 22 8.5c0 3.78-3.4 6.86-8.55 11.54L12 21.35z'/%3E%3C/svg%3E") center / contain no-repeat;
	mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 21.35l-1.45-1.32C5.4 15.36 2 12.28 2 8.5 2 5.42 4.42 3 7.5 3c1.74 0 3.41 0.81 4.5 2.09C13.09 3.81 14.76 3 16.5 3 19.58 3 22 5.42 22 8.5c0 3.78-3.4 6.86-8.55 11.54L12 21.35z'/%3E%3C/svg%3E") center / contain no-repeat;
	animation: bp-heartbeat 1.5s ease-in-out infinite;
}
@media (prefers-reduced-motion: reduce) { .bx-coeur { animation: none; } }

/* Sur les pages de réservation, le bouton flottant du panier recouvrait la dernière ligne du
   pied (la mention, centrée) : on lui laisse sa place. */
body:has(#beb-floating-btn) #brx-footer > .brxe-section,
body:has(.beb-cart-counter-flottant) #brx-footer > .brxe-section { padding-bottom: 96px; }

/* ── Contenu des pages : titres, listes, liens ── */
#brx-content .brxe-heading { margin: 0; }
#brx-content h2.brxe-heading { font-size: 32px; line-height: 1.2; }
#brx-content h3.brxe-heading { font-size: 24px; line-height: 1.25; }
#brx-content .brxe-text { color: var(--bx-encre); }
#brx-content .brxe-text :is(h2, h3, h4, h5, h6) { margin: 1.4em 0 .5em; font-size: 22px; line-height: 1.25; }
#brx-content .brxe-text > :first-child { margin-top: 0; }
#brx-content .brxe-text p { margin: 0 0 1em; }
#brx-content .brxe-text :is(ul, ol) { margin: 0 0 1em; padding-left: 1.3em; }
#brx-content .brxe-text li { margin-bottom: .35em; }
#brx-content .brxe-text a { color: var(--bx-or); }
#brx-content .brxe-text a:hover { color: var(--bx-or-fonce); }
@media (max-width: 767px) { #brx-content h2.brxe-heading { font-size: 26px; } }

/* Liste de contacts (anciennes listes à icônes). */
#brx-content .brxe-text ul.bx-contacts { margin: 0; padding: 0; list-style: none; }
#brx-content .brxe-text ul.bx-contacts li { margin: 0; padding: 9px 0; border-bottom: 1px solid var(--bx-filet); }
#brx-content .brxe-text ul.bx-contacts a { color: var(--bx-encre); text-decoration: none; }
#brx-content .brxe-text ul.bx-contacts a:hover { color: var(--bx-or); }

/* ── Accordéon (questions du mode d'emploi) ── */
.brxe-accordion { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--bx-filet); }
.brxe-accordion .accordion-item { margin: 0; border-bottom: 1px solid var(--bx-filet); }
.brxe-accordion .accordion-title-wrapper { position: relative; padding: 20px 44px 20px 0; cursor: pointer; }
.brxe-accordion .accordion-title .title { margin: 0; font-family: var(--bx-titres); font-size: 20px; font-weight: 500; line-height: 1.3; color: var(--bx-encre); }
.brxe-accordion .accordion-title-wrapper::after {
	content: "+"; position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
	font-family: var(--bx-titres); font-size: 26px; line-height: 1; color: var(--bx-or);
}
.brxe-accordion .accordion-item.brx-open .accordion-title-wrapper::after { content: "–"; }
.brxe-accordion .accordion-title-wrapper:hover .title { color: var(--bx-or); }
.brxe-accordion .accordion-content-wrapper { padding: 0 44px 22px 0; color: var(--bx-encre); }
.brxe-accordion .accordion-content-wrapper p { margin: 0 0 1em; }
.brxe-accordion .accordion-content-wrapper :is(ul, ol) { margin: 0 0 1em; padding-left: 1.3em; }
.brxe-accordion .accordion-content-wrapper a { color: var(--bx-or); }

/* Séparateur. */
.brxe-divider .line { border-top-color: var(--bx-filet); }

/* Texte présent pour les lecteurs d'écran et les moteurs, sans place à l'écran. */
.bx-masque-visuel { position: absolute !important; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ═══════════════════════════════════════════════════════════════════════════════════════
   Règles reprises du « CSS additionnel » de Blocksy (personnaliseur), qui ne s'applique plus
   depuis le changement de thème. Seules celles qui habillent WooCommerce et l'extension de
   réservation sont reprises ; l'original est conservé dans
   scripts/dev-booking/blocksy-css-personnalise-origine.css.
   ═══════════════════════════════════════════════════════════════════════════════════════ */

/* Le compte à rebours de Reserved Stock Pro n'a pas lieu d'être une fois la commande passée. */
.woocommerce-order-received .rsp-countdown-wrapper,
.page-id-1831 .rsp-countdown-wrapper, .page-id-12266 .rsp-countdown-wrapper, .page-id-12267 .rsp-countdown-wrapper { display: none !important; }

/* Liens de la commande, des messages et de l'espace client : or, soulignés au survol. */
.woocommerce-checkout #brx-content a:not(.button):not(.brxe-button),
.woocommerce-cart #brx-content a:not(.button):not(.brxe-button),
.woocommerce-MyAccount-content a:not(.button) { color: var(--bx-or); text-decoration: none; }
.woocommerce-checkout #brx-content a:not(.button):not(.brxe-button):hover,
.woocommerce-cart #brx-content a:not(.button):not(.brxe-button):hover,
.woocommerce-MyAccount-content a:not(.button):hover { color: var(--bx-or); text-decoration: underline; }

/* « Commander à nouveau » n'a pas de sens pour une visite datée. */
.order-again { display: none !important; }

/* Bloc de don à la commande. */
#explore_donation_section { border-radius: 0; border-color: #d3ced2 !important; background: #fff; }
#explore_donation_section h3 { color: var(--bx-encre); font-weight: 600; }
#donation_option_field .woocommerce-input-wrapper { width: 100%; }

/* Titres de la commande, et cases des lettres d'information resserrées. */
.woocommerce-checkout #customer_details h3,
.woocommerce-checkout h3#order_review_heading { margin: 20px 0 15px; font-size: 24px; font-weight: 500; color: var(--bx-encre); }
.woocommerce-checkout p.form-row { margin-bottom: 8px; padding-top: 0; }

/* Résumé du panier : bouton « Terminer ma commande » en noir, liens de trajet en blanc. */
.beb-btn-checkout { background-color: #000 !important; color: #fff !important; }
.beb-btn-checkout:hover { background-color: #333 !important; opacity: 1 !important; }
.beb-transit-link, .beb-transit-link:visited, .beb-transit-link:active { color: #fff !important; }
.beb-custom-cart, .beb-custom-cart .beb-btn-custom { border-radius: 0; }

/* Lien de menu réservé au téléphone (« Site de l'ANTE », qui est un bouton sur grand écran). */
#brx-header .bricks-nav-menu > li.bx-mobile-seul { display: none; }
body .woocommerce-info, body .woocommerce-message { color: var(--bx-encre); }
