/* BijouStudio Core - composants (catalogue, comparateur, assistant, sidebar, consentement).
   Les couleurs viennent des jetons du thème enfant, avec des valeurs de repli. */
:root {
	--bjs-c-ink: var(--bjs-plum, #2d2a32);
	--bjs-c-accent: var(--bjs-champagne-dark, #7a5f35);
	--bjs-c-bg: var(--bjs-cream, #fbf8f3);
	--bjs-c-line: var(--bjs-line, #e2dbd2);
	--bjs-c-muted: var(--bjs-muted, #5e555b);
	--bjs-c-card: #ffffff;
	--bjs-radius: 12px;
}

.bjs-btn {
	display: inline-flex; align-items: center; justify-content: center; gap: .4em;
	min-height: 44px; padding: .6em 1.1em; border: 2px solid var(--bjs-c-ink); border-radius: 999px;
	background: var(--bjs-c-ink); color: #fff; font: inherit; font-weight: 700; text-decoration: none; cursor: pointer;
	transition: background-color .15s ease, color .15s ease;
}
.bjs-btn:hover, .bjs-btn:focus-visible { background: #1c1a20; color: #fff; }
.bjs-btn--ghost { background: transparent; color: var(--bjs-c-ink); }
.bjs-btn--ghost:hover, .bjs-btn--ghost:focus-visible { background: var(--bjs-c-ink); color: #fff; }
.bjs-btn--amazon { background: var(--bjs-c-accent); border-color: var(--bjs-c-accent); }
.bjs-btn--amazon:hover, .bjs-btn--amazon:focus-visible { background: #5f4a29; border-color: #5f4a29; }
.bjs-btn[disabled] { opacity: .5; cursor: not-allowed; }
.bjs-btn:focus-visible, .bjs-filters select:focus-visible, .bjs-q input:focus-visible { outline: 3px solid var(--bjs-c-accent); outline-offset: 2px; }

.bjs-aff-label, .bjs-card__verified, .bjs-src, .bjs-side__date, .bjs-compare__date, .bjs-legend { color: var(--bjs-c-muted); font-size: .85rem; }
.bjs-aff-label { display: block; margin-top: .35rem; }
.bjs-disclosure { border-left: 4px solid var(--bjs-c-accent); background: #fff; padding: .8rem 1rem; border-radius: 0 var(--bjs-radius) var(--bjs-radius) 0; font-size: .92rem; }
.bjs-amazon-statement { font-weight: 600; }
.bjs-demo { display: inline-block; margin: 0 0 .4rem; padding: .1rem .55rem; border-radius: 999px; background: #f3e7d3; color: #5f4a29; font-size: .75rem; font-weight: 700; letter-spacing: .02em; text-transform: uppercase; }
.bjs-notice { padding: .8rem 1rem; border-radius: var(--bjs-radius); background: #fff4e5; border: 1px solid #e5c48f; }
.bjs-noffer { color: var(--bjs-c-muted); font-style: italic; }

/* Filtres */
.bjs-filters { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: .8rem; align-items: end; margin: 1rem 0 1.5rem; padding: 1rem; background: #fff; border: 1px solid var(--bjs-c-line); border-radius: var(--bjs-radius); }
.bjs-field { display: flex; flex-direction: column; gap: .25rem; font-size: .9rem; font-weight: 600; }
.bjs-field select, .bjs-field input { min-height: 44px; padding: .4rem .6rem; border: 1px solid #a9a395; border-radius: 8px; background: #fff; font: inherit; font-weight: 400; }
.bjs-count { font-weight: 600; }
.bjs-empty { padding: 1.5rem; background: #fff; border: 1px dashed var(--bjs-c-line); border-radius: var(--bjs-radius); }

/* Grille et cartes */
.bjs-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 1rem; }
.bjs-card { display: flex; flex-direction: column; background: var(--bjs-c-card); border: 1px solid var(--bjs-c-line); border-radius: var(--bjs-radius); overflow: hidden; }
.bjs-card__media { aspect-ratio: 4 / 3; display: grid; place-items: center; background: var(--bjs-c-bg); }
.bjs-card__media img { width: 100%; height: 100%; object-fit: contain; }
.bjs-card__body { padding: 1rem; display: flex; flex-direction: column; gap: .35rem; flex: 1; }
.bjs-card__brand { margin: 0; color: var(--bjs-c-muted); font-size: .8rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.bjs-card__title { margin: 0; font-size: 1.05rem; line-height: 1.3; }
.bjs-card__title a { color: var(--bjs-c-ink); text-decoration: none; }
.bjs-card__title a:hover { text-decoration: underline; }
.bjs-card__facts { margin: .2rem 0; padding-left: 1.1rem; font-size: .9rem; }
.bjs-card__budget { margin: 0; font-size: .9rem; }
.bjs-card__actions { margin-top: auto; display: flex; flex-wrap: wrap; align-items: center; gap: .6rem; }
.bjs-compare-toggle { display: inline-flex; align-items: center; gap: .35rem; min-height: 44px; font-size: .9rem; cursor: pointer; }
.bjs-compare-toggle input { width: 20px; height: 20px; }
.bjs-thumb-placeholder { display: grid; place-items: center; width: 64px; height: 64px; border-radius: 50%; background: var(--bjs-c-ink); color: var(--bjs-c-bg); font-weight: 800; letter-spacing: .04em; }
.bjs-card__media .bjs-thumb-placeholder { width: 96px; height: 96px; font-size: 1.6rem; }
.bjs-compare-bar { position: sticky; bottom: 0; z-index: 5; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .8rem; margin-top: 1rem; padding: .8rem 1rem; background: #fff; border: 1px solid var(--bjs-c-line); border-radius: var(--bjs-radius); box-shadow: 0 -4px 18px rgba(45, 42, 50, .08); }
.bjs-compare-bar p { margin: 0; }

/* Tableaux */
.bjs-table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 1rem 0; border: 1px solid var(--bjs-c-line); border-radius: var(--bjs-radius); background: #fff; }
.bjs-table-scroll:focus-visible { outline: 3px solid var(--bjs-c-accent); }
.bjs-compare { width: 100%; min-width: 560px; border-collapse: collapse; font-size: .93rem; }
.bjs-compare th, .bjs-compare td { padding: .65rem .75rem; border-bottom: 1px solid var(--bjs-c-line); text-align: left; vertical-align: top; }
.bjs-compare thead th { background: var(--bjs-c-bg); position: sticky; top: 0; }
.bjs-compare tbody th { width: 26%; font-weight: 600; }
.bjs-compare__group, .bjs-compare__brand, .bjs-compare__date { display: block; font-weight: 400; }
.bjs-compare__group { color: var(--bjs-c-muted); font-size: .78rem; }
.bjs-compare td.is-unknown, .bjs-compare td.is-unverified { color: var(--bjs-c-muted); font-style: italic; }
.bjs-compare tr.is-diff th { box-shadow: inset 4px 0 0 var(--bjs-c-accent); }
.bjs-compare tr.is-hit td { background: #efe3cf; font-weight: 700; }
.bjs-comparator__bar { display: flex; flex-wrap: wrap; gap: .5rem 1.5rem; align-items: center; justify-content: space-between; }
.bjs-toggle a { display: inline-block; margin-right: .5rem; padding: .35rem .8rem; border: 1px solid var(--bjs-c-ink); border-radius: 999px; color: var(--bjs-c-ink); text-decoration: none; }
.bjs-toggle a[aria-current="true"] { background: var(--bjs-c-ink); color: #fff; }
.bjs-share input { width: min(100%, 420px); min-height: 40px; padding: .3rem .5rem; border: 1px solid var(--bjs-c-line); border-radius: 8px; font-size: .85rem; }

/* Fiche */
.bjs-product__head { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 1.5rem; align-items: start; margin-bottom: 1.5rem; }
.bjs-product__media { display: grid; place-items: center; min-height: 220px; background: var(--bjs-c-bg); border-radius: var(--bjs-radius); }
.bjs-product__media .bjs-thumb-placeholder { width: 120px; height: 120px; font-size: 2rem; }
.bjs-product__dates, .bjs-product__notried { color: var(--bjs-c-muted); font-size: .9rem; }
.bjs-ref { font-weight: 400; text-transform: none; letter-spacing: 0; }
.bjs-product__proscons { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.bjs-product__proscons section { padding: 1rem; background: #fff; border: 1px solid var(--bjs-c-line); border-radius: var(--bjs-radius); }
.bjs-product__proscons h2 { margin-top: 0; font-size: 1.1rem; }
.bjs-specs { width: 100%; margin: 0 0 1.2rem; border-collapse: collapse; background: #fff; border: 1px solid var(--bjs-c-line); }
.bjs-specs caption { padding: .6rem 0; text-align: left; font-weight: 700; }
.bjs-specs caption .bjs-src { display: block; font-weight: 400; }
.bjs-src--missing { color: #8a4b00; }
.bjs-specs th, .bjs-specs td { padding: .55rem .75rem; border-bottom: 1px solid var(--bjs-c-line); text-align: left; vertical-align: top; }
.bjs-specs th { width: 42%; font-weight: 600; }

/* Assistant */
.bjs-quiz { display: grid; gap: 1rem; }
.bjs-q { margin: 0; padding: 1rem; background: #fff; border: 1px solid var(--bjs-c-line); border-radius: var(--bjs-radius); }
.bjs-q legend { padding: 0 .3rem; font-weight: 700; }
.bjs-q label { display: flex; align-items: center; gap: .5rem; min-height: 40px; }
.bjs-q input[type="radio"] { width: 20px; height: 20px; accent-color: var(--bjs-c-ink); }
.bjs-q input[type="number"] { width: 7rem; min-height: 40px; padding: .3rem .5rem; border: 1px solid #a9a395; border-radius: 8px; }
.bjs-results { margin-top: 2rem; }
.bjs-results__list { padding-left: 1.2rem; }
.bjs-result { margin-bottom: 1.2rem; padding: 1rem; background: #fff; border: 1px solid var(--bjs-c-line); border-radius: var(--bjs-radius); }
.bjs-result__head { display: flex; gap: 1rem; align-items: center; }
.bjs-result__head h3 { margin: 0; }
.bjs-result__score { color: var(--bjs-c-muted); font-size: .85rem; }
.bjs-method { margin-top: 2rem; padding: 1rem 1.2rem; background: #fff; border-radius: var(--bjs-radius); border: 1px solid var(--bjs-c-line); }

/* Tuiles */
.bjs-tiles { list-style: none; margin: 1rem 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: .8rem; }
.bjs-tiles a { display: flex; flex-direction: column; gap: .3rem; height: 100%; padding: 1rem; background: #fff; border: 1px solid var(--bjs-c-line); border-radius: var(--bjs-radius); color: var(--bjs-c-ink); text-decoration: none; }
.bjs-tiles a:hover, .bjs-tiles a:focus-visible { border-color: var(--bjs-c-ink); }
.bjs-tiles__name { font-weight: 700; }
.bjs-tiles__desc { color: var(--bjs-c-muted); font-size: .88rem; }

/* Mise en avant */
.bjs-featured { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); gap: 1.2rem; margin: 2rem 0; padding: 1.2rem; background: #fff; border: 1px solid var(--bjs-c-line); border-radius: var(--bjs-radius); }
.bjs-featured__media { display: grid; place-items: center; background: var(--bjs-c-bg); border-radius: var(--bjs-radius); min-height: 160px; }
.bjs-featured__cols { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.bjs-kicker { margin: 0; color: var(--bjs-c-accent); font-size: .8rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; }

/* Sidebar */
.bjs-side { margin-bottom: 1.5rem; padding: 1.1rem; background: #fff; border: 1px solid var(--bjs-c-line); border-radius: var(--bjs-radius); }
.bjs-side__title { margin: 0 0 .8rem; font-size: 1.05rem; }
.bjs-side__list, .bjs-side__guides, .bjs-side__links { list-style: none; margin: 0; padding: 0; }
.bjs-side__item + .bjs-side__item { border-top: 1px solid var(--bjs-c-line); }
.bjs-side__link { display: flex; gap: .75rem; align-items: center; min-height: 64px; padding: .55rem 0; color: var(--bjs-c-ink); text-decoration: none; }
.bjs-side__link:hover .bjs-side__name, .bjs-side__link:focus-visible .bjs-side__name { text-decoration: underline; }
.bjs-side__thumb { flex: 0 0 56px; width: 56px; height: 56px; display: grid; place-items: center; overflow: hidden; border-radius: 10px; background: var(--bjs-c-bg); }
.bjs-side__thumb img { width: 56px; height: 56px; object-fit: contain; }
.bjs-side__thumb .bjs-thumb-placeholder { width: 44px; height: 44px; font-size: .8rem; }
.bjs-side__text { display: flex; flex-direction: column; align-items: flex-start; gap: .15rem; }
.bjs-side__name { font-weight: 700; line-height: 1.25; }
.bjs-side__benefit { color: var(--bjs-c-muted); font-size: .85rem; line-height: 1.3; }
.bjs-side__guides li { padding: .5rem 0; border-top: 1px solid var(--bjs-c-line); }
.bjs-side__guides li:first-child { border-top: 0; }
.bjs-side__guides a { display: block; color: var(--bjs-c-ink); font-weight: 600; }
.bjs-side__links li { padding: .35rem 0; }
.bjs-side__empty { color: var(--bjs-c-muted); }

/* Contact */
.bjs-contact label { display: block; font-weight: 600; }
.bjs-contact input:not([type="checkbox"]), .bjs-contact textarea { width: 100%; min-height: 44px; padding: .5rem; border: 1px solid #a9a395; border-radius: 8px; font: inherit; }
.bjs-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

/* Consentement */
.bjs-consent { position: fixed; inset: auto 1rem 1rem 1rem; z-index: 1000; max-width: 760px; margin: 0 auto; padding: 1.1rem 1.2rem; background: #fff; border: 1px solid var(--bjs-c-line); border-radius: var(--bjs-radius); box-shadow: 0 12px 40px rgba(0, 0, 0, .18); }
.bjs-consent[hidden] { display: none; }
.bjs-consent__title { margin: 0 0 .4rem; font-weight: 800; }
.bjs-consent__actions { display: flex; flex-wrap: wrap; gap: .6rem; margin-top: .8rem; }
.bjs-consent__actions .bjs-btn { flex: 1 1 160px; }

@media (max-width: 720px) {
	.bjs-product__head, .bjs-product__proscons, .bjs-featured, .bjs-featured__cols { grid-template-columns: 1fr; }
	.bjs-filters { grid-template-columns: 1fr 1fr; }
}
@media (prefers-reduced-motion: reduce) {
	* { transition: none !important; scroll-behavior: auto !important; }
}

/* Assistant de taille et notes */
.bjs-compare tr.is-near td { background: var(--bjs-mauve-light, #ece8e6); }
.bjs-q-note { margin: 0; color: var(--bjs-c-muted); font-size: .9rem; }
/* Un bouton masqué (attribut hidden) ne doit jamais être réaffiché par display:inline-flex. */
.bjs-btn[hidden], .bjs-consent [hidden] { display: none !important; }
