/* ==========================================
   SATISFACTION CLIENT — LNB OM
   Palette de note 1→5 (vert → rouge), cohérente
   avec les tokens définis dans style.css
   ========================================== */

:root {
    --note-1: #2E7D52; /* vert   — tout va bien */
    --note-2: #6FA24C;
    --note-3: #B8860B; /* amber  — vigilance */
    --note-4: #C87137;
    --note-5: #C0392B; /* rouge  — ça ne va pas */
    --note-empty: #C8BC9D;
}

/* ── Bandeau de rappel (page d'accueil) ─────────────────────────────────── */
.satisfaction-banner {
    display: flex;
    align-items: center;
    gap: var(--spacing-md);
    background: #FBF3E4;
    border: 2px solid var(--warning);
    border-radius: var(--radius-md);
    padding: var(--spacing-md) var(--spacing-lg);
    margin-bottom: var(--spacing-lg);
}
.satisfaction-banner .sb-icon { font-size: 1.4rem; flex-shrink: 0; }
.satisfaction-banner .sb-text { flex: 1; color: var(--text-primary); font-size: 0.9375rem; }
.satisfaction-banner .sb-text strong { color: var(--warning); }
.satisfaction-banner .sb-close {
    background: none; border: none; cursor: pointer;
    font-size: 1.25rem; color: var(--text-tertiary); line-height: 1; padding: 4px;
}
.satisfaction-banner .sb-close:hover { color: var(--text-primary); }

/* ── Table satisfaction ──────────────────────────────────────────────────── */
.sat-site-cell { display: flex; flex-direction: column; gap: 2px; }
.sat-site-cell .sat-etage { font-size: 0.8125rem; color: var(--text-tertiary); }
.sat-om-nom { font-size: 0.8125rem; color: var(--text-tertiary); }

/* Puce de note (badge coloré 1-5) */
.note-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2rem;
    height: 2rem;
    padding: 0 0.5rem;
    border-radius: var(--radius-sm);
    font-weight: 700;
    font-size: 0.9375rem;
    color: #fff;
}
.note-chip.note-1 { background: var(--note-1); }
.note-chip.note-2 { background: var(--note-2); }
.note-chip.note-3 { background: var(--note-3); }
.note-chip.note-4 { background: var(--note-4); }
.note-chip.note-5 { background: var(--note-5); }
.note-chip.note-empty {
    background: transparent;
    border: 2px dashed var(--note-empty);
    color: var(--text-tertiary);
}

/* Sélecteur de note (bouton cliquable pour la semaine courante) */
.note-picker-trigger {
    cursor: pointer;
    border: none;
    transition: transform .15s ease, box-shadow .15s ease;
}
.note-picker-trigger:hover { transform: scale(1.08); box-shadow: var(--shadow-sm); }

.note-picker-popover {
    display: flex;
    flex-direction: column;
    gap: 8px;
    width: 16rem;
    background: var(--bg-primary);
    border: 2px solid var(--text-primary);
    border-radius: var(--radius-md);
    padding: 8px;
    box-shadow: var(--shadow-lg);
    z-index: 50;
}
.note-picker-popover .note-chip { cursor: pointer; width: 2.25rem; height: 2.25rem; min-width: 2.25rem; }
.note-picker-popover .note-chip:hover { outline: 2px solid var(--text-primary); outline-offset: 1px; }

.avg-cell { font-variant-numeric: tabular-nums; font-weight: 600; }
.avg-cell .avg-label { display: block; font-size: 0.6875rem; font-weight: 400; color: var(--text-tertiary); text-transform: uppercase; letter-spacing: .03em; }
.avg-cell .avg-empty { color: var(--text-tertiary); font-weight: 400; }

/* ── Historique (modal) ─────────────────────────────────────────────────── */
.sat-history-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
    max-height: 420px;
    overflow-y: auto;
}
.sat-history-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 10px;
    border-radius: var(--radius-sm);
    background: var(--bg-secondary);
}
.sat-history-row .sh-date { color: var(--text-secondary); font-size: 0.875rem; }

@media (max-width: 768px) {
    .satisfaction-banner { flex-wrap: wrap; }
    .data-table.sat-table th:nth-child(4),
    .data-table.sat-table td:nth-child(4) { display: none; } /* masque "OM" sur mobile */
}

.note-picker-popover .np-chips { display: flex; gap: 6px; }
.note-picker-popover .np-chip-selected, .note-picker-popover .np-selected { outline: 2px solid var(--text-primary); outline-offset: 1px; }
.note-picker-popover .np-comment { width: 100%; resize: vertical; font: inherit; font-size: .875rem; padding: 6px 8px; border: 1px solid var(--border-color, #d1d5db); border-radius: var(--radius-md); }
.note-picker-popover .np-submit { align-self: flex-end; }
.sat-history-row { flex-wrap: wrap; }
.sat-history-row .sh-comment { flex-basis: 100%; font-size: .8125rem; color: var(--text-secondary); white-space: pre-wrap; }
.note-picker-popover .np-comment-box { flex-direction: column; gap: 8px; }
.sat-comment-cell { max-width: 18rem; font-size: .8125rem; color: var(--text-secondary); white-space: pre-wrap; word-break: break-word; }
