/* QuinCom App — écrans d'accueil (onboarding). Toutes les variables sont locales. */

.qca-onb {
	--qca-red: #e20613;
	--qca-red-dark: #b80510;
	--qca-yellow: #f8af00;
	--qca-ink: #1d1d1f;
	--qca-muted: #5c5c66;
	--qca-line: #ececf0;
	--qca-soft: #fff4f4;

	position: fixed;
	inset: 0;
	z-index: 2147483000;
	display: flex;
	flex-direction: column;
	background: #fff;
	color: var(--qca-ink);
	font-family: 'Poppins', system-ui, sans-serif;
	-webkit-font-smoothing: antialiased;
	padding: env(safe-area-inset-top, 0) 0 env(safe-area-inset-bottom, 0);
	overflow: hidden;
	opacity: 0;
	transition: opacity .25s ease;
}
.qca-onb[dir="rtl"] { font-family: 'Almarai', Tahoma, sans-serif; }
.qca-onb[hidden] { display: none !important; }
.qca-onb.is-open { opacity: 1; }
.qca-onb *, .qca-onb *::before, .qca-onb *::after { box-sizing: border-box; font-family: inherit; }
html.qca-lock, html.qca-lock body { overflow: hidden !important; }

/* Barre du haut : index des écrans */
.qca-top {
	display: flex;
	align-items: center;
	gap: 12px;
	padding: 12px 20px 0;
	min-height: 50px;
}
.qca-dots { display: flex; gap: 6px; }
.qca-dots button {
	appearance: none; border: 0; padding: 0; margin: 0; cursor: pointer;
	width: 8px; height: 8px; border-radius: 8px;
	background: var(--qca-line);
	transition: width .3s ease, background .3s ease;
}
.qca-dots button.is-on { width: 26px; background: var(--qca-red); }
.qca-count { font-size: 13px; color: var(--qca-muted); font-variant-numeric: tabular-nums; }
.qca-count b { color: var(--qca-ink); }
.qca-skip {
	appearance: none; border: 0; background: none; cursor: pointer;
	margin-inline-start: auto;
	color: var(--qca-muted); font-size: 15px; font-weight: 700;
	padding: 8px 4px;
}
.qca-onb.is-last .qca-skip { visibility: hidden; }

/* Diaporama : défilement natif aimanté, l'index suit le doigt */
.qca-track {
	flex: 1;
	display: flex;
	min-height: 0;
	overflow-x: auto;
	overflow-y: hidden;
	scroll-snap-type: x mandatory;
	scroll-behavior: smooth;
	overscroll-behavior-x: contain;
	scrollbar-width: none;
	-webkit-overflow-scrolling: touch;
}
.qca-track::-webkit-scrollbar { display: none; }
.qca-slide {
	flex: 0 0 100%;
	width: 100%;
	scroll-snap-align: start;
	scroll-snap-stop: always;
	display: flex;
	flex-direction: column;
	padding: 4px 24px 0;
	min-height: 0;
}

/* Zone visuelle : prend la place disponible, l'image s'adapte */
.qca-visual {
	position: relative;
	flex: 1 1 auto;
	min-height: 140px;
	display: flex;
	align-items: center;
	justify-content: center;
}
.qca-visual img {
	position: relative;
	display: block;
	max-width: 100%;
	max-height: 100%;
	width: auto;
	height: auto;
	object-fit: contain;
	opacity: 0;
	transform: translateY(14px) scale(.97);
	transition: opacity .5s ease .05s, transform .6s cubic-bezier(.22,.8,.3,1) .05s;
}
.qca-slide.is-active .qca-visual img { opacity: 1; transform: none; }
.qca-visual img { position: absolute; inset: 0; margin: auto; }

.qca-glow {
	position: absolute;
	width: min(78vw, 300px); aspect-ratio: 1;
	border-radius: 50%;
	background: radial-gradient(circle, var(--qca-soft) 0 62%, transparent 63%);
	box-shadow: 0 0 0 16px rgba(226, 6, 19, .035);
}
.qca-welcome .qca-glow::after {
	content: ""; position: absolute; width: 18%; aspect-ratio: 1; border-radius: 50%;
	background: var(--qca-yellow); top: 4%; inset-inline-end: 6%;
}
.qca-how .qca-visual { margin-right: -24px; }
.qca-how .qca-visual img {
	-webkit-mask-image: linear-gradient(to bottom, #000 78%, transparent 100%);
	mask-image: linear-gradient(to bottom, #000 78%, transparent 100%);
}
.qca-how .qca-glow { background: radial-gradient(circle, #fff7e3 0 62%, transparent 63%); box-shadow: 0 0 0 16px rgba(248, 175, 0, .06); }

/* Texte */
.qca-copy { flex: 0 0 auto; max-width: 440px; width: 100%; margin: 0 auto; padding: 12px 0 4px; text-align: center; }
.qca-kicker {
	margin: 0 0 6px;
	font-size: 13px; font-weight: 800; letter-spacing: .02em;
	color: var(--qca-red);
}
.qca-title {
	font-size: 22px; line-height: 1.3; font-weight: 700;
	margin: 0 0 8px; color: var(--qca-ink);
	text-wrap: balance;
}
.qca-onb[dir="rtl"] .qca-title { font-size: 24px; font-weight: 800; }
.qca-onb:not([dir="rtl"]) .qca-text,
.qca-onb:not([dir="rtl"]) .qca-step-txt span { font-size: 14px; }
.qca-onb:not([dir="rtl"]) .qca-btn { font-weight: 700; }
.qca-text { font-size: 15px; line-height: 1.6; color: var(--qca-muted); margin: 0 0 14px; }

/* 1. Public cible */
.qca-audience { display: flex; flex-direction: column; align-items: center; gap: 8px; }
.qca-audience-label { font-size: 12px; font-weight: 700; color: var(--qca-muted); }
.qca-audience ul {
	list-style: none; margin: 0; padding: 0;
	display: flex; flex-wrap: wrap; justify-content: center; gap: 6px;
}
.qca-audience li {
	font-size: 13px; font-weight: 700; color: var(--qca-ink);
	background: #fff; border: 1.5px solid var(--qca-line); border-radius: 999px;
	padding: 6px 12px;
}
.qca-audience li:last-child { color: var(--qca-muted); border-style: dashed; }

/* 2. Étapes */
.qca-steps { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-direction: column; gap: 10px; text-align: start; }
.qca-step { display: flex; align-items: center; gap: 14px; }
.qca-step-ico {
	position: relative; flex: 0 0 auto;
	width: 46px; height: 46px; border-radius: 14px;
	display: grid; place-items: center;
	background: var(--qca-soft); color: var(--qca-red);
}
.qca-step:nth-child(2) .qca-step-ico { background: #fff7e3; color: #c98700; }
.qca-step-ico svg {
	width: 22px; height: 22px; fill: none; stroke: currentColor;
	stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round;
}
.qca-step-ico b {
	position: absolute; top: -5px; inset-inline-end: -5px;
	width: 20px; height: 20px; border-radius: 50%;
	background: var(--qca-red); color: #fff; border: 2px solid #fff;
	font-size: 10px; font-weight: 800; display: grid; place-items: center;
}
.qca-step:nth-child(2) .qca-step-ico b { background: var(--qca-yellow); color: var(--qca-ink); }
.qca-step-txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.qca-step-txt strong { font-size: 15px; font-weight: 800; }
.qca-step-txt span { font-size: 13px; line-height: 1.45; color: var(--qca-muted); }

/* 3. Compte : cercles SVG animés en arrière-plan */
.qca-waves {
	position: absolute;
	width: min(100%, 120vw, 420px);
	height: auto; aspect-ratio: 1;
	max-height: 125%;
	overflow: visible;
}
.qca-waves circle {
	fill: none; stroke: var(--qca-red); stroke-width: 1.2;
	stroke-dasharray: 1; stroke-dashoffset: 1;
	transform-box: view-box; transform-origin: 200px 200px;
	opacity: .9;
}
.qca-account.is-active .qca-waves circle {
	animation:
		qca-draw 1.3s cubic-bezier(.4,0,.2,1) forwards,
		qca-wave 3.6s ease-in-out 1.5s infinite;
}
.qca-account.is-active .qca-waves circle:nth-child(2) { animation-delay: .15s, 1.75s; }
.qca-account.is-active .qca-waves circle:nth-child(3) { animation-delay: .3s, 2s; }
.qca-account.is-active .qca-waves circle:nth-child(4) { animation-delay: .45s, 2.25s; }
@keyframes qca-draw { to { stroke-dashoffset: 0; } }
@keyframes qca-wave {
	0%, 100% { transform: scale(1); opacity: .9; }
	50% { transform: scale(1.07); opacity: .35; }
}

.qca-benefits { list-style: none; margin: 4px auto 0; padding: 0; display: flex; flex-direction: column; gap: 9px; max-width: 340px; }
.qca-benefits li { display: flex; align-items: center; gap: 10px; font-size: 14px; font-weight: 700; line-height: 1.45; text-align: start; }
.qca-benefits svg {
	flex: 0 0 auto; width: 22px; height: 22px; padding: 4px;
	border-radius: 50%; background: #e9f7ee; color: #1a8a46;
	fill: none; stroke: currentColor; stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round;
}

/* Boutons */
.qca-actions { padding: 12px 24px 18px; }
.qca-act { display: flex; flex-direction: column; gap: 8px; max-width: 440px; margin: 0 auto; }
.qca-act[hidden] { display: none; }
.qca-btn {
	appearance: none; display: flex; align-items: center; justify-content: center;
	width: 100%; min-height: 50px; padding: 12px 20px;
	border-radius: 14px; border: 2px solid transparent;
	font-size: 16px; font-weight: 800; line-height: 1.2;
	text-decoration: none !important; text-align: center; cursor: pointer;
	transition: transform .12s ease, background .2s ease;
	-webkit-tap-highlight-color: transparent;
}
.qca-btn:active { transform: scale(.98); }
.qca-btn:focus { outline: none; }
.qca-btn:focus-visible { outline: 3px solid var(--qca-yellow); outline-offset: 2px; }
.qca-btn-primary { background: var(--qca-red); color: #fff !important; }
.qca-btn-outline { background: #fff; color: var(--qca-ink) !important; border-color: var(--qca-line); }
.qca-btn-ghost { background: none; color: var(--qca-muted) !important; min-height: 40px; font-weight: 700; text-decoration: underline !important; text-underline-offset: 3px; }
@media (hover: hover) { .qca-btn-primary:hover { background: var(--qca-red-dark); } }

/* Petits écrans */
@media (max-height: 700px) {
	.qca-title { font-size: 21px; }
	.qca-text { font-size: 14px; margin-bottom: 10px; }
	.qca-step-txt span { display: none; }
	.qca-benefits li { font-size: 13px; }
	.qca-btn { min-height: 46px; }
}

@media (prefers-reduced-motion: reduce) {
	.qca-onb, .qca-dots button, .qca-visual img { transition: none; }
	.qca-track { scroll-behavior: auto; }
	.qca-waves circle, .qca-account.is-active .qca-waves circle { animation: none; stroke-dashoffset: 0; }
}

/* ------------------------------------------------------------------
 * Protection contre les styles de boutons du thème (WoodMart).
 * Ciblage par #qca-onb + !important sur les propriétés que le thème impose.
 * ------------------------------------------------------------------ */
#qca-onb button,
#qca-onb a.qca-btn {
	text-transform: none !important;
	letter-spacing: normal !important;
	box-shadow: none !important;
	text-shadow: none !important;
	line-height: 1.2 !important;
	font-family: inherit !important;
	opacity: 1 !important;
}
#qca-onb .qca-dots button {
	all: unset;
	display: block !important;
	width: 8px !important; height: 8px !important;
	min-width: 0 !important; min-height: 0 !important;
	padding: 0 !important; margin: 0 !important;
	border: 0 !important; border-radius: 8px !important;
	background: var(--qca-line) !important;
	cursor: pointer;
	transition: width .3s ease, background .3s ease;
}
#qca-onb .qca-dots button.is-on { width: 26px !important; background: var(--qca-red) !important; }
#qca-onb .qca-skip {
	background: none !important; border: 0 !important;
	min-height: 0 !important; height: auto !important; width: auto !important;
	padding: 8px 4px !important;
	color: var(--qca-muted) !important;
	font-size: 15px !important; font-weight: 700 !important;
}
#qca-onb .qca-btn {
	width: 100% !important; min-height: 50px !important; height: auto !important;
	padding: 12px 20px !important; margin: 0 !important;
	border-radius: 14px !important; border: 2px solid transparent !important;
	font-size: 16px !important; font-weight: 700 !important;
}
#qca-onb .qca-btn-primary { background: var(--qca-red) !important; color: #fff !important; }
#qca-onb .qca-btn-outline { background: #fff !important; color: var(--qca-ink) !important; border-color: var(--qca-line) !important; }
#qca-onb .qca-btn-ghost {
	background: none !important; border-color: transparent !important;
	color: var(--qca-muted) !important; min-height: 40px !important;
	text-decoration: underline !important;
}
@media (hover: hover) {
	#qca-onb .qca-btn-primary:hover { background: var(--qca-red-dark) !important; }
}

/* ------------------------------------------------------------------
 * Mode app : bouton de langue dans le header
 * ------------------------------------------------------------------ */
#qca-lang { position: relative; display: inline-flex; align-items: center; margin-inline-end: 4px; }
#qca-lang[hidden] { display: none !important; }
#qca-lang .qca-lang-btn {
	all: unset; box-sizing: border-box;
	display: inline-flex !important; align-items: center; gap: 4px;
	height: 32px !important; padding: 0 9px !important; border-radius: 999px !important;
	border: 1.5px solid #ececf0 !important; background: #fff !important; color: #1d1d1f !important;
	font: 700 12px/1 'Poppins', 'Almarai', system-ui, sans-serif !important; cursor: pointer;
}
#qca-lang .qca-lang-btn svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 1.8; }
#qca-lang .qca-lang-menu {
	position: absolute; top: calc(100% + 6px); inset-inline-end: 0; z-index: 99999;
	list-style: none; margin: 0; padding: 6px; min-width: 150px;
	background: #fff; border-radius: 12px; box-shadow: 0 10px 30px rgba(0,0,0,.14);
}
#qca-lang .qca-lang-menu[hidden] { display: none !important; }
#qca-lang .qca-lang-menu a {
	display: block; padding: 10px 12px; border-radius: 8px;
	color: #1d1d1f !important; text-decoration: none !important; font-size: 14px; font-weight: 600;
}
#qca-lang .qca-lang-menu a[hreflang="ar"] { font-family: 'Almarai', Tahoma, sans-serif; }
#qca-lang .qca-lang-menu a[aria-current="true"] { background: #fff4f4; color: #e20613 !important; }

/* ------------------------------------------------------------------
 * Panneau « Créez votre compte » (invités)
 * ------------------------------------------------------------------ */
:is(#qca-nudge,#qca-pushask) {
	position: fixed; inset-inline: 0; bottom: 0; z-index: 2147482000;
	padding: 0 12px calc(68px + env(safe-area-inset-bottom, 0)); /* au-dessus de la barre WoodMart */
	pointer-events: none; opacity: 0; transform: translateY(16px);
	transition: opacity .25s ease, transform .3s cubic-bezier(.22,.8,.3,1);
	font-family: 'Poppins', system-ui, sans-serif;
}
:is(#qca-nudge,#qca-pushask)[dir="rtl"] { font-family: 'Almarai', Tahoma, sans-serif; }
:is(#qca-nudge,#qca-pushask)[hidden] { display: none !important; }
:is(#qca-nudge,#qca-pushask).is-open { opacity: 1; transform: none; }
:is(#qca-nudge,#qca-pushask) .qca-nudge-card {
	position: relative; pointer-events: auto; max-width: 440px; margin: 0 auto;
	background: #fff; border-radius: 18px; padding: 18px 18px 10px;
	box-shadow: 0 -2px 0 #e20613 inset, 0 16px 40px rgba(0,0,0,.18);
	text-align: center;
}
:is(#qca-nudge,#qca-pushask) .qca-nudge-title { margin: 0 24px 6px; font-size: 17px; font-weight: 700; color: #1d1d1f; line-height: 1.3; }
:is(#qca-nudge,#qca-pushask) .qca-nudge-text { margin: 0 0 14px; font-size: 13.5px; line-height: 1.55; color: #5c5c66; }
:is(#qca-nudge,#qca-pushask) .qca-nudge-actions { display: flex; gap: 8px; }
:is(#qca-nudge,#qca-pushask) .qca-nudge-btn {
	flex: 1; display: flex !important; align-items: center; justify-content: center;
	min-height: 44px; padding: 8px 6px !important; border-radius: 12px !important;
	white-space: nowrap; font-size: 13.5px !important; font-weight: 700 !important; line-height: 1.2 !important;
	text-decoration: none !important; text-transform: none !important; letter-spacing: normal !important;
	border: 2px solid transparent;
}
:is(#qca-nudge,#qca-pushask) .qca-nudge-primary { background: #e20613 !important; color: #fff !important; }
:is(#qca-nudge,#qca-pushask) .qca-nudge-outline { background: #fff !important; color: #1d1d1f !important; border-color: #ececf0 !important; }
:is(#qca-nudge,#qca-pushask) .qca-nudge-later,
:is(#qca-nudge,#qca-pushask) .qca-nudge-x {
	all: unset; box-sizing: border-box; cursor: pointer; color: #8a8a94 !important;
	font-family: inherit !important;
}
:is(#qca-nudge,#qca-pushask) .qca-nudge-later { display: block !important; margin: 8px auto 2px; padding: 6px 10px !important; font-size: 13px !important; font-weight: 600 !important; }
:is(#qca-nudge,#qca-pushask) .qca-nudge-x { position: absolute; top: 8px; inset-inline-end: 10px; width: 30px; height: 30px; line-height: 30px !important; text-align: center; font-size: 22px !important; }
html:not(.qc-in-app) :is(#qca-nudge,#qca-pushask) { padding-bottom: calc(12px + env(safe-area-inset-bottom, 0)); }

:is(#qca-nudge,#qca-pushask) button.qca-nudge-btn { all: unset; box-sizing: border-box; cursor: pointer; text-align: center; flex: 1; width: 100%; display: flex !important; align-items: center; justify-content: center; min-height: 46px; font-family: inherit; }
#qca-pushask .qca-nudge-icon { margin: 0 auto 6px; width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; background: #fff4f4; color: #e20613; }
#qca-pushask .qca-nudge-icon svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.9; stroke-linecap: round; stroke-linejoin: round; }

/* ------------------------------------------------------------------
 * Bouton WhatsApp (fiche produit)
 * ------------------------------------------------------------------ */
a.qca-wa {
	display: flex !important; align-items: center; justify-content: center; gap: 8px;
	width: 100%; max-width: 420px; min-height: 46px; margin: 12px 0 4px;
	padding: 10px 16px !important; border-radius: 10px !important;
	background: #fff !important; color: #128c4a !important; border: 2px solid #25d366 !important;
	font-weight: 700 !important; font-size: 15px !important; text-decoration: none !important;
	text-transform: none !important; letter-spacing: normal !important; line-height: 1.2 !important;
}
a.qca-wa:hover { background: #effcf4 !important; }
a.qca-wa svg { width: 20px; height: 20px; fill: #25d366; flex: 0 0 auto; }
