/* Cmesmat_Quote styles using explicit px sizing (immune to dist/styles.css compounded body 62.5%) */

.cmesmat-quote-price-tag {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 4px;
    background: #eef6e3;
    border: 1px solid #8ac545;
    color: #2f5e0c;
    font-size: 13px;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
}

.cmesmat-cart-toquote {
    margin-top: 16px;
    padding-top: 14px;
    border-top: 1px solid #e2e8f0;
}

.cmesmat-cart-toquote .actions,
.cmesmat-cart-toquote .cart-to-quote {
    width: 100%;
    justify-content: center;
}

.cmesmat-cart-quote-primary {
    display: inline-flex !important;
    width: 100%;
    justify-content: center;
    align-items: center;
    gap: 8px;
    padding: 12px 18px;
    border: 1px solid #8ac545;
    border-radius: 4px;
    background: #8ac545;
    color: #ffffff;
    min-block-size: 46px;
    font-size: 14px;
    font-weight: 700;
    line-height: 1.25;
    text-transform: uppercase;
    text-decoration: none;
    box-sizing: border-box;
    cursor: pointer;
}

.cmesmat-cart-quote-primary:hover,
.cmesmat-cart-quote-primary:focus-visible {
    background: #75ad34;
    border-color: #75ad34;
    color: #ffffff;
}

.cmesmat-cart-quote-primary svg {
    width: 18px;
    height: 18px;
    flex: 0 0 auto;
    fill: currentColor;
}

.cmesmat-cart-quote-note {
    margin: 8px 0 0;
    font-size: 13px;
    line-height: 1.45;
    color: #334155;
}

/* Floating accessible toast after add-to-quote */
.cmesmat-toast {
    position: fixed;
    right: 20px;
    bottom: 20px;
    z-index: 1050;
    width: min(400px, calc(100vw - 32px));
    padding: 16px;
    background: #ffffff;
    color: #1e293b;
    border: 1px solid #8ac545;
    border-left: 5px solid #8ac545;
    border-radius: 8px;
    box-shadow: 0 12px 32px rgba(15, 23, 42, 0.22);
    font-size: 15px;
    line-height: 1.45;
}

.cmesmat-toast.is-error {
    border-color: #dc2626;
    border-left-color: #dc2626;
}

.cmesmat-toast__row {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 12px;
}

.cmesmat-toast__msg {
    font-weight: 600;
    font-size: 15px;
}

.cmesmat-toast__close {
    flex: 0 0 auto;
    min-inline-size: 32px;
    min-block-size: 32px;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    background: #ffffff;
    font-size: 20px;
    line-height: 1;
    cursor: pointer;
}

.cmesmat-toast__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 12px;
}

.cmesmat-toast__link {
    flex: 1 1 auto;
    font-size: 13px;
    padding: 9px 12px;
    text-align: center;
}

/* Request, Suivi & Virement pages */
.cmesmat-quote-page,
.cmesmat-suivi-page,
.cmesmat-virement-page,
.cmesmat-customer-quotes {
    max-width: 1180px;
    margin: 24px auto;
    padding: 0 16px;
    font-size: 15px;
    line-height: 1.5;
    color: #1e293b;
}

.cmesmat-quote-page__head {
    margin-bottom: 24px;
}

.cmesmat-quote-page__head h1,
.cmesmat-suivi-head h1 {
    font-size: 26px;
    font-weight: 700;
    line-height: 1.25;
    margin: 0 0 8px;
}

.cmesmat-quote-page__head p,
.cmesmat-quote-empty p,
.cmesmat-virement-intro {
    font-size: 15px;
    line-height: 1.5;
    margin: 0 0 14px;
}

.cmesmat-quote-grid {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);
    gap: 24px;
    align-items: start;
}

@media (max-width: 900px) {
    .cmesmat-quote-grid {
        grid-template-columns: 1fr;
    }
}

.cmesmat-quote-section,
.cmesmat-virement-card,
.cmesmat-decision-box {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.cmesmat-section-head {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    margin-bottom: 16px;
}

.cmesmat-section-head h2,
.cmesmat-quote-section h2,
.cmesmat-decision-box h2 {
    margin: 0 0 14px;
    font-size: 20px;
    font-weight: 600;
    line-height: 1.3;
}

.cmesmat-section-head h2 {
    margin: 0;
}

.cmesmat-quote-empty__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 12px;
}

.cmesmat-action-link {
    font-size: 13px;
    line-height: 1.2;
}

.cmesmat-quote-items {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.cmesmat-quote-item {
    display: flex;
    gap: 14px;
    padding: 12px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    background: #f8fafc;
}

.cmesmat-quote-item__img {
    flex: 0 0 72px;
    width: 72px;
    height: 72px;
    object-fit: contain;
    background: #ffffff;
    border-radius: 4px;
}

.cmesmat-quote-item__info h3 {
    margin: 0 0 4px;
    font-size: 15px;
    font-weight: 600;
}

.cmesmat-quote-item__sku,
.cmesmat-quote-price-note {
    margin: 4px 0;
    font-size: 13px;
    color: #475569;
}

.cmesmat-quote-item__info {
    flex: 1 1 auto;
    min-width: 0;
}

.cmesmat-quote-item__controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 10px;
}

.cmesmat-qty-stepper {
    display: inline-flex;
    align-items: center;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    background: #ffffff;
    overflow: hidden;
}

.cmesmat-qty-btn {
    min-inline-size: 36px;
    min-block-size: 36px;
    padding: 0 10px;
    border: 0;
    background: #f1f5f9;
    color: #1e293b;
    font-size: 16px;
    font-weight: 700;
    line-height: 1;
    cursor: pointer;
}

.cmesmat-qty-btn:hover:not(:disabled) {
    background: #e2e8f0;
}

.cmesmat-qty-input {
    width: 64px;
    min-block-size: 36px;
    padding: 4px 6px;
    border: 0;
    border-left: 1px solid #cbd5e1;
    border-right: 1px solid #cbd5e1;
    text-align: center;
    font-size: 14px;
    font-weight: 600;
    color: #1e293b;
    background: #ffffff;
}

.cmesmat-remove-btn {
    min-block-size: 36px;
    padding: 6px 12px;
    border: 1px solid #fecaca;
    border-radius: 4px;
    background: #ffffff;
    color: #b91c1c;
    font-size: 13px;
    font-weight: 600;
    line-height: 1.2;
    cursor: pointer;
}

.cmesmat-remove-btn:hover:not(:disabled) {
    background: #fef2f2;
    border-color: #dc2626;
}

@media (pointer: coarse) {
    .cmesmat-qty-btn,
    .cmesmat-qty-input,
    .cmesmat-remove-btn {
        min-block-size: 44px;
    }
}

.cmesmat-field-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
}

@media (max-width: 640px) {
    .cmesmat-field-row {
        grid-template-columns: 1fr;
    }
}

.cmesmat-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 14px;
    position: relative;
}

.cmesmat-field label,
.cmesmat-inline-form label {
    font-weight: 600;
    font-size: 14px;
    line-height: 1.3;
    color: #1e293b;
}

.cmesmat-field input,
.cmesmat-field textarea,
.cmesmat-inline-form textarea {
    padding: 10px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 15px;
    line-height: 1.4;
}

.cmesmat-field input:user-invalid,
.cmesmat-field textarea:user-invalid {
    border-color: #dc2626;
}

.cmesmat-error-summary {
    padding: 14px 16px;
    margin-bottom: 16px;
    border: 1px solid #dc2626;
    border-radius: 6px;
    background: #fef2f2;
    color: #991b1b;
    font-size: 14px;
}

.cmesmat-hp-field {
    position: absolute;
    left: -9999px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.cmesmat-autocomplete-list {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 30;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.12);
    max-height: 220px;
    overflow-y: auto;
}

.cmesmat-autocomplete-option {
    display: block;
    width: 100%;
    text-align: left;
    padding: 10px 12px;
    border: 0;
    background: #ffffff;
    font-size: 14px;
    cursor: pointer;
}

.cmesmat-autocomplete-option:hover,
.cmesmat-autocomplete-option:focus-visible {
    background: #f1f5f9;
}

/* Shared CMESMAT Quote buttons */
.cmesmat-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-inline-size: 44px;
    min-block-size: 44px;
    padding: 10px 18px;
    border-radius: 4px;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.25;
    text-decoration: none;
    cursor: pointer;
    border: 1px solid transparent;
    text-align: center;
}

.cmesmat-btn--primary {
    background: #8ac545;
    color: #ffffff;
}

.cmesmat-btn--secondary {
    background: #ffffff;
    color: #1e293b;
    border-color: #94a3b8;
}

.cmesmat-btn--danger {
    background: #dc2626;
    color: #ffffff;
}

.cmesmat-btn--full {
    width: 100%;
}

/* Suivi, tables & virement */
.cmesmat-suivi-head {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    margin-bottom: 20px;
}

.cmesmat-suivi-kicker {
    margin: 0 0 4px;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #64748b;
}

.cmesmat-suivi-sub {
    margin: 0;
    font-size: 15px;
    color: #475569;
}

.cmesmat-suivi-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.cmesmat-meta-strip {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 12px;
    margin: 0 0 20px;
    padding: 14px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 14px;
}

.cmesmat-meta-strip dt {
    font-size: 12px;
    color: #64748b;
}

.cmesmat-meta-strip dd {
    margin: 2px 0 0;
    font-weight: 700;
}

.cmesmat-status-badge {
    display: inline-block;
    padding: 6px 12px;
    border-radius: 999px;
    font-size: 13px;
    font-weight: 700;
    background: #e2e8f0;
    color: #0f172a;
}

.cmesmat-status-badge--proposal_sent {
    background: #dcfce7;
    color: #166534;
}

.cmesmat-status-badge--paid {
    background: #16a34a;
    color: #ffffff;
}

.cmesmat-status-badge--awaiting_bank_transfer,
.cmesmat-status-badge--payment_pending {
    background: #dbeafe;
    color: #1e40af;
}

.cmesmat-status-badge--refused {
    background: #fee2e2;
    color: #991b1b;
}

.cmesmat-table-wrap {
    overflow-x: auto;
}

.cmesmat-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.cmesmat-table th,
.cmesmat-table td {
    padding: 10px 12px;
    border-bottom: 1px solid #e2e8f0;
    text-align: left;
    vertical-align: top;
}

.cmesmat-table th.num,
.cmesmat-table td.num {
    text-align: right;
    white-space: nowrap;
}

.cmesmat-line-desc {
    font-size: 13px;
    color: #475569;
    margin-top: 2px;
}

.cmesmat-totals-box {
    max-width: 340px;
    margin: 16px 0 0 auto;
    display: flex;
    flex-direction: column;
    gap: 6px;
    font-size: 15px;
}

.cmesmat-totals-box > div {
    display: flex;
    justify-content: space-between;
}

.cmesmat-totals-box__ttc {
    padding-top: 8px;
    border-top: 2px solid #0f172a;
    font-size: 18px;
}

.cmesmat-decision-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 16px;
}

.cmesmat-details {
    margin-top: 12px;
    padding: 12px 14px;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 14px;
}

.cmesmat-details summary {
    cursor: pointer;
    font-weight: 600;
}

.cmesmat-inline-form {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 12px;
}

.cmesmat-bank-list {
    display: grid;
    gap: 14px;
    margin: 20px 0 0;
}

.cmesmat-bank-row {
    display: grid;
    grid-template-columns: 220px minmax(0, 1fr);
    gap: 12px;
    align-items: center;
    padding: 12px 14px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 15px;
}

@media (max-width: 640px) {
    .cmesmat-bank-row {
        grid-template-columns: 1fr;
    }
}

.cmesmat-bank-row dt {
    font-weight: 600;
    color: #475569;
}

.cmesmat-copy-field {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
    margin: 0;
}

.cmesmat-copy-field code {
    font-size: 16px;
    font-weight: 700;
    padding: 4px 8px;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
}

.cmesmat-copy-btn {
    min-inline-size: 44px;
    min-block-size: 44px;
    padding: 8px 14px;
    border-radius: 6px;
    border: 1px solid #0f172a;
    background: #ffffff;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
}

@media (pointer: coarse) {
    .cmesmat-copy-btn {
        min-inline-size: 48px;
        min-block-size: 48px;
    }
}

.cmesmat-copy-tip {
    font-size: 13px;
    font-weight: 600;
    color: #166534;
}

.cmesmat-banner {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 14px 18px;
    border-radius: 6px;
    margin-bottom: 20px;
    font-size: 15px;
}

.cmesmat-banner--success {
    background: #dcfce7;
    border: 1px solid #22c55e;
    color: #14532d;
}

.cmesmat-banner--info {
    background: #eff6ff;
    border: 1px solid #60a5fa;
    color: #1e3a8a;
}

.cmesmat-customer-quotes__top {
    margin-bottom: 16px;
}

.cmesmat-quote-empty-note {
    font-size: 15px;
    margin: 0 0 16px;
}

/* Magic Link widget & /demande-devis-gratuit CMS landing page */
.cmesmat-devis-landing {
    max-width: 1180px;
    margin: 0 auto 28px;
    font-size: 15px;
    line-height: 1.55;
    color: #1e293b;
}

.cmesmat-devis-landing__banner {
    margin: 0 0 20px;
    border-radius: 8px;
    overflow: hidden;
}

.cmesmat-devis-landing__banner img {
    display: block;
    width: 100%;
    height: auto;
}

.cmesmat-devis-landing__intro {
    margin: 0 0 22px;
    padding: 16px 20px;
    background: #f8fafc;
    border-left: 4px solid #8ac545;
    border-radius: 6px;
    font-size: 16px;
    line-height: 1.55;
}

.cmesmat-devis-landing__grid {
    display: grid;
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 0.95fr);
    gap: 24px;
    align-items: start;
    margin-bottom: 24px;
}

@media (max-width: 900px) {
    .cmesmat-devis-landing__grid {
        grid-template-columns: 1fr;
    }
}

.cmesmat-devis-landing__card {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 22px;
    box-shadow: 0 2px 8px rgba(15, 23, 42, 0.04);
}

.cmesmat-devis-landing__card h2 {
    margin: 0 0 14px;
    font-size: 20px;
    font-weight: 700;
    line-height: 1.3;
    color: #0f172a;
}

.cmesmat-devis-steps {
    margin: 0 0 18px;
    padding-left: 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    font-size: 15px;
}

.cmesmat-devis-landing__ctas {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    margin-top: 16px;
}

.cmesmat-devis-landing__contact {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 20px 22px;
}

.cmesmat-devis-landing__contact h2 {
    margin: 0 0 10px;
    font-size: 18px;
    font-weight: 700;
    color: #0f172a;
}

.cmesmat-devis-contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 16px;
    margin-top: 12px;
}

.cmesmat-devis-contact-item {
    padding: 12px 14px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 6px;
    font-size: 15px;
}

.cmesmat-devis-contact-item strong {
    display: block;
    margin-bottom: 4px;
    color: #0f172a;
}

.cmesmat-devis-landing__seo,
.cmesmat-devis-faq {
    margin-top: 24px;
    padding: 20px 22px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
}

.cmesmat-devis-landing__seo h2,
.cmesmat-devis-faq h2 {
    margin: 0 0 12px;
    font-size: 20px;
    font-weight: 700;
    color: #0f172a;
}

.cmesmat-devis-landing__seo ul {
    margin: 0;
    padding-left: 20px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.cmesmat-devis-faq h3 {
    margin: 16px 0 6px;
    font-size: 16px;
    font-weight: 700;
    color: #0f172a;
}

.cmesmat-devis-faq p {
    margin: 0 0 8px;
    font-size: 15px;
    line-height: 1.5;
}

.cmesmat-magic-box h3 {
    margin: 0 0 8px;
    font-size: 18px;
    font-weight: 700;
    line-height: 1.3;
    color: #0f172a;
}

.cmesmat-magic-box__desc {
    margin: 0 0 14px;
    font-size: 14px;
    line-height: 1.5;
    color: #475569;
}

.cmesmat-magic-box__alt {
    margin: 14px 0 0;
    padding-top: 12px;
    border-top: 1px solid #e2e8f0;
    font-size: 13px;
    color: #475569;
}

.cmesmat-magic-box__alt a {
    color: #2f5e0c;
    font-weight: 600;
}

.cmesmat-magic-status {
    margin: 0 0 14px;
    padding: 12px 14px;
    border-radius: 6px;
    font-size: 14px;
    line-height: 1.45;
}

.cmesmat-magic-status--success {
    background: #dcfce7;
    border: 1px solid #22c55e;
    color: #14532d;
}

.cmesmat-magic-status--error {
    background: #fef2f2;
    border: 1px solid #dc2626;
    color: #991b1b;
}

.cmesmat-acces-card {
    max-width: 640px;
}
