/* Dream ACM – Commande Directe : styles de la page de commande et du bouton */

.dacm-btn {
    display: inline-block;
    padding: 13px 26px;
    border: 0;
    border-radius: 6px;
    background: var(--dacm-btn-bg, #e63946);
    color: #ffffff;
    font-size: 15px;
    font-weight: 600;
    text-align: center;
    text-decoration: none;
    line-height: 1.4;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.1s ease, opacity 0.2s ease;
    -webkit-appearance: none;
    appearance: none;
}
.dacm-loop-order {
    display: block;
    width: 100%;
    margin-top: 8px;
    box-sizing: border-box;
}
.dacm-btn:hover,
.dacm-btn:focus {
    background: var(--dacm-btn-hover, #b32333);
    color: #ffffff;
    text-decoration: none;
}
.dacm-btn[disabled] {
    opacity: 0.65;
    cursor: not-allowed;
    pointer-events: none;
}

.dacm-order-now-wrap {
    margin: 18px 0 6px;
    clear: both;
}
.dacm-order-now-wrap .dacm-btn {
    width: 100%;
    margin: 0;
}

.dacm-checkout {
    max-width: 1080px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 380px;
    grid-template-areas:
        "form summary"
        "submit summary";
    gap: 28px;
    padding: 12px 0;
}
.dacm-checkout-form {
    grid-area: form;
}
.dacm-checkout-submit {
    grid-area: submit;
}
.dacm-checkout-summary {
    grid-area: summary;
}

.dacm-section-title {
    font-size: 20px;
    margin: 0 0 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid var(--dacm-btn-bg, #e63946);
}

.dacm-form .dacm-field {
    margin-bottom: 14px;
}
.dacm-row-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}
.dacm-shipping-mode {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    align-items: center;
}
.dacm-shipping-mode .dacm-field-label {
    width: 100%;
    display: block;
    margin-bottom: 4px;
    font-size: 14px;
    font-weight: 500;
}
.dacm-mode-option {
    flex: 1 1 220px;
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid #cfd8dc;
    border-radius: 5px;
    padding: 11px 12px;
    margin-bottom: 0;
    cursor: pointer;
    font-size: 14px;
    background: #ffffff;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.dacm-mode-option:hover {
    border-color: var(--dacm-btn-bg, #e63946);
}
.dacm-mode-option input[type="radio"] {
    width: auto;
    margin: 0;
}
.dacm-shipping-mode:has(.dacm-mode-option input[type="radio"]:checked) .dacm-mode-option {
    border-color: var(--dacm-btn-bg, #e63946);
    box-shadow: 0 0 0 1px var(--dacm-btn-bg, #e63946);
}
.dacm-form label {
    display: block;
    margin-bottom: 5px;
    font-size: 14px;
    font-weight: 500;
}
.dacm-form input[type="text"],
.dacm-form input[type="tel"],
.dacm-form input[type="email"],
.dacm-form input[type="number"],
.dacm-form select,
.dacm-form textarea {
    width: 100%;
    border: 1px solid #cfd8dc;
    border-radius: 5px;
    padding: 11px 12px;
    font-size: 15px;
    background: #ffffff;
    color: #263238;
    box-sizing: border-box;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.dacm-form input:focus,
.dacm-form select:focus,
.dacm-form textarea:focus {
    outline: none;
    border-color: var(--dacm-btn-bg, #e63946);
    box-shadow: 0 0 0 3px rgba(230, 57, 70, 0.12);
}
.dacm-form input.dacm-invalid,
.dacm-form select.dacm-invalid,
.dacm-form textarea.dacm-invalid {
    border-color: #dc3545;
    box-shadow: 0 0 0 3px rgba(220, 53, 69, 0.1);
}
.dacm-form select:disabled {
    background: #f5f6f7;
    color: #90a4ae;
    cursor: not-allowed;
}
.dacm-hint {
    display: block;
    font-size: 12px;
    color: #6c757d;
    margin-top: 4px;
}
.dacm-error-msg {
    display: block;
    color: #dc3545;
    font-size: 12.5px;
    font-weight: 600;
    margin-top: 4px;
    min-height: 0;
}
.dacm-error-msg:empty {
    display: none;
}

.dacm-form-msg {
    margin-top: 14px;
    padding: 12px 14px;
    border-radius: 5px;
    font-size: 14px;
    display: none;
    background: #fef3e2;
    border: 1px solid #f0b429;
    color: #8a5b00;
}
.dacm-form-msg.dacm-show {
    display: block;
}

.dacm-notice {
    padding: 16px 18px;
    border-radius: 6px;
    background: #eef3fb;
    border: 1px solid #b9cee9;
    color: #1a3a5c;
    margin: 18px 0;
}
.dacm-notice-error {
    background: #fdecee;
    border-color: #f2b8bd;
    color: #7c1f27;
}

.dacm-checkout-summary {
    position: sticky;
    top: 24px;
    align-self: start;
}
.dacm-card {
    background: #ffffff;
    border: 1px solid #e6ebef;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 14px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}
.dacm-product {
    display: flex;
    gap: 12px;
    align-items: flex-start;
    margin-bottom: 12px;
}
.dacm-thumb {
    width: 64px;
    height: 64px;
    object-fit: cover;
    border-radius: 6px;
}
.dacm-product-name {
    font-weight: 600;
    font-size: 15px;
    line-height: 1.3;
}
.dacm-product-variation {
    font-size: 13px;
    color: #546e7a;
    margin-top: 3px;
    text-transform: capitalize;
}
.dacm-sum-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 7px 0;
    font-size: 14px;
    color: #37474f;
}
.dacm-sum-row input {
    width: 76px;
    text-align: center;
}
.dacm-grand-total {
    font-size: 17px;
    font-weight: 700;
    border-top: 1px solid #e6ebef;
    margin-top: 6px;
    padding-top: 12px;
    color: #263238;
}
.dacm-payment-note {
    margin: 10px 0 0;
    font-size: 13px;
    color: #546e7a;
    background: #f1f8e9;
    border: 1px solid #d0e8be;
    border-radius: 5px;
    padding: 9px 11px;
}

.dacm-shipping-title {
    font-size: 14px;
    font-weight: 600;
    margin: 0 0 8px;
}
.dacm-shipping-methods {
    display: grid;
    gap: 6px;
}
.dacm-shipping-method {
    display: flex;
    align-items: center;
    gap: 8px;
    border: 1px solid #e6ebef;
    border-radius: 6px;
    padding: 9px 11px;
    cursor: pointer;
    font-size: 14px;
    transition: border-color 0.15s ease, background 0.15s ease;
}
.dacm-shipping-method:hover {
    border-color: var(--dacm-btn-bg, #e63946);
    background: #fff7f7;
}
.dacm-shipping-method input {
    accent-color: var(--dacm-btn-bg, #e63946);
}
.dacm-shipping-method b {
    margin-left: auto;
    font-weight: 600;
}
.dacm-shipping-note {
    font-size: 12.5px;
    color: #6c757d;
    margin: 8px 0 0;
}

.dacm-checkout-submit .dacm-confirm-btn {
    width: 100%;
    padding: 15px 20px;
    font-size: 16px;
    letter-spacing: 0.3px;
}

@keyframes dacm-spin {
    to {
        transform: rotate(360deg);
    }
}
.dacm-btn.dacm-loading {
    pointer-events: none;
    opacity: 0.8;
    position: relative;
}
.dacm-btn.dacm-loading::before {
    content: "";
    width: 16px;
    height: 16px;
    margin: -8px auto 0;
    position: absolute;
    top: 50%;
    left: 50%;
    border: 2px solid rgba(255, 255, 255, 0.4);
    border-top-color: #ffffff;
    border-radius: 50%;
    animation: dacm-spin 0.7s linear infinite;
}

@media (max-width: 860px) {
    .dacm-checkout {
        grid-template-columns: 1fr;
        grid-template-areas:
            "form"
            "summary"
            "submit";
        gap: 20px;
    }
    .dacm-checkout-summary {
        position: static;
    }
    .dacm-row-2 {
        grid-template-columns: 1fr;
        gap: 0;
    }
    .dacm-shipping-mode {
        grid-template-columns: 1fr !important;
    }
}

/* Alignement du mode de livraison (desktop) */
.dacm-shipping-mode {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 12px !important;
    align-items: stretch !important;
}
.dacm-mode-option {
    display: flex !important;
    flex-direction: row;
    align-items: center !important;
    justify-content: flex-start;
    gap: 10px !important;
    width: 100% !important;
    height: 100% !important;
    min-height: 52px !important;
    margin: 0 !important;
    padding: 14px 16px !important;
    box-sizing: border-box !important;
}
.dacm-mode-option input[type="radio"] {
    flex: 0 0 auto;
    width: 18px !important;
    height: 18px !important;
    margin: 0 !important;
}
.dacm-mode-option > span {
    flex: 1 1 auto;
    min-width: 0;
    line-height: 1.35 !important;
}
.dacm-shipping-mode .dacm-field-label {
    display: block !important;
    width: 100% !important;
    grid-column: 1 / -1 !important;
    margin-bottom: 6px !important;
}

/* Landing page produit */
.dacm-landing {
    margin-top: 44px;
    scroll-margin-top: 24px;
}
.dacm-landing-variation {
    max-width: 420px;
}
.dacm-landing .dacm-section-title {
    font-size: 26px;
    line-height: 1.3;
}
.dacm-landing .dacm-payment-note {
    font-size: 13px;
}
.dacm-empty-note {
    color: #767676;
    font-size: 14px;
    margin: 6px 0;
}
.dacm-confirmation-customer {
    margin: 28px 0 12px;
    padding: 18px 20px;
    border: 1px solid #e5e5e5;
    border-radius: 8px;
    background: #fafafa;
}
.dacm-confirmation-table {
    width: 100%;
    border-collapse: collapse;
}
.dacm-confirmation-table th,
.dacm-confirmation-table td {
    text-align: left;
    padding: 6px 10px;
    border-style: dashed;
}
.dacm-confirmation-table th {
    width: 40%;
    font-weight: 600;
}
.dacm-confirmation-page {
    padding: 8px 4px;
}
.dacm-confirmation-head h2 {
    margin: 0 0 10px;
}
.dacm-confirmation-head p {
    font-size: 15px;
    margin: 6px 0;
}
.dacm-confirmation-cod {
    display: inline-block;
    background: #e8f5e9;
    color: #2e7d32;
    border-radius: 999px;
    padding: 5px 14px;
    font-size: 13px;
    font-weight: 600;
}
.dacm-confirmation-title {
    margin: 24px 0 10px;
}
.dacm-confirmation-totals {
    margin-top: 14px;
    border-top: 2px solid var(--dacm-btn-bg, #e63946);
}
.dacm-confirmation-totals th {
    width: auto;
}
.dacm-confirmation-grand-total {
    font-size: 17px;
}
.dacm-confirmation-actions {
    margin-top: 24px;
}
.dacm-confirmation-actions .dacm-btn {
    display: inline-block;
    text-decoration: none;
    color: #ffffff;
}