/* ═══════════════════════════════════════════════════

   UTOPIA FAST CHECKOUT — Modern Design

   ═══════════════════════════════════════════════════ */



/* ═══════════════════════════════════════════════════

   MODERN FAST CHECKOUT FORM — New Design

   ═══════════════════════════════════════════════════ */



@keyframes shakeCart {

    0%, 100% { transform: translateX(0); }

    15%  { transform: translateX(3px); }

    20%  { transform: translateX(-3px); }

    30%  { transform: translateX(1.5px); }

    50%  { transform: translateX(0); }

}



@keyframes fadeIn {

    from { opacity: 0; transform: translateY(6px); }

    to   { opacity: 1; transform: translateY(0); }

}



#utopia-fast-checkout {

    width: 100%; /* 2.11.2 — gardé ici (était dans les ajustements de thème) */

    margin-top: 0;

    margin-bottom: 20px;

    border: none !important;

    border-radius: 20px !important;

    background: linear-gradient(135deg, #ffffff 0%, #fafafa 100%);

    box-shadow: 0 4px 24px rgba(0,0,0,0.08), 0 1px 4px rgba(0,0,0,0.04);

    padding: 0 !important;

    overflow: hidden;

    animation: fadeIn 0.35s ease-out;

    font-family: 'Segoe UI', system-ui, -apple-system, Arial, sans-serif;

}



/* ── Header ── */

div#utopia-fast-checkout h3 {

    text-align: center;

    font-size: 14px;

    font-weight: 700;

    letter-spacing: 0.08em;

    text-transform: uppercase;

    color: #fff;

    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);

    margin: 0;

    padding: 14px 20px;

}



/* ── Form body ── */

#fast-checkout-form {

    padding: 20px 18px 16px;

}



/* ── Input grid ── */

.form-input-box {

    display: grid;

    grid-template-columns: 1fr 1fr;

    gap: 10px;

}



.form-input-box p { margin: 0; }



.form-input-box p input,

.form-input-box p select {

    width: 100%;

    border-radius: 12px !important;

    padding: 11px 14px !important;

    background-color: #f7f7f8 !important;

    color: #1a1a1a !important;

    border: 1.5px solid #e8e8e8 !important;

    font-size: 13.5px !important;

    font-family: inherit;

    transition: border-color .2s, box-shadow .2s, background .2s;

    box-shadow: none !important;

    line-height: 1.4;

    -webkit-appearance: none;

    appearance: none;

    outline: none;

}



.form-input-box p select {

    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%23888' d='M0 0l6 8 6-8z'/%3E%3C/svg%3E") !important;

    background-repeat: no-repeat !important;

    background-position: right 14px center !important;

    padding-right: 36px !important;

    cursor: pointer;

}



.form-input-box p input:focus,

.form-input-box p select:focus {

    border-color: #1a1a1a !important;

    background-color: #fff !important;

    box-shadow: 0 0 0 3px rgba(26,26,26,0.07) !important;

    outline: none !important;

}



.form-input-box p input::placeholder { color: #aaa; }



.form-input-box p select option:checked { background-color: #1a1a1a; color: #fff; }



div#fast-checkout-form .form-input-box p input,

div#fast-checkout-form .form-input-box p select { width: 100%; }



/* ── Order summary ── */

#utopia-fast-checkout .order-summary {

    background: #f7f7f8;

    border: 1.5px solid #ececec;

    border-radius: 14px;

    padding: 14px 16px;

    margin: 14px 0 0;

}



#utopia-fast-checkout .order-summary h4 {

    font-size: 12px;

    font-weight: 700;

    letter-spacing: 0.07em;

    text-transform: uppercase;

    color: #888;

    margin: 0 0 10px;

}



.order-line {

    display: flex;

    justify-content: space-between;

    align-items: center;

    font-size: 13px;

    color: #555;

    padding: 4px 0;

    border-bottom: 1px solid #ebebeb;

    gap: 8px;

}



.order-line:last-child { border-bottom: none; }



.order-line .label { flex: 1; }

.order-line .value { font-weight: 600; color: #1a1a1a; white-space: nowrap; }



.order-line.total {

    margin-top: 6px;

    padding-top: 10px;

    border-top: 2px solid #1a1a1a;

    border-bottom: none;

    font-size: 14.5px;

    font-weight: 700;

    color: #1a1a1a;

}

.order-line.total .value { font-size: 16px; }



/* ── Turnstile ── */

.utopia-turnstile-wrap {

    margin: 14px 0 4px;

    display: flex;

    justify-content: center;

}



/* ── Bottom: quantity + CTA ── */

.utopia-fast-bottom-set {

    display: flex;

    gap: 12px;

    margin-top: 16px;

    align-items: center;

}



/* Quantity box */

.quantity-box {

    position: relative;

    display: flex;

    align-items: center;

    border: 1.5px solid #e0e0e0;

    border-radius: 12px;

    overflow: hidden;

    width: 120px;

    flex-shrink: 0;

    background: #fff;

    height: 46px;

}



.quantity-box input[type="number"] {

    width: 36px;

    text-align: center;

    font-size: 14px;

    font-weight: 700;

    color: #1a1a1a;

    padding: 0 !important;

    border: none !important;

    background: transparent;

    margin: 0;

    -moz-appearance: textfield;

    outline: none;

}



.quantity-box input[type="number"]::-webkit-inner-spin-button,

.quantity-box input[type="number"]::-webkit-outer-spin-button { -webkit-appearance: none; }



.quantity-box > span.btn-minus,
.quantity-box > span.btn-plus {

    display: flex;

    align-items: center;

    justify-content: center;

    width: 42px;

    height: 100%;

    font-size: 20px;

    font-weight: 300;

    color: #1a1a1a;

    cursor: pointer;

    user-select: none;

    background: transparent;

    border: none !important;

    border-radius: 0 !important;

    transition: background .15s;

    line-height: 1 !important;

    padding: 0 !important;

    margin: 0 !important;

}



.quantity-box > span.btn-minus {

    border-right: 1.5px solid #e0e0e0 !important;

    font-size: 22px;

    border-radius: 0 !important;

    background: transparent !important;

}



.quantity-box > span.btn-plus {

    border-left: 1.5px solid #e0e0e0 !important;

    border-radius: 0 !important;

    background: transparent !important;

}



.quantity-box > span.btn-minus:hover,
.quantity-box > span.btn-plus:hover { background: #f5f5f5 !important; }



/* CTA button */

.utopia-fast-bottom-set button.button.alt {

    flex: 1;

    border-radius: 12px !important;

    background: var(--ufc-btn-color, #1a1a1a) !important;

    color: #fff !important;

    font-size: 14px !important;

    font-weight: 700 !important;

    letter-spacing: 0.03em;

    padding: 13px 16px !important;

    border: none !important;

    cursor: pointer;

    display: flex !important;

    align-items: center;

    justify-content: center;

    gap: 8px;

    animation: shakeCart 2.5s ease-in-out infinite;

    transition: background .2s, transform .15s, box-shadow .2s;

    box-shadow: 0 4px 14px rgba(0,0,0,0.18);

    width: auto !important;

    margin: 0 !important;

    height: 46px;

    position: relative !important;

    left: auto !important;

    bottom: auto !important;

}



.utopia-fast-bottom-set button.button.alt:hover {

    background: var(--ufc-btn-hover-color, #c39348) !important;

    box-shadow: 0 6px 20px rgba(0,0,0,0.25);

    animation: none;

    transform: translateY(-1px);

}



.utopia-fast-bottom-set button.button.alt:active { transform: translateY(0); }



/* ── Terms ── */

#utopia-fast-checkout .terms {

    font-size: 11px;

    color: #aaa;

    margin: 10px 0 4px;

    text-align: center;

    line-height: 1.5;

}



/* ── Single product quantity label ── */

#utopia-fast-checkout .quantity label,

.single-product .summary .quantity label { display: none !important; }



/* ── Feedback message ── */

.fast-checkout-message {

    margin-top: 12px !important;

}



#utopia-fast-checkout .fast-checkout-message .ufc-msg {

    display: flex !important;

    align-items: flex-start !important;

    gap: 10px !important;

    padding: 11px 14px !important;

    border-radius: 10px !important;

    font-size: 13.5px !important;

    font-weight: 500 !important;

    line-height: 1.5 !important;

    margin: 0 !important;

    box-shadow: none !important;

    text-align: left !important;

    animation: fadeIn 0.25s ease-out;

}



#utopia-fast-checkout .fast-checkout-message .ufc-msg.ufc-error {

    background: #fff5f5 !important;

    border: 1.5px solid #fed7d7 !important;

    color: #c53030 !important;

}



#utopia-fast-checkout .fast-checkout-message .ufc-msg.ufc-success {

    background: #f0fff4 !important;

    border: 1.5px solid #9ae6b4 !important;

    color: #276749 !important;

}



#utopia-fast-checkout .fast-checkout-message .ufc-msg-icon {

    display: inline-flex !important;

    align-items: center !important;

    justify-content: center !important;

    flex-shrink: 0 !important;

    width: 20px !important;

    height: 20px !important;

    border-radius: 50% !important;

    font-size: 12px !important;

    font-weight: 800 !important;

    line-height: 1 !important;

    color: #fff !important;

    margin-top: 1px !important;

}



#utopia-fast-checkout .fast-checkout-message .ufc-error .ufc-msg-icon {

    background: #e53e3e !important;

}



#utopia-fast-checkout .fast-checkout-message .ufc-success .ufc-msg-icon {

    background: #38a169 !important;

}



/* ── Popup overlay ── */

.check_ui_popop_after_submit {

    display: none;

    position: fixed;

    top: 0; left: 0;

    width: 100%; height: 100%;

    background: rgba(0,0,0,0.55);

    z-index: 9999;

    justify-content: center;

    align-items: center;

    backdrop-filter: blur(3px);

}



.popup-body {

    width: 100%; height: 100%;

    display: flex;

    align-items: center;

    justify-content: center;

}



.check_ui_popop_after_submit .popup-content {

    background: #fff;

    padding: 32px 36px;

    border-radius: 20px;

    text-align: center;

    max-width: 400px;

    width: 90%;

    box-shadow: 0 20px 50px rgba(0,0,0,0.2);

    animation: popupScale 0.3s cubic-bezier(0.34,1.56,0.64,1);

}



@keyframes popupScale {

    from { transform: scale(0.75); opacity: 0; }

    to   { transform: scale(1);    opacity: 1; }

}



.check_ui_popop_after_submit .popup-content h3 { margin-top: 0; font-size: 22px; color: #1a1a1a; }

.check_ui_popop_after_submit .popup-content p  { font-size: 15px; color: #555; margin: 10px 0 24px; }

.check_ui_popop_after_submit .popup-content .close-btn {

    background: #1a1a1a;

    color: #fff;

    border: none;

    padding: 12px 24px;

    border-radius: 10px;

    cursor: pointer;

    font-size: 14px;

    font-weight: 600;

    transition: background .2s;

}

.check_ui_popop_after_submit .popup-content .close-btn:hover { background: #c39348; }



/* ── Responsive ── */

@media (max-width: 600px) {

    .form-input-box { grid-template-columns: 1fr; gap: 8px; }

    .quantity-box   { width: 110px; }

    .utopia-fast-bottom-set button.button.alt { font-size: 13px !important; }

}



@media (max-width: 340px) {

    .quantity-box { width: 105px; }

    .utopia-fast-bottom-set { gap: 8px; }

}


/* ── 2.10.0 — champ quantité WooCommerce affiché dans le bloc (champ unique) ── */
#utopia-fast-checkout .quantity-box .quantity {
    display: flex !important; align-items: center; justify-content: center;
    flex: 1 1 auto; margin: 0 !important; padding: 0 !important;
    border: 0 !important; background: transparent !important; width: auto !important; height: 100%;
    box-shadow: none !important;
}
/* Les − / + du thème sont masqués dans notre bloc : on garde les nôtres (pas de doublon). */
#utopia-fast-checkout .quantity-box .quantity .minus,
#utopia-fast-checkout .quantity-box .quantity .plus,
#utopia-fast-checkout .quantity-box .quantity button,
#utopia-fast-checkout .quantity-box .quantity .number-button:before,
#utopia-fast-checkout .quantity-box .quantity .number-button:after,
#utopia-fast-checkout .quantity-box .quantity .qty-button,
#utopia-fast-checkout .quantity-box .quantity .quantity-button { display: none !important; }

/* 2.11.1 — Libellé « Quantité » de WooCommerce (classe screen-reader-text) : certains thèmes ne le masquent pas
   et il se superpose au chiffre. Masqué à l'écran, toujours lu par les lecteurs d'écran. */
#utopia-fast-checkout .quantity-box .screen-reader-text,
#utopia-fast-checkout .quantity-box .quantity > label,
#utopia-fast-checkout .quantity-box .quantity .quantity-label {
    position: absolute !important;
    width: 1px !important; height: 1px !important;
    padding: 0 !important; margin: -1px !important;
    overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; clip-path: inset(50%) !important;
    white-space: nowrap !important; border: 0 !important;
}
#utopia-fast-checkout .quantity-box .quantity .number-button { display: contents !important; }
#utopia-fast-checkout .quantity-box .quantity input.qty {
    width: 36px !important; min-width: 0 !important; height: auto !important; min-height: 0 !important;
    margin: 0 !important; padding: 0 !important; border: 0 !important; border-radius: 0 !important;
    background: transparent !important; box-shadow: none !important;
    text-align: center; font-size: 14px !important; font-weight: 700; color: #1a1a1a;
    -moz-appearance: textfield; appearance: textfield;
}
#utopia-fast-checkout .quantity-box .quantity input.qty::-webkit-inner-spin-button,
#utopia-fast-checkout .quantity-box .quantity input.qty::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }

/* ── 2.10.2 — thèmes qui ajoutent leurs propres − / + dans .quantity (ex. Glozin : <span> + icônes) :
   on masque tout ce qui n'est pas le champ (ou un élément qui le contient). Un seul − / + : le nôtre. ── */
#utopia-fast-checkout .quantity-box .quantity *:not(input):not(:has(input)) { display: none !important; }
#utopia-fast-checkout .quantity-box .quantity *:has(input) {
    display: contents !important;
}
#utopia-fast-checkout .quantity-box .quantity::before,
#utopia-fast-checkout .quantity-box .quantity::after { display: none !important; content: none !important; }
#utopia-fast-checkout .quantity-box .quantity input.qty { display: block !important; flex: 0 0 36px; }

/* ── 2.11.2 — chiffre de la quantité toujours centré dans le bloc, quel que soit le style du thème
   (hauteur, padding, line-height, arrondi posés par le thème sur input.qty). ── */
#utopia-fast-checkout .quantity-box .quantity { height: 100% !important; align-items: center !important; }
#utopia-fast-checkout .quantity-box input.qty,
#utopia-fast-checkout .quantity-box input[type="number"] {
    height: 100% !important; min-height: 0 !important; max-height: none !important;
    padding: 0 !important; margin: 0 !important; line-height: normal !important;
    border: 0 !important; border-radius: 0 !important; box-shadow: none !important;
    box-sizing: border-box !important; text-align: center !important; vertical-align: middle !important;
    background: transparent !important;
}
