.quote-cart-panel {
    position: fixed;
    left: 20px;
    bottom: 20px;
    width: min(420px, calc(100vw - 40px));
    max-height: 50vh;
    background: #fff;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    box-shadow: 0 10px 26px rgba(0, 0, 0, 0.18);
    z-index: 1250;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    opacity: 0;
    pointer-events: none;
    transform: translateY(10px);
    transition: opacity 0.2s ease, transform 0.2s ease;
}
.quote-cart-panel.open {
    opacity: 1;
    pointer-events: auto;
    transform: translateY(0);
}
.quote-cart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 14px;
    border-bottom: 1px solid var(--border-color);
    background: #f9faf9;
}
.quote-cart-header-right {
    display: flex;
    align-items: center;
    gap: 8px;
}
.quote-cart-count {
    font-size: 0.8rem;
    color: #666;
    background: #ecf5e8;
    border-radius: 999px;
    padding: 3px 9px;
}
.quote-cart-close {
    border: 1px solid #ddd;
    background: #fff;
    color: #666;
    width: 26px;
    height: 26px;
    border-radius: 50%;
    cursor: pointer;
}
.quote-cart-list {
    list-style: none;
    margin: 0;
    padding: 10px 14px;
    overflow-y: auto;
    max-height: 210px;
}
.quote-cart-list li {
    display: grid;
    grid-template-columns: 1fr auto;
    gap: 10px;
    align-items: start;
    border-bottom: 1px dashed #e3e3e3;
    padding: 8px 0;
    font-size: 0.88rem;
}
.quote-remove-btn {
    border: none;
    background: transparent;
    color: #999;
    cursor: pointer;
    font-size: 0.9rem;
}
.quote-cart-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding: 12px 14px 14px;
    border-top: 1px solid var(--border-color);
    background: #fff;
}
.quote-btn {
    border: none;
    border-radius: 6px;
    padding: 10px 12px;
    font-weight: 700;
    cursor: pointer;
    font-size: 0.84rem;
}
.quote-btn-primary {
    background: var(--green-logo);
    color: #fff;
}
.quote-btn-secondary {
    background: #333;
    color: #fff;
}
.quote-btn-light {
    background: #f0f0f0;
    color: #444;
}
.quote-menu-btn {
    border: 1px solid #dcdcdc;
    background: #fff;
    color: var(--anthracite);
    border-radius: 999px;
    padding: 7px 12px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 0.8rem;
    font-weight: 700;
    cursor: pointer;
    transition: 0.2s;
}
.quote-menu-btn:hover {
    border-color: var(--green-logo);
    color: var(--green-logo);
}
.quote-menu-badge {
    display: inline-block;
    min-width: 18px;
    text-align: center;
    padding: 2px 6px;
    border-radius: 999px;
    background: var(--green-logo);
    color: #fff;
    font-size: 0.72rem;
    font-weight: 700;
    line-height: 1.2;
}

/* Boutons catalogue — Ajouter / Devis (priorité sur styles navigateur) */
.add-quote-btn {
    margin-top: 0;
    border: none !important;
    background: var(--green-logo, #64b446) !important;
    color: #fff !important;
    border-radius: 6px;
    padding: 8px 14px;
    cursor: pointer;
    font-size: 0.82rem;
    font-weight: 700;
    font-family: inherit;
    line-height: 1.2;
    white-space: nowrap;
    appearance: none;
    -webkit-appearance: none;
    box-shadow: none;
    transition: filter 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease;
}

.add-quote-btn:hover {
    filter: brightness(1.06);
}

.add-quote-btn:active {
    transform: scale(0.98);
}

.add-quote-btn:focus-visible {
    outline: 2px solid var(--green-logo, #64b446);
    outline-offset: 2px;
}

.add-quote-btn--error {
    animation: quote-btn-shake 0.45s ease;
    box-shadow: 0 0 0 2px rgba(192, 57, 43, 0.45) !important;
}

.add-quote-btn--ok {
    filter: brightness(1.08);
    box-shadow: 0 0 0 2px rgba(100, 180, 70, 0.55) !important;
}

@keyframes quote-btn-shake {
    0%,
    100% {
        transform: translateX(0);
    }
    20%,
    60% {
        transform: translateX(-4px);
    }
    40%,
    80% {
        transform: translateX(4px);
    }
}

@media (max-width: 768px) {
    .add-quote-btn {
        min-height: 44px;
        padding: 10px 16px;
        font-size: 0.85rem;
    }
}

/* Récapitulatif panier avant envoi */
body.quote-review-open {
    overflow: hidden;
}

body.quote-review-open .quote-cart-panel {
    display: none !important;
}

.quote-cart-panel--compact {
    width: min(320px, calc(100vw - 40px));
    max-height: none;
}

.quote-cart-panel--compact .quote-cart-list {
    max-height: none;
    padding: 14px 16px 8px;
}

.quote-cart-compact-msg {
    display: block !important;
    grid-template-columns: 1fr !important;
    border-bottom: none !important;
    padding: 0 !important;
}

.quote-cart-compact-count {
    margin: 0 0 6px;
    font-size: 0.95rem;
    font-weight: 700;
    color: var(--anthracite, #333);
}

.quote-cart-compact-hint {
    margin: 0;
    font-size: 0.82rem;
    color: #666;
    line-height: 1.45;
}

.quote-cart-panel--compact .quote-cart-actions {
    grid-template-columns: 1fr;
    padding-top: 8px;
}

.quote-review-overlay {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px 16px;
    background: rgba(17, 24, 17, 0.55);
    backdrop-filter: blur(2px);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.22s ease;
}

.quote-review-overlay[hidden] {
    display: none !important;
}

.quote-review-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

.quote-review-modal {
    width: min(960px, 100%);
    max-height: min(90vh, 920px);
    background: #fff;
    border-radius: 14px;
    box-shadow: 0 24px 64px rgba(0, 0, 0, 0.28);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.quote-review-header {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    align-items: flex-start;
    padding: 20px 22px 16px;
    border-bottom: 1px solid var(--border-color, #e3e3e3);
    background: linear-gradient(180deg, #f9fbf8 0%, #fff 100%);
    flex-shrink: 0;
}

.quote-review-header-text {
    min-width: 0;
}

.quote-review-kicker {
    margin: 0 0 4px;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--green-logo, #64b446);
}

.quote-review-header h2 {
    margin: 0 0 8px;
    font-size: 1.35rem;
    color: var(--anthracite, #333);
    line-height: 1.25;
}

.quote-review-intro {
    margin: 0;
    font-size: 0.92rem;
    color: #666;
    line-height: 1.45;
}

.quote-review-count {
    margin: 10px 0 0;
    font-size: 0.84rem;
    font-weight: 700;
    color: var(--green-logo, #64b446);
}

.quote-review-close {
    border: 1px solid #ddd;
    background: #fff;
    color: #666;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    flex-shrink: 0;
    font-size: 1.35rem;
    line-height: 1;
}

.quote-review-body {
    padding: 0;
    overflow: auto;
    flex: 1;
    min-height: 0;
}

.quote-review-empty {
    margin: 0;
    padding: 32px 20px;
    text-align: center;
    color: #777;
}

.quote-review-table-wrap {
    overflow-x: auto;
}

.quote-review-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.quote-review-table thead th {
    position: sticky;
    top: 0;
    z-index: 1;
}

.quote-review-table th,
.quote-review-table td {
    padding: 12px 14px;
    text-align: left;
    border-bottom: 1px solid #ececec;
    vertical-align: top;
}

.quote-review-table th {
    background: #f0f4ee;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #555;
    white-space: nowrap;
}

.quote-review-table tbody tr:hover {
    background: #fafcf9;
}

.quote-review-num {
    width: 44px;
    color: #888;
    font-weight: 600;
}

.quote-review-ref {
    min-width: 120px;
}

.quote-review-ref strong {
    display: block;
    color: var(--anthracite, #333);
}

.quote-review-ref .quote-review-cat {
    display: block;
    margin-top: 4px;
    font-size: 0.72rem;
    color: #888;
    text-transform: capitalize;
}

.quote-review-desc {
    min-width: 200px;
    max-width: 420px;
    line-height: 1.45;
}

.quote-review-qty {
    white-space: nowrap;
    font-weight: 700;
    color: var(--anthracite, #333);
}

.quote-review-action {
    width: 1%;
    white-space: nowrap;
}

.quote-review-action .quote-remove-btn {
    color: #b55;
    font-size: 0.82rem;
    font-weight: 600;
}

.quote-review-action .quote-remove-btn:hover {
    color: #922;
    text-decoration: underline;
}

.quote-review-footer {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 16px 18px 18px;
    border-top: 1px solid var(--border-color, #e3e3e3);
    background: #fff;
    flex-shrink: 0;
}

.quote-review-footer-tools {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.quote-review-main-cta {
    width: 100%;
    padding: 13px 16px;
    font-size: 0.92rem;
}

.quote-review-mail-link {
    border: none;
    background: transparent;
    color: #666;
    font-size: 0.84rem;
    text-decoration: underline;
    cursor: pointer;
    align-self: center;
    padding: 4px 8px;
}

.quote-review-mail-link:hover {
    color: var(--anthracite, #333);
}

.quote-review-mail-link:disabled {
    opacity: 0.45;
    cursor: not-allowed;
}

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

@media (min-width: 640px) {
    .quote-review-footer {
        flex-direction: row;
        flex-wrap: wrap;
        align-items: center;
    }

    .quote-review-footer-tools {
        flex: 1;
    }

    .quote-review-main-cta {
        width: auto;
        min-width: min(100%, 320px);
        margin-left: auto;
    }

    .quote-review-mail-link {
        width: 100%;
        text-align: center;
    }
}

@media (max-width: 639px) {
    .quote-review-overlay {
        padding: 0;
        align-items: flex-end;
    }

    .quote-review-modal {
        max-height: 94vh;
        border-radius: 14px 14px 0 0;
    }

    .quote-review-table th:nth-child(3),
    .quote-review-table td:nth-child(3) {
        min-width: 140px;
    }
}

/* Récapitulatif sur page contact (avant envoi) */
.quote-selection-summary {
    margin-bottom: 24px;
    padding: 18px 20px;
    border: 1px solid var(--border-color, #e3e3e3);
    border-radius: 10px;
    background: #f9fbf8;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.06);
}

.quote-selection-summary h2 {
    margin: 0 0 8px;
    font-size: 1.15rem;
    color: var(--anthracite, #333);
}

.quote-selection-summary-intro {
    margin: 0 0 14px;
    font-size: 0.9rem;
    color: #666;
}

.quote-selection-table .quote-review-action,
.quote-selection-table th:last-child {
    display: none;
}
