body {
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji";
}

/*
 * Repli sans Tailwind CDN.
 * Ne PAS mettre !important sur .hidden : ?a casse `hidden md:flex` (sidebar).
 * L?attribut HTML [hidden] reste prioritaire (espace client, etc.).
 */
.hidden {
    display: none;
}

[hidden] {
    display: none !important;
}

/* Layout admin si Tailwind absent : sidebar desktop + shell flex */
body > div.flex.min-h-screen {
    display: flex;
    min-height: 100vh;
}

body > div.flex.min-h-screen > aside {
    display: none;
    width: 16rem;
    flex-shrink: 0;
    flex-direction: column;
    gap: 1rem;
    padding: 1rem;
    background: #fff;
    border-right: 1px solid #e2e8f0;
}

@media (min-width: 768px) {
    body > div.flex.min-h-screen > aside {
        display: flex;
    }
}

body > div.flex.min-h-screen > main {
    flex: 1;
    min-width: 0;
}

.app-sidebar-link.active {
    background-color: rgb(37 99 235 / 0.1);
    color: rgb(37 99 235);
}

.modal-backdrop {
    opacity: 0;
    transition: opacity 0.2s ease;
}

.modal-panel {
    opacity: 0;
    transform: scale(0.95) translateY(8px);
    transition: transform 0.2s ease, opacity 0.2s ease;
}

.modal-open .modal-backdrop {
    opacity: 1;
}

.modal-open .modal-panel {
    opacity: 1;
    transform: scale(1) translateY(0);
}

.toast-item {
    animation: toastIn 0.25s ease;
}

@keyframes toastIn {
    from {
        transform: translateY(8px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.table-wrap {
    overflow-x: auto;
}

/* Listes type quotes-v2 : table desktop / cartes mobile */
.mobile-card-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

#quotes-v2-more-menu > summary {
    list-style: none;
}
#quotes-v2-more-menu > summary::-webkit-details-marker {
    display: none;
}
#quotes-v2-actifs-toolbar.hidden {
    display: none !important;
}
.mobile-card-list:empty {
    display: none;
}
.mobile-card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 1rem;
    box-shadow: 0 1px 2px rgb(15 23 42 / 0.04);
    padding: 1rem;
}
.mobile-card--alert {
    border-color: #fdba74;
    border-left-width: 4px;
    background: #fffbeb;
}
.mobile-card-title {
    font-weight: 600;
    color: #0f172a;
    line-height: 1.3;
}
.mobile-card-meta {
    margin-top: 0.25rem;
    font-size: 0.8125rem;
    color: #64748b;
    line-height: 1.4;
}
.mobile-card-amount {
    font-size: 0.9375rem;
    font-weight: 600;
    color: #1e293b;
    white-space: nowrap;
}
.mobile-card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem 0.75rem;
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid #f1f5f9;
    font-size: 0.8125rem;
}
.mobile-card-actions a,
.mobile-card-actions button {
    background: none;
    border: 0;
    padding: 0;
    cursor: pointer;
    font: inherit;
}
.page-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
}
.page-toolbar-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.5rem;
}
@media (max-width: 767px) {
    .page-toolbar h2 {
        font-size: 1.35rem;
        line-height: 1.25;
    }
    .page-toolbar-actions .logout-btn,
    .page-toolbar-actions form button {
        font-size: 0.8125rem;
        padding: 0.5rem 0.75rem;
    }
}

/* Assistant IA ? aper?u HTML r?sultat (hors textarea) */
.ai-result-pane.ai-result-plain {
    white-space: pre-wrap;
    word-break: break-word;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.8125rem;
    line-height: 1.45;
}

.ai-result-pane.ai-result-html {
    font-family: inherit;
    outline: none;
}

.ai-result-pane.ai-result-html:focus-visible {
    box-shadow: inset 0 0 0 2px rgb(99 102 241 / 0.35);
    border-radius: 0.5rem;
}

.ai-result-pane.ai-result-html [contenteditable],
.ai-result-pane.ai-result-html {
    outline: none;
}

.ai-result-pane.ai-result-html > * + * {
    margin-top: 0.5rem;
}

.ai-result-pane.ai-result-html a {
    color: rgb(37 99 235);
    text-decoration: underline;
}

.ai-result-pane .ai-result-placeholder {
    color: rgb(148 163 184);
    font-style: italic;
    margin: 0;
}

.ai-result-pane pre.ai-result-json {
    margin: 0;
    padding: 0;
    white-space: pre-wrap;
    word-break: break-word;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.75rem;
    line-height: 1.5;
}

.ai-result-pane.ai-result-dashboard pre.ai-result-json {
    user-select: text;
}

.document-workflow-slider {
    accent-color: rgb(79 70 229);
    height: 0.5rem;
}

.document-workflow-track {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(5.5rem, 1fr));
    gap: 0.35rem 0.25rem;
    max-height: 9rem;
    overflow-y: auto;
    padding-top: 0.25rem;
}

.document-workflow-step {
    font-size: 0.65rem;
    line-height: 1.2;
    padding: 0.35rem 0.25rem;
    border-radius: 0.5rem;
    border: 1px solid rgb(226 232 240);
    background: white;
    color: rgb(100 116 139);
    text-align: center;
    cursor: pointer;
    transition: background 0.15s, color 0.15s, border-color 0.15s;
}

.document-workflow-step:hover {
    border-color: rgb(165 180 252);
    color: rgb(67 56 202);
}

.document-workflow-step.is-done {
    background: rgb(238 242 255);
    border-color: rgb(199 210 254);
    color: rgb(67 56 202);
}

.document-workflow-step.is-current {
    background: rgb(79 70 229);
    border-color: rgb(79 70 229);
    color: white;
    font-weight: 600;
}

.document-workflow-history {
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: 11rem;
    overflow-y: auto;
}

.document-workflow-history li {
    display: flex;
    gap: 0.75rem;
    align-items: flex-start;
    padding: 0.45rem 0;
    border-bottom: 1px solid rgb(224 231 255);
    font-size: 0.75rem;
}

.document-workflow-history li:last-child {
    border-bottom: none;
}

.document-workflow-history time {
    flex-shrink: 0;
    min-width: 7.5rem;
    color: rgb(100 116 139);
    font-variant-numeric: tabular-nums;
}

.document-workflow-history .history-step-label {
    color: rgb(30 27 75);
    font-weight: 500;
}

.document-workflow-history .history-meta {
    color: rgb(100 116 139);
    font-weight: 400;
}

.document-workflow-history li.is-email .history-step-label {
    color: rgb(67 56 202);
}

.qv2-history {
    list-style: none;
    margin: 0.35rem 0 0;
    padding: 0;
    max-height: 7.5rem;
    overflow-y: auto;
}

.qv2-history li {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem 0.5rem;
    align-items: baseline;
    padding: 0.2rem 0;
    border-bottom: 1px solid rgb(241 245 249);
    font-size: 0.68rem;
    line-height: 1.35;
    color: rgb(71 85 105);
}

.qv2-history li:last-child { border-bottom: none; }
.qv2-history time {
    flex-shrink: 0;
    color: rgb(148 163 184);
    font-variant-numeric: tabular-nums;
}
.qv2-history .qv2-history-label { color: rgb(30 41 59); font-weight: 600; }
.qv2-history .qv2-history-meta { color: rgb(100 116 139); }
.qv2-history li.is-email .qv2-history-label { color: rgb(67 56 202); }

.qv2-mail-item { cursor: pointer; transition: box-shadow 0.12s ease; }
.qv2-mail-item:hover { box-shadow: 0 0 0 1px rgb(99 102 241 / 0.35); }

.document-workflow-history-empty {
    font-size: 0.75rem;
    color: rgb(100 116 139);
    font-style: italic;
    margin: 0;
}

/* Liste devis ? code couleur par ?tape du parcours */
.quote-row-wf {
    transition: background-color 0.15s ease;
}

.quote-row-wf:hover {
    filter: brightness(0.98);
}

.workflow-pill {
    display: inline-block;
    max-width: 100%;
    padding: 0.2rem 0.5rem;
    border-radius: 9999px;
    font-size: 0.7rem;
    font-weight: 600;
    line-height: 1.25;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    vertical-align: middle;
}

.quote-inline-select {
    appearance: none;
    -webkit-appearance: none;
    max-width: 100%;
    padding: 0.15rem 1.35rem 0.15rem 0.35rem;
    border: 1px solid transparent;
    border-radius: 0.375rem;
    background-color: transparent;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3E%3Cpath stroke='%2394a3b8' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.15rem center;
    background-size: 0.85rem;
    font-size: inherit;
    line-height: 1.35;
    cursor: pointer;
    color: inherit;
}

.quote-inline-select:hover:not(:disabled),
.quote-inline-select:focus:not(:disabled) {
    border-color: rgb(203 213 225);
    background-color: rgb(255 255 255);
    outline: none;
}

.quote-inline-select:disabled {
    opacity: 0.65;
    cursor: wait;
}

select.quote-inline-workflow.workflow-pill {
    border: none;
    padding-right: 1.35rem;
    font-size: 0.7rem;
    font-weight: 600;
}

select.quote-inline-workflow.workflow-pill:hover:not(:disabled),
select.quote-inline-workflow.workflow-pill:focus:not(:disabled) {
    filter: brightness(0.97);
    outline: 2px solid rgb(148 163 184);
    outline-offset: 1px;
}

.workflow-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
}

.workflow-legend-swatch {
    display: inline-block;
    width: 0.65rem;
    height: 0.65rem;
    border-radius: 9999px;
    flex-shrink: 0;
}

.workflow-pill--none,
.workflow-legend-swatch.workflow-pill--none {
    background: rgb(241 245 249);
    color: rgb(100 116 139);
}

.quote-row-wf--request_received { box-shadow: inset 4px 0 0 rgb(148 163 184); background: rgb(248 250 252); }
.workflow-pill--request_received, .workflow-legend-swatch.workflow-pill--request_received { background: rgb(226 232 240); color: rgb(51 65 85); }

.quote-row-wf--awaiting,
.quote-row-wf--pending_response,
.quote-row-wf--to_follow_up { box-shadow: inset 4px 0 0 rgb(96 165 250); background: rgb(239 246 255); }
.workflow-pill--awaiting,
.workflow-pill--pending_response,
.workflow-legend-swatch.workflow-pill--awaiting,
.workflow-legend-swatch.workflow-pill--pending_response { background: rgb(219 234 254); color: rgb(30 64 175); }

.quote-row-wf--label_created { box-shadow: inset 4px 0 0 rgb(34 211 238); background: rgb(236 254 255); }
.workflow-pill--label_created, .workflow-legend-swatch.workflow-pill--label_created { background: rgb(207 250 254); color: rgb(14 116 144); }

.quote-row-wf--support_received { box-shadow: inset 4px 0 0 rgb(99 102 241); background: rgb(238 242 255); }
.workflow-pill--support_received, .workflow-legend-swatch.workflow-pill--support_received { background: rgb(224 231 255); color: rgb(55 48 163); }

.quote-row-wf--diagnostic_done { box-shadow: inset 4px 0 0 rgb(168 85 247); background: rgb(250 245 255); }
.workflow-pill--diagnostic_done, .workflow-legend-swatch.workflow-pill--diagnostic_done { background: rgb(243 232 255); color: rgb(107 33 168); }

.quote-row-wf--quote_sent { box-shadow: inset 4px 0 0 rgb(245 158 11); background: rgb(255 251 235); }
.workflow-pill--quote_sent, .workflow-legend-swatch.workflow-pill--quote_sent { background: rgb(254 243 199); color: rgb(146 64 14); }

.quote-row-wf--quote_thinking { box-shadow: inset 4px 0 0 rgb(251 191 36); background: rgb(255 251 235); }
.workflow-pill--quote_thinking, .workflow-legend-swatch.workflow-pill--quote_thinking { background: rgb(254 243 199); color: rgb(146 64 14); }

.quote-row-wf--recovery_impossible { box-shadow: inset 4px 0 0 rgb(244 63 94); background: rgb(255 241 242); }
.workflow-pill--recovery_impossible, .workflow-legend-swatch.workflow-pill--recovery_impossible { background: rgb(255 228 230); color: rgb(159 18 57); }

.quote-row-wf--quote_accepted { box-shadow: inset 4px 0 0 rgb(34 197 94); background: rgb(240 253 244); }
.workflow-pill--quote_accepted, .workflow-legend-swatch.workflow-pill--quote_accepted { background: rgb(220 252 231); color: rgb(21 128 61); }

.quote-row-wf--quote_refused { box-shadow: inset 4px 0 0 rgb(239 68 68); background: rgb(254 242 242); }
.workflow-pill--quote_refused, .workflow-legend-swatch.workflow-pill--quote_refused { background: rgb(254 226 226); color: rgb(185 28 28); }

.quote-row-wf--recovery_in_progress { box-shadow: inset 4px 0 0 rgb(14 165 233); background: rgb(240 249 255); }
.workflow-pill--recovery_in_progress, .workflow-legend-swatch.workflow-pill--recovery_in_progress { background: rgb(224 242 254); color: rgb(7 89 133); }

.quote-row-wf--recovery_success,
.quote-row-wf--unpaid { box-shadow: inset 4px 0 0 rgb(5 150 105); background: rgb(236 253 245); }
.workflow-pill--recovery_success,
.workflow-pill--unpaid,
.workflow-legend-swatch.workflow-pill--recovery_success,
.workflow-legend-swatch.workflow-pill--unpaid { background: rgb(167 243 208); color: rgb(6 78 59); }

.quote-row-wf--recovery_failed { box-shadow: inset 4px 0 0 rgb(220 38 38); background: rgb(254 242 242); }
.workflow-pill--recovery_failed, .workflow-legend-swatch.workflow-pill--recovery_failed { background: rgb(254 202 202); color: rgb(153 27 27); }

.quote-row-wf--paid,
.quote-row-wf--not_returned { box-shadow: inset 4px 0 0 rgb(22 163 74); background: rgb(240 253 244); }
.workflow-pill--paid,
.workflow-pill--not_returned,
.workflow-legend-swatch.workflow-pill--paid,
.workflow-legend-swatch.workflow-pill--not_returned { background: rgb(187 247 208); color: rgb(22 101 52); }

.quote-row-wf--returned,
.quote-row-wf--closed { box-shadow: inset 4px 0 0 rgb(20 184 166); background: rgb(240 253 250); }
.workflow-pill--returned,
.workflow-pill--closed,
.workflow-legend-swatch.workflow-pill--returned,
.workflow-legend-swatch.workflow-pill--closed { background: rgb(204 251 241); color: rgb(15 118 110); }

/* Notifications webhook ? nouvelles demandes formulaire */
.webhook-quotes-badge {
    margin-left: auto;
    min-width: 1.25rem;
    height: 1.25rem;
    padding: 0 0.35rem;
    border-radius: 9999px;
    background: rgb(14 165 233);
    color: white;
    font-size: 0.65rem;
    font-weight: 700;
    line-height: 1.25rem;
    text-align: center;
}

.quotes-decision-badge {
    margin-left: 0.25rem;
    min-width: 1.25rem;
    height: 1.25rem;
    padding: 0 0.35rem;
    border-radius: 9999px;
    background: rgb(5 150 105);
    color: white;
    font-size: 0.65rem;
    font-weight: 700;
    line-height: 1.25rem;
    text-align: center;
}

.quotes-parcel-badge {
    margin-left: 0.25rem;
    min-width: 1.25rem;
    height: 1.25rem;
    padding: 0 0.35rem;
    border-radius: 9999px;
    background: rgb(217 119 6);
    color: white;
    font-size: 0.65rem;
    font-weight: 700;
    line-height: 1.25rem;
    text-align: center;
}

.quotes-call-badge {
    margin-left: 0.25rem;
    min-width: 1.25rem;
    height: 1.25rem;
    padding: 0 0.35rem;
    border-radius: 9999px;
    background: rgb(225 29 72);
    color: white;
    font-size: 0.65rem;
    font-weight: 700;
    line-height: 1.25rem;
    text-align: center;
}

.quote-row-webhook-new > td {
    background: rgb(248 250 252);
    border-top: 2px solid #0f172a;
    border-bottom: 2px solid #0f172a;
}

.quote-row-webhook-new > td:first-child {
    border-left: 2px solid #0f172a;
    box-shadow: inset 4px 0 0 rgb(14 165 233);
}

.quote-row-webhook-new > td:last-child {
    border-right: 2px solid #0f172a;
}

.quote-row-webhook-new:hover > td {
    background: rgb(241 245 249);
}

.webhook-new-pill {
    display: inline-flex;
    align-items: center;
    margin-left: 0.35rem;
    padding: 0.1rem 0.45rem;
    border-radius: 9999px;
    background: rgb(224 242 254);
    color: rgb(3 105 161);
    font-size: 0.65rem;
    font-weight: 700;
    vertical-align: middle;
}

#webhook-quotes-banner .webhook-banner-list {
    margin: 0.5rem 0 0;
    padding: 0;
    list-style: none;
}

#webhook-quotes-banner .webhook-banner-list li + li {
    margin-top: 0.35rem;
}

#webhook-quotes-banner .webhook-banner-link {
    color: rgb(3 105 161);
    font-weight: 600;
    text-decoration: underline;
}

.stripe-status-pill {
    display: inline-block;
    padding: 0.15rem 0.5rem;
    border-radius: 9999px;
    font-size: 0.65rem;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
}

.stripe-status-pill--pending {
    background: rgb(254 243 199);
    color: rgb(146 64 14);
}

.stripe-status-pill--paid {
    background: rgb(220 252 231);
    color: rgb(21 128 61);
}

.stripe-status-pill--inactive,
.stripe-status-pill--expired {
    background: rgb(241 245 249);
    color: rgb(100 116 139);
}

.payment-pill {
    display: inline-block;
    padding: 0.15rem 0.55rem;
    border-radius: 9999px;
    font-size: 0.7rem;
    font-weight: 700;
    line-height: 1.25;
    white-space: nowrap;
}

.payment-pill--paid {
    background: rgb(220 252 231);
    color: rgb(21 128 61);
}

.payment-pill--partial {
    background: rgb(254 243 199);
    color: rgb(146 64 14);
}

.payment-pill--unpaid {
    background: rgb(254 226 226);
    color: rgb(153 27 27);
}

.payment-pill--none {
    background: rgb(241 245 249);
    color: rgb(100 116 139);
}

/* Google Places Autocomplete ? au-dessus des modales */
.pac-container {
    z-index: 10050 !important;
    font-family: inherit;
}

.email-rich-editor:empty::before {
    content: attr(data-placeholder);
    color: rgb(148 163 184);
    pointer-events: none;
}

.email-rich-editor p {
    margin: 0 0 0.75em;
}

.email-rich-editor p:last-child {
    margin-bottom: 0;
}

.email-rich-editor ul,
.email-rich-editor ol {
    margin: 0.5em 0 0.75em 1.25em;
    padding-left: 1em;
}

.email-rich-editor a {
    color: rgb(79 70 229);
    text-decoration: underline;
}

#email-compose-body-source,
.email-template-source {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    line-height: 1.45;
    background: #f8fafc;
}

.email-template-editor {
    min-height: 220px;
}

.email-rich-editor strong,
.email-rich-editor b {
    font-weight: 700;
}

.email-rich-editor em,
.email-rich-editor i {
    font-style: italic;
}

.email-rich-editor u {
    text-decoration: underline;
}

/* ?? R?daction IA flottante (type Gmail) ?? */
.ai-compose-dock {
    position: fixed;
    left: 1rem;
    bottom: 1rem;
    z-index: 55;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    max-width: min(12rem, calc(100vw - 2rem));
    padding: 0.65rem 0.9rem;
    border-radius: 9999px;
    border: 1px solid rgb(99 102 241);
    background: rgb(49 46 129);
    color: #fff;
    box-shadow: 0 10px 30px rgba(15, 23, 42, 0.25);
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
}
.ai-compose-dock--active {
    border-radius: 0.75rem 0.75rem 0 0;
    border-bottom: none;
    padding-bottom: 0.75rem;
}
.ai-compose-dock.hidden { display: none !important; }
.ai-compose-dock-icon {
    font-size: 1.15rem;
    line-height: 1;
}
.ai-compose-dock-meta {
    opacity: 0.8;
    font-weight: 400;
    font-size: 0.75rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
@media (max-width: 767px) {
    .ai-compose-dock {
        right: 0.75rem;
        bottom: 0.75rem;
        width: 3.25rem;
        height: 3.25rem;
        max-width: none;
        padding: 0;
        justify-content: center;
        border-radius: 9999px;
        border-bottom: 1px solid rgb(99 102 241);
    }
    .ai-compose-dock--active {
        border-radius: 9999px;
        border-bottom: 1px solid rgb(99 102 241);
        padding-bottom: 0;
        box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.35), 0 10px 30px rgba(15, 23, 42, 0.25);
    }
    .ai-compose-dock-label,
    .ai-compose-dock-meta {
        display: none;
    }
    .ai-compose-dock-icon {
        font-size: 1.35rem;
    }
}
.ai-compose-shell {
    position: fixed;
    right: 1rem;
    bottom: 0;
    z-index: 60;
    width: min(720px, calc(100vw - 1.5rem));
    height: min(78vh, 640px);
    max-width: calc(100vw - 0.75rem);
    max-height: calc(100vh - 0.5rem);
    min-width: 320px;
    min-height: 280px;
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid rgb(203 213 225);
    border-bottom: none;
    border-radius: 0.75rem 0.75rem 0 0;
    box-shadow: 0 -4px 40px rgba(15, 23, 42, 0.2);
    overflow: hidden;
}
.ai-compose-shell.is-maximized {
    inset: 0.75rem;
    right: 0.75rem;
    left: 0.75rem;
    top: 0.75rem;
    bottom: 0.75rem;
    width: auto !important;
    height: auto !important;
    max-width: none;
    max-height: none;
    min-width: 0;
    min-height: 0;
    border-radius: 0.75rem;
    border-bottom: 1px solid rgb(203 213 225);
}
.ai-compose-shell.is-maximized .ai-compose-resize {
    display: none;
}
.ai-compose-shell.hidden { display: none !important; }
.ai-compose-shell-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.55rem 0.75rem;
    background: rgb(49 46 129);
    color: #fff;
    user-select: none;
    cursor: grab;
    flex-shrink: 0;
}
.ai-compose-shell-header:active { cursor: grabbing; }
.ai-compose-shell-title { font-weight: 700; font-size: 0.9rem; line-height: 1.2; }
.ai-compose-shell-subtitle { font-size: 0.7rem; opacity: 0.8; margin-top: 0.1rem; }
.ai-compose-shell-controls { display: flex; gap: 0.25rem; }
.ai-compose-shell-btn {
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 0.4rem;
    border: none;
    background: rgba(255,255,255,0.12);
    color: #fff;
    font-size: 1rem;
    line-height: 1;
    cursor: pointer;
}
.ai-compose-shell-btn:hover { background: rgba(255,255,255,0.22); }
.ai-compose-shell-body {
    padding: 0.75rem;
    overflow: auto;
    flex: 1;
    min-height: 0;
    background: rgb(248 250 252);
    display: flex;
    flex-direction: column;
}
.ai-compose-context-banner {
    margin: 0 0 0.5rem;
    padding: 0.45rem 0.65rem;
    border-radius: 0.6rem;
    font-size: 0.7rem;
    line-height: 1.35;
    border: 1px solid rgb(253 230 138);
    background: rgb(255 251 235);
    color: rgb(120 53 15);
}
.ai-compose-context-banner.is-synced {
    border-color: rgb(167 243 208);
    background: rgb(236 253 245);
    color: rgb(6 78 59);
}
.ai-compose-context-banner.is-stale {
    border-color: rgb(254 202 202);
    background: rgb(254 242 242);
    color: rgb(153 27 27);
    font-weight: 600;
}
.ai-compose-resize {
    position: absolute;
    z-index: 2;
}
.ai-compose-resize--n {
    top: 0;
    left: 12px;
    right: 12px;
    height: 6px;
    cursor: ns-resize;
}
.ai-compose-resize--w {
    left: 0;
    top: 12px;
    bottom: 12px;
    width: 6px;
    cursor: ew-resize;
}
.ai-compose-resize--nw {
    left: 0;
    top: 0;
    width: 14px;
    height: 14px;
    cursor: nwse-resize;
}
.ai-compose-toolbar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    align-items: flex-end;
    margin-bottom: 0.65rem;
    flex-shrink: 0;
}
.ai-compose-label {
    display: block;
    font-size: 0.65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: rgb(100 116 139);
}
.ai-compose-select {
    margin-top: 0.2rem;
    width: 100%;
    border-radius: 0.65rem;
    border: 1px solid rgb(203 213 225);
    background: #fff;
    padding: 0.4rem 0.55rem;
    font-size: 0.8rem;
}
.ai-compose-secondary-btn {
    border-radius: 0.65rem;
    border: 1px solid rgb(203 213 225);
    background: #fff;
    padding: 0.45rem 0.7rem;
    font-size: 0.75rem;
}
.ai-compose-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.65rem;
    flex: 1;
    min-height: 0;
}
@media (min-width: 640px) {
    .ai-compose-grid { grid-template-columns: 1fr 1fr; }
}
.ai-compose-col { display: flex; flex-direction: column; min-height: 0; flex: 1; }
.ai-compose-draft {
    margin-top: 0.25rem;
    width: 100%;
    min-height: 9rem;
    flex: 1;
    border-radius: 0.65rem;
    border: 1px solid rgb(203 213 225);
    padding: 0.5rem 0.65rem;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.75rem;
    background: #fff;
    resize: none;
}
.ai-compose-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin-top: 0.45rem;
    align-items: center;
    flex-shrink: 0;
}
.ai-compose-result-wrap {
    margin-top: 0.25rem;
    border-radius: 0.65rem;
    border: 1px solid rgb(226 232 240);
    background: #fff;
    min-height: 9rem;
    flex: 1;
    max-height: none;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.ai-compose-result {
    flex: 1;
    overflow: auto;
    padding: 0.5rem 0.65rem;
    font-size: 0.8rem;
    min-height: 9rem;
}

/* ??? File active ? panneau devis compact ??? */
#quotes-v2-panel .qv2-stack {
    display: flex;
    flex-direction: column;
    gap: 0.45rem;
}
#quotes-v2-panel .qv2-cols {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.45rem;
    align-items: start;
}
@media (min-width: 900px) {
    #quotes-v2-panel .qv2-cols--2 {
        grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    }
    #quotes-v2-panel .qv2-cols--top {
        grid-template-columns: minmax(13rem, 0.85fr) minmax(0, 1.15fr);
    }
}
#quotes-v2-panel .qv2-span-2 {
    grid-column: 1 / -1;
}
#quotes-v2-panel .qv2-acc {
    border: 1px solid #e2e8f0;
    border-radius: 0.65rem;
    background: #fff;
    overflow: hidden;
    min-width: 0;
}
#quotes-v2-panel .qv2-acc > summary {
    list-style: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.45rem 0.65rem;
    font-weight: 650;
    font-size: 0.78rem;
    color: #0f172a;
    background: #f8fafc;
    user-select: none;
}
#quotes-v2-panel .qv2-acc > summary::-webkit-details-marker { display: none; }
#quotes-v2-panel .qv2-acc[open] > summary {
    border-bottom: 1px solid #eef2f7;
    background: #f1f5f9;
}
#quotes-v2-panel .qv2-acc .qv2-chev {
    margin-left: auto;
    color: #94a3b8;
    font-size: 0.7rem;
    transition: transform 0.15s ease;
}
#quotes-v2-panel .qv2-acc[open] .qv2-chev { transform: rotate(180deg); }
#quotes-v2-panel .qv2-acc-body {
    padding: 0.55rem 0.65rem 0.7rem;
}
#quotes-v2-panel .qv2-ico {
    display: inline-flex;
    width: 1.35rem;
    height: 1.35rem;
    align-items: center;
    justify-content: center;
    border-radius: 0.4rem;
    font-size: 0.78rem;
    flex-shrink: 0;
    background: #e2e8f0;
    color: #334155;
}
#quotes-v2-panel .qv2-ico--violet { background: #ede9fe; color: #5b21b6; }
#quotes-v2-panel .qv2-ico--emerald { background: #d1fae5; color: #065f46; }
#quotes-v2-panel .qv2-ico--sky { background: #e0f2fe; color: #075985; }
#quotes-v2-panel .qv2-ico--amber { background: #fef3c7; color: #92400e; }
#quotes-v2-panel .qv2-ico--rose { background: #ffe4e6; color: #9f1239; }
#quotes-v2-panel .qv2-ico--indigo { background: #e0e7ff; color: #3730a3; }
#quotes-v2-panel .qv2-ico--fuchsia { background: #fae8ff; color: #86198f; }
#quotes-v2-panel .qv2-badge {
    display: inline-flex;
    align-items: center;
    border-radius: 999px;
    padding: 0.1rem 0.45rem;
    font-size: 0.65rem;
    font-weight: 700;
    line-height: 1.2;
}
#quotes-v2-panel .qv2-banner {
    display: flex;
    align-items: flex-start;
    gap: 0.45rem;
    border-radius: 0.65rem;
    border-width: 1px;
    border-style: solid;
    padding: 0.45rem 0.6rem;
    font-size: 0.78rem;
    font-weight: 650;
}
#quotes-v2-panel .qv2-meta {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.35rem 0.75rem;
    font-size: 0.78rem;
}
@media (min-width: 900px) {
    #quotes-v2-panel .qv2-meta {
        grid-template-columns: repeat(5, minmax(0, 1fr));
    }
}
#quotes-v2-panel .qv2-meta dt {
    color: #64748b;
    font-size: 0.65rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    font-weight: 600;
}
#quotes-v2-panel .qv2-meta dd {
    margin: 0;
    font-weight: 650;
    color: #0f172a;
    word-break: break-word;
}
#quotes-v2-panel .qv2-fields {
    display: grid;
    grid-template-columns: 1fr;
    gap: 0.35rem 0.85rem;
}
@media (min-width: 900px) {
    #quotes-v2-panel .qv2-fields {
        grid-template-columns: 1fr 1fr;
    }
}
#quotes-v2-panel .qv2-fields > div {
    display: grid;
    grid-template-columns: 6.25rem minmax(0, 1fr);
    gap: 0.25rem 0.45rem;
    align-items: start;
}
#quotes-v2-panel .qv2-acts {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.35rem;
}
@media (min-width: 900px) {
    #quotes-v2-panel .qv2-acts {
        grid-template-columns: repeat(6, minmax(0, 1fr));
    }
}
@media (max-width: 640px) {
    #quotes-v2-panel .qv2-acts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
#quotes-v2-panel .qv2-act {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.2rem;
    min-height: 3.1rem;
    padding: 0.35rem 0.2rem;
    border-radius: 0.6rem;
    border: 1px solid #e2e8f0;
    background: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    line-height: 1.15;
    text-align: center;
    color: #334155;
    text-decoration: none;
}
#quotes-v2-panel .qv2-act:hover { border-color: #cbd5e1; background: #f8fafc; }
#quotes-v2-panel .qv2-act .qv2-act-ico {
    font-size: 1rem;
    line-height: 1;
}
#quotes-v2-panel .qv2-act--wide { grid-column: span 2; }
#quotes-v2-panel .qv2-act--full { grid-column: span 2; }
@media (min-width: 900px) {
    #quotes-v2-panel .qv2-act--full { grid-column: span 3; }
}
#quotes-v2-panel .qv2-act--violet { color: #5b21b6; border-color: #ddd6fe; background: #f5f3ff; }
#quotes-v2-panel .qv2-act--emerald { color: #065f46; border-color: #a7f3d0; background: #ecfdf5; }
#quotes-v2-panel .qv2-act--sky { color: #075985; border-color: #bae6fd; background: #f0f9ff; }
#quotes-v2-panel .qv2-act--indigo { color: #3730a3; border-color: #c7d2fe; background: #eef2ff; }
#quotes-v2-panel .qv2-act--fuchsia { color: #86198f; border-color: #f5d0fe; background: #fdf4ff; }
#quotes-v2-panel .qv2-act--amber { color: #92400e; border-color: #fde68a; background: #fffbeb; }
#quotes-v2-panel .qv2-act--rose { color: #9f1239; border-color: #fecdd3; background: #fff1f2; }
#quotes-v2-panel .qv2-act--blue { color: #1d4ed8; border-color: #bfdbfe; background: #eff6ff; }
#quotes-v2-panel .qv2-act--slate { color: #334155; border-color: #cbd5e1; background: #f8fafc; }
#quotes-v2-panel .qv2-row {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.78rem;
}
#quotes-v2-panel .qv2-muted { color: #64748b; font-size: 0.7rem; }
#quotes-v2-panel #quotes-v2-panel-actions,
#quotes-v2-panel #quotes-v2-panel-body {
    padding-top: 0.55rem;
    padding-bottom: 0.55rem;
}
#quotes-v2-panel #quotes-v2-panel-body { padding-bottom: 5rem; }

/* Dashboard : listes clamp?es (5 visibles + accord?on + d?grad?) */
.dash-list-clamp {
    position: relative;
}
.dash-list-clamp[data-expanded="false"] .dash-list-clamp-extra {
    display: none;
}
.dash-list-clamp-fade {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 2.75rem;
    height: 3.25rem;
    pointer-events: none;
    z-index: 1;
}
.dash-list-clamp[data-clamp-fade="white"] .dash-list-clamp-fade {
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0), #ffffff 85%);
}
.dash-list-clamp[data-clamp-fade="rose"] .dash-list-clamp-fade {
    background: linear-gradient(to bottom, rgba(255, 241, 242, 0), #fff1f2 85%);
}
.dash-list-clamp[data-expanded="true"] .dash-list-clamp-fade {
    display: none;
}
.dash-list-clamp-toggle {
    position: relative;
    z-index: 2;
}
.dash-list-clamp-toggle .dash-clamp-chevron {
    display: inline-block;
    margin-left: 0.35rem;
    transition: transform 0.2s ease;
}
.dash-list-clamp[data-expanded="true"] .dash-list-clamp-toggle .dash-clamp-chevron {
    transform: rotate(180deg);
}

/* Modale courriel ? bouton G?n?rer 1?? r?ponse lead */
@keyframes email-lead-generate-in {
    0% {
        opacity: 0;
        transform: scale(0.82) translateY(4px);
        box-shadow: 0 0 0 0 rgba(99, 102, 241, 0.55);
    }
    55% {
        opacity: 1;
        transform: scale(1.06) translateY(0);
        box-shadow: 0 0 0 10px rgba(99, 102, 241, 0);
    }
    100% {
        opacity: 1;
        transform: scale(1);
        box-shadow: 0 0 0 0 rgba(99, 102, 241, 0);
    }
}
@keyframes email-mail-type-flash {
    0%, 100% {
        border-color: rgb(203 213 225);
        box-shadow: none;
    }
    35% {
        border-color: rgb(129 140 248);
        box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.25);
    }
}
#email-compose-lead-generate.email-compose-lead-generate--appear {
    animation: email-lead-generate-in 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}
#email-compose-mail-type.email-compose-mail-type--flash {
    animation: email-mail-type-flash 0.85s ease-out;
}
