/* Recherche IA Web-to-Print – s'adapte à la police et aux couleurs du thème */
.wtp-ai {
	--wtp-ink: currentColor;
	--wtp-muted: color-mix(in srgb, currentColor 62%, transparent);
	--wtp-rule: color-mix(in srgb, currentColor 16%, transparent);
	--wtp-chip: color-mix(in srgb, currentColor 7%, transparent);
	--wtp-ok: #1e8a4c;
	--wtp-warn: #b66a00;
	--wtp-late: #c2264b;
	/* Couleurs du logo */
	--wtp-blue: #0299dd;
	--wtp-pink: #fa027b;
	--wtp-violet: #480379;
	max-width: 1080px;
	margin: 0 auto 2rem;
	line-height: 1.5;
}
.wtp-ai *, .wtp-ai *::before, .wtp-ai *::after { box-sizing: border-box; }

.wtp-ai__title { font-size: clamp(1.6rem, 4.2vw, 2.9rem); line-height: 1.12; margin: 0 auto 1.5rem; text-align: center; text-wrap: balance; }

.wtp-ai__sheet { position: relative; }

.wtp-ai__form { display: flex; align-items: stretch; border: 2px solid var(--wtp-ink); border-radius: 4px; overflow: hidden; background: transparent; margin: 0; }
.wtp-ai__form:focus-within { box-shadow: 0 0 0 4px color-mix(in srgb, var(--wtp-accent) 28%, transparent); }
.wtp-ai .wtp-ai__input { flex: 1; border: 0; background: transparent; color: inherit; font: inherit; font-size: 1.15rem; padding: 1rem 1.15rem; resize: none; min-height: 3.5rem; line-height: 1.4; box-shadow: none; margin: 0; width: auto; }
.wtp-ai--compact .wtp-ai__input { font-size: 1rem; padding: .7rem .9rem; min-height: 2.8rem; }
.wtp-ai .wtp-ai__input:focus { outline: none; }
.wtp-ai .wtp-ai__go { border: 0; border-radius: 0; background: var(--wtp-accent); color: #fff; font: inherit; font-weight: 700; padding: 0 1.4rem; cursor: pointer; margin: 0; }
.wtp-ai .wtp-ai__go:disabled { opacity: .6; cursor: wait; }

.wtp-ai__examples { display: flex; flex-wrap: wrap; justify-content: center; gap: .5rem; margin-top: .9rem; }
.wtp-ai--searched .wtp-ai__examples { display: none; }
.wtp-ai__examples > span { color: var(--wtp-muted); align-self: center; font-size: .9rem; }
.wtp-ai .wtp-ai__chip { background: var(--wtp-chip); color: inherit; border: 0; border-radius: 999px; padding: .4rem .85rem; font: inherit; font-size: .9rem; cursor: pointer; margin: 0; }
.wtp-ai .wtp-ai__chip:hover { background: color-mix(in srgb, var(--wtp-accent) 16%, transparent); }
.wtp-ai :focus-visible { outline: 3px solid var(--wtp-accent); outline-offset: 2px; }

/* Résultats */
.wtp-ai__results { scroll-margin-top: 90px; }
.wtp-ai__status { position: relative; overflow: hidden; display: flex; align-items: center; justify-content: center; gap: 1rem; margin: 1.6rem 0; padding: 1.6rem 1.4rem; border: 2px solid var(--wtp-accent); border-radius: 6px; background: color-mix(in srgb, var(--wtp-accent) 7%, transparent); color: inherit; font-size: 1.2rem; font-weight: 700; text-align: left; }
.wtp-ai__status small { display: block; font-size: .9rem; font-weight: 400; color: var(--wtp-muted); margin-top: .15rem; }
.wtp-ai__status::after { content: ""; position: absolute; left: 0; bottom: 0; height: 4px; width: 35%; background: linear-gradient(90deg, var(--wtp-blue), var(--wtp-pink), var(--wtp-violet)); animation: wtp-bar 1.4s ease-in-out infinite; }
@keyframes wtp-bar { 0% { left: -35%; } 100% { left: 100%; } }
.wtp-ai__status .wtp-ai__reg { color: var(--wtp-accent); width: 30px; height: 30px; flex: none; }
.wtp-ai__status .wtp-ai__reg::before, .wtp-ai__status .wtp-ai__reg::after { top: -8px; height: 42px; }
.wtp-ai__reg { width: 22px; height: 22px; border-radius: 50%; border: 2px solid currentColor; position: relative; animation: wtp-spin 1.6s linear infinite; }
.wtp-ai__reg::before, .wtp-ai__reg::after { content: ""; position: absolute; background: currentColor; left: 50%; top: -6px; width: 2px; height: 30px; transform: translateX(-50%); }
.wtp-ai__reg::after { transform: translateX(-50%) rotate(90deg); }
@keyframes wtp-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .wtp-ai__reg, .wtp-ai__status::after { animation: none; } .wtp-ai__status::after { width: 100%; left: 0; } }

.wtp-ai__brief { border-left: 6px solid var(--wtp-accent); padding: 1.2rem 1.4rem; margin: 1.4rem 0 2rem; background: var(--wtp-chip); border-radius: 2px; }
.wtp-ai__brief h3 { margin: 0 0 .3rem; font-size: 1.5rem; line-height: 1.2; }
.wtp-ai__brief p { margin: .2rem 0 0; max-width: 70ch; }
.wtp-ai__meta { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .9rem; }
.wtp-ai__tag { font-size: .85rem; padding: .2rem .65rem; border-radius: 3px; background: var(--wtp-chip); }
.wtp-ai__tag--time { background: color-mix(in srgb, var(--wtp-blue) 16%, transparent); }
.wtp-ai__alert { margin-top: .9rem; padding: .75rem 1rem; border-radius: 3px; background: color-mix(in srgb, var(--wtp-late) 12%, transparent); font-size: .95rem; }

.wtp-ai__debug { margin-top: .9rem; padding: .6rem .9rem; border: 1px dashed var(--wtp-warn); border-radius: 3px; font-size: .85rem; }
.wtp-ai__group { margin-bottom: 2rem; }
.wtp-ai__ghead { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; border-bottom: 2px solid var(--wtp-ink); padding-bottom: .4rem; }
.wtp-ai__ghead h4 { margin: 0; font-size: 1.2rem; display: flex; align-items: center; gap: .55rem; }
.wtp-ai__swatch { width: 13px; height: 13px; border-radius: 2px; display: inline-block; }
.wtp-ai__group--essentiel .wtp-ai__swatch { background: var(--wtp-pink); }
.wtp-ai__group--recommande .wtp-ai__swatch { background: var(--wtp-blue); }
.wtp-ai__group--bonus .wtp-ai__swatch { background: var(--wtp-violet); }
.wtp-ai .wtp-ai__addall { background: none; color: inherit; border: 1px solid var(--wtp-rule); border-radius: 3px; padding: .3rem .7rem; font: inherit; font-size: .85rem; cursor: pointer; }

.wtp-ai__item { display: grid; grid-template-columns: 72px 1fr auto; gap: .4rem 1.2rem; align-items: center; padding: 1rem 0; border-bottom: 1px solid var(--wtp-rule); }
.wtp-ai__thumb img { width: 72px; height: 72px; object-fit: cover; border-radius: 3px; display: block; }
.wtp-ai__body h5 { margin: 0; font-size: 1.05rem; }
.wtp-ai__body h5 a { color: inherit; text-decoration: none; }
.wtp-ai__body h5 a:hover { text-decoration: underline; }
.wtp-ai__why { margin: .15rem 0 .4rem; color: var(--wtp-muted); font-size: .95rem; max-width: 62ch; }
.wtp-ai__facts { display: flex; flex-wrap: wrap; gap: .3rem 1rem; font-size: .85rem; color: var(--wtp-muted); }
.wtp-ai__facts .is-ok { color: var(--wtp-ok); }
.wtp-ai__facts .is-warn { color: var(--wtp-warn); }
.wtp-ai__facts .is-late { color: var(--wtp-late); }
.wtp-ai__facts .is-express { display: inline-block; padding: .1rem .6rem; border-radius: 999px; background: color-mix(in srgb, currentColor 11%, transparent); font-weight: 700; line-height: 1.5; }
.wtp-ai__facts .is-express::before { content: "⚡ "; }
.wtp-ai__gamme { display: grid; grid-template-columns: 120px 1fr; gap: 1.2rem; align-items: center; margin: 0 0 2rem; padding: 1rem; border: 2px dashed var(--wtp-rule); border-radius: 4px; color: inherit; text-decoration: none; }
.wtp-ai__gamme:hover { border-color: var(--wtp-accent); }
.wtp-ai__gamme img, .wtp-ai__gamme-ph { width: 120px; height: 120px; object-fit: cover; border-radius: 3px; display: block; }
.wtp-ai__gamme-ph { background: linear-gradient(135deg, var(--wtp-blue), var(--wtp-pink) 55%, var(--wtp-violet)); }
.wtp-ai__gamme-body { display: flex; flex-direction: column; gap: .3rem; }
.wtp-ai__gamme-body strong { font-size: 1.15rem; }
.wtp-ai__gamme-text { color: var(--wtp-muted); max-width: 62ch; }
.wtp-ai__gamme-cta { font-weight: 700; color: var(--wtp-accent); text-decoration: underline; text-underline-offset: 3px; }
@media (max-width: 640px) { .wtp-ai__gamme { grid-template-columns: 72px 1fr; } .wtp-ai__gamme img, .wtp-ai__gamme-ph { width: 72px; height: 72px; } }
.wtp-ai__buy { display: flex; flex-direction: column; align-items: flex-end; gap: .4rem; text-align: right; }
.wtp-ai__price { font-weight: 700; white-space: nowrap; }
.wtp-ai__price small { font-weight: 400; color: var(--wtp-muted); }
.wtp-ai .wtp-ai__btn { display: inline-block; border: 1.5px solid var(--wtp-ink); background: transparent; color: inherit; border-radius: 3px; padding: .4rem .9rem; font: inherit; font-size: .9rem; font-weight: 600; text-decoration: none; cursor: pointer; white-space: nowrap; }
.wtp-ai .wtp-ai__btn:hover { background: var(--wtp-accent); border-color: var(--wtp-accent); color: #fff; }
.wtp-ai .wtp-ai__btn.is-added { background: var(--wtp-ok); border-color: var(--wtp-ok); color: #fff; }

.wtp-ai__next { padding: 1.1rem 1.3rem; border: 1px dashed var(--wtp-rule); border-radius: 2px; }
.wtp-ai__next h4 { margin: 0 0 .6rem; font-size: 1rem; }
.wtp-ai__next div { display: flex; flex-wrap: wrap; gap: .5rem; }
.wtp-ai__empty { color: var(--wtp-muted); padding: 1rem 0; }
.wtp-ai__classic { margin: 1.4rem 0 0; color: var(--wtp-muted); font-size: .92rem; text-align: center; }
.wtp-ai__classic a { color: inherit; font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }

@media (max-width: 640px) {
	.wtp-ai__form { flex-direction: column; }
	.wtp-ai .wtp-ai__input { min-height: 4.6rem; font-size: 1.05rem; padding: .85rem 1rem; }
	.wtp-ai .wtp-ai__go { padding: .8rem; }
	.wtp-ai__status { font-size: 1.05rem; padding: 1.3rem 1rem; }

	.wtp-ai__brief { padding: 1rem 1.1rem; margin: 1.2rem 0 1.6rem; }
	.wtp-ai__brief h3 { font-size: 1.3rem; }
	.wtp-ai__brief p { font-size: .95rem; }
	.wtp-ai__tag { font-size: .8rem; }
	.wtp-ai__ghead h4 { font-size: 1.1rem; }

	/* Produit : image en haut à gauche, texte et bouton alignés dans la colonne de droite */
	.wtp-ai__item { grid-template-columns: 64px 1fr; gap: 0 .9rem; align-items: start; padding: 1rem 0; }
	.wtp-ai__thumb { grid-row: 1 / span 2; }
	.wtp-ai__thumb img { width: 64px; height: 64px; }
	.wtp-ai__body h5 { font-size: 1rem; line-height: 1.3; }
	.wtp-ai__why { font-size: .9rem; line-height: 1.45; margin: .25rem 0 .4rem; }
	.wtp-ai__facts { font-size: .8rem; gap: .35rem .8rem; }
	.wtp-ai__facts .is-express { font-size: .78rem; }
	.wtp-ai__buy { grid-column: 2; flex-direction: row; align-items: center; justify-content: flex-start; gap: .8rem; margin-top: .7rem; text-align: left; }
	.wtp-ai .wtp-ai__btn { flex: 1; text-align: center; padding: .55rem 1rem; }

	.wtp-ai__gamme { padding: .9rem; gap: .9rem; }
	.wtp-ai__gamme-body strong { font-size: 1.05rem; }
	.wtp-ai__gamme-text { font-size: .9rem; }
	.wtp-ai__next { padding: 1rem; }
	.wtp-ai__classic { font-size: .85rem; }
}

