/* ============================================
   CHECKOUT
   ============================================ */

.site-main > article,
.site-main > .page,
.entry-header,
.entry-title,
.page-header { display: none !important; }
.site-main { padding: 0 !important; margin: 0 !important; background: transparent !important; }

body.woocommerce-checkout,
body.woocommerce-checkout #page,
body.woocommerce-checkout #content,
body.woocommerce-checkout .site-content,
body.woocommerce-checkout #primary,
body.woocommerce-checkout .site-main {
    background: #002060 !important;
    max-width: 100% !important;
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
    box-shadow: none !important;
}
body.woocommerce-checkout .woocommerce {
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
}

.checkout-theme-global {
    background: #002060;
    min-height: 100vh;
    position: relative;
    padding: 50px 0 80px;
    overflow: hidden;
}

.checkout-bg-circle {
    position: absolute;
    width: 500px;
    height: 650px;
    border-radius: 9999px;
    pointer-events: none;
    opacity: 0.1;
    z-index: 0;
}
.checkout-bg-circle-right { right: -250px; top: 10%;   background: #4DC4FF; }
.checkout-bg-circle-left  { left: -250px;  bottom: 5%; background: #00AFEF; }

.checkout-wrapper {
    max-width: 1200px;
    margin: 80px auto;
    padding: 0 20px;
    position: relative;
    z-index: 1;
}

/* En-tête */
.checkout-header { margin-bottom: 24px; }
.checkout-title {
    font-size: 2rem;
    font-weight: 800;
    color: white;
    margin: 0;
    letter-spacing: -0.02em;
}

/* Étapes */
.checkout-steps {
    display: flex;
    align-items: center;
    margin-bottom: 36px;
}
.checkout-step { display: flex; align-items: center; gap: 8px; }
.step-num {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
    font-weight: 700;
    background: rgba(255,255,255,0.15);
    color: rgba(255,255,255,0.5);
    border: 1px solid rgba(255,255,255,0.2);
    flex-shrink: 0;
}
.step-label { font-size: 0.85rem; font-weight: 600; color: rgba(255,255,255,0.5); }
.checkout-step.done .step-num   { background: #00AFEF; color: white; border-color: #00AFEF; }
.checkout-step.done .step-label { color: rgba(255,255,255,0.8); }
.checkout-step.active .step-num   { background: white; color: #002060; border-color: white; }
.checkout-step.active .step-label { color: white; font-weight: 700; }
.checkout-step-line {
    flex: 1; height: 1px;
    background: rgba(255,255,255,0.15);
    margin: 0 12px; max-width: 60px;
}
.checkout-step-line.done { background: #00AFEF; }

/* Layout */
.checkout-layout {
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 24px;
    align-items: start;
}

/* Cards */
.checkout-card {
    background: white;
    border-radius: 16px;
    padding: 28px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.2);
    margin-bottom: 20px;
    box-sizing: border-box;
}
.checkout-card-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.95rem;
    font-weight: 800;
    color: #002060;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid #f0f2f5;
}

/* Champs */
.checkout-card .form-row { margin-bottom: 16px; }
.checkout-card .form-row label {
    display: block;
    font-size: 0.82rem;
    font-weight: 700;
    color: #555;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    margin-bottom: 6px;
}
.checkout-card .form-row .required { color: #002060; }
.checkout-card .form-row input[type="text"],
.checkout-card .form-row input[type="email"],
.checkout-card .form-row input[type="tel"],
.checkout-card .form-row input[type="number"],
.checkout-card .form-row input[type="password"],
.checkout-card .form-row select,
.checkout-card .form-row textarea {
    width: 100%;
    padding: 11px 14px;
    border: 1.5px solid #e2e6ed;
    border-radius: 8px;
    font-size: 0.92rem;
    color: #333;
    background: #fafbfc;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
    -webkit-appearance: none;
}
.checkout-card .form-row input:focus,
.checkout-card .form-row select:focus,
.checkout-card .form-row textarea:focus {
    outline: none;
    border-color: #002060;
    background: white;
    box-shadow: 0 0 0 3px rgba(0,32,96,0.06);
}
.checkout-card .form-row textarea { min-height: 90px; resize: vertical; }
.checkout-card .form-row-wide { width: 100%; }
.checkout-card .form-row-first,
.checkout-card .form-row-last {
    width: calc(50% - 8px);
    display: inline-block;
    vertical-align: top;
}
.checkout-card .form-row-first { margin-right: 16px; }

/* Récapitulatif */
.checkout-summary-card .shop_table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
.checkout-summary-card .shop_table th,
.checkout-summary-card .shop_table td {
    padding: 10px 0;
    border-bottom: 1px solid #f0f2f5;
    color: #555;
}
.checkout-summary-card .shop_table th {
    font-weight: 700; color: #002060;
    font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.04em;
}
.checkout-summary-card .shop_table .product-name { font-weight: 600; color: #002060; }
.checkout-summary-card .shop_table .product-total { text-align: right; font-weight: 700; color: #002060; }
.checkout-summary-card .shop_table tfoot tr:last-child td,
.checkout-summary-card .shop_table tfoot tr:last-child th {
    font-size: 1rem; font-weight: 800; color: #002060;
    border-bottom: none; border-top: 2px solid #002060; padding-top: 16px;
}

/* Paiement natif — reset du style WooCommerce */
.checkout-payment-card #payment {
    background: transparent !important;
    padding: 0 !important;
    border: none !important;
}
.checkout-payment-card #payment ul.wc_payment_methods {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 0 16px !important;
    border: none !important;
}
.checkout-payment-card #payment li.wc_payment_method {
    border: 1.5px solid #e2e6ed !important;
    border-radius: 10px !important;
    margin-bottom: 10px !important;
    overflow: hidden !important;
    padding: 0 !important;
    background: white !important;
}
.checkout-payment-card #payment li.wc_payment_method:has(input:checked) {
    border-color: #002060 !important;
}
.checkout-payment-card #payment li.wc_payment_method label {
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    padding: 14px 16px !important;
    cursor: pointer !important;
    font-weight: 600 !important;
    color: #333 !important;
    font-size: 0.9rem !important;
    text-transform: none !important;
    letter-spacing: 0 !important;
    margin: 0 !important;
    border: none !important;
    background: transparent !important;
}
.checkout-payment-card #payment li.wc_payment_method input[type="radio"] {
    accent-color: #002060;
    width: 16px; height: 16px; flex-shrink: 0;
}
.checkout-payment-card #payment .payment_box {
    background: #f8f9fb !important;
    padding: 14px 16px !important;
    font-size: 0.88rem !important;
    color: #666 !important;
    border-top: 1px solid #f0f2f5 !important;
    margin: 0 !important;
}

/* CGV */
.checkout-payment-card #payment .woocommerce-privacy-policy-text,
.checkout-payment-card #payment .woocommerce-terms-and-conditions-wrapper {
    font-size: 0.8rem; color: #888; margin-bottom: 16px; line-height: 1.6;
}
.checkout-payment-card #payment .woocommerce-privacy-policy-text a,
.checkout-payment-card #payment .woocommerce-terms-and-conditions-wrapper a {
    color: #002060; text-decoration: underline;
}

/* Bouton commander */
.checkout-payment-card #payment #place_order {
    width: 100% !important;
    background: #002060 !important;
    color: white !important;
    border: none !important;
    padding: 16px !important;
    border-radius: 10px !important;
    font-size: 1rem !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    transition: background 0.3s ease !important;
    letter-spacing: 0.02em !important;
    box-sizing: border-box !important;
    display: block !important;
    text-align: center !important;
    margin-top: 8px !important;
}
.checkout-payment-card #payment #place_order:hover { background: #001a4d !important; }

/* Notices */
.woocommerce-NoticeGroup { position: relative; z-index: 2; }
.woocommerce-error,
.woocommerce-message,
.woocommerce-info {
    margin: 0 0 20px !important;
    padding: 12px 20px !important;
    border-radius: 10px !important;
    background: rgba(255,255,255,0.08) !important;
    border: 1px solid rgba(255,255,255,0.12) !important;
    border-top: none !important;
    color: rgba(255,255,255,0.85) !important;
    font-size: 0.88rem !important;
    list-style: none !important;
}
.woocommerce-error {
    border-left: 3px solid #ef4444 !important;
    background: rgba(239,68,68,0.1) !important;
    color: white !important;
}
.woocommerce-error li { color: white !important; margin-left: 0 !important; }
.woocommerce-error::before,
.woocommerce-message::before,
.woocommerce-info::before { display: none !important; }

/* Responsive */
@media (max-width: 900px) {
    .checkout-layout { grid-template-columns: 1fr; }
    .checkout-step-line { max-width: 30px; }
}
@media (max-width: 640px) {
    .checkout-title { font-size: 1.5rem; }
    .checkout-card { padding: 20px; }
    .checkout-card .form-row-first,
    .checkout-card .form-row-last { width: 100%; display: block; margin-right: 0; }
    .checkout-wrapper { margin: 0 auto;, padding: 0 16px; }
}