/* TimeLeas – Filtre Produits AJAX */
.wafe {
	--wafe-accent: #8B7355;
	--wafe-ink: #1A1A1A;
	--wafe-sec: #666;
	--wafe-border: #F0F0F0;
	--wafe-bg: #FAFAF8;
	--wafe-radius: 4px;
	color: var(--wafe-ink);
	box-sizing: border-box;
}
.wafe *, .wafe *::before, .wafe *::after { box-sizing: border-box; }

/* Layout : panneau + résultats */
.wafe-layout { display: grid; grid-template-columns: 280px 1fr; gap: 32px; align-items: start; }
@media (max-width: 1024px) { .wafe-layout { grid-template-columns: 240px 1fr; gap: 22px; } }

/* Panneau filtres */
.wafe-panel { border: 1px solid var(--wafe-border); border-radius: var(--wafe-radius); background: #fff; }
.wafe-panel-header { display: none; }
.wafe-form { padding: 4px 0; }

.wafe-field { padding: 14px 16px; border-bottom: 1px solid var(--wafe-border); }
.wafe-search {
	width: 100%; border: 1px solid var(--wafe-border); border-radius: var(--wafe-radius);
	padding: 11px 14px; font: inherit; font-size: 14px; color: var(--wafe-ink); outline: none;
}
.wafe-search:focus { border-color: var(--wafe-accent); }

/* Sections accordéon */
.wafe-section { border-bottom: 1px solid var(--wafe-border); }
.wafe-section-header {
	width: 100%; display: flex; align-items: center; justify-content: space-between;
	padding: 14px 16px; background: none; border: 0; cursor: pointer; font: inherit;
	font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--wafe-ink);
}
.wafe-section-label { font-weight: 600; }
.wafe-chevron { transition: transform .2s; color: var(--wafe-sec); }
.wafe-section.is-open .wafe-chevron { transform: rotate(180deg); }
.wafe-section-body { display: none; padding: 0 16px 14px; }
.wafe-section.is-open .wafe-section-body { display: block; }

/* Options checkbox */
.wafe-options { list-style: none; margin: 0; padding: 0; max-height: 260px; overflow-y: auto; }
.wafe-option { display: flex; align-items: center; gap: 9px; padding: 6px 0; cursor: pointer; font-size: 14px; }
.wafe-option input { accent-color: var(--wafe-accent); width: 16px; height: 16px; flex: 0 0 16px; }
.wafe-option-label { flex: 1; color: var(--wafe-ink); }
.wafe-option-count { font-size: 12px; color: var(--wafe-sec); }
.wafe-empty { color: var(--wafe-sec); font-size: 13px; margin: 4px 0; }
.wafe-toggle { display: flex; align-items: center; gap: 9px; font-size: 14px; cursor: pointer; padding: 4px 0; }
.wafe-toggle input { accent-color: var(--wafe-accent); }

/* Prix + budget */
.wafe-price-inputs, .wafe-budget-field { display: flex; align-items: center; gap: 8px; }
.wafe-price-field, .wafe-budget-field {
	display: flex; align-items: center; gap: 6px; flex: 1;
	border: 1px solid var(--wafe-border); border-radius: var(--wafe-radius); padding: 7px 10px;
}
.wafe-price-symbol { font-size: 11px; color: var(--wafe-accent); font-weight: 600; }
.wafe-budget-suffix { font-size: 12px; color: var(--wafe-sec); }
.wafe-price-field input, .wafe-budget-field input { width: 100%; border: 0; outline: none; font: inherit; font-size: 14px; background: none; }
.wafe-price-sep { color: var(--wafe-sec); }
.wafe-budget-help { font-size: 11px; color: var(--wafe-sec); margin: 8px 0 0; }

.wafe-price-slider { position: relative; height: 30px; margin-top: 14px; }
.wafe-price-slider input[type=range] { position: absolute; width: 100%; top: 8px; margin: 0; pointer-events: none; -webkit-appearance: none; background: none; }
.wafe-price-slider input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; pointer-events: auto; width: 16px; height: 16px; border-radius: 50%; background: var(--wafe-accent); border: 2px solid #fff; box-shadow: 0 1px 4px rgba(0,0,0,.25); cursor: pointer; }
.wafe-price-slider input[type=range]::-moz-range-thumb { pointer-events: auto; width: 16px; height: 16px; border-radius: 50%; background: var(--wafe-accent); border: 2px solid #fff; cursor: pointer; }
.wafe-price-track { position: absolute; top: 14px; left: 0; right: 0; height: 3px; background: var(--wafe-border); border-radius: 2px; }
.wafe-price-fill { position: absolute; top: 14px; height: 3px; background: var(--wafe-accent); border-radius: 2px; }

/* Chips actifs */
.wafe-active-chips { display: flex; flex-wrap: wrap; gap: 6px; padding: 0 16px; }
.wafe-active-chips:not(:empty) { padding: 12px 16px; border-bottom: 1px solid var(--wafe-border); }
.wafe-chip {
	display: inline-flex; align-items: center; gap: 5px; font-size: 12px; padding: 4px 9px;
	border: 1px solid var(--wafe-accent); color: var(--wafe-accent); background: #fff;
	border-radius: 20px; cursor: pointer;
}
.wafe-chip:hover { background: var(--wafe-accent); color: #fff; }

/* Footer */
.wafe-panel-footer { display: flex; gap: 8px; padding: 14px 16px; border-top: 1px solid var(--wafe-border); }
.wafe-btn { flex: 1; padding: 11px 14px; border-radius: var(--wafe-radius); border: 1px solid var(--wafe-accent); cursor: pointer; font: inherit; font-size: 13px; letter-spacing: .03em; }
.wafe-btn-ghost { background: #fff; color: var(--wafe-accent); flex: 0 0 auto; }
.wafe-btn-primary { background: var(--wafe-ink); color: #fff; border-color: var(--wafe-ink); }
.wafe-btn-primary:hover { background: var(--wafe-accent); border-color: var(--wafe-accent); }

/* Barre résultats */
.wafe-results-bar { margin-bottom: 16px; font-size: 13px; color: var(--wafe-sec); min-height: 18px; }

/* Grille de cartes */
.wafe-grid { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(var(--wafe-cols, 4), 1fr); gap: 22px; }
@media (max-width: 1024px) { .wafe-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 700px) { .wafe-grid { grid-template-columns: repeat(2, 1fr); gap: 14px; } }
.wafe-card-link { display: flex; flex-direction: column; text-decoration: none; color: inherit; }
.wafe-card-media { display: block; aspect-ratio: 4/5; background: var(--wafe-bg) center/contain no-repeat; border: 1px solid var(--wafe-border); border-radius: var(--wafe-radius); transition: transform .25s; }
.wafe-card-link:hover .wafe-card-media { transform: translateY(-3px); }
.wafe-card-body { padding: 12px 2px 0; display: flex; flex-direction: column; gap: 3px; }
.wafe-card-label { font-size: 10px; letter-spacing: .09em; text-transform: uppercase; color: var(--wafe-accent); }
.wafe-card-name { font-family: "Playfair Display", Georgia, serif; font-size: 15px; line-height: 1.25; color: var(--wafe-ink); }
.wafe-card-price { font-size: 14px; margin-top: 4px; }
.wafe-card-price b { color: var(--wafe-accent); font-weight: 700; }
.wafe-card-total { font-size: 12px; color: var(--wafe-sec); }
.wafe-card-oos { font-size: 10px; text-transform: uppercase; letter-spacing: .05em; color: #b00; }

.wafe-no-results { padding: 40px 0; text-align: center; color: var(--wafe-sec); }
.wafe-results.wafe-loading, .wafe-loading { opacity: .45; transition: opacity .2s; pointer-events: none; }

/* Pagination */
.wafe-pagination { margin-top: 30px; }
.wafe-pagination ul { list-style: none; display: flex; gap: 6px; justify-content: center; padding: 0; flex-wrap: wrap; }
.wafe-pagination .page-numbers { display: inline-flex; min-width: 38px; height: 38px; align-items: center; justify-content: center; border: 1px solid var(--wafe-border); border-radius: var(--wafe-radius); text-decoration: none; color: var(--wafe-ink); font-size: 14px; }
.wafe-pagination .page-numbers.current { background: var(--wafe-ink); color: #fff; border-color: var(--wafe-ink); }
.wafe-pagination a.page-numbers:hover { border-color: var(--wafe-accent); color: var(--wafe-accent); }

/* Mobile drawer */
.wafe-mobile-toggle { display: none; align-items: center; gap: 8px; padding: 11px 16px; border: 1px solid var(--wafe-ink); background: #fff; border-radius: var(--wafe-radius); cursor: pointer; font: inherit; font-size: 14px; margin-bottom: 18px; }
.wafe-active-count { background: var(--wafe-accent); color: #fff; border-radius: 50%; min-width: 20px; height: 20px; display: inline-flex; align-items: center; justify-content: center; font-size: 11px; padding: 0 5px; }
.wafe-backdrop { display: none; }

/* Mode drawer forcé (grid-control) : bouton "Filtres" + panneau overlay, tous écrans */
.wafe-as-drawer .wafe-layout { display: block; }
.wafe-as-drawer .wafe-mobile-toggle { display: inline-flex; background: var(--wafe-ink); color: #fff; border-color: var(--wafe-ink); }
.wafe-as-drawer .wafe-panel { position: fixed; top: 0; left: 0; bottom: 0; width: 90%; max-width: 380px; z-index: 100000; overflow-y: auto; transform: translateX(-100%); transition: transform .25s; border-radius: 0; box-shadow: 0 0 40px rgba(0,0,0,.18); }
.wafe-as-drawer.is-open .wafe-panel { transform: none; }
.wafe-as-drawer .wafe-panel-header { display: flex; align-items: center; justify-content: space-between; padding: 16px; border-bottom: 1px solid var(--wafe-border); }
.wafe-as-drawer .wafe-panel-title { margin: 0; font-size: 16px; }
.wafe-as-drawer .wafe-panel-close { background: none; border: 0; cursor: pointer; color: var(--wafe-ink); }
.wafe-as-drawer .wafe-panel-footer { position: sticky; bottom: 0; background: #fff; }
.wafe-as-drawer.is-open .wafe-backdrop { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 99999; }

@media (max-width: 860px) {
	.wafe-layout { grid-template-columns: 1fr; }
	.wafe-mobile-toggle { display: inline-flex; }
	.wafe-panel { position: fixed; top: 0; left: 0; bottom: 0; width: 88%; max-width: 360px; z-index: 100000; overflow-y: auto; transform: translateX(-100%); transition: transform .25s; border-radius: 0; }
	.wafe.is-open .wafe-panel { transform: none; }
	.wafe-panel-header { display: flex; align-items: center; justify-content: space-between; padding: 16px; border-bottom: 1px solid var(--wafe-border); }
	.wafe-panel-title { margin: 0; font-size: 16px; }
	.wafe-panel-close { background: none; border: 0; cursor: pointer; color: var(--wafe-ink); }
	.wafe-panel-footer { position: sticky; bottom: 0; background: #fff; }
	.wafe.is-open .wafe-backdrop { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.4); z-index: 99999; }
}

/* ===== Contraste robuste : empêcher le thème de masquer le texte ===== */
.wafe, .wafe .wafe-panel { color: #1A1A1A; }
.wafe .wafe-search,
.wafe .wafe-field-sort select,
.wafe .wafe-price-field input,
.wafe .wafe-budget-field input {
	color: #1A1A1A !important; -webkit-text-fill-color: #1A1A1A;
	background-color: #fff !important; opacity: 1;
}
.wafe .wafe-field-sort select option { color: #1A1A1A; background: #fff; }
.wafe .wafe-search::placeholder,
.wafe .wafe-price-field input::placeholder,
.wafe .wafe-budget-field input::placeholder { color: #9a9a9a !important; -webkit-text-fill-color: #9a9a9a; opacity: 1; }
.wafe .wafe-option-label,
.wafe .wafe-section-label,
.wafe .wafe-panel-title,
.wafe .wafe-toggle span,
.wafe .wafe-field-sort label,
.wafe .wafe-budget-suffix,
.wafe .wafe-price-sep,
.wafe .wafe-mobile-toggle span { color: #1A1A1A !important; }
.wafe .wafe-mobile-toggle { color: #fff !important; }
.wafe .wafe-mobile-toggle span { color: #fff !important; }
.wafe .wafe-option-count { color: #8B7355 !important; }
.wafe .wafe-price-symbol { color: #8B7355 !important; }
.wafe .wafe-budget-help { color: #666 !important; }
.wafe .wafe-btn-primary, .wafe .wafe-btn-primary * { color: #fff !important; }
.wafe .wafe-btn-ghost { color: #8B7355 !important; }
.wafe .wafe-chip { color: #8B7355; }
.wafe .wafe-chip:hover, .wafe .wafe-chip:hover * { color: #fff !important; }
.wafe .wafe-card-name { color: #1A1A1A !important; }
.wafe .wafe-card-label, .wafe .wafe-card-price b { color: #8B7355 !important; }

/* ===== Tasti sezione : neutralise le style <button> du thème (jamais blanc/blanc ni magenta) ===== */
.wafe .wafe-section-header,
.wafe .wafe-section-header:hover,
.wafe .wafe-section-header:focus,
.wafe .wafe-section-header:active,
.wafe .wafe-section-header:focus-visible {
	background: transparent !important;
	color: #1A1A1A !important;
	box-shadow: none !important;
	outline: none !important;
	border-width: 0 !important;
	-webkit-text-fill-color: #1A1A1A;
}
.wafe .wafe-section-header * { color: inherit !important; }
.wafe .wafe-section-header .wafe-section-label { color: #1A1A1A !important; -webkit-text-fill-color: #1A1A1A; }
.wafe .wafe-section-header .wafe-chevron { color: #8B7355 !important; }
/* Bouton "Réinitialiser" (ghost) et croix : pas de fond hérité du thème */
.wafe .wafe-btn-ghost:hover,
.wafe .wafe-btn-ghost:focus { background: #8B7355 !important; color: #fff !important; }
.wafe .wafe-panel-close,
.wafe .wafe-panel-close:hover,
.wafe .wafe-panel-close:focus { background: transparent !important; color: #1A1A1A !important; box-shadow: none !important; }
