/* ==========================================================================
   Nuqueo — feuille de style unique (thème + blocs nuqueo-core)
   Les couleurs/typos viennent de theme.json ; les alias ci-dessous servent
   aux composants.
   ========================================================================== */
:root {
	--nq-base: var(--wp--preset--color--base, #FAF8F4);
	--nq-surface: var(--wp--preset--color--surface, #FFFFFF);
	--nq-sand: var(--wp--preset--color--sand, #F1EDE6);
	--nq-border: var(--wp--preset--color--border, #E2DDD4);
	--nq-ink: var(--wp--preset--color--contrast, #1F2A33);
	--nq-muted: var(--wp--preset--color--muted, #56616B);
	--nq-accent: var(--wp--preset--color--accent, #3D5A73);
	--nq-accent-dark: var(--wp--preset--color--accent-dark, #2C4357);
	--nq-accent-soft: var(--wp--preset--color--accent-soft, #E4EBF1);
	--nq-ok: #2F6B4F;
	--nq-error: #A12C2C;
	--nq-radius-s: 8px;
	--nq-radius-m: 14px;
	--nq-radius-l: 22px;
	--nq-shadow: 0 1px 2px rgba(31, 42, 51, .06), 0 8px 24px rgba(31, 42, 51, .06);
	--nq-tap: 44px;
}

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } *, *::before, *::after { animation: none !important; transition: none !important; } }
body { overflow-x: hidden; }
img, video { max-width: 100%; height: auto; }

/* Focus visible partout (AA) */
:where(a, button, input, select, textarea, summary, [tabindex]):focus-visible {
	outline: 3px solid var(--nq-accent-dark);
	outline-offset: 3px;
	border-radius: 4px;
}
.screen-reader-text, .nq-sr {
	position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
	overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}
.nq-skip { position: absolute; left: -9999px; top: 0; z-index: 1000; background: var(--nq-surface); padding: .75rem 1rem; }
.nq-skip:focus { left: 1rem; }

/* ---------- En-tête / annonce / pied ---------- */
.nuqueo-annonce p { margin: 0; }
.nuqueo-annonce a { color: inherit; }
.nuqueo-header { border-bottom: 1px solid var(--nq-border); background: var(--nq-base); }
.nuqueo-logo { margin: 0; line-height: 0; }
.nuqueo-logo a { display: inline-flex; align-items: center; min-height: var(--nq-tap); }
.nuqueo-logo svg { width: 134px; height: 32px; }
.nuqueo-header__links { margin: 0; display: flex; gap: .25rem; flex-wrap: wrap; justify-content: flex-end; }
.nuqueo-header__links a { display: inline-flex; align-items: center; min-height: var(--nq-tap); padding: 0 .6rem; color: var(--nq-ink); text-decoration: none; border-radius: var(--nq-radius-pill, 999px); }
.nuqueo-header__links a:hover { background: var(--nq-sand); }
@media (max-width: 420px) { .nuqueo-header__links a:first-child { display: none; } }

.nuqueo-footer h2 { margin-bottom: .5rem; }
.nuqueo-footer__list { list-style: none; padding: 0; margin: 0; }
.nuqueo-footer__list li { margin: 0; }
.nuqueo-footer__list a { display: inline-flex; align-items: center; min-height: var(--nq-tap); color: var(--nq-ink); }
.nuqueo-footer--checkout a { display: inline-block; padding: .6rem .25rem; }

/* ---------- Sections / cartes / grilles ---------- */
.nuqueo-section > h2 { margin-bottom: var(--wp--preset--spacing--40); }
.nuqueo-card {
	background: var(--nq-surface);
	border: 1px solid var(--nq-border);
	border-radius: var(--nq-radius-l);
	padding: 1.5rem;
}
.nuqueo-card > :first-child { margin-top: 0; }
.nuqueo-card > :last-child { margin-bottom: 0; }
.nuqueo-routine { border-radius: var(--nq-radius-l); margin-top: var(--wp--preset--spacing--50); }
.nuqueo-routine ol { padding-left: 1.25rem; }
.nuqueo-routine li { margin-bottom: .5rem; }
.nuqueo-encart { border-radius: var(--nq-radius-l); }

/* Tableau comparatif : défilement horizontal propre sur mobile */
.nuqueo-table { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.nuqueo-table table { border-collapse: separate; border-spacing: 0; width: 100%; min-width: 540px; background: var(--nq-surface); border: 1px solid var(--nq-border); border-radius: var(--nq-radius-m); overflow: hidden; }
.nuqueo-table th, .nuqueo-table td { padding: .8rem 1rem; border: 0; border-bottom: 1px solid var(--nq-border); text-align: left; vertical-align: top; }
.nuqueo-table tr:last-child td { border-bottom: 0; }
.nuqueo-table thead th { background: var(--nq-accent-soft); }
.nuqueo-table td:nth-child(2) { font-weight: 600; }

/* FAQ (blocs Détails natifs) */
.wp-block-details { margin-block: .6rem !important; }
.wp-block-details summary {
	cursor: pointer; list-style: none; font-weight: 600; padding: .85rem 2rem .85rem 0; position: relative; min-height: var(--nq-tap);
}
.wp-block-details summary::-webkit-details-marker { display: none; }
.wp-block-details summary::after {
	content: ""; position: absolute; right: .25rem; top: 50%; width: .6rem; height: .6rem;
	border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: translateY(-70%) rotate(45deg); transition: transform .2s;
}
.wp-block-details[open] summary::after { transform: translateY(-30%) rotate(-135deg); }
.wp-block-details > :not(summary) { margin-top: 0; padding-bottom: .5rem; }

/* ---------- Hero ---------- */
.nuqueo-hero h1 { margin-top: 0; margin-bottom: .5rem; }
.nuqueo-hero__sous-titre { margin-top: 0; font-weight: 500; }
@media (max-width: 781px) {
	.nuqueo-hero .wp-block-columns { gap: 1.25rem; }
	.nuqueo-hero h1 { font-size: 1.75rem; }
}

/* Galerie (bloc nuqueo/galerie) : défilement à la main sur mobile, sans librairie */
.nq-gallery { position: relative; }
.nq-gallery__track {
	display: flex; overflow-x: auto; scroll-snap-type: x mandatory; gap: .5rem;
	border-radius: var(--nq-radius-l); scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.nq-gallery__track::-webkit-scrollbar { display: none; }
.nq-gallery__slide { flex: 0 0 100%; scroll-snap-align: center; margin: 0; aspect-ratio: 1 / 1; background: var(--nq-sand); border-radius: var(--nq-radius-l); overflow: hidden; }
.nq-gallery__slide img { width: 100%; height: 100%; object-fit: cover; display: block; }
.nq-gallery__thumbs { display: flex; gap: .5rem; margin-top: .75rem; overflow-x: auto; padding: 2px; }
.nq-gallery__thumb { flex: 0 0 64px; height: 64px; padding: 0; border: 2px solid transparent; border-radius: var(--nq-radius-s); overflow: hidden; background: var(--nq-sand); cursor: pointer; }
.nq-gallery__thumb[aria-current="true"] { border-color: var(--nq-accent); }
.nq-gallery__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.nq-gallery__placeholder { display: grid; place-items: center; color: var(--nq-muted); font-size: .95rem; padding: 1rem; text-align: center; }

/* ---------- Offre (bloc nuqueo/offre) ---------- */
.nq-offer { margin-top: 1.25rem; }
.nq-offer fieldset { border: 0; padding: 0; margin: 0 0 1.25rem; min-width: 0; }
.nq-offer legend { font-weight: 650; margin-bottom: .6rem; padding: 0; }
.nq-tiers { display: grid; gap: .6rem; }
.nq-tier { position: relative; display: block; }
.nq-tier input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.nq-tier__box {
	display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: .75rem;
	padding: .9rem 1rem; min-height: 64px; background: var(--nq-surface);
	border: 2px solid var(--nq-border); border-radius: var(--nq-radius-m); transition: border-color .15s, background .15s;
}
.nq-tier__dot { width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--nq-muted); position: relative; }
.nq-tier input:checked + .nq-tier__box { border-color: var(--nq-accent); background: var(--nq-accent-soft); }
.nq-tier input:checked + .nq-tier__box .nq-tier__dot { border-color: var(--nq-accent); }
.nq-tier input:checked + .nq-tier__box .nq-tier__dot::after { content: ""; position: absolute; inset: 3px; border-radius: 50%; background: var(--nq-accent); }
.nq-tier input:focus-visible + .nq-tier__box { outline: 3px solid var(--nq-accent-dark); outline-offset: 2px; }
.nq-tier__title { font-weight: 650; display: block; }
.nq-tier__sub { font-size: .9rem; color: var(--nq-muted); display: block; }
.nq-tier__price { font-weight: 700; font-size: 1.15rem; text-align: right; white-space: nowrap; }
.nq-tier__unit { display: block; font-size: .8rem; font-weight: 500; color: var(--nq-muted); }
.nq-tier__badge { display: inline-block; margin-left: .35rem; padding: .1rem .5rem; font-size: .75rem; font-weight: 600; border-radius: 999px; background: var(--nq-accent); color: #fff; vertical-align: middle; }

.nq-colors { display: flex; gap: .6rem; flex-wrap: wrap; }
.nq-color-row { display: flex; align-items: center; gap: .75rem; flex-wrap: wrap; margin-bottom: .5rem; }
.nq-color-row__label { min-width: 6.5rem; font-size: .95rem; color: var(--nq-muted); }
.nq-swatch { position: relative; }
.nq-swatch input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.nq-swatch span {
	display: inline-flex; align-items: center; gap: .5rem; min-height: var(--nq-tap); padding: .4rem .9rem .4rem .5rem;
	border: 2px solid var(--nq-border); border-radius: 999px; background: var(--nq-surface); font-weight: 600;
}
.nq-swatch span::before { content: ""; width: 24px; height: 24px; border-radius: 50%; background: var(--sw, #ccc); box-shadow: inset 0 0 0 1px rgba(0,0,0,.12); }
.nq-swatch input:checked + span { border-color: var(--nq-accent); background: var(--nq-accent-soft); }
.nq-swatch input:focus-visible + span { outline: 3px solid var(--nq-accent-dark); outline-offset: 2px; }
.nq-duo-only[hidden] { display: none !important; }

.nq-buy {
	display: flex; width: 100%; justify-content: center; align-items: center; gap: .5rem;
	min-height: 56px; padding: .9rem 1.5rem; border: 0; border-radius: 999px; cursor: pointer;
	background: var(--nq-accent); color: #fff; font: inherit; font-size: 1.125rem; font-weight: 700;
	box-shadow: var(--nq-shadow); transition: background .15s;
}
.nq-buy:hover { background: var(--nq-accent-dark); }
.nq-buy[disabled] { opacity: .6; cursor: not-allowed; }
.nq-offer__delay { margin: .75rem 0 0; font-size: .95rem; color: var(--nq-ink); display: flex; gap: .5rem; align-items: flex-start; }
.nq-offer__delay svg { flex: 0 0 auto; margin-top: .15rem; }
.nq-offer__note { margin: .35rem 0 0; font-size: .85rem; color: var(--nq-muted); }
.nq-offer__gift { margin: .75rem 0 0; padding: .6rem .9rem; border-radius: var(--nq-radius-m); background: var(--nq-sand); font-size: .95rem; }
.nq-offer__unavailable { padding: 1rem; border-radius: var(--nq-radius-m); background: var(--nq-sand); }

/* Barre d'achat collante (mobile) */
.nq-sticky {
	position: fixed; left: 0; right: 0; bottom: 0; z-index: 50;
	display: flex; align-items: center; gap: .75rem; padding: .65rem 16px calc(.65rem + env(safe-area-inset-bottom));
	background: rgba(250, 248, 244, .97); border-top: 1px solid var(--nq-border);
	transform: translateY(110%); transition: transform .2s ease;
}
.nq-sticky.is-visible { transform: translateY(0); }
.nq-sticky__info { flex: 1; min-width: 0; line-height: 1.25; }
.nq-sticky__name { display: block; font-weight: 650; font-size: .95rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nq-sticky__price { font-size: .9rem; color: var(--nq-muted); }
.nq-sticky .nq-buy { width: auto; min-height: 48px; font-size: 1rem; padding: .6rem 1.25rem; }
@media (min-width: 782px) { .nq-sticky { display: none; } }
body.has-nq-sticky .nuqueo-footer { padding-bottom: 6rem !important; }
@media (min-width: 782px) { body.has-nq-sticky .nuqueo-footer { padding-bottom: var(--wp--preset--spacing--50) !important; } }

/* ---------- Garanties ---------- */
.nq-guarantees { margin: 1.25rem 0 0; padding: 1rem 1.1rem; border: 1px solid var(--nq-border); border-radius: var(--nq-radius-m); background: var(--nq-surface); }
.nq-guarantees__title { margin: 0 0 .5rem; font-size: 1rem; font-weight: 650; }
.nq-guarantees ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .45rem; }
.nq-guarantees li { display: flex; gap: .6rem; align-items: flex-start; font-size: .95rem; }
.nq-guarantees svg { flex: 0 0 auto; margin-top: .2rem; color: var(--nq-accent); }

/* ---------- Vidéo ---------- */
.nq-video { position: relative; border-radius: var(--nq-radius-l); overflow: hidden; background: var(--nq-sand); aspect-ratio: var(--nq-video-ratio, 9 / 16); max-width: 420px; margin-inline: auto; }
.nq-video video, .nq-video img { width: 100%; height: 100%; object-fit: cover; display: block; }
.nq-video__toggle { position: absolute; right: .75rem; bottom: .75rem; min-width: var(--nq-tap); min-height: var(--nq-tap); border-radius: 999px; border: 0; background: rgba(31,42,51,.75); color: #fff; font: inherit; font-size: .85rem; padding: 0 .9rem; cursor: pointer; }
.nq-video__empty { display: grid; place-items: center; height: 100%; padding: 1.5rem; text-align: center; color: var(--nq-muted); }

/* ---------- Avis ---------- */
.nq-reviews__summary { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: .5rem 1rem; margin-bottom: 1rem; }
.nq-reviews__avg { font-size: 2rem; font-weight: 700; }
.nq-stars { display: inline-flex; gap: 2px; color: var(--nq-accent); }
.nq-stars svg { width: 18px; height: 18px; }
.nq-reviews__note { text-align: center; color: var(--nq-muted); font-size: .9rem; margin: 0 0 1.5rem; }
.nq-reviews__list { list-style: none; padding: 0; margin: 0; display: grid; gap: .75rem; }
.nq-review { background: var(--nq-surface); border: 1px solid var(--nq-border); border-radius: var(--nq-radius-m); padding: 1rem 1.2rem; }
.nq-review__head { display: flex; flex-wrap: wrap; gap: .25rem .75rem; align-items: center; margin-bottom: .35rem; font-size: .92rem; }
.nq-review__author { font-weight: 650; }
.nq-review__verified { color: var(--nq-ok); font-weight: 600; }
.nq-review__date { color: var(--nq-muted); }
.nq-review p { margin: 0; }
.nq-reviews__empty { text-align: center; background: var(--nq-surface); border: 1px dashed var(--nq-border); border-radius: var(--nq-radius-m); padding: 1.5rem; }

/* ---------- Formulaires maison (suivi, contact, rétractation, avis) ---------- */
.nq-form { display: grid; gap: 1rem; max-width: 640px; }
.nq-field { display: grid; gap: .35rem; }
.nq-field label, .nq-field legend { font-weight: 600; }
.nq-field .nq-hint { font-size: .875rem; color: var(--nq-muted); margin: 0; }
.nq-form input[type="text"], .nq-form input[type="email"], .nq-form input[type="date"], .nq-form input[type="number"], .nq-form select, .nq-form textarea {
	width: 100%; min-height: var(--nq-tap); padding: .65rem .8rem; font: inherit; color: var(--nq-ink);
	background: var(--nq-surface); border: 1.5px solid #8C949B; border-radius: var(--nq-radius-s);
}
.nq-form textarea { min-height: 8rem; resize: vertical; }
.nq-form .nq-check { display: flex; gap: .6rem; align-items: flex-start; }
.nq-form .nq-check input { width: 22px; height: 22px; margin-top: .15rem; flex: 0 0 auto; }
.nq-form button[type="submit"], .nq-button {
	justify-self: start; min-height: var(--nq-tap); padding: .75rem 1.5rem; border: 0; border-radius: 999px;
	background: var(--nq-accent); color: #fff; font: inherit; font-weight: 650; cursor: pointer; text-decoration: none; display: inline-flex; align-items: center;
}
.nq-form button[type="submit"]:hover, .nq-button:hover { background: var(--nq-accent-dark); color: #fff; }
.nq-hp { position: absolute !important; left: -9999px !important; }
.nq-notice { padding: 1rem 1.2rem; border-radius: var(--nq-radius-m); margin-bottom: 1rem; border: 1px solid var(--nq-border); background: var(--nq-surface); }
.nq-notice--ok { border-color: #9CC5AE; background: #EEF6F1; }
.nq-notice--error { border-color: #E2A5A5; background: #FBEFEF; color: #5E1B1B; }
.nq-status { display: grid; gap: .5rem; padding: 1.25rem; background: var(--nq-surface); border: 1px solid var(--nq-border); border-radius: var(--nq-radius-m); }
.nq-status dl { display: grid; grid-template-columns: max-content 1fr; gap: .4rem 1rem; margin: 0; }
.nq-status dt { font-weight: 600; }
.nq-status dd { margin: 0; }
.nq-faq-hints { padding: 1rem 1.2rem; background: var(--nq-accent-soft); border-radius: var(--nq-radius-m); }
.nq-faq-hints h3 { margin-top: 0; font-size: 1.05rem; }
.nq-rating { display: flex; flex-direction: row-reverse; justify-content: flex-end; gap: .25rem; }
.nq-rating input { position: absolute; opacity: 0; }
.nq-rating label { cursor: pointer; font-size: 2rem; line-height: 1; color: #B9C0C6; padding: 0 .1rem; min-width: var(--nq-tap); text-align: center; }
.nq-rating input:checked ~ label, .nq-rating label:hover, .nq-rating label:hover ~ label { color: var(--nq-accent); }
.nq-rating input:focus-visible + label { outline: 3px solid var(--nq-accent-dark); border-radius: 4px; }

/* ---------- Moyens de paiement ---------- */
.nq-payments { display: flex; flex-wrap: wrap; gap: .4rem; margin: 1.5rem 0 .5rem; padding: 0; list-style: none; }
.nq-payments li { font-size: .78rem; font-weight: 700; letter-spacing: .02em; padding: .3rem .6rem; border: 1px solid var(--nq-border); border-radius: 6px; background: var(--nq-surface); color: var(--nq-ink); }

/* ---------- Commande (bloc Checkout WooCommerce) ---------- */
.nuqueo-checkout .wc-block-components-button:not(.is-link) { border-radius: 999px; min-height: 52px; }
.nuqueo-checkout .wp-block-woocommerce-checkout { margin-top: 0; }
.nq-checkout-reassurance { display: flex; gap: .5rem; align-items: flex-start; padding: .75rem 1rem; border-radius: var(--nq-radius-m); background: var(--nq-accent-soft); font-size: .95rem; margin-bottom: 1rem; }
.nq-checkout-reassurance p { margin: 0; }
.nq-checkout-reassurance svg { flex: 0 0 auto; width: 18px; height: 18px; margin-top: .2rem; color: var(--nq-accent); }

/* ---------- Articles ---------- */
.nuqueo-article .wp-block-post-content { font-size: 1.0625rem; }
.nuqueo-article .wp-block-post-content h2 { margin-top: 2.25rem; }
