/*
 * Streamori — pages du moteur SN Core (commande, confirmation, partenaires) dans l'habillage des pages statiques.
 * Reprend l'apparence de la page de commande statique (static/streamori-checkout-*.html) : mêmes couleurs (--ink,
 * --slate, --ctl, --signal), mêmes champs, mêmes choix segmentés, même récapitulatif. Classes du moteur : co-*.
 */

/* ---------- Commande : mise en page ---------- */
.sm-checkout .co-page { background: none; padding: 0; }
.sm-checkout .co-page > .wrap { max-width: none; padding: 0; }
.sm-checkout .co-wrap { display: grid; grid-template-columns: minmax(0, 560px) minmax(0, 420px); justify-content: space-between; gap: 56px; align-items: start; }
.sm-checkout .co-head h1 { font-family: Inter, sans-serif; text-transform: none; font-size: 34px; line-height: 1.15; letter-spacing: -0.6px; font-weight: 600; margin: 0; }
.sm-checkout .co-head .lede { margin: 10px 0 0; font-size: 16px; color: var(--slate); }
.sm-checkout .co-mini { display: none; }
.sm-checkout .co-sec { margin-top: 36px; padding-top: 28px; border-top: 1px solid var(--ctl); }
.sm-checkout #customer_details > .co-sec:first-child { margin-top: 32px; }
.sm-checkout h2.co-title { font-family: Inter, sans-serif; text-transform: none; font-size: 19px; line-height: 1.3; letter-spacing: -0.2px; font-weight: 600; margin: 0 0 18px; }

/* ---------- Champs ---------- */
.sm-shell fieldset.co-field { border: 0; margin: 0 0 20px; padding: 0; min-width: 0; }
.sm-shell .co-field { margin: 0 0 18px; }
.sm-shell .co-field > label, .sm-shell fieldset.co-field > legend { display: block; font-size: 14px; font-weight: 500; margin-bottom: 8px; padding: 0; color: var(--ink); }
.sm-shell .co-field > label span, .sm-shell fieldset.co-field > legend span { font-weight: 400; color: var(--slate); margin-left: 4px; }
.sm-shell .co-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 14px; }
.sm-shell input.input-text, .sm-shell .co-field input[type="text"], .sm-shell .co-field input[type="email"], .sm-shell .co-field input[type="tel"], .sm-shell .co-field input[type="password"], .sm-shell .co-field select, .sm-shell .payment_box select, .sm-shell .payment_box input[type="text"] {
	display: block; width: 100%; height: 48px; font: inherit; font-size: 16px; color: var(--ink); background: #fff;
	border: 1px solid #D6D1C7; border-radius: 10px; padding: 0 14px; transition: border-color .15s, box-shadow .15s; box-sizing: border-box;
}
.sm-shell input::placeholder { color: #8A8F98; }
.sm-shell input.input-text:hover, .sm-shell .co-field select:hover { border-color: #B9B3A8; }
.sm-shell input:focus, .sm-shell select:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 3px rgba(14, 15, 18, .10); }
.sm-shell [aria-invalid="true"], .sm-shell .woocommerce-invalid input { border-color: #B3261E !important; box-shadow: 0 0 0 3px rgba(179, 38, 30, .10); }
.sm-shell .co-hint { display: block; margin: 8px 0 0; font-size: 13px; line-height: 1.45; color: var(--slate); }
.sm-shell .co-hint-note { margin-top: -6px; }
.sm-shell .co-msg { display: block; margin: 8px 0 0; font-size: 13px; color: #B3261E; font-weight: 500; }
.sm-shell .co-msg[hidden], .sm-shell [hidden] { display: none !important; }

/* Choix segmentés (nouvel abonnement / renouvellement, WhatsApp / Telegram) */
.sm-shell .co-seg { display: inline-flex; gap: 4px; padding: 4px; background: #F4F2EE; border-radius: 12px; max-width: 100%; }
.sm-shell .co-seg label { position: relative; display: inline-flex; align-items: center; gap: 8px; padding: 9px 16px; border-radius: 9px; font-size: 14px; font-weight: 500; color: var(--slate); cursor: pointer; white-space: nowrap; margin: 0; transition: background .15s, color .15s, box-shadow .15s; }
.sm-shell .co-seg input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.sm-shell .co-seg label:has(input:checked) { background: #fff; color: var(--ink); font-weight: 600; box-shadow: 0 1px 2px rgba(14, 15, 18, .08), 0 0 0 1px var(--ctl); }
.sm-shell .co-seg label:has(input:focus-visible) { outline: 2px solid var(--ink); outline-offset: 2px; }
.sm-shell .co-seg svg { width: 16px; height: 16px; flex: none; }

/* ---------- Moyens de paiement ---------- */
.sm-checkout .co-pay { list-style: none; margin: 0; padding: 0; }
.sm-checkout .co-method { display: block; border: 1px solid var(--ctl); border-radius: 12px; padding: 16px 18px; transition: border-color .15s, box-shadow .15s; }
.sm-checkout .co-method + .co-method { margin-top: 10px; }
.sm-checkout .co-method:hover { border-color: #C9C3B8; }
.sm-checkout .co-method:has(input:checked) { border-color: var(--ink); box-shadow: inset 0 0 0 1px var(--ink); }
.sm-checkout .co-method > label { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; font-size: 15px; font-weight: 600; cursor: pointer; margin: 0; }
.sm-checkout .co-method > label input { width: 18px; height: 18px; margin: 0; accent-color: var(--ink); flex: none; }
.sm-checkout .co-method > label img, .sm-checkout .co-method > label svg { height: 20px; width: auto; max-width: 48px; }
.sm-checkout .payment_box { margin: 10px 0 0 30px; font-size: 13px; line-height: 1.5; color: var(--slate); }
.sm-checkout .payment_box p { margin: 0 0 8px; }
.sm-checkout .payment_box label { display: block; font-size: 14px; font-weight: 500; color: var(--ink); margin: 10px 0 6px; }
.sm-checkout .payment_box input { font-family: ui-monospace, Menlo, Consolas, monospace; letter-spacing: .04em; }
.sm-checkout .payment_box svg { width: 16px; height: 16px; flex: none; }
.sm-checkout .woocommerce-privacy-policy-text, .sm-checkout .woocommerce-terms-and-conditions-wrapper { font-size: 13px; color: var(--slate); }

/* ---------- Récapitulatif ---------- */
.sm-checkout .co-sum { position: sticky; top: 24px; background: #F6F4EF; border-radius: 16px; padding: 28px; }
.sm-checkout .co-kicker { font-family: Inter, sans-serif; font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--slate); margin: 0; }
.sm-checkout .co-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 4px 16px; align-items: baseline; margin-top: 16px; }
.sm-checkout .co-item-name { font-size: 19px; font-weight: 600; }
.sm-checkout .co-item-price { font-size: 16px; font-weight: 600; font-variant-numeric: tabular-nums; }
.sm-checkout .co-item-meta { grid-column: 1 / -1; font-size: 14px; color: var(--slate); }
.sm-checkout .co-change { grid-column: 1 / -1; justify-self: start; margin-top: 4px; font-size: 14px; font-weight: 500; color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.sm-checkout .co-lines { margin: 20px 0 0; border-top: 1px solid #E3DFD6; }
.sm-checkout .co-lines > div { display: flex; justify-content: space-between; padding: 12px 0; font-size: 15px; color: var(--slate); font-variant-numeric: tabular-nums; }
.sm-checkout .co-lines dt, .sm-checkout .co-lines dd { margin: 0; }
.sm-checkout .co-lines .co-discount { color: var(--ink); }
.sm-checkout .co-lines .co-note { font-size: 13px; }
.sm-checkout .co-lines .co-total { border-top: 1px solid #E3DFD6; padding-top: 16px; color: var(--ink); align-items: baseline; }
.sm-checkout .co-total dt { font-size: 16px; font-weight: 600; }
.sm-checkout .co-total dd { font-family: var(--face); font-weight: 700; font-size: 44px; line-height: 1; letter-spacing: .005em; }
.sm-checkout .co-total dd small { font-family: Inter, sans-serif; font-size: 12px; font-weight: 600; color: var(--slate); margin-right: 6px; letter-spacing: 0; }

/* Code affilié */
.sm-checkout .co-aff { margin-top: 6px; }
.sm-checkout .co-aff-toggle, .sm-checkout .co-aff-remove { background: none; border: 0; padding: 0; font: inherit; font-size: 14px; font-weight: 500; color: var(--ink); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.sm-checkout .co-aff-on { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; margin: 8px 0 0; }
.sm-checkout .co-aff-form { margin-top: 10px; }
.sm-checkout .co-aff-form .co-field { margin-bottom: 8px; }
.sm-checkout .co-aff-form input { text-transform: uppercase; letter-spacing: .04em; }
.sm-checkout .co-aff-apply { height: 40px; padding: 0 18px; font: inherit; font-size: 14px; font-weight: 600; color: #fff; background: var(--ink); border: 0; border-radius: 10px; cursor: pointer; }

/* Bouton, sécurité, étapes, mentions */
.sm-shell #place_order, .sm-shell .btn-primary { display: block; width: 100%; height: 54px; margin-top: 20px; font: inherit; font-size: 17px; font-weight: 600; color: var(--night); background: var(--signal); border: 0; border-radius: 12px; cursor: pointer; transition: background .15s, transform .1s; }
.sm-shell #place_order:hover, .sm-shell .btn-primary:hover { background: #FF7340; }
.sm-shell #place_order:active { transform: translateY(1px); }
.sm-shell #place_order:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
.sm-checkout .co-safe { display: flex; justify-content: center; align-items: center; gap: 6px; margin: 12px 0 0; font-size: 13px; color: var(--slate); }
.sm-checkout .co-safe svg { width: 14px; height: 14px; fill: none; stroke: currentColor; stroke-width: 1.5; }
.sm-checkout .co-steps { list-style: none; margin: 22px 0 0; padding: 18px 0 0; border-top: 1px solid #E3DFD6; display: grid; gap: 10px; counter-reset: f; }
.sm-checkout .co-steps li { display: grid; grid-template-columns: 24px minmax(0, 1fr); gap: 10px; font-size: 13px; color: var(--slate); align-items: start; }
.sm-checkout .co-steps li::before { counter-increment: f; content: counter(f); width: 22px; height: 22px; border-radius: 50%; border: 1px solid #CFC9BE; display: grid; place-items: center; font-size: 11px; font-weight: 600; color: var(--ink); background: #fff; }
.sm-checkout .co-steps b { color: var(--ink); font-weight: 600; }
.sm-checkout .co-legal { margin: 16px 0 0; font-size: 12px; line-height: 1.5; color: var(--slate); }
.sm-checkout .co-legal a { color: var(--ink); text-decoration: underline; }

/* Messages WooCommerce (erreurs de commande) */
.sm-shell .woocommerce-NoticeGroup, .sm-shell .woocommerce-error, .sm-shell .woocommerce-message, .sm-shell .woocommerce-info { list-style: none; margin: 0 0 20px; padding: 14px 16px; border-radius: 12px; background: #FDF1F0; color: #8C1D18; font-size: 14px; }
.sm-shell .woocommerce-message, .sm-shell .woocommerce-info { background: #F6F4EF; color: var(--ink); }
.sm-shell .woocommerce-error li { margin: 0; }
.sm-shell .blockUI.blockOverlay { background: rgba(255, 255, 255, .6) !important; }

/* ---------- Téléphone ---------- */
@media (max-width: 860px) {
	.sm-checkout .co-wrap { grid-template-columns: minmax(0, 1fr); gap: 32px; }
	.sm-checkout .co-sum { position: static; padding: 22px 18px; }
	.sm-checkout .co-mini { display: flex; justify-content: space-between; gap: 12px; margin: 20px 0 0; padding: 14px 16px; background: #F6F4EF; border-radius: 12px; font-size: 14px; }
	.sm-checkout .co-head h1 { font-size: 28px; }
	.sm-shell .co-row { grid-template-columns: minmax(0, 1fr); gap: 0; }
	.sm-checkout .payment_box { margin-left: 0; }
	.sm-shell .co-seg { display: flex; }
	.sm-shell .co-seg label { flex: 1; justify-content: center; padding: 9px 8px; }
	.sm-checkout .co-total dd { font-size: 38px; }
}

/* Arabe : de droite à gauche */
html[dir="rtl"] .sm-checkout .payment_box { margin: 10px 30px 0 0; }
html[dir="rtl"] .sm-checkout .co-total dd small { margin-right: 0; margin-left: 6px; }

/* ---------- Confirmation de commande ---------- */
.sm-checkout .band-papier { background: none; padding: 0; }
.sm-checkout .co-done { display: grid; grid-template-columns: minmax(0, 560px) minmax(0, 420px); justify-content: space-between; gap: 56px; align-items: start; max-width: none; padding: 0; }
.sm-checkout .co-done .co-ref { margin: 10px 0 0; font-size: 15px; font-weight: 600; color: var(--slate); font-variant-numeric: tabular-nums; }
.sm-checkout .co-done .co-main > .co-card { margin-top: 32px; padding-top: 28px; border-top: 1px solid var(--ctl); }
.sm-checkout .co-next { list-style: none; margin: 0; padding: 0; display: grid; gap: 22px; counter-reset: n; }
.sm-checkout .co-next > li { position: relative; padding-left: 40px; }
.sm-checkout .co-next > li::before { counter-increment: n; content: counter(n); position: absolute; left: 0; top: 0; width: 26px; height: 26px; border-radius: 50%; border: 1px solid #CFC9BE; display: grid; place-items: center; font-size: 12px; font-weight: 600; color: var(--ink); background: #fff; }
.sm-checkout .co-next h3 { font-family: Inter, sans-serif; text-transform: none; font-size: 16px; line-height: 1.4; font-weight: 600; letter-spacing: 0; margin: 2px 0 6px; }
.sm-checkout .co-next p { margin: 0; font-size: 15px; line-height: 1.55; color: var(--slate); }
.sm-checkout .co-next b { color: var(--ink); font-weight: 600; }
.sm-checkout .co-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 14px; }
.sm-checkout .co-actions .btn { display: inline-flex; align-items: center; justify-content: center; height: 44px; padding: 0 18px; border-radius: 10px; font-size: 15px; font-weight: 600; color: var(--ink); background: #fff; border: 1px solid #D6D1C7; text-decoration: none; width: auto; margin: 0; }
.sm-checkout .co-actions .btn-primary { background: var(--signal); color: var(--night); border-color: transparent; }
.sm-checkout .co-busy { margin: 24px 0 0; padding: 14px 16px; border-radius: 12px; background: #F6F4EF; font-size: 14px; line-height: 1.5; color: var(--slate); }
.sm-checkout .co-done-side .co-card.co-sum h2.co-title { font-size: 12px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--slate); margin: 0; }
.sm-checkout .co-help { margin: 16px 0 0; font-size: 14px; color: var(--slate); }
.sm-checkout .co-help a { color: var(--ink); text-decoration: underline; }
@media (max-width: 860px) {
	.sm-checkout .co-done { grid-template-columns: minmax(0, 1fr); gap: 32px; }
}
html[dir="rtl"] .sm-checkout .co-next > li { padding-left: 0; padding-right: 40px; }
html[dir="rtl"] .sm-checkout .co-next > li::before { left: auto; right: 0; }
