/* Broderies TS D'OR — créateur de broderie. Reprend les couleurs et polices du thème quand elles existent. */
.tsc {
	--tsc-indigo: var(--wp--preset--color--brand-500, #3A2F96);
	--tsc-indigo-600: var(--wp--preset--color--brand-600, #2E2580);
	--tsc-indigo-50: var(--wp--preset--color--brand-50, #F3F1FB);
	--tsc-gold: var(--wp--preset--color--gold-500, #C9A13B);
	--tsc-gold-100: var(--wp--preset--color--gold-100, #F7EDD2);
	--tsc-gold-700: var(--wp--preset--color--gold-700, #7A5A12);
	--tsc-ink: var(--wp--preset--color--ink-900, #1F1B2E);
	--tsc-ink-700: var(--wp--preset--color--ink-700, #3B3549);
	--tsc-ink-500: var(--wp--preset--color--ink-500, #625C70);
	--tsc-line: var(--wp--preset--color--sand-300, #E6DCC9);
	--tsc-cream: var(--wp--preset--color--cream-100, #FBF7F0);
	--tsc-linen: var(--wp--preset--color--cream-200, #F3ECDF);
	--tsc-red: var(--wp--preset--color--red-500, #C2363F);
	--tsc-display: var(--wp--preset--font-family--display, Georgia, serif);
	--tsc-body: var(--wp--preset--font-family--body, system-ui, sans-serif);
	padding-block: clamp(28px, 4vw, 56px) clamp(48px, 6vw, 88px);
	color: var(--tsc-ink);
	font-family: var(--tsc-body);
}
.tsc *, .tsc *::before, .tsc *::after { box-sizing: border-box; }
.tsc [hidden] { display: none !important; }
.tsc-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; }

/* En-tête */
.tsc-head { max-width: 760px; margin-bottom: clamp(24px, 3vw, 40px); }
.tsc-head h1 { font-size: var(--wp--preset--font-size--title-xl, 48px); margin: 6px 0 12px; }
.tsc-lead { font-size: var(--wp--preset--font-size--lg, 19px); line-height: 1.6; color: var(--tsc-ink-700); margin: 0; }

/* Mise en page : aperçu à gauche (reste visible), étapes à droite */
.tsc-grid { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: clamp(24px, 3vw, 48px); align-items: start; }
.tsc-stage { position: sticky; top: var(--tsc-offset, 120px); z-index: 2; background: var(--tsc-linen); border: 1px solid var(--tsc-line); border-radius: 28px; padding: 16px 16px 14px; }
.tsc-stage-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; margin-bottom: 6px; }
.tsc-stage-hint { font-size: 13.5px; color: var(--tsc-ink-500); }
.tsc-svg { display: block; width: 100%; height: auto; max-height: calc(100vh - var(--tsc-offset, 120px) - 150px); min-height: 260px; margin-inline: auto; touch-action: none; -webkit-user-select: none; user-select: none; }
.tsc-info { margin: 6px 0 0; text-align: center; font-size: 14.5px; font-weight: 700; color: var(--tsc-ink-700); }
.tsc-info--tailles { margin-top: 2px; font-weight: 600; color: var(--tsc-indigo); }
.tsc-note { margin: 8px 0 0; text-align: center; font-size: 12.5px; color: var(--tsc-ink-500); }

/* Sélecteur devant / dos */
.tsc-switch { display: inline-flex; gap: 2px; padding: 4px; background: #fff; border: 1px solid var(--tsc-line); border-radius: 999px; }
.tsc-switch button { position: relative; display: inline-flex; align-items: center; gap: 6px; padding: 8px 18px; border: 0; border-radius: 999px; background: transparent; color: var(--tsc-ink-500); font: 800 14.5px var(--tsc-body); cursor: pointer; }
.tsc-switch button[aria-pressed="true"] { background: var(--tsc-indigo); color: #fff; }
.tsc-switch button:focus-visible { outline: 3px solid var(--tsc-gold); outline-offset: 2px; }
.tsc-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--tsc-gold); display: none; }
.tsc-switch button.has-content .tsc-dot { display: inline-block; }

/* Dessin */
.tsc-zone { fill: rgba(201, 161, 59, 0.07); stroke: var(--tsc-gold); stroke-width: 2; stroke-dasharray: 8 6; }
.tsc-zone-hint { font-family: var(--tsc-body); font-weight: 800; fill: var(--tsc-gold-700); opacity: 0.85; pointer-events: none; }
.tsc-item { cursor: grab; outline: none; }
.tsc-item:active { cursor: grabbing; }
.tsc-select { fill: none; stroke: var(--tsc-indigo); stroke-width: 1.6; stroke-dasharray: 5 4; pointer-events: none; }

/* Étapes */
.tsc-panel { display: grid; gap: 16px; }
.tsc-step { background: #fff; border: 1px solid var(--tsc-line); border-radius: 22px; padding: 20px 22px 22px; transition: opacity 200ms; }
.tsc-step h2 { display: flex; align-items: center; gap: 12px; margin: 0 0 16px; font: 800 17px/1.3 var(--tsc-body); letter-spacing: 0; color: var(--tsc-ink); }
.tsc-num { display: inline-grid; place-items: center; flex: none; width: 32px; height: 32px; border-radius: 50%; background: var(--tsc-indigo-50); color: var(--tsc-indigo); font: 600 15px var(--tsc-display); }
.tsc-step.is-disabled { opacity: 0.5; }
.tsc-step.is-disabled .tsc-stack { pointer-events: none; }
.tsc-stack { display: grid; gap: 14px; }
.tsc-tip { margin: 0; font-size: 13.5px; line-height: 1.5; color: var(--tsc-ink-500); }
.tsc-tip--warn:not(:empty) { color: var(--tsc-gold-700); font-weight: 700; }
.tsc-error { margin: 0; color: var(--tsc-red); font-size: 14px; font-weight: 700; }
.tsc-error:empty, .tsc-tip:empty { display: none; }

/* 1. Vêtements */
.tsc-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.tsc-card { position: relative; display: grid; justify-items: center; gap: 6px; padding: 12px 6px 10px; border: 1.5px solid var(--tsc-line); border-radius: 16px; background: #fff; cursor: pointer; text-align: center; font-size: 13.5px; font-weight: 800; line-height: 1.25; color: var(--tsc-ink-700); transition: border-color 160ms, background-color 160ms; }
.tsc-card svg { width: 64px; height: 74px; }
.tsc-ico { fill: var(--tsc-ico, #fff); stroke: rgba(31, 27, 46, 0.45); stroke-width: 9; stroke-linejoin: round; }
.tsc-card:hover { border-color: var(--tsc-indigo); }
.tsc-card:has(input:checked) { border-color: var(--tsc-indigo); background: var(--tsc-indigo-50); color: var(--tsc-indigo); box-shadow: inset 0 0 0 1px var(--tsc-indigo); }
.tsc-card:has(input:focus-visible), .tsc-pill:has(input:focus-visible), .tsc-font:has(input:focus-visible) { outline: 3px solid var(--tsc-gold); outline-offset: 2px; }

/* 2 et 5. Nuanciers */
.tsc-swatches { display: flex; flex-wrap: wrap; gap: 10px; }
.tsc-swatch { position: relative; width: 38px; height: 38px; border-radius: 50%; background: var(--c); box-shadow: inset 0 0 0 1px rgba(31, 27, 46, 0.2); cursor: pointer; transition: transform 160ms; }
.tsc-swatch:hover { transform: scale(1.08); }
.tsc-swatch:has(input:checked) { outline: 2.5px solid var(--tsc-indigo); outline-offset: 3px; }
.tsc-swatch:has(input:focus-visible) { outline: 3px solid var(--tsc-gold); outline-offset: 3px; }
.tsc-swatches--fils { gap: 8px; }
.tsc-swatch--fil { width: 32px; height: 32px; background: radial-gradient(circle at 35% 30%, rgba(255, 255, 255, 0.55), transparent 55%), var(--c); }
.tsc-sub { font-weight: 600; color: var(--tsc-ink-500); }

/* 3. Emplacements */
.tsc-pills { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 12px; }
.tsc-pill { position: relative; display: inline-flex; padding: 10px 16px; border: 1.5px solid var(--tsc-line); border-radius: 999px; background: #fff; cursor: pointer; font-size: 14.5px; font-weight: 800; color: var(--tsc-ink-700); transition: border-color 160ms, background-color 160ms; }
.tsc-pill small { margin-left: 6px; font-size: 12.5px; font-weight: 600; color: var(--tsc-ink-500); }
.tsc-pill:hover { border-color: var(--tsc-indigo); }
.tsc-pill:has(input:checked) { border-color: var(--tsc-indigo); background: var(--tsc-indigo-50); color: var(--tsc-indigo); }

/* 4. Logo */
.tsc-drop { display: grid; justify-items: center; gap: 4px; padding: 22px 16px; border: 2px dashed var(--tsc-gold); border-radius: 18px; background: var(--tsc-cream); text-align: center; cursor: pointer; transition: background-color 160ms; }
.tsc-drop:hover, .tsc-drop.is-over { background: var(--tsc-gold-100); }
.tsc-drop strong { font-size: 16px; color: var(--tsc-ink); }
.tsc-drop span:not(.tsc-drop-ico) { font-size: 14px; color: var(--tsc-ink-700); }
.tsc-drop small { font-size: 12.5px; color: var(--tsc-ink-500); }
.tsc-drop-ico { display: grid; place-items: center; width: 40px; height: 40px; margin-bottom: 4px; border-radius: 50%; background: var(--tsc-indigo); color: #fff; font-size: 24px; font-weight: 600; line-height: 1; }
.tsc-file { display: flex; align-items: center; gap: 12px; padding: 10px; border: 1px solid var(--tsc-line); border-radius: 16px; }
.tsc-thumb { flex: none; width: 56px; height: 56px; object-fit: contain; border-radius: 10px; background: var(--tsc-linen); }
.tsc-file-meta { display: grid; gap: 2px; min-width: 0; flex: 1; }
.tsc-file-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14.5px; }

.tsc-check { display: flex; align-items: center; gap: 10px; font-size: 14.5px; font-weight: 700; color: var(--tsc-ink-700); cursor: pointer; }
.tsc-check input { flex: none; width: 20px; height: 20px; margin: 0; accent-color: var(--tsc-indigo); }
.tsc-check small { font-weight: 600; color: var(--tsc-ink-500); }

/* Réglages communs */
.tsc-range { display: grid; gap: 6px; }
.tsc-range-label { display: flex; justify-content: space-between; gap: 12px; font-size: 14.5px; font-weight: 800; color: var(--tsc-ink-700); }
.tsc-range-value { font-weight: 800; color: var(--tsc-indigo); }
.tsc-range input { width: 100%; accent-color: var(--tsc-indigo); }
.tsc-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.tsc-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 8px 16px; border: 1.5px solid var(--tsc-line); border-radius: 999px; background: #fff; color: var(--tsc-ink); font: 700 14px var(--tsc-body); text-decoration: none; cursor: pointer; transition: border-color 160ms, color 160ms; }
.tsc-btn:hover { border-color: var(--tsc-indigo); color: var(--tsc-indigo); text-decoration: none; }
.tsc-btn--danger:hover { border-color: var(--tsc-red); color: var(--tsc-red); }
.tsc-btn:focus-visible, .tsc-submit:focus-visible { outline: 3px solid var(--tsc-gold); outline-offset: 2px; }

/* 5. Texte */
.tsc-field { display: grid; gap: 6px; }
.tsc-label { font-size: 14.5px; font-weight: 800; color: var(--tsc-ink-700); }
.tsc input[type="text"], .tsc input[type="email"], .tsc input[type="tel"], .tsc input[type="number"], .tsc textarea { width: 100%; min-height: 48px; padding: 11px 14px; border: 1.5px solid var(--tsc-line); border-radius: 14px; background: #fff; color: var(--tsc-ink); font: 16px/1.4 var(--tsc-body); }
.tsc textarea { min-height: 96px; resize: vertical; }
.tsc input:focus, .tsc textarea:focus { outline: none; border-color: var(--tsc-indigo); box-shadow: 0 0 0 4px rgba(58, 47, 150, 0.14); }
.tsc input:disabled { background: var(--tsc-cream); }
.tsc-fonts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.tsc-font { position: relative; display: grid; justify-items: center; gap: 2px; padding: 8px 6px; border: 1.5px solid var(--tsc-line); border-radius: 14px; cursor: pointer; }
.tsc-font:has(input:checked) { border-color: var(--tsc-indigo); background: var(--tsc-indigo-50); }
.tsc-font-sample { font-size: 24px; line-height: 1.2; color: var(--tsc-ink); }
.tsc-font-name { font-size: 12.5px; font-weight: 700; color: var(--tsc-ink-500); }

/* 6. Demande */
.tsc-summary { list-style: none; margin: 0 0 18px; padding: 14px 16px; border-radius: 16px; background: var(--tsc-cream); display: grid; gap: 6px; font-size: 14.5px; line-height: 1.45; }
.tsc-summary .is-empty { color: var(--tsc-ink-500); }
.tsc-form { display: grid; gap: 16px; }
.tsc-fields { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
.tsc-field--wide { grid-column: 1 / -1; }
.tsc-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.tsc-consent { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; line-height: 1.5; color: var(--tsc-ink-700); cursor: pointer; }
.tsc-consent input { flex: none; width: 20px; height: 20px; margin-top: 1px; accent-color: var(--tsc-indigo); }
.tsc-status { margin: 0; font-size: 14.5px; font-weight: 700; }
.tsc-status:empty { display: none; }
.tsc-status.is-error { color: var(--tsc-red); }
.tsc-submit { width: 100%; padding: 16px 24px; border: 0; border-radius: 999px; background: var(--tsc-indigo); color: #fff; font: 800 17px var(--tsc-body); cursor: pointer; box-shadow: 0 8px 20px rgba(58, 47, 150, 0.22); transition: background-color 160ms; }
.tsc-submit:hover { background: var(--tsc-indigo-600); }
.tsc-submit:disabled { opacity: 0.65; cursor: progress; }
.tsc-success { text-align: center; padding: 12px 8px; }
.tsc-success h2 { display: block; margin: 0 0 8px; font: 600 26px/1.2 var(--tsc-display); }
.tsc-success p { margin: 0 0 14px; color: var(--tsc-ink-700); }
.tsc-success-ico { display: grid; place-items: center; width: 56px; height: 56px; margin: 0 auto 12px !important; border-radius: 50%; background: var(--tsc-indigo-50); color: var(--tsc-indigo); font-size: 28px; font-weight: 800; }

/* Tablette et téléphone : aperçu en haut, toujours visible, étapes en dessous */
@media (max-width: 960px) {
	.tsc-grid { grid-template-columns: minmax(0, 1fr); }
	.tsc-stage { padding: 10px 10px 8px; border-radius: 20px; box-shadow: 0 10px 24px rgba(31, 27, 46, 0.08); }
	.tsc-svg { max-height: 34vh; min-height: 200px; }
	.tsc-stage-hint, .tsc-note { display: none; }
	.tsc-info { margin-top: 2px; font-size: 13px; }
}
@media (max-width: 600px) {
	.tsc-cards { gap: 6px; }
	.tsc-card { padding: 8px 4px; font-size: 12px; }
	.tsc-card svg { width: 44px; height: 52px; }
	.tsc-step { padding: 16px 16px 18px; border-radius: 18px; }
	.tsc-fields { grid-template-columns: minmax(0, 1fr); }
	.tsc-switch button { padding: 7px 14px; }
}
@media (prefers-reduced-motion: reduce) {
	.tsc *, .tsc *::before, .tsc *::after { transition: none !important; }
}
