/* TalabaStore — demandes : fenêtre « Demander un devis » et page « Recommander un commerce ». */
.tsaio-rq, .tsaio-rcm {
	--rq-ink: var(--wp--preset--color--ink, #0D1F1A);
	--rq-pri: var(--wp--preset--color--primary, #0F7363);
	--rq-pri-h: var(--wp--preset--color--primary-dark, #0B5E51);
	--rq-teal: var(--wp--preset--color--brand-teal, #2BB6A1);
	--rq-muted: var(--wp--preset--color--muted, #56665F);
	--rq-line: var(--wp--preset--color--line, #DDE8E3);
	--rq-surf: var(--wp--preset--color--surface, #F3F8F6);
	--rq-mint: var(--wp--preset--color--mint, #E6F5EE);
	--rq-amber: var(--wp--preset--color--amber, #FFC857);
	--rq-amber-s: var(--wp--preset--color--amber-soft, #FFF4D6);
	--rq-red: var(--wp--preset--color--danger, #B42318);
	--rq-grad: var(--wp--preset--gradient--brand, linear-gradient(120deg, #2BB6A1 0%, #5CBD80 100%));
}
html.tsaio-rq-lock { overflow: hidden; }

/* Fenêtre */
dialog.tsaio-rq { padding: 0; border: 0; background: transparent; max-width: none; max-height: none; width: 100%; height: 100%; margin: 0; inset: 0; display: none; color: var(--rq-ink); font: inherit; }
dialog.tsaio-rq[open] { display: flex; align-items: center; justify-content: center; padding: 24px; }
dialog.tsaio-rq::backdrop { background: rgba(8, 20, 17, .62); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
dialog.tsaio-rq[open] .tsaio-rq__panel { animation: tsaio-rq-in .28s cubic-bezier(.2, .9, .3, 1.15); }
@keyframes tsaio-rq-in { from { opacity: 0; transform: translateY(18px) scale(.98); } to { opacity: 1; transform: none; } }
.tsaio-rq__panel { position: relative; width: min(640px, 100%); max-height: calc(100dvh - 48px); overflow: auto; overscroll-behavior: contain; background: #fff; border-radius: 26px; box-shadow: 0 40px 90px rgba(5, 20, 16, .35); }
.tsaio-rq--page .tsaio-rq__panel { width: 100%; max-height: none; overflow: visible; box-shadow: 0 1px 0 var(--rq-line), 0 18px 40px rgba(13, 31, 26, .06); border: 1px solid var(--rq-line); }
.tsaio-rq__close { position: absolute; top: 14px; inset-inline-end: 14px; z-index: 2; width: 40px; height: 40px; border-radius: 50%; border: 0; background: rgba(255, 255, 255, .14); color: #fff; display: grid; place-items: center; cursor: pointer; transition: background .2s; }
.tsaio-rq__close:hover { background: rgba(255, 255, 255, .26); }
.tsaio-rq__head { position: relative; padding: 30px 30px 26px; background: var(--rq-ink); color: #fff; border-radius: 26px 26px 0 0; overflow: hidden; }
.tsaio-rq__head::after { content: ""; position: absolute; right: -60px; top: -80px; width: 240px; height: 240px; border-radius: 50%; background: radial-gradient(circle, rgba(92, 189, 128, .45), transparent 65%); pointer-events: none; }
.tsaio-rq__head h2 { margin: 2px 0 8px; font-size: clamp(22px, 3.4vw, 28px); line-height: 1.15; color: #fff; }
.tsaio-rq__head p { margin: 0; color: #CFE3DB; font-size: 15px; line-height: 1.5; max-width: 52ch; }
.tsaio-rq__badge { display: inline-grid; place-items: center; width: 46px; height: 46px; border-radius: 15px; background: var(--rq-grad); color: var(--rq-ink); margin-bottom: 14px; box-shadow: 0 10px 24px rgba(43, 182, 161, .35); }
.tsaio-rq__kicker { margin: 0 !important; font-size: 12.5px !important; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: #9FE0BD !important; }

/* Formulaire */
.tsaio-rq__form, .tsaio-rq__done { padding: 26px 30px 28px; }
.tsaio-rq__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 16px; }
.tsaio-rq__field { display: flex; flex-direction: column; gap: 6px; margin: 0; font-weight: 700; font-size: 14px; }
.tsaio-rq__field > span i, .tsaio-rq__chips legend i { color: var(--rq-red); font-style: normal; }
.tsaio-rq__form > .tsaio-rq__field { margin-top: 16px; }
.tsaio-rq input[type="text"], .tsaio-rq input[type="tel"], .tsaio-rq input[type="email"], .tsaio-rq select, .tsaio-rq textarea {
	width: 100%; box-sizing: border-box; min-height: 48px; padding: 11px 14px; border: 1.5px solid var(--rq-line); border-radius: 14px; background: var(--rq-surf);
	font: inherit; font-size: 16px; font-weight: 500; color: var(--rq-ink); transition: border-color .15s, box-shadow .15s, background .15s; appearance: none; -webkit-appearance: none;
}
.tsaio-rq select { background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2356665F' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; background-size: 18px; padding-right: 40px; }
[dir="rtl"] .tsaio-rq select { background-position: left 12px center; padding-right: 14px; padding-left: 40px; }
.tsaio-rq select:disabled { opacity: .6; }
.tsaio-rq textarea { min-height: 92px; resize: vertical; }
.tsaio-rq input:focus, .tsaio-rq select:focus, .tsaio-rq textarea:focus { outline: none; border-color: var(--rq-teal); background: #fff; box-shadow: 0 0 0 4px rgba(43, 182, 161, .16); }
.tsaio-rq ::placeholder { color: #8FA39B; font-weight: 400; }
.tsaio-rq__err { font-style: normal; font-size: 13px; font-weight: 600; color: var(--rq-red); min-height: 0; }
.tsaio-rq__err:empty { display: none; }
.tsaio-rq .is-invalid input, .tsaio-rq .is-invalid select, .tsaio-rq .is-invalid textarea { border-color: var(--rq-red); background: #FFF7F6; }

.tsaio-rq__chips { border: 0; padding: 0; margin: 18px 0 0; display: flex; flex-wrap: wrap; gap: 8px; min-width: 0; }
.tsaio-rq__chips legend { font-weight: 700; font-size: 14px; padding: 0; margin-bottom: 8px; width: 100%; }
.tsaio-rq__chips label { position: relative; margin: 0; cursor: pointer; }
.tsaio-rq__chips input { position: absolute; opacity: 0; pointer-events: none; }
.tsaio-rq__chips span { display: inline-flex; align-items: center; gap: 7px; padding: 10px 15px; border-radius: 999px; border: 1.5px solid var(--rq-line); background: #fff; font-weight: 700; font-size: 14px; transition: all .15s; }
.tsaio-rq__chips input:checked + span { border-color: var(--rq-pri); background: var(--rq-mint); color: var(--rq-pri-h); box-shadow: inset 0 0 0 1px var(--rq-pri); }
.tsaio-rq__chips input:focus-visible + span { box-shadow: 0 0 0 4px rgba(43, 182, 161, .25); }
.tsaio-rq__chips .tsaio-rq__err { width: 100%; }

.tsaio-rq__alert { margin: 16px 0 0; padding: 12px 14px; border-radius: 12px; background: #FEE4E2; color: var(--rq-red); font-weight: 600; font-size: 14px; }
.tsaio-rq__foot { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--rq-line); }
.tsaio-rq__foot p { margin: 0; display: flex; gap: 7px; align-items: flex-start; font-size: 13px; color: var(--rq-muted); line-height: 1.45; max-width: 34ch; }
.tsaio-rq__foot p svg { flex: none; margin-top: 2px; }
.tsaio-rq__submit, .tsaio-rq__ghost { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 50px; padding: 12px 22px; border-radius: 15px; border: 0; font: inherit; font-weight: 800; font-size: 16px; cursor: pointer; text-decoration: none !important; white-space: nowrap; transition: background .15s, transform .08s, box-shadow .15s; }
.tsaio-rq__submit { background: var(--rq-pri); color: #fff !important; box-shadow: 0 10px 22px rgba(15, 115, 99, .25); }
.tsaio-rq__submit:hover { background: var(--rq-pri-h); }
.tsaio-rq__submit:active { transform: translateY(1px); }
.tsaio-rq__submit[aria-busy="true"] { opacity: .75; cursor: progress; }
.tsaio-rq__submit[aria-busy="true"] svg { display: none; }
.tsaio-rq__submit[aria-busy="true"]::after { content: ""; width: 18px; height: 18px; border-radius: 50%; border: 2.5px solid rgba(255, 255, 255, .4); border-top-color: #fff; animation: tsaio-rq-spin .7s linear infinite; }
@keyframes tsaio-rq-spin { to { transform: rotate(360deg); } }
.tsaio-rq__ghost { background: var(--rq-surf); color: var(--rq-ink); box-shadow: inset 0 0 0 1.5px var(--rq-line); }
.tsaio-rq__ghost:hover { background: #fff; }
.tsaio-rq__trap { position: absolute !important; inset-inline-start: 0; top: 0; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; opacity: 0; pointer-events: none; }

/* Confirmation */
.tsaio-rq__done { text-align: center; outline: none; padding-top: 40px; padding-bottom: 34px; }
.tsaio-rq__done-icon { display: inline-grid; place-items: center; width: 68px; height: 68px; border-radius: 50%; background: var(--rq-grad); color: var(--rq-ink); box-shadow: 0 14px 30px rgba(43, 182, 161, .35); animation: tsaio-rq-pop .45s cubic-bezier(.2, .9, .3, 1.4); }
@keyframes tsaio-rq-pop { from { transform: scale(.4); opacity: 0; } to { transform: none; opacity: 1; } }
.tsaio-rq__done h2 { margin: 18px 0 6px; font-size: 24px; }
.tsaio-rq__done p { margin: 0 auto 10px; max-width: 46ch; color: var(--rq-muted); line-height: 1.55; }
.tsaio-rq__number { display: inline-block; padding: 5px 12px; border-radius: 99px; background: var(--rq-mint); color: var(--rq-pri-h) !important; font-weight: 800; font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 14px; letter-spacing: .03em; }
.tsaio-rq__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 10px; margin-top: 20px !important; }
.tsaio-rq__actions [hidden] { display: none !important; }

/* Page « Recommander » */
.tsaio-rcm { max-width: 760px; margin-inline: auto; }
.tsaio-rcm__intro { display: flex; gap: 18px; align-items: flex-start; margin-bottom: 20px; }
.tsaio-rcm__intro .tsaio-rq__badge { flex: none; margin: 0; }
.tsaio-rcm__intro .tsaio-rq__kicker { color: var(--rq-pri) !important; }
.tsaio-rcm__intro h2 { margin: 4px 0 8px; font-size: clamp(24px, 3.4vw, 32px); line-height: 1.15; }
.tsaio-rcm__intro p { margin: 0; color: var(--rq-muted); line-height: 1.55; }
.tsaio-rcm__card { display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center; margin: 0 0 18px; padding: 16px 18px; border-radius: 20px; background: var(--rq-ink); color: #DDE8E3 !important; text-decoration: none !important; font-size: 14.5px; line-height: 1.5; box-shadow: 0 18px 38px rgba(13, 31, 26, .2); transition: transform .15s; position: relative; overflow: hidden; }
.tsaio-rcm__card::after { content: ""; position: absolute; right: -40px; bottom: -70px; width: 200px; height: 200px; border-radius: 50%; background: radial-gradient(circle, rgba(255, 200, 87, .3), transparent 65%); pointer-events: none; }
.tsaio-rcm__card:hover { transform: translateY(-2px); }
.tsaio-rcm__card strong { display: block; color: #fff; font-size: 16px; margin-bottom: 2px; }
.tsaio-rcm__card-icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 14px; background: var(--rq-amber); color: var(--rq-ink); }
.tsaio-rcm__card-go { display: inline-flex; align-items: center; gap: 6px; padding: 10px 16px; border-radius: 13px; background: var(--rq-amber); color: var(--rq-ink); font-weight: 800; white-space: nowrap; position: relative; z-index: 1; }
.tsaio-rcm__ok { display: flex; gap: 8px; align-items: center; margin: 0 0 18px; padding: 12px 16px; border-radius: 16px; background: var(--rq-mint); color: var(--rq-pri-h); font-weight: 700; }
.tsaio-rq--page .tsaio-rq__form > .tsaio-rq__chips:first-of-type { margin-top: 0; }
.tsaio-rq--page .tsaio-rq__grid { margin-top: 16px; }
.tsaio-rq__me { margin-top: 22px !important; padding-top: 18px; border-top: 1px dashed var(--rq-line); }
.tsaio-rq__sub { grid-column: 1 / -1; margin: 0; font-weight: 800; font-size: 15px; }

@media (max-width: 640px) {
	dialog.tsaio-rq[open] { align-items: flex-end; padding: 0; }
	.tsaio-rq__panel { border-radius: 24px 24px 0 0; max-height: 94dvh; }
	dialog.tsaio-rq[open] .tsaio-rq__panel { animation: tsaio-rq-up .3s cubic-bezier(.2, .9, .3, 1); }
	@keyframes tsaio-rq-up { from { transform: translateY(40%); opacity: .4; } to { transform: none; opacity: 1; } }
	.tsaio-rq__head { padding: 24px 20px 20px; border-radius: 24px 24px 0 0; }
	.tsaio-rq__form, .tsaio-rq__done { padding: 20px 20px 24px; }
	.tsaio-rq--page .tsaio-rq__panel { border-radius: 22px; }
	.tsaio-rq__grid { grid-template-columns: 1fr; }
	.tsaio-rq__foot { flex-direction: column; align-items: stretch; }
	.tsaio-rq__foot p { max-width: none; }
	.tsaio-rq__submit { width: 100%; }
	.tsaio-rcm__intro { flex-direction: column; gap: 12px; }
	.tsaio-rcm__card { grid-template-columns: auto 1fr; }
	.tsaio-rcm__card-go { grid-column: 1 / -1; justify-content: center; }
}
@media (prefers-reduced-motion: reduce) {
	dialog.tsaio-rq[open] .tsaio-rq__panel, .tsaio-rq__done-icon { animation: none; }
}

/* Mode sombre (thème T27) */
html[data-theme="dark"] .tsaio-rq__panel { background: #12201B; box-shadow: 0 40px 90px rgba(0, 0, 0, .6); }
html[data-theme="dark"] .tsaio-rq--page .tsaio-rq__panel { box-shadow: none; }
html[data-theme="dark"] .tsaio-rq__head { background: #07100D; box-shadow: inset 0 -1px 0 rgba(255, 255, 255, .06); }
html[data-theme="dark"] .tsaio-rq input[type="text"], html[data-theme="dark"] .tsaio-rq input[type="tel"], html[data-theme="dark"] .tsaio-rq input[type="email"],
html[data-theme="dark"] .tsaio-rq select, html[data-theme="dark"] .tsaio-rq textarea { background-color: #0E1A16 !important; }
html[data-theme="dark"] .tsaio-rq input:focus, html[data-theme="dark"] .tsaio-rq select:focus, html[data-theme="dark"] .tsaio-rq textarea:focus { background-color: #0B1512 !important; }
html[data-theme="dark"] .tsaio-rq__chips span { background: #0E1A16; }
html[data-theme="dark"] .tsaio-rq .is-invalid input, html[data-theme="dark"] .tsaio-rq .is-invalid select, html[data-theme="dark"] .tsaio-rq .is-invalid textarea { background-color: #2A1513 !important; }
html[data-theme="dark"] .tsaio-rq__submit, html[data-theme="dark"] .tsaio-rq__done-icon, html[data-theme="dark"] .tsaio-rq__badge { color: #06120E !important; }
html[data-theme="dark"] .tsaio-rq__alert { background: #3A1815; color: #FDA29B; }
html[data-theme="dark"] .tsaio-rcm__card { background: #07100D; box-shadow: inset 0 0 0 1px rgba(255, 200, 87, .25); }
html[data-theme="dark"] .tsaio-rcm__card-go { color: #1A1300; }
