/* ==========================================================================
   Boutique mastering (mastering-order.html)
   S'appuie sur booking-page.css (boutons, champs, étapes, confirmation)
   ========================================================================== */

.sh-main [hidden] { display: none !important; }

.sh-testmode,
.sh-alert {
    margin: 0 0 18px;
    padding: 12px 16px;
    font-size: 13px;
    line-height: 1.5;
    border: 1px solid var(--bk-line);
}
.sh-testmode { color: #0d0e0d; background: #f2d36b; border-color: #f2d36b; font-weight: 700; }
.sh-alert { color: #ff8a89; border-color: #6b3433; background: #2a1d1d; }

/* ---------- Mise en page : parcours + récapitulatif ---------- */
.sh-layout {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 340px;
    gap: 24px;
    align-items: start;
    margin-top: 28px;
}
.sh-flow { display: grid; gap: 24px; min-width: 0; }

/* ---------- Étape 1 : choix ---------- */
.sh-block { border: 1px solid var(--bk-line); background: var(--bk-surface); }
.sh-block-head { padding: 22px 24px 0; }
.sh-block-head span { display: block; margin-bottom: 6px; font-size: 11px; letter-spacing: .25em; color: var(--bk-muted); }
.sh-block-head h3 { font-size: 20px; font-weight: 700; }

.sh-options { display: grid; gap: 22px; padding: 20px 24px 6px; }
.sh-group { margin: 0; padding: 0; border: 0; min-width: 0; }
.sh-group legend { margin-bottom: 10px; padding: 0; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: #d6d6d6; }
.sh-choices { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; }

.sh-choice { position: relative; display: block; cursor: pointer; }
.sh-choice input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.sh-choice-box {
    display: flex;
    flex-direction: column;
    gap: 4px;
    height: 100%;
    padding: 14px 14px 13px;
    border: 1px solid var(--bk-line);
    background: #222322;
    transition: border-color .2s, background-color .2s;
}
.sh-choice-name { font-size: 14px; font-weight: 700; color: #fff; }
.sh-choice-hint { font-size: 13px; color: var(--bk-muted); }
.sh-choice:hover .sh-choice-box { border-color: #8a8b8a; }
.sh-choice input:checked + .sh-choice-box { border-color: #fff; background: #2f302f; box-shadow: inset 0 0 0 1px #fff; }
.sh-choice input:checked + .sh-choice-box .sh-choice-hint { color: #fff; }
.sh-choice input:focus-visible + .sh-choice-box { outline: 2px solid #fff; outline-offset: 2px; }
.sh-choice input:disabled + .sh-choice-box { opacity: .4; cursor: not-allowed; }

.sh-config-footer {
    display: flex;
    flex-wrap: wrap;
    gap: 14px;
    align-items: center;
    justify-content: space-between;
    margin-top: 18px;
    padding: 18px 24px;
    border-top: 1px solid var(--bk-line);
}
.sh-config-price { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.sh-config-price span { font-size: 12px; color: var(--bk-muted); }
.sh-config-price strong { font-size: 26px; font-weight: 700; }

.sh-skeleton {
    height: 74px;
    background: linear-gradient(90deg, #222322 25%, #2c2d2c 50%, #222322 75%);
    background-size: 200% 100%;
    animation: shShimmer 1.4s linear infinite;
}
@keyframes shShimmer { from { background-position: 200% 0; } to { background-position: -200% 0; } }

/* ---------- Étapes 2 et 3 : coordonnées et paiement ---------- */
.sh-checkout select {
    width: 100%;
    padding: 12px 2px;
    font: inherit;
    font-size: 15px;
    color: #fff;
    background: transparent;
    border: 0;
    border-bottom: 1px solid var(--bk-line);
    border-radius: 0;
    outline: none;
    color-scheme: dark;
    cursor: pointer;
}
.sh-checkout select:focus { border-color: #fff; }
.sh-checkout select option { background: #1b1b1b; }

.sh-pay { display: grid; gap: 14px; min-width: 0; }
.sh-methods { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.sh-method { position: relative; display: block; cursor: pointer; }
.sh-method input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.sh-method-box { display: flex; flex-direction: column; gap: 3px; padding: 13px 14px; border: 1px solid var(--bk-line); background: #222322; transition: border-color .2s; }
.sh-method-box strong { font-size: 14px; }
.sh-method-box small { font-size: 12px; color: var(--bk-muted); }
.sh-method:hover .sh-method-box { border-color: #8a8b8a; }
.sh-method input:checked + .sh-method-box { border-color: #fff; box-shadow: inset 0 0 0 1px #fff; }
.sh-method input:focus-visible + .sh-method-box { outline: 2px solid #fff; outline-offset: 2px; }
.sh-card-element { min-height: 120px; }
.sh-paypal-note { font-size: 13px; line-height: 1.6; color: #d6d6d6; }

.sh-pay-footer { align-items: flex-end; }
.sh-terms { display: flex; gap: 10px; align-items: flex-start; max-width: 460px; font-size: 13px; line-height: 1.5; color: #d6d6d6; cursor: pointer; }
.sh-terms input { flex-shrink: 0; width: 18px; height: 18px; margin: 1px 0 0; accent-color: #fff; cursor: pointer; }
.sh-terms a { color: #fff; }
.sh-pay-action { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; margin-left: auto; }
.sh-pay-btn { min-width: 200px; justify-content: center; padding: 15px 26px; font-size: 15px; }

/* ---------- Récapitulatif ---------- */
.sh-summary { position: sticky; top: calc(var(--hdr, 57px) + 20px); }
.sh-summary-inner { border: 1px solid var(--bk-line); background: var(--bk-surface); padding: 22px 20px; }
.sh-summary h3 { font-size: 18px; font-weight: 700; padding-bottom: 14px; border-bottom: 1px solid var(--bk-line); }
.sh-items { list-style: none; margin: 0; padding: 0; }
.sh-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 10px; padding: 14px 0; border-bottom: 1px solid #333433; transition: opacity .2s; }
.sh-item.is-busy { opacity: .5; pointer-events: none; }
.sh-item-main strong { display: block; font-size: 14px; }
.sh-item-details { display: flex; flex-wrap: wrap; gap: 4px 8px; margin-top: 5px; }
.sh-item-details span { font-size: 12px; color: var(--bk-muted); }
.sh-item-details span + span::before { content: '·'; margin-right: 8px; }
.sh-item-side { display: flex; flex-direction: column; align-items: flex-end; gap: 8px; }
.sh-item-price { font-size: 14px; font-weight: 700; }
.sh-qty { display: inline-flex; align-items: center; border: 1px solid var(--bk-line); }
.sh-qty button { width: 28px; height: 28px; padding: 0; font: inherit; font-size: 15px; color: #fff; background: none; border: 0; cursor: pointer; }
.sh-qty button:hover { background: #343634; }
.sh-qty button:focus-visible { outline: 2px solid #fff; outline-offset: -2px; }
.sh-qty span { min-width: 24px; font-size: 13px; text-align: center; font-variant-numeric: tabular-nums; }
.sh-remove { padding: 0; font: inherit; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--bk-muted); background: none; border: 0; cursor: pointer; }
.sh-remove:hover { color: #fff; text-decoration: underline; }
.sh-empty { padding: 18px 0 4px; font-size: 13px; line-height: 1.5; color: var(--bk-muted); }

.sh-coupon { display: flex; gap: 8px; margin-top: 16px; }
.sh-coupon input {
    flex: 1;
    min-width: 0;
    padding: 10px 2px;
    font: inherit;
    font-size: 14px;
    color: #fff;
    background: transparent;
    border: 0;
    border-bottom: 1px solid var(--bk-line);
    border-radius: 0;
    outline: none;
}
.sh-coupon input:focus { border-color: #fff; }
.sh-coupon .bk-btn { padding: 9px 14px; font-size: 13px; }
.sh-coupon-msg { margin-top: 6px !important; font-size: 12px; }
.sh-coupon-msg:empty { display: none; }
.sh-coupon-msg.is-ok { color: #8fd18f; }
.sh-coupon-msg.is-error { color: #ff8a89; }

.sh-totals { margin: 16px 0 0; }
.sh-totals > div { display: flex; justify-content: space-between; gap: 10px; padding: 6px 0; font-size: 14px; color: #d6d6d6; }
.sh-totals dt, .sh-totals dd { margin: 0; }
.sh-totals em { font-style: normal; text-transform: uppercase; letter-spacing: .06em; }
.sh-totals button { padding: 0 4px; font: inherit; font-size: 11px; color: var(--bk-muted); background: none; border: 0; cursor: pointer; }
.sh-totals button:hover { color: #fff; }
.sh-discount dd { color: #8fd18f; }
.sh-total { margin-top: 6px; padding-top: 14px !important; border-top: 1px solid var(--bk-line); color: #fff !important; font-size: 18px !important; font-weight: 700; }

.sh-secure { display: flex; align-items: center; gap: 8px; margin-top: 16px !important; font-size: 12px; color: var(--bk-muted); }
.sh-secure svg { width: 14px; height: 14px; flex-shrink: 0; }

/* ---------- Confirmation ---------- */
.sh-confirm { margin-top: 28px; outline: none; }
.sh-confirm-head p { margin: 12px auto 0 !important; max-width: 560px; font-size: 14px; line-height: 1.6; color: #d6d6d6; }
.sh-confirm-head h4 { font-size: 24px; font-weight: 700; }
.sh-confirm-items { list-style: none; display: grid; gap: 6px; max-width: 520px; margin: 22px auto 0; padding: 16px 0 0; border-top: 1px solid var(--bk-line); }
.sh-confirm-items li { font-size: 13px; color: #d6d6d6; }
.sh-confirm-items span { color: var(--bk-muted); }
.sh-confirm-items span::before { content: ' · '; }
.sh-confirm-head .bk-btn { margin-top: 18px; }

/* ---------- Barre d'étapes ---------- */
.sh-progress {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 6px;
    margin: 24px 0 0;
    padding: 0;
    list-style: none;
    counter-reset: none;
}
.sh-progress li {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 0 0;
    font-size: 12px;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--bk-muted);
    border-top: 2px solid var(--bk-line);
    transition: color .3s, border-color .3s;
}
.sh-progress li span {
    display: grid;
    place-items: center;
    flex-shrink: 0;
    width: 22px;
    height: 22px;
    font-size: 11px;
    border: 1px solid var(--bk-line);
}
.sh-progress li.is-current { color: #fff; border-color: #fff; }
.sh-progress li.is-current span { background: #fff; color: #0d0e0d; border-color: #fff; font-weight: 700; }
.sh-progress li.is-done { color: #d6d6d6; border-color: #8a8b8a; }
.sh-progress li.is-done span { border-color: #8a8b8a; }

/* ---------- Options : aide et explications ---------- */
.sh-group-help { margin: -4px 0 12px !important; font-size: 13px; line-height: 1.5; color: var(--bk-muted); }
.sh-choice-tag { font-size: 10px; letter-spacing: .16em; text-transform: uppercase; color: var(--bk-muted); }
.sh-choice-desc { font-size: 12px; line-height: 1.45; color: #bdbebd; }
.sh-choice-hint { margin-top: auto; padding-top: 6px; font-weight: 700; color: #d6d6d6; }
.sh-choice input:checked + .sh-choice-box .sh-choice-tag,
.sh-choice input:checked + .sh-choice-box .sh-choice-desc { color: #e6e6e6; }
.sh-choices { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }

/* Nombre de titres */
.sh-qty-row {
    display: flex;
    gap: 16px;
    align-items: center;
    justify-content: space-between;
    margin: 18px 24px 0;
    padding-top: 18px;
    border-top: 1px solid #333433;
}
.sh-qty-title { font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: #d6d6d6; }
.sh-qty-help { margin-top: 4px !important; font-size: 13px; line-height: 1.5; color: var(--bk-muted); max-width: 420px; }
.sh-qty-lg button { width: 40px; height: 40px; font-size: 18px; }
.sh-qty-lg span { min-width: 36px; font-size: 16px; font-weight: 700; }
.sh-qty button:disabled { opacity: .35; cursor: default; background: none; }

/* Inclus dans chaque master */
.sh-included {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 16px;
    margin: 20px 24px 0;
    padding: 16px 0 0;
    list-style: none;
    border-top: 1px solid #333433;
}
.sh-included li { position: relative; padding-left: 20px; font-size: 12px; line-height: 1.5; color: var(--bk-muted); }
.sh-included li::before { content: '✓'; position: absolute; left: 0; top: 0; color: #fff; font-weight: 700; }
.sh-included strong { display: block; margin-bottom: 2px; font-size: 13px; color: #fff; }

/* Récapitulatif : lignes de prix */
.sh-line { display: flex; justify-content: space-between; gap: 12px; padding: 10px 0; font-size: 13px; color: #d6d6d6; border-bottom: 1px solid #333433; }
.sh-line:first-child { padding-top: 14px; font-size: 14px; font-weight: 700; color: #fff; }
.sh-line span:last-child { flex-shrink: 0; font-variant-numeric: tabular-nums; }
.sh-layout.is-syncing .sh-summary-inner { opacity: .6; transition: opacity .2s; }

/* Et après ? */
.sh-next { margin-top: 12px; padding: 18px 20px; border: 1px solid var(--bk-line); }
.sh-next-title { margin-bottom: 12px !important; font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--bk-muted); }
.sh-next ol { margin: 0; padding: 0; list-style: none; counter-reset: next; display: grid; gap: 12px; }
.sh-next li { position: relative; padding-left: 30px; font-size: 12px; line-height: 1.5; color: var(--bk-muted); counter-increment: next; }
.sh-next li::before {
    content: counter(next);
    position: absolute;
    left: 0;
    top: 0;
    display: grid;
    place-items: center;
    width: 20px;
    height: 20px;
    font-size: 11px;
    color: #fff;
    border: 1px solid var(--bk-line);
}
.sh-next strong { display: block; font-size: 13px; color: #fff; }

/* Questions fréquentes */
.sh-faq { margin-top: 8px; }
.sh-faq details { border-bottom: 1px solid var(--bk-line); }
.sh-faq details:first-of-type { border-top: 1px solid var(--bk-line); }
.sh-faq summary {
    position: relative;
    padding: 18px 40px 18px 0;
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    cursor: pointer;
    list-style: none;
}
.sh-faq summary::-webkit-details-marker { display: none; }
.sh-faq summary::after { content: '+'; position: absolute; right: 6px; top: 50%; transform: translateY(-50%); font-size: 20px; font-weight: 400; color: var(--bk-muted); transition: transform .25s; }
.sh-faq details[open] summary::after { transform: translateY(-50%) rotate(45deg); }
.sh-faq summary:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.sh-faq details p { margin: 0 0 18px !important; max-width: 760px; font-size: 14px; line-height: 1.7; color: #d6d6d6; }
.sh-faq a { color: #fff; }

/* Barre mobile */
.sh-mbar { display: none; }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
    /* Une colonne : choix, puis récapitulatif, puis coordonnées et paiement */
    .sh-layout { grid-template-columns: 1fr; }
    .sh-flow { display: contents; }
    .sh-block { order: 1; }
    .sh-summary { position: static; order: 2; }
    .sh-checkout { order: 3; }
}
@media (max-width: 900px) {
    /* Total toujours visible en bas d'écran (au-dessus du pied de page fixe) */
    .sh-mbar:not([hidden]) {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 95;
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
        padding: 10px 16px;
        background: rgba(13, 14, 13, .97);
        border-top: 1px solid var(--bk-line);
        transition: transform .25s, opacity .25s;
    }
    .sh-mbar div { display: flex; flex-direction: column; min-width: 0; }
    .sh-mbar span { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--bk-muted); }
    .sh-mbar strong { font-size: 20px; }
    .sh-mbar .bk-btn { padding: 12px 18px; }
    html.sh-mbar-off .sh-mbar { transform: translateY(110%); opacity: 0; pointer-events: none; }
    .sh-main { padding-bottom: 150px; }
    .sh-included { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
    .sh-progress li { flex-direction: column; align-items: flex-start; gap: 6px; font-size: 10px; letter-spacing: .04em; }
    .sh-qty-row { flex-direction: column; align-items: flex-start; margin-left: 16px; margin-right: 16px; }
    .sh-included { margin-left: 16px; margin-right: 16px; }
    .sh-choices { grid-template-columns: 1fr; }
    .sh-block-head, .sh-options, .sh-config-footer { padding-left: 16px; padding-right: 16px; }
    .sh-config-footer .bk-btn, .sh-pay-btn { width: 100%; justify-content: center; }
    .sh-pay-action { width: 100%; align-items: stretch; }
    .sh-methods { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: reduce) {
    .sh-skeleton { animation: none; }
}

/* ---------- Compte client ---------- */
.sh-account-note { margin: 0 !important; padding: 14px 24px; font-size: 13px; color: #a7a8a7; border-bottom: 1px solid var(--bk-line); }
.sh-account { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; align-items: center; margin: 16px 0 24px; padding: 24px; background: var(--bk-surface); border: 1px solid #fff; }
.sh-account[hidden], .sh-account [hidden] { display: none !important; }
.sh-account h4 { margin: 0 0 8px; font-size: 18px; font-weight: 700; }
.sh-account-copy p { margin: 0 !important; font-size: 14px; line-height: 1.6; color: #d6d6d6; }
.sh-account-copy strong { color: #fff; overflow-wrap: anywhere; }
.sh-account-form { display: grid; gap: 12px; }
.sh-account-pass { display: flex; flex-direction: column; gap: 6px; font-size: 12px; letter-spacing: .1em; text-transform: uppercase; color: #d6d6d6; }
.sh-account-pass small { font-size: 12px; text-transform: none; letter-spacing: 0; color: #a7a8a7; }
.sh-account-pass input { padding: 10px 2px; font: inherit; font-size: 15px; letter-spacing: 0; color: #fff; background: transparent; border: 0; border-bottom: 1px solid var(--bk-line); border-radius: 0; outline: none; }
.sh-account-pass input:focus { border-color: #fff; }
.sh-account-check { display: flex; gap: 10px; align-items: flex-start; font-size: 13px; line-height: 1.5; color: #d6d6d6; cursor: pointer; }
.sh-account-check input { width: 17px; height: 17px; margin: 1px 0 0; flex-shrink: 0; accent-color: #fff; }
.sh-account-check a { color: #fff; }
.sh-account-form .bk-result { margin: 0; }
.sh-account-form .bk-btn { justify-content: center; }
.sh-account-done { grid-column: 2; margin: 0 !important; font-size: 15px; line-height: 1.5; color: #8fd18f; }
@media (max-width: 760px) {
    .sh-account { grid-template-columns: 1fr; padding: 20px 16px; }
    .sh-account-done { grid-column: 1; }
}
