/* Styles de l'extension (simulateur, choix du paiement) — s'appuient sur les jetons du thème Toucoclim, avec des valeurs de secours. */

/* Les champs masqués selon une réponse doivent le rester, quel que soit leur affichage. */
.tc-sim [hidden] { display: none !important; }

form.cart:has(.tc-sim) { display: block; }
form.cart:has(.tc-sim) .single_add_to_cart_button { width: 100%; margin-top: 16px; }

.tc-sim {
    margin: 8px 0 0;
    padding: clamp(16px, 3vw, 24px);
    background: var(--surface, #fff);
    border: 1px solid var(--border, #dce6eb);
    border-radius: var(--radius-l, 20px);
}
.tc-sim__title { margin: 0 0 4px; font-size: 1.4rem; }
.tc-sim__lead { color: var(--text-muted, #4c6377); margin-bottom: 8px; }

.tc-q { border: 0; border-top: 1px solid var(--border, #dce6eb); margin: 0; padding: 16px 0; min-width: 0; }
.tc-q legend { font-weight: 700; color: var(--navy, #123b5c); padding: 0; margin-bottom: 8px; float: left; width: 100%; }
.tc-q legend + * { clear: both; }
.tc-help { font-size: .88rem; color: var(--text-muted, #4c6377); margin: 6px 0 0; }

.tc-choice {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 14px; margin: 6px 0 0;
    border: 1px solid var(--border, #dce6eb); border-radius: var(--radius, 12px);
    font-weight: 500; cursor: pointer; background: var(--surface, #fff);
}
.tc-choice:has(input:checked) { border-color: var(--blue, #0161ad); background: var(--arctic-soft, #e3f3f9); }
.tc-choice input { width: 18px; height: 18px; margin: 0; accent-color: var(--blue, #0161ad); }
.tc-choice--small { padding: 6px 10px; margin: 0; font-size: .9rem; }

/* Couleurs d'un même modèle (Product_Colors) : chaque pastille mène à la fiche de cette couleur */
.tc-colors { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0; padding: 0; border: 0; }
.tc-colors legend { width: 100%; margin-bottom: 4px; font-weight: 700; }
.tc-colors__item {
    display: inline-flex; align-items: center; gap: 8px; padding: 8px 14px;
    border: 1px solid var(--border, #dce6eb); border-radius: var(--radius, 12px);
    background: var(--surface, #fff); color: inherit; font-weight: 500; text-decoration: none;
}
.tc-colors__item:hover { border-color: var(--blue, #0161ad); }
.tc-colors__item.is-current { border-color: var(--blue, #0161ad); background: var(--arctic-soft, #e3f3f9); }
.tc-colors__dot { width: 18px; height: 18px; border-radius: 50%; border: 1px solid rgba(0, 0, 0, .25); }

/* Accessoires en option (étoffes Haori) : nom et prix, quantité à droite */
.tc-accessory { display: grid; grid-template-columns: 1fr 90px; align-items: center; gap: 12px; padding: 8px 0; border-top: 1px solid var(--border, #dce6eb); font-weight: 500; }
.tc-accessory small { display: block; font-weight: 400; color: var(--muted, #5b6b75); }
.tc-accessory input { width: 90px; }
/* Vignette : la photo carrée (appareil centré) est recadrée en bandeau sur l'appareil. */
.tc-accessory--image { grid-template-columns: 96px 1fr 90px; }
.tc-accessory__img { box-sizing: border-box; width: 96px; height: 44px; padding: 0 6px; object-fit: cover; border-radius: 6px; background: #fff; }

.tc-input-small { width: 90px; }
.tc-inline { display: inline-flex; align-items: center; gap: 8px; font-weight: 500; margin-top: 8px; }
.tc-input-cp { max-width: 140px; font-size: 1.1rem; letter-spacing: .08em; }
.tc-option + .tc-option { margin-top: 10px; }

.tc-forfait { margin: 8px 0 16px; padding: 12px 16px; background: var(--surface-2, #f7fafb); border-radius: var(--radius, 12px); }
.tc-forfait summary { cursor: pointer; font-weight: 700; color: var(--blue, #0161ad); }
.tc-forfait ul { margin: 10px 0 0; padding-left: 20px; }
.tc-forfait li + li { margin-top: 4px; }

/* Récapitulatif */
.tc-recap-wrap { transition: opacity .15s; }
.tc-recap-wrap.is-loading { opacity: .55; }
.tc-recap {
    padding: 18px; border-radius: var(--radius, 12px);
    background: var(--surface-2, #f7fafb); border: 1px solid var(--border, #dce6eb);
}
.tc-recap__title { font-size: 1.15rem; margin: 0 0 10px; }
.tc-recap__table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.tc-recap__table th, .tc-recap__table td { padding: 7px 0; border-bottom: 1px dashed var(--border, #dce6eb); vertical-align: top; }
.tc-recap__table th { text-align: left; font-weight: 500; padding-right: 12px; }
.tc-recap__table td { text-align: right; white-space: nowrap; font-weight: 600; }
.tc-recap__qty { display: inline-block; margin-left: 6px; color: var(--text-muted, #4c6377); font-size: .85rem; }
.tc-recap__pending td { color: var(--text-muted, #4c6377); font-weight: 500; }
.tc-free { color: var(--ok, #2e8b57); }
.tc-recap__total th, .tc-recap__total td {
    border-bottom: 0; padding-top: 14px;
    font-family: var(--font-display, sans-serif); font-weight: 800; font-size: 1.35rem; color: var(--navy, #123b5c);
}
.tc-recap__split th, .tc-recap__split td { border-bottom: 0; padding: 2px 0; font-size: .92rem; }
.tc-recap__split:first-of-type th, .tc-recap__split:first-of-type td { color: var(--blue, #0161ad); }

.tc-alert {
    margin: 12px 0 0; padding: 10px 14px; font-size: .9rem;
    border-radius: var(--radius-s, 8px); background: var(--orange-soft, #fef1e6); border-left: 4px solid var(--orange, #f58329);
}
.tc-alert--bad { background: var(--bad-soft, #fbecea); border-left-color: var(--bad, #c0392b); margin: 0 0 12px; }

/* Choix acompte / paiement complet (page de commande) */
.tc-paiement { border: 1px solid var(--border, #dce6eb); border-radius: var(--radius, 12px); background: var(--surface, #fff); padding: 16px; margin: 20px 0; }
.tc-paiement legend { font-family: var(--font-display, sans-serif); font-weight: 800; font-size: 1.15rem; color: var(--navy, #123b5c); padding: 0 6px; }
.tc-paiement .tc-choice { align-items: flex-start; }
.tc-paiement .tc-choice input { margin-top: 3px; }
.tc-split--now th, .tc-split--now td { color: var(--blue, #0161ad); font-weight: 700; }

/* Encart « Votre prix posé » sous l'image (ordinateur uniquement : sur mobile, le récapitulatif suffit) */
.tc-live {
    display: none; margin-top: 16px; padding: 18px 20px;
    background: var(--surface, #fff); border: 1px solid var(--border, #dce6eb); border-left: 4px solid var(--orange, #f58329);
    border-radius: var(--radius-l, 20px); transition: opacity .15s;
}
@media (min-width: 900px) { .tc-live { display: block; } }
.tc-live.is-loading { opacity: .55; }
.tc-live p { margin: 0; }
.tc-live__label { font-size: .8rem; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--blue, #0161ad); }
.tc-live__total { font-family: var(--font-display, sans-serif); font-weight: 800; font-size: 2.2rem; line-height: 1.1; color: var(--navy, #123b5c); margin-top: 2px !important; }
.tc-live__sub { font-size: .9rem; color: var(--text-muted, #4c6377); }
.tc-live__status { margin-top: 8px !important; font-size: .85rem; color: var(--text-muted, #4c6377); }
.tc-live__status--ok { color: var(--ok, #2e8b57); }
.tc-live__status--bad { color: var(--bad, #c0392b); font-weight: 600; }
.tc-live__link { display: inline-block; margin-top: 10px; font-size: .88rem; font-weight: 600; }
#tc-recap { scroll-margin-top: 110px; } /* sous l'en-tête fixe, quand on clique « Voir le détail » */

/* Formulaire de contact */
.tc-contact { max-width: 720px; padding: clamp(18px, 3vw, 28px); background: var(--surface, #fff); border: 1px solid var(--border, #dce6eb); border-radius: var(--radius-l, 20px); scroll-margin-top: 110px; }
.tc-contact__grid { display: grid; gap: 0 16px; }
@media (min-width: 640px) { .tc-contact__grid { grid-template-columns: 1fr 1fr; } }
.tc-field { margin: 0 0 14px; }
.tc-field label { display: block; margin-bottom: 4px; font-weight: 600; }
.tc-field label span[aria-hidden] { color: var(--bad, #c0392b); }
.tc-field--check label { display: flex; gap: 10px; align-items: flex-start; font-weight: 500; }
.tc-field--check input { width: 18px; height: 18px; margin-top: 3px; flex: none; accent-color: var(--blue, #0161ad); }
.tc-contact .cf-turnstile { margin: 4px 0 16px; min-height: 65px; }
.tc-contact .tc-alert ul { margin: 6px 0 0; padding-left: 20px; }
.tc-hp { position: absolute !important; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.tc-contact-ok { max-width: 720px; padding: 24px; border-radius: var(--radius-l, 20px); background: var(--ok-soft, #e8f4ee); border: 1px solid var(--ok, #2e8b57); scroll-margin-top: 110px; }
.tc-contact-ok h2 { margin: 0 0 6px; }

/* Demande de devis (code postal hors zone) */
.tc-devis { margin: 28px 0; scroll-margin-top: 110px; }
.tc-devis__title { margin: 0 0 6px; }
.tc-devis__lead { margin: 0 0 16px; max-width: 720px; }
.tc-devis__captcha { margin: 4px 0 16px; min-height: 65px; }
.tc-devis-open { margin-top: 8px; }
.tc-live__devis { margin-top: 6px; }
.single_add_to_cart_button[hidden], [data-tc-devis-open][hidden], .tc-devis[hidden] { display: none !important; }

/* Multi-split sur mesure */
.tc-composer__layout { display: grid; gap: 24px; align-items: start; }
@media (min-width: 1000px) { .tc-composer__layout { grid-template-columns: minmax(0, 1fr) 320px; } }
.tc-composer .tc-live { display: block; margin-top: 0; }
@media (min-width: 1000px) { .tc-composer__side { position: sticky; top: 110px; } }
.tc-composer__compo { margin-bottom: 24px; }
.tc-choice--pill { display: inline-flex; margin-right: 8px; }
.tc-room { display: grid; gap: 8px; grid-template-columns: 1fr 110px; margin-bottom: 10px; padding: 10px; border: 1px solid var(--border, #dce6eb); border-radius: var(--radius, 12px); background: var(--surface, #fff); }
.tc-room__unit { grid-column: 1 / -1; }
@media (min-width: 700px) { .tc-room { grid-template-columns: 1fr 110px 1.3fr; } .tc-room__unit { grid-column: auto; } }
.tc-room input, .tc-room select { width: 100%; }
.tc-room__surface { display: flex; align-items: center; gap: 6px; }
.tc-compo { padding: 16px 18px; border-radius: var(--radius, 12px); background: var(--blue-soft, #e9f3fb); }
.tc-compo__title { margin: 0 0 8px; font-size: 1.1rem; }
.tc-compo__list { margin: 0; padding-left: 18px; }
.tc-compo__list li { margin: 4px 0; }
.tc-compo__note { display: block; font-size: .85rem; color: var(--text-muted, #4c6377); }
.tc-compo__warn { color: var(--bad, #c0392b); font-size: .9rem; }
.tc-compo__pack { margin: 10px 0 0; }
.tc-badge { display: inline-block; padding: 1px 8px; border-radius: 99px; font-size: .75rem; font-weight: 700; background: var(--ok-soft, #e8f4ee); color: var(--ok, #2e8b57); }
.tc-composer__actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.tc-room[hidden], .tc-room option[hidden] { display: none !important; }

/* Mode devis (équipe) */
.tc-staff-bar { background: var(--navy, #123b5c); color: #fff; font-size: .9rem; }
.tc-staff-bar__inner { display: flex; flex-wrap: wrap; gap: 6px 16px; align-items: center; padding-block: 8px; }
.tc-staff-bar strong { color: var(--orange, #f58329); text-transform: uppercase; letter-spacing: .06em; font-size: .8rem; }
.tc-staff-bar nav { display: flex; flex-wrap: wrap; gap: 4px 14px; margin-left: auto; }
.tc-staff-bar a { color: #fff; text-decoration: underline; text-underline-offset: 3px; }
.tc-space__table { overflow-x: auto; }
.tc-space__table table { width: 100%; border-collapse: collapse; background: var(--surface, #fff); }
.tc-space__table th, .tc-space__table td { padding: 10px; border-bottom: 1px solid var(--border, #dce6eb); text-align: left; vertical-align: top; }
.tc-space__expired { color: var(--bad, #c0392b); }
.tc-space__bulk { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 8px; }
.tc-space__table td > strong { white-space: nowrap; }
.tc-space__table .tc-space__actions a { display: block; margin: 0 0 6px; text-align: center; white-space: nowrap; }
.tc-space__table input[type="checkbox"] { width: 18px; height: 18px; margin: 0; accent-color: var(--blue, #0161ad); }
.btn--small { padding: 6px 14px; font-size: .9rem; }
.tc-staff-adjust { margin-bottom: 12px; }
.tc-staff-scroll { overflow-x: auto; margin-bottom: 8px; }
.tc-staff-table { width: 100%; min-width: 720px; border-collapse: collapse; background: var(--surface, #fff); font-size: .9rem; }
.tc-staff-table th, .tc-staff-table td { padding: 6px 8px; border-bottom: 1px solid var(--border, #dce6eb); text-align: left; vertical-align: middle; }
.tc-staff-table th { font-size: .8rem; color: var(--navy, #123b5c); }
.tc-staff-table input, .tc-staff-table select, .tc-staff-global input, .tc-staff-global select { padding: 6px 8px; font-size: .9rem; min-height: 0; }
.tc-staff-table select, .tc-staff-global select { width: auto; min-width: 72px; padding-right: 28px; }
.tc-staff-table input[name$="[label]"] { width: 100%; min-width: 200px; }
.tc-staff-table input.tc-num, .tc-staff-global input.tc-num { width: 76px; text-align: right; }
.tc-staff-table input[name$="[qty]"] { width: 56px; }
.tc-staff-table .tc-num { text-align: right; white-space: nowrap; }
.tc-staff-discount { white-space: nowrap; }
.tc-staff-discount select { margin-left: 4px; }
.tc-staff-remove { border: 0; background: none; color: var(--bad, #c0392b); font-size: 1.3rem; line-height: 1; cursor: pointer; padding: 2px 6px; }
.tc-staff-global { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.tc-staff-global label { font-weight: 700; color: var(--navy, #123b5c); }
.tc-staff-totals { margin: 8px 0 0 auto; border-collapse: collapse; min-width: 280px; }
.tc-staff-totals td { padding: 3px 8px; }
.tc-staff-totals td + td { text-align: right; white-space: nowrap; }
.tc-staff-totals .is-total td { font-weight: 700; border-top: 1px solid var(--navy, #123b5c); color: var(--navy, #123b5c); }
/* Devis en cours (mode devis) */
.tc-draft { margin: 0 0 32px; }
.tc-draft > .tc-alert { margin: 0 0 12px; }
.tc-draft textarea { width: 100%; }
.tc-draft__form { max-width: none; }
.tc-draft__step { margin: 28px 0 12px; padding-top: 16px; border-top: 1px solid var(--border, #dce6eb); font-size: 1.15rem; color: var(--navy, #123b5c); }
.tc-draft__step:first-of-type { margin-top: 8px; padding-top: 0; border-top: 0; }
.tc-draft__tva { border-top: 0; padding-top: 0; }
.tc-draft__item { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px 16px; padding: 12px 14px; border: 1px solid var(--border, #dce6eb); border-radius: var(--radius, 12px); background: var(--surface-2, #f7fafb); }
.tc-draft__price { margin-left: 8px; font-weight: 700; color: var(--blue, #0161ad); white-space: nowrap; }
.tc-draft__add { margin: 12px 0 0; }
.tc-draft__add > summary { display: inline-block; cursor: pointer; list-style: none; }
.tc-draft__add > summary::-webkit-details-marker { display: none; }
.tc-draft__choices { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.tc-staff-add { margin-top: 16px; padding: 14px 16px; border: 2px solid var(--blue, #0161ad); border-radius: var(--radius, 12px); background: var(--arctic-soft, #e3f3f9); scroll-margin-top: 110px; }
.tc-staff-add .btn { width: 100%; }
.tc-draft__list { padding-left: 22px; }
.tc-draft__list > li { margin: 0 0 12px; }
.tc-draft__compo { margin: 4px 0 6px; padding-left: 18px; font-size: .9rem; color: var(--text-muted, #4c6377); }
.tc-draft__actions { display: inline-flex; gap: 8px; flex-wrap: wrap; }
.tc-staff-table .tc-draft__head th { background: var(--surface-alt, #f2f7fa); color: var(--navy, #123b5c); font-size: .9rem; }
.tc-staff__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 18px; }
.tc-alert--ok { background: var(--ok-soft, #e8f4ee); border-left-color: var(--ok, #2e8b57); margin: 0 0 12px; }
