/*
 * QuotePilot : composants propres à l'outil, sur la base du design system Styléo (style.css).
 * Distinction par teinte de fond et typographie, jamais par liseré coloré.
 */

.icon-sprite { position: absolute; width: 0; height: 0; overflow: hidden; }

/* Alertes et toasts : fond teinté. */

.alert {
    display: flex;
    gap: var(--gap);
    align-items: flex-start;
    padding: 14px 18px;
    margin-bottom: var(--gap);
    border-radius: var(--radius);
    font-size: 14px;
}
.alert-content { flex: 1; }
.alert.info { background: var(--accent-soft); color: var(--accent-text); }
.alert.success { background: rgba(45, 165, 111, .1); color: #1e6d4a; }
.alert.warning { background: rgba(255, 196, 61, .18); color: #7a5f08; }
.alert.error { background: rgba(197, 59, 69, .1); color: #8a2f38; }

#toast-container .alert {
    margin: 0;
    color: var(--white);
    background: var(--ink);
    box-shadow: var(--shadow);
    animation: toastIn .25s ease;
}
#toast-container .alert.success { background: #1e6d4a; }
#toast-container .alert.error { background: #8a2f38; }
#toast-container .alert.warning { background: #6b5207; }

/* Champs de formulaire : aucun rendu navigateur par défaut. */

.form-select {
    appearance: none;
    padding-right: 40px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236e6e76' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 16px;
}
input[type="checkbox"], input[type="radio"] {
    appearance: none;
    flex-shrink: 0;
    width: 18px;
    height: 18px;
    margin: 0;
    border: 1.5px solid var(--line-strong);
    background: var(--white);
    display: inline-grid;
    place-content: center;
    cursor: pointer;
    transition: background var(--ease), border-color var(--ease);
}
input[type="checkbox"] { border-radius: 5px; }
input[type="radio"] { border-radius: 50%; }
input[type="checkbox"]:checked, input[type="radio"]:checked { background: var(--ink); border-color: var(--ink); }
input[type="checkbox"]:checked::after {
    content: "";
    width: 9px;
    height: 5px;
    border: 2px solid var(--white);
    border-top: 0;
    border-right: 0;
    transform: rotate(-45deg) translate(1px, -1px);
}
input[type="radio"]:checked::after { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--white); }
input[type="checkbox"]:disabled, input[type="radio"]:disabled { opacity: .4; cursor: not-allowed; }
input[type="date"].form-input { min-height: 40px; }

.checkbox-item { display: inline-flex; align-items: center; gap: 8px; font-size: 14px; cursor: pointer; }
.checkbox-item span { font-weight: 600; }

/* Interrupteur : case à cocher habillée en bascule. */
.switch { display: inline-flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 600; cursor: pointer; }
.switch input[type="checkbox"] {
    width: 38px;
    height: 22px;
    border-radius: var(--radius-pill);
    background: rgba(11, 11, 12, .14);
    border: 0;
    place-content: center start;
    padding: 3px;
}
.switch input[type="checkbox"]::after {
    content: "";
    width: 16px;
    height: 16px;
    border: 0;
    border-radius: 50%;
    background: var(--white);
    box-shadow: 0 1px 3px rgba(11, 11, 12, .3);
    transform: none;
    transition: transform var(--ease);
}
.switch input[type="checkbox"]:checked { background: var(--green); }
.switch input[type="checkbox"]:checked::after { transform: translateX(16px); }

.form-actions { display: flex; align-items: center; justify-content: flex-end; gap: var(--gap); flex-wrap: wrap; margin-top: var(--gap); }
.form-row-tight { gap: 0 12px; }
.form-group-model { max-width: 520px; }
.estimate { font-size: 12px; color: var(--muted); }
.input-compact { min-height: 38px; padding: 7px 10px; font-size: 14px; }
.input-number { width: 110px; }
.select-compact { min-height: 34px; padding: 5px 34px 5px 10px; font-size: 12px; width: auto; max-width: 220px; background-position: right 10px center; }
.inline-form { display: flex; gap: 8px; align-items: center; }
.inline-form .form-input { min-height: 40px; }
.inline-form-wide .form-select { flex: 1; }
.spacer { flex: 1; }

/* Connexion. */

.login-title { margin: 0 0 6px; }
.login-intro { font-size: 13px; margin: 0 0 20px; }
.login-install { margin-top: 10px; }

/* En-têtes de page. */

.page-head { margin-bottom: var(--gap-lg); }
.page-head h1 { margin: 0; }
.page-head-tight { margin-bottom: var(--gap); }

/* Accueil : les deux canaux. */

.channel-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-bottom: 20px; }
.channel-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    color: var(--ink);
    text-decoration: none;
    transition: transform var(--ease), box-shadow var(--ease);
}
.channel-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.channel-card h2 { margin: 6px 0 0; }
.channel-card p { margin: 0 0 8px; color: var(--muted); flex: 1; }
.channel-icon {
    display: grid;
    place-items: center;
    width: 48px;
    height: 48px;
    border-radius: var(--radius);
    background: var(--ink);
    color: var(--yellow);
}
.channel-icon .lc { width: 24px; height: 24px; }

/* Tableaux. */

.data-table th { padding: 12px 14px; font-size: 12px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.data-table td { padding: 12px 14px; vertical-align: middle; }
.data-table tbody tr:last-child td { border-bottom: 0; }
.row-link { cursor: pointer; }
.cell-sub { font-size: 12px; }
.cell-num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.cell-date { white-space: nowrap; color: var(--muted); font-size: 13px; }
tr.is-muted td { color: var(--muted); background: rgba(11, 11, 12, .02); }
.card + .card, .card + .usage-grid, .usage-grid + .card, .channel-grid + .card, .key-grid + p { margin-top: 20px; }

/* Brief et dépôt de fichiers. */

.brief-input { min-height: 220px; }
.dropzone {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    padding: 22px 16px;
    border: 1.5px dashed var(--line-strong);
    border-radius: var(--radius);
    background: rgba(255, 255, 255, .6);
    text-align: center;
    font-size: 14px;
    cursor: pointer;
    transition: background var(--ease), border-color var(--ease);
}
.dropzone .lc { width: 24px; height: 24px; color: var(--accent-text); }
.dropzone:hover, .dropzone.is-over { background: var(--accent-soft); border-color: var(--orange); }
.dropzone-input { position: absolute; width: 1px; height: 1px; opacity: 0; pointer-events: none; }
.dropzone-hint { font-size: 12px; }
.file-list { list-style: none; margin: 10px 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.file-list li { display: flex; align-items: center; gap: 8px; font-size: 13px; padding: 6px 8px; border-radius: var(--radius-sm); background: rgba(11, 11, 12, .035); }
.file-list .btn-icon { min-height: 28px; width: 28px; }
.file-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }

/* Questions. */

.questions-layout { display: grid; grid-template-columns: minmax(0, 2fr) minmax(260px, 1fr); gap: 20px; align-items: start; }
.understanding { background: rgba(255, 196, 61, .1); box-shadow: none; }
.understanding h3 { margin-bottom: 10px; }
.understanding p { font-size: 14px; margin-bottom: 10px; }
.question-progress { font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }
.progress-bar {
    appearance: none;
    width: 100%;
    height: 6px;
    margin: 8px 0 20px;
    border: 0;
    border-radius: var(--radius-pill);
    background: rgba(11, 11, 12, .08);
    overflow: hidden;
}
.progress-bar::-webkit-progress-bar { background: rgba(11, 11, 12, .08); }
.progress-bar::-webkit-progress-value { background: var(--gradient); border-radius: var(--radius-pill); }
.progress-bar::-moz-progress-bar { background: var(--gradient); border-radius: var(--radius-pill); }
.question-text { font-family: var(--font-body); text-transform: none; letter-spacing: 0; font-weight: 700; font-size: 20px; margin-bottom: 6px; }
.question-why { font-size: 13px; margin-bottom: 18px; }
.choice-list { display: flex; flex-wrap: wrap; gap: 8px; margin-bottom: 18px; }
.choice {
    padding: 10px 16px;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius-pill);
    background: var(--white);
    font-size: 14px;
    font-weight: 600;
    text-align: left;
    transition: background var(--ease), color var(--ease), border-color var(--ease);
}
.choice:hover:not(:disabled) { border-color: var(--ink); }
.choice.is-selected { background: var(--ink); border-color: var(--ink); color: var(--white); }
.choice:disabled { opacity: .5; cursor: default; }
.choice-text { background: transparent; border-style: dashed; }
.question-actions { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.recap-list { padding-left: 20px; margin: 0 0 var(--gap); }
.recap-list li { padding: 10px 0; border-bottom: 1px solid var(--line); }
.recap-list li > div { display: inline-block; width: calc(100% - 110px); vertical-align: middle; }
.recap-list li .btn { float: right; }

/* Atelier. */

.workshop { display: grid; grid-template-columns: minmax(0, 1fr) minmax(320px, 400px); gap: 20px; align-items: start; }
.workshop-main, .workshop-side { display: flex; flex-direction: column; gap: 20px; min-width: 0; }
.workshop-main > .card + .card, .workshop-side > .card + .card { margin-top: 0; }
/* Sous l'en-tête (72 px) et la barre d'onglets (environ 46 px), toujours présente sur un devis ouvert. */
.workshop-side { position: sticky; top: 138px; max-height: calc(100vh - 156px); overflow-y: auto; padding-bottom: 4px; }
.side-card { padding: 18px; }
.side-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 12px; }
.side-head h3 { margin: 0; font-size: 18px; }
.side-empty { font-size: 13px; margin-bottom: 10px; }

.edit-banner { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; margin-bottom: 20px; }
.edit-banner h2 { margin: 0 0 8px; }
.edit-links { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; font-size: 13px; }
.edit-links a { color: var(--accent-text); font-weight: 700; text-decoration: none; }
.mode-picker { display: flex; gap: 8px; flex-wrap: wrap; }
.mode-option {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 12px 16px;
    border: 1px solid var(--line-strong);
    border-radius: var(--radius);
    background: var(--white);
    text-align: left;
    font-size: 13px;
}
.mode-option span { color: var(--muted); font-size: 12px; }
.mode-option strong, .choice strong, .chat-bubble strong { color: inherit; }
.mode-option.is-selected { background: var(--ink); border-color: var(--ink); color: var(--white); }
.mode-option.is-selected span { color: rgba(255, 255, 255, .7); }
.mode-option:disabled { opacity: .45; cursor: not-allowed; }

.quote-editor { transition: background .6s ease; }
.quote-editor.is-refreshed { background: rgba(255, 196, 61, .14); }
.editor-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.editor-head h3 { margin: 0; font-size: 26px; }

.rich-toolbar { display: flex; flex-wrap: wrap; gap: 4px; padding: 6px; border: 1px solid var(--line); border-bottom: 0; border-radius: var(--radius-sm) var(--radius-sm) 0 0; background: var(--paper); }
.rich-toolbar button { padding: 5px 10px; border: 0; border-radius: 6px; background: transparent; font-size: 12px; font-weight: 600; }
.rich-toolbar button:hover { background: var(--white); }
.rich-editor {
    min-height: 180px;
    max-height: 520px;
    overflow-y: auto;
    padding: 14px 16px;
    border: 1px solid var(--line);
    border-radius: 0 0 var(--radius-sm) var(--radius-sm);
    background: var(--white);
    font-size: 14px;
}
.rich-editor:focus { outline: none; border-color: var(--orange); box-shadow: 0 0 0 4px rgba(248, 120, 77, .09); }
.rich-editor h2, .rich-editor h3 { font-family: var(--font-body); text-transform: none; letter-spacing: 0; font-weight: 700; margin: 14px 0 6px; }
.rich-editor h2 { font-size: 18px; }
.rich-editor h3 { font-size: 16px; }
.rich-editor p { margin: 0 0 10px; }
.rich-editor ul, .rich-editor ol { margin: 0 0 10px; padding-left: 22px; }

.quote-section { margin: 18px 0; padding: 14px; border-radius: var(--radius); background: rgba(11, 11, 12, .03); }
.section-head { display: flex; gap: 8px; align-items: center; margin-bottom: 10px; }
.section-title { font-weight: 700; min-height: 42px; }
.lines { display: flex; flex-direction: column; gap: 10px; }
.quote-line { padding: 12px; border-radius: var(--radius-sm); background: var(--white); border: 1px solid var(--line); }
.quote-line.is-approx { background: #fffaf0; }
.line-top { display: grid; grid-template-columns: 22px minmax(0, 1fr) 92px 104px 100px 38px; gap: 8px; align-items: end; margin-bottom: 8px; }
.line-grip { display: grid; place-items: center; height: 40px; color: var(--muted); cursor: grab; border-radius: 6px; }
.line-grip:hover { background: rgba(11, 11, 12, .06); color: var(--ink); }
.line-grip:active { cursor: grabbing; }
.quote-line.is-dragging { opacity: .45; }
.quote-line.drop-before { box-shadow: 0 -3px 0 var(--orange); }
.quote-line.drop-after { box-shadow: 0 3px 0 var(--orange); }
.lines { min-height: 12px; border-radius: var(--radius-sm); }
.lines.drop-into { background: var(--accent-soft); min-height: 48px; }
.line-top .form-input, .line-top .form-select { min-height: 40px; padding-top: 7px; padding-bottom: 7px; font-size: 14px; }
.line-qty, .line-price { display: flex; flex-direction: column; gap: 3px; font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.line-subtotal { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; padding-bottom: 10px; }
.line-description { min-height: 64px; font-size: 14px; }
.line-note { margin: 6px 0 0; font-size: 12px; color: #7a5f08; }
.line-add { margin-top: 10px; }

.totals {
    position: sticky;
    bottom: 0;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 28px;
    margin: 18px -24px -24px;
    padding: 16px 24px;
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
    background: var(--ink);
    color: var(--white);
}
.total-item { display: flex; flex-direction: column; }
.total-item span { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; opacity: .7; font-weight: 700; }
.total-item strong { font-size: 22px; color: inherit; font-variant-numeric: tabular-nums; }
.total-item small { font-size: 12px; opacity: .7; }
.total-alert { padding: 6px 12px; border-radius: var(--radius-pill); background: var(--danger); font-size: 13px; font-weight: 700; }

/* Questions au client. */

.client-questions { list-style: none; margin: 0 0 12px; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.client-questions li { display: flex; gap: 8px; align-items: flex-start; padding: 8px 10px; border-radius: var(--radius-sm); background: rgba(255, 196, 61, .14); font-size: 13px; }
.client-questions li span { flex: 1; }
.client-questions .btn-icon { min-height: 26px; width: 26px; background: transparent; border: 0; }
#client-questions .inline-form { margin-bottom: 10px; }
#client-questions .inline-form .btn-icon { min-height: 40px; width: 40px; }

/* Discussion. */

.chat-card { display: flex; flex-direction: column; }
.chat-log { display: flex; flex-direction: column; gap: 12px; max-height: 460px; min-height: 160px; overflow-y: auto; padding: 4px 2px 10px; }
.chat-log-static { max-height: none; margin-top: 14px; }
.chat-message { display: flex; flex-direction: column; gap: 6px; }
.chat-message.is-user { align-items: flex-end; }
.chat-bubble { padding: 10px 14px; border-radius: 14px; font-size: 14px; line-height: 1.5; }
.chat-message.is-assistant .chat-bubble { background: rgba(11, 11, 12, .05); border-top-left-radius: 4px; }
.chat-message.is-user .chat-bubble { background: var(--ink); color: var(--white); border-top-right-radius: 4px; }
.chat-meta { font-size: 11px; font-weight: 700; color: var(--green); text-transform: uppercase; letter-spacing: .06em; }
.chat-meta.chat-warning { color: #7a5f08; text-transform: none; letter-spacing: 0; font-weight: 600; }
.chat-note { align-self: center; font-size: 12px; color: var(--muted); text-align: center; }
.chat-pending .loader-box { justify-content: flex-start; padding: 8px 0; }
.chat-opener { padding: 14px; border-radius: var(--radius); background: var(--accent-soft); font-size: 13px; }
.chat-opener p { margin: 0 0 10px; color: var(--accent-text); }
.proposal { padding: 10px 12px; border-radius: var(--radius); background: rgba(255, 196, 61, .12); }
.proposal.is-past { background: rgba(11, 11, 12, .03); }
.proposal-question { margin: 0 0 8px; font-size: 13px; font-weight: 700; }
.choice-list-compact { margin: 0; gap: 6px; }
.choice-list-compact .choice { padding: 7px 12px; font-size: 13px; }
.chat-form { border-top: 1px solid var(--line); padding-top: 12px; }
.chat-form .form-textarea { min-height: 76px; font-size: 14px; }
.chat-form-foot { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-top: 8px; }

.constraints summary { list-style: none; cursor: pointer; }
.constraints summary::-webkit-details-marker { display: none; }
.constraints summary h3 { margin: 0; font-size: 18px; }
.constraints summary h3::after { content: " +"; color: var(--muted); }
.constraints[open] summary h3::after { content: " −"; }
.constraints form { margin-top: 14px; }

/* Client et validation. */

.partner-results { list-style: none; margin: 6px 0 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.partner-item {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px 10px;
    width: 100%;
    padding: 10px 12px;
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    background: var(--white);
    text-align: left;
    font-size: 14px;
}
.partner-item:hover { border-color: var(--ink); }
.partner-item .text-muted { font-size: 12px; }
.partner-none { padding: 8px 0; font-size: 13px; }
.partner-search { margin-top: 16px; }
.partner-create summary { cursor: pointer; font-weight: 700; font-size: 14px; color: var(--accent-text); }
.partner-create form { margin-top: 12px; align-items: end; }
.partner-selected { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 14px; border-radius: var(--radius); background: rgba(45, 165, 111, .08); }

.validate-card { background: var(--white); }
.validate-row { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; }
.validate-row h3 { margin: 0 0 4px; }
.validate-row p { margin: 0; font-size: 14px; }

/* Terminé. */

.done-links { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 20px; }
.done-summary { display: flex; gap: 32px; flex-wrap: wrap; padding: 16px 0 4px; }
.done-summary .total-item span { opacity: 1; color: var(--muted); }
.summary-title { display: inline; margin: 0; cursor: pointer; }

/* Administration. */

.member-add { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 0 16px; align-items: end; }
.member-add .checkbox-item, .member-add .btn { margin-bottom: 18px; }
.budget-cell { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.key-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px; margin-top: 20px; align-items: stretch; }
.key-grid > .card + .card, .usage-grid > .card + .card, .channel-grid > .card + .card { margin-top: 0; }
.key-card { display: flex; flex-direction: column; gap: 14px; }
.key-card-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.key-card-head h3 { margin: 0; font-size: 22px; }
.key-card-head .badge { white-space: nowrap; }
.key-note { margin: 2px 0 0; font-size: 12px; }
.key-models { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.key-models li { padding: 10px 12px; border-radius: var(--radius-sm); background: rgba(11, 11, 12, .035); }
.key-model-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 14px; }
.key-model-price { margin-left: auto; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.key-form { padding-top: 14px; border-top: 1px solid var(--line); }
.key-form .form-input { min-height: 44px; }
.key-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 10px; }

/* Fiche d'un modèle IA : conseil, avantages, inconvénients. */
.model-help { margin-top: 10px; padding: 12px 14px; border-radius: var(--radius-sm); background: rgba(11, 11, 12, .035); font-size: 13px; }
.model-help:empty { display: none; }
.model-help-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 6px; }
.model-pros, .model-cons, .model-price { margin: 4px 0 0; font-size: 13px; line-height: 1.45; }
.model-pros::before { content: "Pour : "; font-weight: 700; color: var(--green); }
.model-cons::before { content: "Contre : "; font-weight: 700; color: var(--danger); }
.model-price { color: var(--muted); font-size: 12px; }
.model-help-toggle { margin: -4px 0 10px; font-size: 12px; }
.model-help-toggle summary { cursor: pointer; color: var(--accent-text); font-weight: 700; }
.model-help-compact { margin-top: 6px; }
.default-model-form .model-help { margin-top: 12px; }
.odoo-link { color: var(--ink); text-decoration: none; font-weight: 600; }
.odoo-link .lc { color: var(--muted); width: .9em; height: .9em; }
.odoo-link:hover { color: var(--accent-text); }
.odoo-user-picker .partner-results { max-height: 260px; overflow-y: auto; }
.order-results { max-height: 420px; overflow-y: auto; }
.order-results-title { margin: 4px 0 2px; }
.order-item .order-title { flex: 1; min-width: 0; font-weight: 600; }
.order-item .order-meta { flex-basis: 100%; }
.partner-item:disabled { opacity: .55; cursor: default; }
.filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-bottom: 16px; }
.filters .form-input, .filters .form-select { min-height: 40px; width: auto; flex: 1 1 200px; }
.filters .inline-form .form-input { flex: 0 1 170px; }
.period-buttons { display: flex; gap: 6px; flex-wrap: wrap; }
.usage-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 20px; }

/* Menu de gauche fixe pendant le défilement (grand écran). */

@media (min-width: 1200px) {
    .app-sidebar { position: sticky; top: 0; height: 100vh; align-self: start; }
}

/* Onglets des devis ouverts. */

.session-tabs {
    position: sticky;
    top: 72px;
    z-index: 25;
    display: flex;
    align-items: flex-end;
    gap: 4px;
    padding: 8px var(--gap-lg) 0;
    overflow-x: auto;
    background: rgba(243, 242, 238, .92);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--line);
}
.session-tab {
    display: flex;
    align-items: center;
    flex: 0 1 240px;
    min-width: 140px;
    border-radius: var(--radius-sm) var(--radius-sm) 0 0;
    background: rgba(11, 11, 12, .05);
    transition: background var(--ease);
}
.session-tab:hover { background: rgba(11, 11, 12, .09); }
.session-tab.is-active { background: var(--white); box-shadow: 0 -1px 0 var(--line), 1px 0 0 var(--line), -1px 0 0 var(--line); }
.session-tab a { display: flex; align-items: center; gap: 8px; flex: 1; min-width: 0; padding: 9px 4px 9px 12px; color: var(--ink); text-decoration: none; font-size: 13px; font-weight: 600; }
.tab-title { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tab-dot { width: 8px; height: 8px; border-radius: 50%; flex-shrink: 0; background: var(--line-strong); }
.tab-dot.stage-questions, .tab-dot.stage-brief { background: var(--yellow); }
.tab-dot.stage-workshop { background: var(--orange); }
.tab-dot.stage-done { background: var(--green); }
.tab-flag { padding: 1px 7px; border-radius: var(--radius-pill); background: var(--ink); color: var(--white); font-size: 10px; font-weight: 800; }
.session-tab.is-updated:not(.is-active) { background: rgba(255, 196, 61, .3); }
.tab-close { display: grid; place-items: center; width: 26px; height: 26px; margin-right: 6px; border: 0; border-radius: 6px; background: transparent; color: var(--muted); }
.tab-close:hover { background: rgba(11, 11, 12, .08); color: var(--ink); }
.session-tab-new { display: grid; place-items: center; width: 34px; height: 34px; margin-bottom: 2px; border-radius: var(--radius-sm); color: var(--muted); }
.session-tab-new:hover { background: rgba(11, 11, 12, .06); color: var(--ink); }

/* En-tête de session, étapes, actions. */

.session-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; flex-wrap: wrap; margin-bottom: 14px; }
.session-head h1 { margin: 0; }
.session-actions { display: flex; align-items: center; gap: 8px; }
.edit-banner-side { display: flex; flex-direction: column; align-items: flex-end; gap: 12px; }
.stepper { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 20px; }
.step {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 7px 14px 7px 8px;
    border-radius: var(--radius-pill);
    background: rgba(11, 11, 12, .04);
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
    text-decoration: none;
}
.step-index { display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: rgba(11, 11, 12, .08); font-size: 11px; }
.step.is-reached { color: var(--ink); }
a.step:hover { background: rgba(11, 11, 12, .08); }
.step.is-current { background: var(--ink); color: var(--white); }
.step.is-current .step-index { background: var(--yellow); color: var(--ink); }
.brief-files { margin-bottom: var(--gap); }

.quote-editor.is-locked { opacity: .6; pointer-events: none; }
.filter-tabs { display: flex; gap: 8px; flex-wrap: wrap; }
.filter-tabs .tag { padding: 7px 14px; }
.sessions-help { font-size: 13px; margin: -6px 0 14px; }
.cell-actions { width: 52px; text-align: right; }
.confirm-message { line-height: 1.5; }

/* Lecture du site : voyant, avancement, fiche. */

.run-dot { width: 9px; height: 9px; border-radius: 50%; flex-shrink: 0; background: var(--orange); box-shadow: 0 0 0 0 rgba(248, 120, 77, .55); animation: run-blink 1.4s ease-in-out infinite; }
@keyframes run-blink {
    0%, 100% { opacity: 1; box-shadow: 0 0 0 0 rgba(248, 120, 77, .55); }
    50% { opacity: .45; box-shadow: 0 0 0 5px rgba(248, 120, 77, 0); }
}
@media (prefers-reduced-motion: reduce) { .run-dot { animation: none; } }
.run-chip {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 5px 12px;
    border: 1px solid var(--accent-line);
    border-radius: var(--radius-pill);
    background: var(--accent-soft);
    color: var(--accent-text);
    font-size: 12px;
    font-weight: 700;
    white-space: nowrap;
}
.run-chip:hover { background: rgba(248, 120, 77, .18); }
.run-state { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; color: var(--accent-text); }

.progress-card { display: flex; flex-direction: column; gap: 8px; padding: 14px; border-radius: var(--radius); background: var(--accent-soft); }
.progress-card .progress-bar { margin: 0; }
.progress-card .help-text { margin: 0; font-size: 12px; color: var(--muted); }
.progress-card .btn { align-self: flex-start; }
.progress-head { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; }
.progress-head strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.site-form { display: flex; gap: 8px; flex-wrap: wrap; }
.site-form .form-input { flex: 1 1 220px; min-height: 40px; }
.site-form .form-select { flex: 0 0 auto; width: auto; min-height: 40px; }
.site-detect { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-top: 10px; padding: 10px 14px; border-radius: var(--radius-sm); background: var(--accent-soft); color: var(--accent-text); font-size: 13px; }
.site-detect span { flex: 1 1 260px; }
.site-detect strong { color: inherit; word-break: break-all; }
.site-url { display: inline-flex; align-items: center; gap: 6px; margin-bottom: 10px; color: var(--accent-text); font-weight: 700; font-size: 13px; text-decoration: none; word-break: break-all; }
.site-facts { margin: 0 0 10px; display: flex; flex-direction: column; gap: 6px; font-size: 13px; }
.site-facts div { display: grid; grid-template-columns: 90px minmax(0, 1fr); gap: 8px; }
.site-facts dt { color: var(--muted); font-weight: 700; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; padding-top: 2px; }
.site-facts dd { margin: 0; }
.site-pages, .site-reread { margin-top: 8px; font-size: 13px; }
.site-pages summary, .site-reread summary { cursor: pointer; color: var(--accent-text); font-weight: 700; }
.site-pages ul { list-style: none; margin: 8px 0 0; padding: 0; max-height: 260px; overflow-y: auto; display: flex; flex-direction: column; gap: 4px; }
.site-pages li { display: flex; justify-content: space-between; gap: 10px; font-size: 12px; }
.site-pages a { color: var(--ink); text-decoration: none; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.site-reread .site-form { margin-top: 10px; }
.site-panel-wide { margin-bottom: 20px; }
.site-panel-wide .site-facts div { grid-template-columns: 130px minmax(0, 1fr); }
.select-limit { width: auto; min-height: 40px; }

/* Verdict refonte / évolution et scores Google. */
.verdict { margin-bottom: 12px; padding: 12px 14px; border-radius: var(--radius); font-size: 13px; background: rgba(11, 11, 12, .04); }
.verdict strong { display: block; margin-bottom: 6px; font-size: 14px; }
.verdict-refonte { background: rgba(197, 59, 69, .08); }
.verdict-refonte strong { color: #8a2f38; }
.verdict-evolution { background: rgba(45, 165, 111, .1); }
.verdict-evolution strong { color: #1e6d4a; }
.verdict ul { margin: 0 0 6px; padding-left: 18px; display: flex; flex-direction: column; gap: 3px; }
.verdict p { margin: 0 0 6px; }
.reason-evolution { color: #1e6d4a; }
.verdict-note { font-size: 11px; color: var(--muted); }
.score-line { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-bottom: 4px; }
.score { display: inline-flex; padding: 1px 8px; border-radius: var(--radius-pill); font-size: 11px; font-weight: 800; }
.score-good { background: rgba(45, 165, 111, .14); color: #1e6d4a; }
.score-average { background: rgba(255, 196, 61, .25); color: #6b5207; }
.score-poor { background: rgba(197, 59, 69, .12); color: #8a2f38; }

/* Responsive. */

@media (max-width: 1199px) {
    .session-tabs { position: static; padding: 8px var(--gap) 0; }
}

@media (max-width: 1280px) {
    .workshop { grid-template-columns: minmax(0, 1fr); }
    .workshop-side { position: static; max-height: none; overflow: visible; }
}

@media (max-width: 900px) {
    .channel-grid, .questions-layout, .key-grid { grid-template-columns: minmax(0, 1fr); }
    .line-top { grid-template-columns: 22px minmax(0, 1fr) minmax(0, 1fr) 38px; }
    .line-top .line-product { grid-column: 2 / -1; }
    .line-top .line-qty { grid-column: 2; }
    .line-top .line-price { grid-column: 3; }
    .line-subtotal { grid-column: 2 / 4; text-align: left; padding-bottom: 0; }
}

@media (max-width: 600px) {
    .totals { margin: 18px -16px -16px; padding: 14px 16px; }
    .card { padding: 16px; }
    .recap-list li > div { width: 100%; }
    .recap-list li .btn { float: none; margin-top: 6px; }
}
