/* ── Palette back ────────────────────────────────────────
   Fond       #F1F5F9
   Texte      #111827
   Bleu       #2563EB
   Vert       #16A34A
   Blanc      #FFFFFF
   Bordure    #E2E8F0
──────────────────────────────────────────────────────── */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    color: #111827;
    background: #F1F5F9;
    line-height: 1.6;
}

/* ── Globals back ────────────────────────────────────── */

body { font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif; }

/* ── Alertes (réutilisées dans l'espace client) ─────────── */

.alert {
    padding: .85rem 1rem;
    border-radius: 10px;
    border: 1px solid transparent;
    background: #ffffff;
    font-size: .9rem;
}

.alert p { margin: 0 0 .5rem 0; }
.alert p:last-child { margin-bottom: 0; }

.alert-success { background: #DCFCE7; border-color: #BBF7D0; color: #166534; }
.alert-error   { background: #FEE2E2; border-color: #FECACA; color: #991B1B; }
.alert-warning { background: #FEF9C3; border-color: #FEF08A; color: #854D0E; }
.alert-info    { background: #DBEAFE; border-color: #BFDBFE; color: #1E3A8A; }

/* ── Operator shell ──────────────────────────────────── */

/* Topbar + bannières hors du shell : le shell occupe l'espace restant */
body:has(.operator-shell) {
    display: flex;
    flex-direction: column;
    height: 100vh;
    overflow: hidden;
}

body:has(.operator-shell) > .agent-topbar,
body:has(.operator-shell) > .client-settings-nav,
body:has(.operator-shell) > .flash-stack,
body:has(.operator-shell) > .pending-validation-banner {
    flex-shrink: 0;
}

.operator-shell {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    overflow: hidden;
    background: #F3F4F6;
}

/* Topbar */
.op-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 52px;
    padding: 0 1.25rem;
    background: #ffffff;
    border-bottom: 1px solid #E5E7EB;
    flex-shrink: 0;
    gap: 1rem;
}

.op-topbar-left {
    display: flex;
    align-items: center;
    gap: .5rem;
}

.op-logo {
    font-weight: 700;
    font-size: .95rem;
    color: #1E3A8A;
}

.op-nav {
    display: flex;
    align-items: center;
    gap: .25rem;
    margin-left: 1.25rem;
}

.op-nav-link {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    font-size: .875rem;
    font-weight: 500;
    color: #6B7280;
    text-decoration: none;
    padding: .35rem .75rem;
    border-radius: 6px;
    transition: color .15s, background .15s;
}

.op-nav-icon {
    width: 1rem;
    height: 1rem;
    flex-shrink: 0;
}

.op-nav-link:hover {
    color: #111827;
    background: #F3F4F6;
}

.op-nav-active {
    color: #1E3A8A;
    background: #EFF6FF;
    font-weight: 600;
}

.op-topbar-right {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.op-agent {
    display: flex;
    align-items: center;
    gap: .625rem;
}

.agent-avatar {
    width: 30px;
    height: 30px;
    background: #DBEAFE;
    color: #1E3A8A;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .75rem;
    font-weight: 700;
}

.agent-info {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.agent-name {
    font-size: .825rem;
    font-weight: 600;
    color: #111827;
}

.agent-role {
    font-size: .75rem;
    color: #6B7280;
}

.agent-badge {
    font-size: .7rem;
    font-weight: 600;
    padding: .2rem .6rem;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: .4px;
}

.badge-disponible { background: #DCFCE7; color: #166534; }
.badge-occupe     { background: #FEE2E2; color: #991B1B; }
.badge-pause      { background: #FEF9C3; color: #854D0E; }

.op-logout {
    font-size: .8rem;
    color: #9CA3AF;
    text-decoration: none;
    transition: color .15s;
}
.op-logout:hover { color: #EF4444; }

/* ---------- Bandeau global agent (Sprint 2) ---------- */

.agent-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    min-height: 52px;
    padding: 0 1.25rem;
    background: #ffffff;
    border-bottom: 1px solid #E5E7EB;
    flex-shrink: 0;
}

.agent-topbar-start {
    display: flex;
    align-items: center;
    gap: 1.25rem;
    flex: 1;
    min-width: 0;
}

.agent-topbar-end {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-shrink: 0;
    margin-left: auto;
    padding-left: 1.25rem;
    border-left: 1px solid #E5E7EB;
}

.agent-topbar-identity {
    display: flex;
    align-items: center;
    gap: .625rem;
    flex-shrink: 0;
}

.agent-topbar-identity > div {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.agent-topbar-nav {
    display: flex;
    align-items: center;
    flex-wrap: nowrap;
    gap: .35rem;
    flex: 1;
    min-width: 0;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
}

.agent-topbar-nav .op-nav-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 2.5rem;
    height: 2.5rem;
    padding: 0;
    gap: 0;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    background: #F9FAFB;
}

.agent-topbar-nav .op-nav-link:hover {
    background: #F3F4F6;
    border-color: #D1D5DB;
}

.agent-topbar-nav .op-nav-active {
    background: #EFF6FF;
    border-color: #BFDBFE;
}

.agent-topbar-nav .op-nav-icon {
    width: 1.25rem;
    height: 1.25rem;
}

.agent-topbar-nav .op-nav-link-direction {
    background: #FFFBEB;
    border-color: #FDE68A;
}

.agent-topbar-nav .op-nav-link-direction.op-nav-active,
.agent-topbar-nav .op-nav-link-direction:hover {
    background: #FEF3C7;
    border-color: #FCD34D;
}

@media (max-width: 1100px) {
    .agent-topbar-identity > div {
        display: none;
    }
}

@media (max-width: 768px) {
    .agent-topbar {
        padding: 0 .75rem;
        gap: .5rem;
    }

    .agent-topbar-start {
        gap: .5rem;
    }

    .agent-topbar-end {
        padding-left: .5rem;
        gap: .5rem;
    }
}

.topbar-field {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.topbar-label {
    font-size: .65rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .4px;
    color: #6B7280;
}

.topbar-field select {
    font-size: .8rem;
    padding: .25rem .5rem;
    border: 1px solid #D1D5DB;
    border-radius: 6px;
    background: #ffffff;
    color: #111827;
}

.topbar-toggle {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    font-size: .8rem;
    font-weight: 500;
    color: #374151;
    cursor: pointer;
    user-select: none;
}

.topbar-toggle input[type="checkbox"] {
    accent-color: #1E3A8A;
}

.topbar-toggle-mode {
    padding: .25rem .6rem;
    border: 1px solid #D1D5DB;
    border-radius: 6px;
    background: #F9FAFB;
}

.topbar-auto-controls {
    display: flex;
    align-items: center;
    gap: .35rem;
}

.topbar-auto-controls[hidden] {
    display: none;
}

.btn-outline {
    font-size: .75rem;
    padding: .25rem .6rem;
    border: 1px solid #D1D5DB;
    border-radius: 6px;
    background: #ffffff;
    color: #374151;
    cursor: pointer;
    transition: background .15s, border-color .15s;
}

.btn-outline:hover {
    background: #F3F4F6;
    border-color: #9CA3AF;
}

.agent-topbar-logout {
    font-size: .8rem;
    color: #9CA3AF;
    text-decoration: none;
    transition: color .15s;
    padding-left: .75rem;
    border-left: 1px solid #E5E7EB;
    white-space: nowrap;
}

.agent-topbar-logout:hover { color: #EF4444; }

/* ---------- Sous-nav Paramètres (espace client) ---------- */

.client-settings-nav {
    display: flex;
    align-items: center;
    gap: 1rem;
    min-height: 44px;
    padding: 0 1.25rem;
    background: #F9FAFB;
    border-bottom: 1px solid #E5E7EB;
    flex-shrink: 0;
}

.client-settings-nav-label {
    font-size: .7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    color: #6B7280;
    flex-shrink: 0;
}

.client-settings-nav-links {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .25rem;
}

.client-settings-nav-link {
    font-size: .875rem;
    font-weight: 500;
    color: #6B7280;
    text-decoration: none;
    padding: .35rem .75rem;
    border-radius: 6px;
    transition: color .15s, background .15s;
}

.client-settings-nav-link:hover {
    color: #111827;
    background: #F3F4F6;
}

.client-settings-nav-link--active {
    color: #1E3A8A;
    background: #EFF6FF;
    font-weight: 600;
}

.client-settings-nav-separator {
    display: inline-block;
    width: 1px;
    height: 1.25rem;
    background: #E5E7EB;
    margin: 0 .25rem;
}

/* Édition retry rules — 1 ligne par statut d'échec : libellé + délai + max */
.retry-rules-grid {
    display: flex;
    flex-direction: column;
    gap: .75rem;
}

.retry-rules-row {
    display: grid;
    grid-template-columns: 12rem 1fr 1fr;
    gap: 1rem;
    align-items: center;
    padding: .75rem 1rem;
    background: #F9FAFB;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
}

.retry-rules-label {
    font-weight: 600;
    color: #1F2937;
}

@media (max-width: 720px) {
    .retry-rules-row {
        grid-template-columns: 1fr;
        gap: .5rem;
    }
}

/* Page Sonnerie — liste avec preview + badge visuel du choix actif */
.ringtone-list {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: .5rem;
}

.ringtone-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: .65rem 1rem;
    background: #FFFFFF;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    transition: border-color .15s, background .15s;
}

.ringtone-item:hover {
    border-color: #C7D2FE;
}

.ringtone-item--active {
    background: #EFF6FF;
    border-color: #2563EB;
}

.ringtone-radio {
    display: flex;
    align-items: center;
    gap: .5rem;
    flex: 1;
    cursor: pointer;
}

.ringtone-label {
    font-weight: 500;
    color: #1F2937;
    min-width: 8rem;
}

.ringtone-item--active .ringtone-label {
    font-weight: 600;
    color: #1E3A8A;
}

.ringtone-badge {
    font-size: .75rem;
    font-weight: 600;
    color: #1D4ED8;
    background: #DBEAFE;
    padding: .15rem .5rem;
    border-radius: 999px;
}

.ringtone-audio {
    height: 32px;
}

/* Compteur dans le titre des pages liste (Messages d'accueil, etc.) */
.page-title-count {
    display: inline-block;
    margin-left: .5rem;
    padding: .15rem .6rem;
    background: #E5E7EB;
    color: #374151;
    font-size: .75rem;
    font-weight: 600;
    border-radius: 999px;
    vertical-align: middle;
}

/* État vide générique pour les pages liste */
.empty-state {
    text-align: center;
    padding: 3rem 1.5rem;
    background: #F9FAFB;
    border: 1px dashed #D1D5DB;
    border-radius: 12px;
    margin: 1rem 0;
}

.empty-state-icon {
    font-size: 2.5rem;
    margin-bottom: .75rem;
}

.empty-state-title {
    font-size: 1.05rem;
    font-weight: 600;
    color: #1F2937;
    margin: 0 0 .25rem;
}

.empty-state-hint {
    color: #6B7280;
    font-size: .9rem;
    margin: 0 0 1.25rem;
}

/* Bloc configuration mise en attente (fiche mandant) */
.hold-config {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.hold-config-row {
    display: flex;
    gap: 1rem;
    padding: .85rem 1rem;
    background: #F9FAFB;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
}

.hold-config-icon {
    font-size: 1.5rem;
    line-height: 1;
}

.hold-config-body {
    flex: 1;
}

.hold-config-label {
    font-size: .75rem;
    font-weight: 600;
    color: #6B7280;
    text-transform: uppercase;
    letter-spacing: .03em;
    margin-bottom: .25rem;
}

.hold-config-value {
    font-weight: 600;
    color: #1F2937;
    margin-bottom: .35rem;
}

.hold-config-quote {
    color: #4B5563;
    font-style: italic;
    font-size: .9rem;
}

.hold-config-empty {
    color: #9CA3AF;
    font-style: italic;
}

.hold-config-audio {
    height: 28px;
    margin-top: .25rem;
}

/* Page Règles d'appels — schéma de flux Appel → Sonnerie → Répondeur */
.call-rules-flow {
    display: flex;
    align-items: stretch;
    gap: .75rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.call-rules-step {
    flex: 1 1 10rem;
    text-align: center;
    padding: 1rem .75rem;
    background: #F9FAFB;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    min-width: 10rem;
}

.call-rules-step-icon {
    font-size: 1.75rem;
    line-height: 1;
    margin-bottom: .5rem;
}

.call-rules-step-label {
    font-weight: 600;
    color: #1F2937;
    font-size: .9rem;
}

.call-rules-step-meta {
    color: #6B7280;
    font-size: .85rem;
    margin-top: .35rem;
}

.call-rules-step-meta strong {
    color: #1D4ED8;
}

.call-rules-arrow {
    display: flex;
    align-items: center;
    color: #9CA3AF;
    font-size: 1.25rem;
    font-weight: 600;
}

@media (max-width: 720px) {
    .call-rules-arrow {
        display: none;
    }
}

/* Formulaires Paramètres (horaires, conformité, mandants…) : scroll vertical */
body:has(.client-settings-nav) .operator-shell .page-shell {
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 2rem;
}

/* ---------- Bloc actions du dialer (déplacé du topbar) ---------- */

.dialer-actions-bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: .85rem 1.5rem;
    background: #ffffff;
    border-bottom: 1px solid #E5E7EB;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
    flex-wrap: wrap;
    flex-shrink: 0;
}

/* Segmented control des modes de travail — style iOS / Mac, sobre */
.dialer-modes {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    padding: 3px;
    background: #F1F5F9;
    border-radius: 9px;
}

.dialer-mode-pill {
    font-size: .82rem;
    font-weight: 500;
    line-height: 1;
    padding: .55rem 1rem;
    border: 1px solid transparent;
    border-radius: 7px;
    background: transparent;
    color: #475569;
    cursor: pointer;
    transition: background .15s ease, color .15s ease, box-shadow .15s ease;
}

.dialer-mode-pill:hover {
    color: #0F172A;
    background: rgba(255, 255, 255, 0.6);
}

.dialer-mode-pill:focus-visible {
    outline: 2px solid #2563EB;
    outline-offset: 2px;
}

.dialer-mode-pill[aria-pressed="true"] {
    background: #ffffff;
    color: #1E3A8A;
    font-weight: 600;
    border-color: #E2E8F0;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.08);
}

/* Groupe d'actions secondaires (Entrant, Mode auto, Pause/Stop) */
.dialer-actions-secondary {
    display: inline-flex;
    align-items: center;
    gap: .85rem;
}

.dialer-toggle {
    display: inline-flex;
    align-items: center;
    gap: .4rem;
    font-size: .82rem;
    font-weight: 500;
    color: #334155;
    cursor: pointer;
    user-select: none;
}

.dialer-toggle input[type="checkbox"] {
    accent-color: #1E3A8A;
    width: 14px;
    height: 14px;
}

.dialer-toggle--mode {
    padding: .35rem .75rem;
    border: 1px solid #E2E8F0;
    border-radius: 7px;
    background: #F8FAFC;
}

.dialer-auto-controls {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
}

.dialer-auto-controls[hidden] {
    display: none;
}

/* ---------- File de travail (Sprint 2) ---------- */

.op-col-queue {
    background: #ffffff;
}

.op-col-header-stack {
    flex-direction: column;
    align-items: stretch;
    gap: .75rem;
}

.op-col-header-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.btn-take-next {
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .4rem;
    padding: .55rem .75rem;
    font-size: .825rem;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    background: #1E3A8A;
    color: #ffffff;
    cursor: pointer;
    transition: background .15s, opacity .15s;
}

.btn-take-next:hover:not(:disabled) { background: #1D4ED8; }

/* Force le masquage quand l'attribut hidden est posé (display:flex sinon écrase) */
.btn-take-next[hidden] {
    display: none;
}

.btn-take-next:disabled {
    opacity: .4;
    cursor: not-allowed;
}

/* Sous-filtres pills mode Rappels */
.queue-subsets {
    display: flex;
    flex-wrap: wrap;
    gap: .35rem;
    padding: .65rem 1rem;
    border-bottom: 1px solid #F1F5F9;
    background: #F8FAFC;
}

/* Force le masquage quand l'attribut hidden est posé (sinon display:flex écrase) */
.queue-subsets[hidden] {
    display: none;
}

.queue-subset-pill {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    font-size: .78rem;
    font-weight: 500;
    padding: .3rem .65rem;
    border: 1px solid #E2E8F0;
    border-radius: 999px;
    background: #FFFFFF;
    color: #475569;
    cursor: pointer;
    transition: all .15s;
}

.queue-subset-pill:hover {
    border-color: #CBD5E1;
    background: #F1F5F9;
}

.queue-subset-pill[aria-pressed="true"] {
    border-color: #1E3A8A;
    background: #1E3A8A;
    color: #FFFFFF;
    font-weight: 600;
}

.queue-subset-pill--disabled,
.queue-subset-pill[disabled] {
    opacity: 0.5;
    cursor: not-allowed;
    color: #94A3B8;
}

.subset-badge {
    display: inline-block;
    min-width: 18px;
    padding: 1px 5px;
    font-size: .68rem;
    font-weight: 700;
    text-align: center;
    background: #EF4444;
    color: #FFFFFF;
    border-radius: 999px;
    line-height: 1.3;
}

.queue-subset-pill[aria-pressed="true"] .subset-badge {
    background: #FFFFFF;
    color: #1E3A8A;
}

/* Input recherche mode Répertoire */
.queue-search {
    padding: .65rem 1rem;
    border-bottom: 1px solid #F1F5F9;
    background: #F8FAFC;
}

.queue-search-input {
    width: 100%;
    font-size: .85rem;
    padding: .5rem .75rem;
    border: 1px solid #E2E8F0;
    border-radius: 7px;
    background: #FFFFFF;
    color: #0F172A;
    transition: border-color .15s, box-shadow .15s;
}

.queue-search-input:focus {
    outline: 0;
    border-color: #2563EB;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.queue-item-subline {
    font-size: .78rem;
    color: #64748B;
    margin-top: 1px;
}

.queue-badge-optedout {
    background: #FEE2E2 !important;
    color: #991B1B !important;
}

.queue-empty-link {
    display: inline-block;
    margin-top: .65rem;
    padding: .35rem .75rem;
    font-size: .82rem;
    font-weight: 500;
    color: #FFFFFF;
    background: #1E3A8A;
    border-radius: 6px;
    text-decoration: none;
    transition: background .15s;
}

.queue-empty-link:hover {
    background: #1E40AF;
}

/* ── Messagerie vocale (page /client/voicemails) ───────────────────── */

.vm-page {
    max-width: 900px;
    margin: 0 auto;
    padding: 1.5rem;
}

.vm-page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.vm-page-header h1 {
    margin: 0;
    font-size: 1.35rem;
    font-weight: 600;
    color: #0F172A;
}

.vm-filters {
    display: inline-flex;
    gap: .35rem;
    background: #F1F5F9;
    padding: 3px;
    border-radius: 9px;
}

.vm-filter-pill {
    padding: .4rem .85rem;
    font-size: .82rem;
    font-weight: 500;
    color: #475569;
    border-radius: 7px;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    transition: background .15s, color .15s;
}

.vm-filter-pill:hover {
    color: #0F172A;
    background: rgba(255, 255, 255, 0.6);
}

.vm-filter-pill--active {
    background: #ffffff;
    color: #1E3A8A;
    font-weight: 600;
    box-shadow: 0 1px 2px rgba(15, 23, 42, .08);
}

.vm-filter-badge {
    display: inline-block;
    min-width: 18px;
    padding: 1px 5px;
    font-size: .68rem;
    font-weight: 700;
    background: #EF4444;
    color: #FFFFFF;
    border-radius: 999px;
}

.vm-empty {
    padding: 3rem 1rem;
    text-align: center;
    color: #64748B;
    background: #F8FAFC;
    border-radius: 10px;
}

.vm-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: .5rem;
}

.vm-item {
    background: #FFFFFF;
    border: 1px solid #E5E7EB;
    border-radius: 10px;
    transition: border-color .15s, box-shadow .15s;
}

.vm-item:hover {
    border-color: #2563EB;
    box-shadow: 0 4px 12px rgba(37, 99, 235, .1);
}

.vm-item--unread {
    border-left: 3px solid #2563EB;
}

.vm-item-link {
    display: block;
    padding: .85rem 1rem;
    text-decoration: none;
    color: inherit;
}

.vm-item-row1 {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .5rem;
}

.vm-item-caller {
    font-weight: 600;
    color: #0F172A;
}

.vm-item-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #2563EB;
    flex-shrink: 0;
}

.vm-item-row2 {
    display: flex;
    gap: .85rem;
    margin-top: 4px;
    font-size: .78rem;
    color: #64748B;
}

.vm-item-number { font-variant-numeric: tabular-nums; }
.vm-item-duration::before { content: "· "; color: #CBD5E1; }
.vm-item-date::before     { content: "· "; color: #CBD5E1; }

.vm-item-preview {
    margin-top: .5rem;
    font-size: .85rem;
    color: #334155;
    line-height: 1.4;
}

.vm-item-preview--pending {
    color: #94A3B8;
    font-style: italic;
}

/* ── Détail VM ─────────────────────────────────────────────────────── */

.vm-detail {
    max-width: 720px;
    margin: 0 auto;
    padding: 1.5rem;
}

.vm-detail-header {
    margin-bottom: 1.25rem;
}

.vm-back-link {
    display: inline-block;
    margin-bottom: .5rem;
    font-size: .82rem;
    color: #2563EB;
    text-decoration: none;
}

.vm-back-link:hover { text-decoration: underline; }

.vm-detail h1 {
    margin: 0;
    font-size: 1.35rem;
    color: #0F172A;
}

.vm-detail-card {
    background: #FFFFFF;
    border: 1px solid #E5E7EB;
    border-radius: 12px;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.vm-detail-meta {
    display: flex;
    flex-direction: column;
    gap: .5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #F1F5F9;
}

.vm-detail-row {
    display: flex;
    gap: .75rem;
    font-size: .9rem;
}

.vm-detail-label {
    flex: 0 0 80px;
    color: #64748B;
}

.vm-detail-value {
    color: #0F172A;
}

.vm-detail-unknown {
    color: #94A3B8;
    font-style: italic;
}

.vm-detail-player audio {
    width: 100%;
    height: 40px;
}

.vm-detail-transcription h3 {
    margin: 0 0 .5rem;
    font-size: .75rem;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: #475569;
    font-weight: 700;
}

.vm-detail-transcription blockquote {
    margin: 0;
    padding: .85rem 1rem;
    background: #F1F5F9;
    border-left: 3px solid #2563EB;
    color: #1F2937;
    line-height: 1.6;
    font-size: .92rem;
}

.vm-detail-transcription-pending,
.vm-detail-transcription-skip {
    color: #94A3B8;
    font-style: italic;
    font-size: .85rem;
}

.vm-detail-actions {
    display: flex;
    gap: .5rem;
    flex-wrap: wrap;
}

.vm-detail-feedback {
    padding: .5rem .75rem;
    font-size: .85rem;
    background: #DCFCE7;
    color: #166534;
    border-radius: 6px;
}

.vm-detail-feedback--error {
    background: #FEE2E2;
    color: #991B1B;
}

/* ── Bouton Transférer (V1) ────────────────────────────────────────── */

.btn-transfer {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    font-size: .85rem;
    font-weight: 500;
    padding: 0.4rem 0.8rem;
    background: #ffffff;
    color: #1E40AF;
    border: 1px solid #1E40AF;
    border-radius: 6px;
    cursor: pointer;
    transition: background-color .15s ease, color .15s ease;
}

.btn-transfer:hover:not(:disabled) {
    background: #1E40AF;
    color: #ffffff;
}

.btn-transfer:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.btn-transfer[hidden] {
    display: none;
}

/* ── Popover sélection agent cible (Transfert V1) ──────────────────── */

.transfer-popover {
    position: relative;
    margin-top: 0.75rem;
    background: #ffffff;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(15, 23, 42, 0.08);
    overflow: hidden;
}

.transfer-popover[hidden] {
    display: none;
}

.transfer-popover-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.625rem 0.875rem;
    background: #F9FAFB;
    border-bottom: 1px solid #E5E7EB;
}

.transfer-popover-title {
    font-weight: 600;
    color: #1F2937;
    font-size: 0.9375rem;
}

.transfer-popover-close {
    background: transparent;
    border: 0;
    font-size: 1rem;
    color: #6B7280;
    cursor: pointer;
    padding: 0 0.25rem;
}

.transfer-popover-close:hover {
    color: #1F2937;
}

.transfer-popover-body {
    padding: 0.875rem;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.transfer-popover-label {
    font-size: 0.8125rem;
    color: #4B5563;
}

.transfer-popover-select {
    width: 100%;
    padding: 0.45rem 0.625rem;
    border: 1px solid #D1D5DB;
    border-radius: 6px;
    font-size: 0.9375rem;
    background: #ffffff;
}

.transfer-popover-feedback {
    margin: 0;
    padding: 0.5rem 0.625rem;
    border-radius: 4px;
    font-size: 0.875rem;
}

.transfer-popover-feedback[hidden] {
    display: none;
}

.transfer-popover-feedback--pending {
    background: #DBEAFE;
    color: #1E40AF;
}

.transfer-popover-feedback--success {
    background: #D1FAE5;
    color: #065F46;
}

.transfer-popover-feedback--error {
    background: #FEE2E2;
    color: #991B1B;
}

.transfer-popover-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
    padding: 0.625rem 0.875rem;
    background: #F9FAFB;
    border-top: 1px solid #E5E7EB;
}

/* ── Bouton Mise en attente (Hold) ──────────────────────────────────── */

.btn-hold {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    font-size: .85rem;
    font-weight: 500;
    padding: .55rem .9rem;
    border: 1px solid #E2E8F0;
    border-radius: 7px;
    background: #F8FAFC;
    color: #475569;
    cursor: pointer;
    transition: background .15s, color .15s, border-color .15s;
}

.btn-hold:hover:not(:disabled) {
    background: #E2E8F0;
    color: #0F172A;
}

/* État actif (appel en attente) : couleur orange pour attirer l'attention */
.btn-hold--active {
    background: #F97316;
    color: #FFFFFF;
    border-color: #EA580C;
}

.btn-hold--active:hover {
    background: #EA580C;
    color: #FFFFFF;
}

.btn-hold[hidden] {
    display: none;
}

/* ── Cards résultats Répertoire (design pro) ─────────────────────────── */

.queue-item--card {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: .75rem;
    margin: .4rem .65rem;
    padding: .75rem .9rem;
    background: #FFFFFF;
    border: 1px solid #E5E7EB;
    border-bottom: 1px solid #E5E7EB;
    border-radius: 10px;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.05);
    transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
    cursor: pointer;
}

.queue-item--card:hover {
    border-color: #2563EB;
    box-shadow: 0 6px 16px rgba(37, 99, 235, 0.14);
    transform: translateY(-1px);
}

.queue-item--card:active {
    transform: translateY(0);
}

.queue-card-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: #1E3A8A;
    color: #FFFFFF;
    font-weight: 600;
    font-size: .85rem;
    letter-spacing: .03em;
    flex-shrink: 0;
}

.queue-card-avatar--optedout {
    background: #DC2626;
}

.queue-card-body {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.queue-card-name {
    font-size: .92rem;
    font-weight: 600;
    color: #0F172A;
    line-height: 1.2;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.queue-card-meta {
    display: flex;
    flex-wrap: wrap;
    gap: .5rem;
    font-size: .75rem;
    color: #64748B;
    line-height: 1.3;
}

.queue-card-company {
    font-weight: 500;
    color: #475569;
}

.queue-card-phone {
    font-variant-numeric: tabular-nums;
}

.queue-card-badge--optedout {
    display: inline-block;
    align-self: center;
    font-size: .65rem;
    font-weight: 700;
    padding: 3px 7px;
    background: #FEE2E2;
    color: #991B1B;
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: .4px;
    white-space: nowrap;
}

.queue-list {
    list-style: none;
    margin: 0;
    padding: 0;
    overflow-y: auto;
    flex: 1;
}

.queue-item {
    padding: .75rem 1rem;
    border-bottom: 1px solid #F3F4F6;
    display: flex;
    flex-direction: column;
    gap: .35rem;
}

.queue-item-overdue {
    background: #FEF2F2;
    border-left: 3px solid #DC2626;
}

.queue-item-row {
    display: flex;
    align-items: center;
    gap: .5rem;
}

.queue-badge {
    display: inline-block;
    font-size: .65rem;
    font-weight: 600;
    padding: .15rem .45rem;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: .3px;
}

.queue-badge-campaign         { background: #EFF6FF; color: #1E3A8A; }
.queue-badge-callback         { background: #FEF9C3; color: #854D0E; }
.queue-badge-manual           { background: #F3F4F6; color: #374151; }
.queue-badge-inbound_followup { background: #DCFCE7; color: #166534; }

.queue-overdue-flag {
    font-size: .65rem;
    font-weight: 700;
    color: #DC2626;
    text-transform: uppercase;
    letter-spacing: .3px;
}

.queue-item-name {
    font-size: .875rem;
    font-weight: 600;
    color: #111827;
}

.queue-item-meta {
    display: flex;
    gap: .75rem;
    font-size: .75rem;
    color: #6B7280;
}

.queue-phone { font-variant-numeric: tabular-nums; }

.queue-due { font-style: italic; }

.queue-empty {
    padding: 1.5rem 1rem;
    text-align: center;
    color: #9CA3AF;
    font-size: .825rem;
    line-height: 1.5;
}

.queue-empty-hint {
    display: inline-block;
    margin-top: .5rem;
    font-size: .75rem;
    color: #D1D5DB;
}

.btn-skip-task {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .35rem;
    padding: 1rem .75rem;
    font-size: .8rem;
    font-weight: 600;
    border: 1px solid #D1D5DB;
    border-radius: 10px;
    background: #ffffff;
    color: #6B7280;
    cursor: pointer;
    transition: background .15s, border-color .15s, color .15s;
}

.btn-skip-task:hover:not(:disabled) {
    background: #F9FAFB;
    border-color: #9CA3AF;
    color: #374151;
}

/* Grille 2 colonnes (depuis UI.3 — la colonne notes a fusionné dans le gabarit Qualification) */
.op-grid {
    display: grid;
    grid-template-columns: 300px 1fr;
    flex: 1;
    overflow: hidden;
    gap: 0;
}

.op-col {
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: #ffffff;
    border-right: 1px solid #E5E7EB;
}

.op-col:last-child { border-right: none; }

.op-col-call { background: #F9FAFB; }

.op-col-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: .875rem 1rem;
    border-bottom: 1px solid #F3F4F6;
    flex-shrink: 0;
}

.op-col-header h2 {
    font-size: .875rem;
    font-weight: 600;
    color: #374151;
    text-transform: uppercase;
    letter-spacing: .5px;
}

.op-count {
    font-size: .75rem;
    background: #E5E7EB;
    color: #374151;
    padding: .15rem .5rem;
    border-radius: 20px;
    font-weight: 600;
}

/* Search */
.op-search {
    padding: .75rem 1rem;
    border-bottom: 1px solid #F3F4F6;
    flex-shrink: 0;
}

.op-search input {
    width: 100%;
    padding: .5rem .75rem;
    border: 1px solid #E5E7EB;
    border-radius: 6px;
    font-size: .875rem;
    color: #374151;
    background: #F9FAFB;
    outline: none;
    transition: border-color .15s;
}

.op-search input:focus {
    border-color: #2563EB;
    background: #ffffff;
}

/* Contact list */
.contact-list {
    list-style: none;
    overflow-y: auto;
    flex: 1;
}

.contact-item {
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .75rem 1rem;
    cursor: pointer;
    border-bottom: 1px solid #F9FAFB;
    transition: background .1s;
}

.contact-item:hover   { background: #F3F4F6; }
.contact-active       { background: #EFF6FF; border-left: 3px solid #2563EB; }

.contact-avatar {
    width: 34px;
    height: 34px;
    background: #E5E7EB;
    color: #374151;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .75rem;
    font-weight: 700;
    flex-shrink: 0;
}

.contact-info {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
}

.contact-name {
    font-size: .875rem;
    font-weight: 500;
    color: #111827;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.contact-phone {
    font-size: .775rem;
    color: #9CA3AF;
}

.contact-status {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    flex-shrink: 0;
}

.status-online  { background: #22C55E; }
.status-offline { background: #D1D5DB; }
.status-busy    { background: #F59E0B; }

/* ── Centre : appel ─────────────────────────────────── */

.op-col-call {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 1.5rem;
    background: #F8FAFC;
}

/* Wrapper de layout (free = composer+qualif côte-à-côte ; contact = A) */
.dialer-fiche-row {
    display: flex;
    flex-direction: row;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: center;
    gap: 1.5rem;
    width: 100%;
    max-width: 1100px;
}

.dialer-fiche-row[hidden] {
    display: none;
}

/* ---------- Bandeau « Mention d'enregistrement » (conformité DGCCRF) ---------- */

.dialer-recording-notice {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    margin-bottom: 1rem;
    background: #FEF3C7;
    border: 1px solid #F59E0B;
    border-left: 4px solid #D97706;
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(217, 119, 6, 0.12);
}

.dialer-recording-notice[hidden] {
    display: none;
}

.dialer-recording-notice-content {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
}

.dialer-recording-notice-icon {
    font-size: 1.5rem;
    line-height: 1;
}

.dialer-recording-notice-text {
    margin: 0;
    color: #78350F;
    line-height: 1.45;
}

.dialer-recording-notice-text strong {
    display: block;
    margin-bottom: 0.25rem;
    color: #7C2D12;
}

.dialer-recording-notice-hint {
    font-size: 0.875rem;
    color: #92400E;
    font-style: italic;
}

.dialer-recording-notice-hint[hidden] {
    display: none;
}

.dialer-recording-notice-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

.dialer-recording-notice-checkbox {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: #78350F;
    font-size: 0.9375rem;
    cursor: pointer;
}

.dialer-recording-notice-checkbox input[type="checkbox"]:disabled {
    cursor: not-allowed;
}

.dialer-recording-notice-checkbox input[type="checkbox"]:disabled + * {
    opacity: 0.6;
}

.dialer-recording-notice-btn-primary {
    padding: 0.5rem 1rem;
    background: #D97706;
    color: #ffffff;
    border: 0;
    border-radius: 6px;
    font-size: 0.9375rem;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.dialer-recording-notice-btn-primary:hover:not(:disabled) {
    background: #B45309;
}

.dialer-recording-notice-btn-primary:disabled {
    background: #FCD34D;
    cursor: not-allowed;
}

/* ---------- Fiche centrale dialer (gabarits A / B / Qualification) ---------- */

.dialer-fiche {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
    padding: 1.5rem;
    width: 100%;
    max-width: 480px;
    background: #ffffff;
    border: 1px solid #E5E7EB;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(15, 23, 42, 0.04);
    flex: 1 1 360px;
    transition: opacity .2s ease;
}

/* État désactivé (qualification sans appel actif) : grisé + non-interactif */
.dialer-fiche--disabled {
    opacity: 0.5;
    pointer-events: none;
    user-select: none;
}

.dialer-fiche-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding-bottom: .85rem;
    border-bottom: 1px solid #F1F5F9;
}

.dialer-fiche-title {
    margin: 0;
    font-size: 1.1rem;
    font-weight: 600;
    color: #0F172A;
}

.dialer-fiche-state-block {
    display: inline-flex;
    align-items: center;
    gap: .65rem;
}

/* Gabarit B — Composer Appel libre */
.dialer-fiche--composer {
    text-align: center;
}

.dialer-composer {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.dialer-composer-label {
    font-size: .7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: #64748B;
    text-align: left;
}

.dialer-composer-input {
    font-size: 1.65rem;
    font-weight: 500;
    letter-spacing: .03em;
    text-align: center;
    padding: .85rem 1rem;
    border: 1px solid #E2E8F0;
    border-radius: 10px;
    background: #F8FAFC;
    color: #0F172A;
    transition: border-color .15s, background .15s;
}

.dialer-composer-input:focus {
    outline: 0;
    border-color: #2563EB;
    background: #ffffff;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.dialer-composer-input:disabled {
    color: #475569;
    background: #F1F5F9;
}

.dialer-composer-actions {
    display: flex;
    gap: .65rem;
    justify-content: center;
}

.dialer-composer-btn {
    flex: 1;
    max-width: 180px;
}

.dialer-composer-hint {
    margin: 0;
    font-size: .8rem;
    color: #64748B;
    text-align: center;
    line-height: 1.5;
}

.dialer-composer-hint kbd {
    display: inline-block;
    padding: 1px 6px;
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: .75rem;
    background: #F1F5F9;
    border: 1px solid #CBD5E1;
    border-radius: 4px;
    color: #334155;
}

/* Gabarit Qualification — wrap-up structuré (identité + cet appel + tout enregistrer) */

.dialer-fiche--qualification {
    max-width: 560px;
    text-align: left;
}

.dialer-fiche-context {
    font-size: .85rem;
    color: #64748B;
}

.dialer-fiche-context strong {
    color: #0F172A;
    font-weight: 600;
}

.dialer-qual-section {
    display: flex;
    flex-direction: column;
    gap: .65rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #F1F5F9;
}

.dialer-qual-section:last-of-type {
    border-bottom: 0;
}

.dialer-qual-section-title {
    margin: 0;
    font-size: .7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .5px;
    color: #475569;
}

.dialer-qual-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: .65rem;
}

.dialer-qual-field {
    display: flex;
    flex-direction: column;
    gap: .25rem;
}

.dialer-qual-field--full {
    grid-column: 1 / -1;
}

.dialer-qual-field label {
    font-size: .72rem;
    font-weight: 600;
    color: #475569;
}

.dialer-qual-input,
.dialer-qual-textarea,
.dialer-qual-select {
    font-size: .9rem;
    padding: .5rem .65rem;
    border: 1px solid #E2E8F0;
    border-radius: 7px;
    background: #FFFFFF;
    color: #0F172A;
    transition: border-color .15s, box-shadow .15s;
}

.dialer-qual-textarea {
    min-height: 80px;
    resize: vertical;
    font-family: inherit;
}

.dialer-qual-input:focus,
.dialer-qual-textarea:focus,
.dialer-qual-select:focus {
    outline: 0;
    border-color: #2563EB;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.dialer-qual-search-link {
    align-self: flex-start;
    font-size: .8rem;
    padding: .35rem .75rem;
    border: 1px dashed #CBD5E1;
    border-radius: 6px;
    background: #F8FAFC;
    color: #64748B;
    cursor: not-allowed;
}

.dialer-qual-callback-toggle {
    align-self: flex-start;
    font-size: .82rem;
    font-weight: 500;
    padding: .35rem .75rem;
    border: 1px solid #E2E8F0;
    border-radius: 6px;
    background: #FFFFFF;
    color: #334155;
    cursor: pointer;
}

.dialer-qual-callback-toggle[aria-expanded="true"] {
    border-color: #2563EB;
    color: #2563EB;
}

.dialer-qual-callback-form {
    display: flex;
    flex-direction: column;
    gap: .5rem;
    margin-top: .35rem;
    padding: .75rem;
    background: #F8FAFC;
    border-radius: 7px;
}

.dialer-qual-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.dialer-qual-save-btn {
    flex: 1;
    padding: .7rem 1.25rem;
    font-size: .9rem;
    font-weight: 600;
    background: #1E3A8A;
    color: #FFFFFF;
    border: 0;
    border-radius: 8px;
    cursor: pointer;
    transition: background .15s;
}

.dialer-qual-save-btn:hover:not(:disabled) {
    background: #1E40AF;
}

.dialer-qual-save-btn:disabled {
    background: #94A3B8;
    cursor: not-allowed;
}

.dialer-qual-feedback {
    font-size: .82rem;
    color: #166534;
    padding: .5rem .75rem;
    background: #DCFCE7;
    border-radius: 6px;
}

.dialer-qual-feedback--error {
    color: #991B1B;
    background: #FEE2E2;
}

/* Gabarit A — fiche contact (mode Campagnes/Rappels/Répertoire ou entrant connu) */

.dialer-fiche--contact {
    max-width: 720px;
    text-align: left;
}

.dialer-fiche-header--contact {
    align-items: flex-start;
}

.contact-identity {
    display: flex;
    align-items: center;
    gap: .85rem;
}

.contact-avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: #1E3A8A;
    color: #FFFFFF;
    font-weight: 600;
    font-size: .95rem;
    flex-shrink: 0;
}

.contact-identity-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.contact-name {
    margin: 0;
    font-size: 1.05rem;
    font-weight: 600;
    color: #0F172A;
}

.contact-phone {
    font-size: .82rem;
    color: #64748B;
    font-variant-numeric: tabular-nums;
}

.contact-meta {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: .35rem;
}

.contact-badge-qual {
    display: inline-block;
    padding: 2px 8px;
    font-size: .7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: .4px;
    background: #FEF3C7;
    color: #92400E;
    border-radius: 999px;
}

.contact-open-link {
    font-size: .75rem;
    color: #2563EB;
    text-decoration: none;
}

.contact-open-link:hover {
    text-decoration: underline;
}

.contact-call-actions {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #F1F5F9;
}

.contact-call-buttons {
    display: inline-flex;
    gap: .5rem;
}

.dialer-fiche-history {
    display: flex;
    flex-direction: column;
    gap: .65rem;
}

.dialer-fiche-history .history-list {
    list-style: none;
    margin: 0;
    padding: 0;
    max-height: 220px;
    overflow-y: auto;
}

.history-empty {
    font-size: .82rem;
    color: #94A3B8;
    padding: .5rem 0;
}

.call-panel {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    padding: 2rem;
    width: 100%;
    max-width: 380px;
}

.call-contact {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .75rem;
}

.call-avatar {
    width: 72px;
    height: 72px;
    background: #DBEAFE;
    color: #1E3A8A;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    font-weight: 700;
}

.call-name {
    font-size: 1.2rem;
    font-weight: 700;
    color: #111827;
}

.call-number {
    font-size: .9rem;
    color: #6B7280;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 6px;
    padding: .15rem .35rem;
    margin-top: .15rem;
    width: 100%;
    max-width: 220px;
    font-family: inherit;
}

.call-number:hover {
    border-color: #E5E7EB;
}

.call-number:focus {
    outline: none;
    border-color: #2563EB;
    background: #FFFFFF;
    color: #111827;
}

.call-number:disabled {
    cursor: not-allowed;
    opacity: .7;
}

.call-contact-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .2rem;
}

.call-status-block {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: .5rem;
}

.call-state {
    font-size: .8rem;
    font-weight: 600;
    padding: .25rem .875rem;
    border-radius: 20px;
    text-transform: uppercase;
    letter-spacing: .5px;
}

.call-state-idle   { background: #F3F4F6; color: #6B7280; }
.call-state-active { background: #DCFCE7; color: #166534; }
.call-state-done   { background: #FEE2E2; color: #991B1B; }

.call-timer {
    font-size: 2rem;
    font-weight: 700;
    color: #111827;
    font-variant-numeric: tabular-nums;
    letter-spacing: 2px;
}

.call-actions {
    display: flex;
    gap: 1rem;
    width: 100%;
}

.btn-call, .btn-hangup {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    padding: 1rem;
    font-size: 1rem;
    font-weight: 700;
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: opacity .15s, transform .1s;
}

.btn-call:hover:not(:disabled)   { opacity: .9; transform: translateY(-1px); }
.btn-hangup:hover:not(:disabled) { opacity: .9; transform: translateY(-1px); }

.btn-call   { background: #16A34A; color: #ffffff; }
.btn-hangup { background: #DC2626; color: #ffffff; }

.btn-call:disabled, .btn-hangup:disabled {
    opacity: .35;
    cursor: not-allowed;
}

.btn-icon { font-size: 1.1rem; }

.call-meta {
    display: flex;
    gap: 1.5rem;
    padding-top: 1rem;
    border-top: 1px solid #E5E7EB;
    width: 100%;
}

.call-meta-item {
    display: flex;
    flex-direction: column;
    gap: .2rem;
}

.meta-label {
    font-size: .75rem;
    color: #9CA3AF;
    text-transform: uppercase;
    letter-spacing: .4px;
}

.meta-value {
    font-size: .875rem;
    font-weight: 500;
    color: #374151;
}

/* ── Droite : notes & historique ────────────────────── */

.op-col-notes { overflow-y: auto; }

.btn-save-note {
    font-size: .775rem;
    font-weight: 600;
    padding: .3rem .75rem;
    background: #2563EB;
    color: #ffffff;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: background .15s;
}

.btn-save-note:hover { background: #1D4ED8; }

.notes-area {
    margin: .75rem 1rem;
    padding: .75rem;
    width: calc(100% - 2rem);
    height: 120px;
    border: 1px solid #E5E7EB;
    border-radius: 6px;
    font-size: .875rem;
    font-family: inherit;
    color: #374151;
    resize: none;
    outline: none;
    transition: border-color .15s;
}

.notes-area:focus { border-color: #2563EB; }

.history-section {
    padding: 0 1rem 1rem;
    flex: 1;
}

.history-section h3 {
    font-size: .775rem;
    font-weight: 600;
    color: #9CA3AF;
    text-transform: uppercase;
    letter-spacing: .5px;
    margin-bottom: .75rem;
}

.history-list { list-style: none; display: flex; flex-direction: column; gap: .75rem; }

.history-item {
    padding: .75rem;
    background: #F9FAFB;
    border: 1px solid #F3F4F6;
    border-radius: 6px;
}

.history-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: .2rem;
}

.history-name  { font-size: .875rem; font-weight: 600; color: #111827; }
.history-duration { font-size: .775rem; font-weight: 600; color: #16A34A; }
.history-date  { font-size: .775rem; color: #9CA3AF; }

.history-note {
    font-size: .825rem;
    color: #6B7280;
    margin-top: .375rem;
    line-height: 1.4;
}

/* ── Page shell (contacts, logs…) ───────────────────── */

.page-shell {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    min-height: 0;
    padding: 1.25rem 1.5rem;
    gap: 1rem;
}

/* Fiches / formulaires longs (contact, agent, campagne…) — défilement vertical */
.page-shell--scroll {
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.page-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-shrink: 0;
}

.toolbar-left { display: flex; align-items: center; gap: .75rem; }
.toolbar-right { display: flex; align-items: center; gap: .625rem; }

.page-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: #111827;
}

/* ── Signature légale (page importante) ─────────────────── */

/* Page signature légale : contenu long, défilement dans page-shell--scroll */
.operator-shell--legal-signature .page-shell--scroll {
    padding-bottom: 2rem;
}

.legal-signature {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    min-height: 0;
}

.legal-signature-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    min-height: 0;
}

.legal-signature-intro {
    background: #ffffff;
    border: 1px solid #E5E7EB;
    border-radius: 12px;
    padding: 1.25rem;
}

.legal-signature-intro-head {
    display: grid;
    grid-template-columns: 1.25fr .75fr;
    gap: 1rem;
    align-items: start;
}

.legal-signature-kicker {
    font-size: .75rem;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: #6B7280;
    margin-bottom: .5rem;
}

.legal-signature-lead {
    font-size: 1rem;
    font-weight: 650;
    color: #111827;
    line-height: 1.45;
    margin-bottom: .5rem;
}

.legal-signature-note {
    color: #6B7280;
    font-size: .9rem;
}

.legal-doc-list {
    display: grid;
    gap: 1rem;
}

.legal-doc-card {
    background: #ffffff;
    border: 1px solid #E5E7EB;
    border-radius: 12px;
    padding: 1.1rem;
}

.legal-doc-card-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: .75rem;
    margin-bottom: .75rem;
}

.legal-doc-card-title {
    font-weight: 900;
    letter-spacing: -.2px;
    color: #111827;
}

.legal-doc-card-version {
    display: inline-flex;
    align-items: center;
    margin-left: .4rem;
    padding: .15rem .45rem;
    border-radius: 999px;
    background: #F3F4F6;
    border: 1px solid #E5E7EB;
    color: #6B7280;
    font-size: .75rem;
    font-weight: 800;
}

.legal-doc-details summary {
    cursor: pointer;
    font-weight: 700;
    color: #1E3A8A;
    user-select: none;
}

.legal-doc-content--client {
    margin-top: .75rem;
    border: 1px solid #E5E7EB;
    border-radius: 10px;
    background: #F9FAFB;
    padding: 1rem;
    max-height: min(50vh, 420px);
    overflow-y: auto;
    overflow-x: hidden;
    line-height: 1.55;
    font-size: .9rem;
}

.legal-doc-content--client h1,
.legal-doc-content--client h2,
.legal-doc-content--client h3 {
    font-size: 1rem;
    margin: 1rem 0 .5rem;
}

.legal-doc-content--client p,
.legal-doc-content--client li {
    margin-bottom: .5rem;
}

.legal-accept {
    display: grid;
    grid-template-columns: 20px 1fr;
    gap: .75rem;
    align-items: start;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #F3F4F6;
}

.legal-accept input[type="checkbox"] {
    width: 18px;
    height: 18px;
    margin-top: .2rem;
}

.legal-accept label {
    font-weight: 700;
    color: #111827;
}

.legal-signature-actions {
    flex-shrink: 0;
    margin-top: .5rem;
    padding: 1rem 1.25rem;
    background: #ffffff;
    border: 1px solid #E5E7EB;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgb(15 23 42 / 6%);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
}

.legal-signature-actions::before {
    content: 'En signant, vous acceptez l’ensemble des documents cochés ci-dessus pour votre organisation.';
    flex: 1;
    min-width: 12rem;
    font-size: .85rem;
    color: #6B7280;
    line-height: 1.4;
}

.legal-signature-actions .btn-primary {
    flex-shrink: 0;
}

@media (max-width: 860px) {
    .legal-signature-intro-head {
        grid-template-columns: 1fr;
    }
}

.results-count {
    font-size: .8rem;
    color: #9CA3AF;
    background: #F3F4F6;
    padding: .2rem .6rem;
    border-radius: 20px;
}

.btn-primary {
    padding: .5rem 1rem;
    background: #2563EB;
    color: #ffffff;
    font-size: .875rem;
    font-weight: 600;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    text-decoration: none;
    transition: background .15s;
}
.btn-primary:hover { background: #1D4ED8; }

.btn-outline {
    padding: .5rem 1rem;
    background: #ffffff;
    color: #374151;
    font-size: .875rem;
    font-weight: 500;
    border: 1px solid #D1D5DB;
    border-radius: 6px;
    cursor: pointer;
    transition: border-color .15s, background .15s;
}
.btn-outline:hover { border-color: #9CA3AF; background: #F9FAFB; }

/* Filtres */
.filters-bar {
    display: flex;
    align-items: center;
    gap: .625rem;
    flex-wrap: wrap;
    flex-shrink: 0;
}

.filter-search {
    padding: .5rem .875rem;
    border: 1px solid #E5E7EB;
    border-radius: 6px;
    font-size: .875rem;
    color: #111827;
    background: #ffffff;
    width: 240px;
    outline: none;
    transition: border-color .15s;
}
.filter-search:focus { border-color: #2563EB; }

.filter-select {
    padding: .45rem .75rem;
    border: 1px solid #E5E7EB;
    border-radius: 6px;
    font-size: .875rem;
    color: #374151;
    background: #ffffff;
    cursor: pointer;
    outline: none;
    transition: border-color .15s;
}
.filter-select:focus { border-color: #2563EB; }

.filter-reset {
    font-size: .8rem;
    color: #EF4444;
    text-decoration: none;
    padding: .3rem .5rem;
    border-radius: 4px;
    transition: background .15s;
}
.filter-reset:hover { background: #FEF2F2; }

/* Tableau */
.table-wrapper {
    flex: 1;
    overflow-y: auto;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    background: #ffffff;
}

.table-empty {
    padding: 3rem;
    text-align: center;
    color: #9CA3AF;
    font-size: .9rem;
}

.contacts-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .875rem;
}

.contacts-table thead {
    position: sticky;
    top: 0;
    background: #F9FAFB;
    z-index: 1;
}

.contacts-table th {
    padding: .75rem 1rem;
    text-align: left;
    font-size: .775rem;
    font-weight: 600;
    color: #6B7280;
    text-transform: uppercase;
    letter-spacing: .4px;
    border-bottom: 1px solid #E5E7EB;
    white-space: nowrap;
}

.contacts-table td {
    padding: .75rem 1rem;
    border-bottom: 1px solid #F3F4F6;
    color: #374151;
    vertical-align: middle;
}

.contact-row { cursor: pointer; transition: background .1s; }
.contact-row:hover { background: #F9FAFB; }
.contact-row:last-child td { border-bottom: none; }

.col-check { width: 40px; }
.col-actions { width: 86px; text-align: center; }

.row-actions {
    display: inline-flex;
    gap: .45rem;
    align-items: center;
    justify-content: center;
}

.sort-link {
    color: inherit;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: .25rem;
}
.sort-link:hover { color: #2563EB; }
.sort-arrow { color: #2563EB; }

/* Cellule nom */
.contact-name-cell {
    display: flex;
    align-items: center;
    gap: .625rem;
}

.row-avatar {
    width: 30px;
    height: 30px;
    background: #DBEAFE;
    color: #1E3A8A;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: .7rem;
    font-weight: 700;
    flex-shrink: 0;
}

.row-name { font-weight: 500; color: #111827; display: block; }
.row-company { font-size: .775rem; color: #9CA3AF; display: block; }
.row-phone { font-variant-numeric: tabular-nums; white-space: nowrap; }
.row-email a { color: #2563EB; text-decoration: none; }
.row-email a:hover { text-decoration: underline; }
.row-empty { color: #D1D5DB; }
.row-date { color: #9CA3AF; white-space: nowrap; font-size: .8rem; }

/* Badges statut */
.status-badge {
    display: inline-block;
    padding: .2rem .625rem;
    border-radius: 20px;
    font-size: .75rem;
    font-weight: 600;
    white-space: nowrap;
}

.status-a_appeler     { background: #DBEAFE; color: #1E40AF; }
.status-rappel        { background: #FEF9C3; color: #854D0E; }
.status-interesse     { background: #DCFCE7; color: #166534; }
.status-pas_interesse { background: #F3F4F6; color: #6B7280; }
.status-client        { background: #D1FAE5; color: #065F46; }
.status-ko            { background: #FEE2E2; color: #991B1B; }

/* Source */
.source-label { font-size: .8rem; color: #6B7280; }
.source-campaign {
    display: block;
    font-size: .75rem;
    color: #9CA3AF;
    max-width: 120px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* Tags */
.tags-cell { display: flex; flex-wrap: wrap; gap: .25rem; }
.tag-chip {
    font-size: .7rem;
    font-weight: 500;
    padding: .15rem .5rem;
    background: #EFF6FF;
    color: #2563EB;
    border-radius: 20px;
}

/* Bouton appeler ligne */
.btn-call-row {
    width: 32px;
    height: 32px;
    border: none;
    background: #DCFCE7;
    border-radius: 6px;
    cursor: pointer;
    font-size: .9rem;
    transition: background .15s;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto;
}
.btn-call-row:hover { background: #BBF7D0; }

.btn-view-row {
    width: 32px;
    height: 32px;
    border: 1px solid #BFDBFE;
    background: #EFF6FF;
    border-radius: 6px;
    cursor: pointer;
    font-size: .9rem;
    transition: background .15s, border-color .15s, transform .1s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #1E40AF;
    text-decoration: none;
}

.btn-view-row:hover {
    background: #DBEAFE;
    border-color: #93C5FD;
    transform: translateY(-1px);
}

/* Barre sélection multiple */
.bulk-bar {
    position: fixed;
    bottom: 1.5rem;
    left: 50%;
    transform: translateX(-50%);
    background: #1E3A8A;
    color: #ffffff;
    padding: .75rem 1.25rem;
    border-radius: 8px;
    display: flex;
    align-items: center;
    gap: 1rem;
    box-shadow: 0 4px 20px rgba(0,0,0,.2);
    z-index: 50;
}

.bulk-count { font-size: .875rem; font-weight: 500; }

.btn-bulk {
    padding: .4rem .875rem;
    background: rgba(255,255,255,.15);
    color: #ffffff;
    border: 1px solid rgba(255,255,255,.3);
    border-radius: 5px;
    font-size: .8rem;
    font-weight: 500;
    cursor: pointer;
    transition: background .15s;
}
.btn-bulk:hover { background: rgba(255,255,255,.25); }

.btn-bulk-danger {
    padding: .4rem .875rem;
    background: #DC2626;
    color: #ffffff;
    border: none;
    border-radius: 5px;
    font-size: .8rem;
    font-weight: 500;
    cursor: pointer;
    transition: background .15s;
}
.btn-bulk-danger:hover { background: #B91C1C; }

/* ── Login split layout ──────────────────────────────── */

.login-page {
    min-height: 100vh;
    background: #F1F5F9;
}

.login-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 100vh;
}

/* Panneau gauche — branding */
.login-brand {
    background: #1E3A8A;
    color: #ffffff;
    display: flex;
    flex-direction: column;
    padding: 2.5rem 3rem;
}

.login-brand-logo {
    font-size: 1.4rem;
    font-weight: 800;
    color: #ffffff;
    text-decoration: none;
    letter-spacing: -.5px;
}

.login-brand-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 1.5rem;
}

.login-brand-content h2 {
    font-size: 1.75rem;
    font-weight: 700;
    line-height: 1.3;
    color: #ffffff;
}

.login-brand-content p {
    font-size: 1rem;
    color: #BFDBFE;
    line-height: 1.7;
    max-width: 360px;
}

.login-features {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: .875rem;
    margin-top: .5rem;
}

.login-features li {
    display: flex;
    align-items: center;
    gap: .75rem;
    font-size: .95rem;
    color: #DBEAFE;
}

.feature-icon {
    width: 22px;
    height: 22px;
    background: #16A34A;
    color: #ffffff;
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: .75rem;
    font-weight: 700;
    flex-shrink: 0;
}

.login-brand-footer {
    font-size: .8rem;
    color: #93C5FD;
}

/* Panneau droit — formulaire */
.login-form-panel {
    background: #ffffff;
    display: flex;
    flex-direction: column;
    padding: 2.5rem;
}

.login-form-header {
    display: flex;
    justify-content: flex-end;
    margin-bottom: auto;
}

.btn-back-site {
    font-size: .875rem;
    font-weight: 500;
    color: #6B7280;
    text-decoration: none;
    transition: color .15s;
}

.btn-back-site:hover {
    color: #2563EB;
}

.login-form-panel > .login-form-inner {
    margin: auto;
    width: 100%;
    max-width: 400px;
}

.login-form-inner {
    width: 100%;
    max-width: 400px;
    padding-bottom: 2.5rem;
}

.login-form-inner h1 {
    font-size: 1.6rem;
    font-weight: 700;
    color: #111827;
    margin-bottom: .375rem;
}

.login-subtitle {
    font-size: .9rem;
    color: #6B7280;
    margin-bottom: 2rem;
}

.login-error {
    background: #FEF2F2;
    color: #DC2626;
    border: 1px solid #FECACA;
    border-radius: 6px;
    padding: .75rem 1rem;
    font-size: .875rem;
    margin-bottom: 1.25rem;
    display: flex;
    gap: .5rem;
    align-items: flex-start;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: .375rem;
    margin-bottom: 1.125rem;
}

.form-group-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.form-group label {
    font-size: .875rem;
    font-weight: 500;
    color: #374151;
}

.form-group input {
    padding: .65rem .875rem;
    border: 1px solid #D1D5DB;
    border-radius: 6px;
    font-size: .95rem;
    color: #111827;
    transition: border-color .15s, box-shadow .15s;
}

.form-group input::placeholder {
    color: #9CA3AF;
}

.form-group input:focus {
    outline: none;
    border-color: #2563EB;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .12);
}

.form-link {
    font-size: .8rem;
    color: #2563EB;
    text-decoration: none;
}

.form-link:hover {
    text-decoration: underline;
}

.btn-login {
    width: 100%;
    margin-top: .5rem;
    padding: .75rem;
    background: #2563EB;
    color: #ffffff;
    font-size: .95rem;
    font-weight: 600;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: .5rem;
    transition: background .15s;
}

.btn-login:hover {
    background: #1D4ED8;
}

.btn-arrow {
    font-size: 1.1rem;
}

.login-hint {
    margin-top: 1.5rem;
    text-align: center;
    font-size: .875rem;
    color: #6B7280;
}

/* Responsive */
@media (max-width: 768px) {
    .login-split {
        grid-template-columns: 1fr;
    }

    .login-brand {
        display: none;
    }
}

/* ── États d'appel — variante erreur ───────────────────── */

.call-state-error {
    color: #991B1B;
    background: #FEE2E2;
}

/* ── Listes vides (placeholders) ───────────────────────── */

.contact-empty,
.history-empty {
    padding: 1rem;
    color: #9CA3AF;
    font-size: .875rem;
    font-style: italic;
    text-align: center;
    list-style: none;
}

/* ── Wrap-up post-appel ─────────────────────────────────── */

.wrap-up-status {
    display: flex;
    flex-direction: column;
    gap: .35rem;
    margin: .75rem 0;
}

.wrap-up-label {
    font-size: .8125rem;
    font-weight: 600;
    color: #6B7280;
    text-transform: uppercase;
    letter-spacing: .03em;
}

.wrap-up-feedback {
    margin-top: .5rem;
    padding: .5rem .75rem;
    border-radius: 6px;
    font-size: .875rem;
    background: #DCFCE7;
    color: #166534;
    border: 1px solid #BBF7D0;
}

.wrap-up-feedback-error {
    background: #FEE2E2;
    color: #991B1B;
    border-color: #FECACA;
}

/* ── Programmer un rappel (Sprint 2 / Chunk 4) ─────────── */

.wrap-up-callback {
    margin: .5rem 0 .25rem;
}

.wrap-up-callback-toggle {
    width: 100%;
    display: flex;
    align-items: center;
    gap: .4rem;
    padding: .45rem .6rem;
    font-size: .8rem;
    font-weight: 500;
    color: #1E3A8A;
    background: #EFF6FF;
    border: 1px dashed #BFDBFE;
    border-radius: 6px;
    cursor: pointer;
    transition: background .15s, border-color .15s;
}

.wrap-up-callback-toggle:hover {
    background: #DBEAFE;
    border-color: #93C5FD;
}

.callback-toggle-icon {
    font-size: 1rem;
    font-weight: 700;
    line-height: 1;
    transition: transform .15s;
}

.wrap-up-callback-toggle[aria-expanded="true"] .callback-toggle-icon {
    transform: rotate(45deg);
}

.wrap-up-callback-form {
    display: flex;
    flex-direction: column;
    gap: .4rem;
    margin-top: .5rem;
    padding: .6rem;
    background: #F9FAFB;
    border-radius: 6px;
}

.callback-datetime,
.callback-note {
    font-size: .85rem;
    padding: .4rem .55rem;
    border: 1px solid #D1D5DB;
    border-radius: 6px;
    background: #ffffff;
    color: #111827;
    font-family: inherit;
}

.callback-datetime:focus,
.callback-note:focus {
    outline: none;
    border-color: #2563EB;
}

.callback-note {
    min-height: 60px;
    resize: vertical;
}

/* ── Toast notification rappel (Sprint 2 / Chunk 4) ────── */

.callback-toast {
    position: fixed;
    bottom: 1.5rem;
    right: 1.5rem;
    display: flex;
    align-items: center;
    gap: .75rem;
    padding: .75rem 1rem;
    min-width: 260px;
    max-width: 360px;
    background: #ffffff;
    border: 1px solid #BFDBFE;
    border-left: 4px solid #1E3A8A;
    border-radius: 8px;
    box-shadow: 0 10px 25px -5px rgba(0,0,0,.15), 0 4px 6px -2px rgba(0,0,0,.05);
    cursor: pointer;
    z-index: 1000;
    transition: transform .15s, box-shadow .15s;
}

.callback-toast:hover {
    transform: translateY(-2px);
    box-shadow: 0 14px 28px -5px rgba(0,0,0,.2), 0 6px 8px -2px rgba(0,0,0,.07);
}

.callback-toast-overdue {
    border-color: #FECACA;
    border-left-color: #DC2626;
}

.callback-toast[hidden] {
    display: none;
}

.callback-toast-icon {
    font-size: 1.5rem;
    line-height: 1;
}

.callback-toast-content {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    min-width: 0;
}

.callback-toast-title {
    font-size: .8rem;
    font-weight: 700;
    color: #1E3A8A;
    text-transform: uppercase;
    letter-spacing: .03em;
}

.callback-toast-overdue .callback-toast-title {
    color: #DC2626;
}

.callback-toast-body {
    font-size: .875rem;
    color: #111827;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.callback-toast-close {
    background: none;
    border: none;
    font-size: 1.25rem;
    line-height: 1;
    color: #9CA3AF;
    cursor: pointer;
    padding: 0 .25rem;
    transition: color .15s;
}

.callback-toast-close:hover {
    color: #374151;
}

/* ── Page d'accueil agent (Sprint 2 / Chunk 4) ─────────── */

.dashboard-agent {
    max-width: 1100px;
    margin: 0 auto;
    padding: 2rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.dashboard-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.dashboard-title {
    font-size: 1.6rem;
    font-weight: 700;
    color: #111827;
    margin: 0;
}

.dashboard-subtitle {
    margin: .25rem 0 0;
    color: #6B7280;
    font-size: .9rem;
}

.btn-start-day {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    padding: .75rem 1.5rem;
    font-size: .95rem;
    font-weight: 600;
    color: #ffffff;
    background: #16A34A;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background .15s, transform .1s;
    box-shadow: 0 1px 3px rgba(0,0,0,.1);
}

.btn-start-day:hover:not(:disabled) {
    background: #15803D;
    transform: translateY(-1px);
}

.btn-start-day:disabled {
    opacity: .5;
    cursor: not-allowed;
}

.day-start-block {
    padding: 1.5rem;
    background: linear-gradient(135deg, #EFF6FF 0%, #ffffff 100%);
    border: 1px solid #BFDBFE;
    border-radius: 12px;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.day-start-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #1E3A8A;
    margin: 0;
}

.day-start-counts {
    display: flex;
    gap: 2rem;
    flex-wrap: wrap;
}

.day-start-count {
    display: flex;
    align-items: baseline;
    gap: .5rem;
}

.day-start-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1E3A8A;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.day-start-count-warn .day-start-value {
    color: #DC2626;
}

.day-start-label {
    font-size: .85rem;
    color: #6B7280;
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
}

.stat-card {
    display: flex;
    flex-direction: column;
    gap: .35rem;
    padding: 1.25rem;
    background: #ffffff;
    border: 1px solid #E5E7EB;
    border-radius: 10px;
    border-left: 4px solid #9CA3AF;
}

.stat-card-warn { border-left-color: #DC2626; }
.stat-card-info { border-left-color: #1E3A8A; }
.stat-card-ok   { border-left-color: #16A34A; }

.stat-label {
    font-size: .75rem;
    font-weight: 600;
    color: #6B7280;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: #111827;
    line-height: 1;
}

.stat-card-warn .stat-value { color: #DC2626; }
.stat-card-info .stat-value { color: #1E3A8A; }
.stat-card-ok   .stat-value { color: #16A34A; }

.stat-hint {
    font-size: .75rem;
    color: #9CA3AF;
}

.dashboard-section {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.dashboard-section-title {
    font-size: 1rem;
    font-weight: 600;
    color: #374151;
    margin: 0;
}

.dashboard-empty {
    padding: 1.5rem;
    text-align: center;
    color: #9CA3AF;
    font-size: .9rem;
    background: #F9FAFB;
    border: 1px dashed #E5E7EB;
    border-radius: 8px;
    margin: 0;
}

.upcoming-callbacks-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: .5rem;
}

.upcoming-callback {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: .75rem 1rem;
    background: #ffffff;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
}

.upcoming-callback-overdue {
    background: #FEF2F2;
    border-color: #FECACA;
}

.upcoming-callback-time {
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 70px;
    gap: 2px;
    flex-shrink: 0;
}

.upcoming-flag {
    font-size: .65rem;
    font-weight: 700;
    color: #DC2626;
    text-transform: uppercase;
    letter-spacing: .03em;
}

.upcoming-time-value {
    font-size: 1.05rem;
    font-weight: 700;
    color: #111827;
    font-variant-numeric: tabular-nums;
}

.upcoming-date-value {
    font-size: .7rem;
    color: #9CA3AF;
    text-transform: uppercase;
}

.upcoming-callback-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    flex: 1;
    min-width: 0;
}

.upcoming-name {
    font-size: .9rem;
    font-weight: 600;
    color: #111827;
}

.upcoming-phone {
    font-size: .8rem;
    color: #6B7280;
    font-variant-numeric: tabular-nums;
}

.upcoming-note {
    font-size: .8rem;
    color: #6B7280;
    font-style: italic;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ── Mandants / Accounts (Sprint 3 / Chunk 3.1) ────────── */

.op-nav-link-direction {
    color: #B45309;
}

.op-nav-link-direction.op-nav-active,
.op-nav-link-direction:hover {
    color: #92400E;
    background: #FEF3C7;
}

.account-status {
    display: inline-block;
    font-size: .7rem;
    font-weight: 600;
    padding: .15rem .55rem;
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.account-status-active    { background: #DCFCE7; color: #166534; }
.account-status-suspended { background: #FEF9C3; color: #854D0E; }
.account-status-archived  { background: #F3F4F6; color: #6B7280; }

.account-form .form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem 1.5rem;
    margin-bottom: 1.5rem;
}

.account-form .form-row-full {
    grid-column: 1 / -1;
}

.account-form .form-actions {
    display: flex;
    justify-content: flex-end;
    gap: .75rem;
    padding-top: 1rem;
    border-top: 1px solid #E5E7EB;
}

.account-detail-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
    margin-top: 1rem;
}

.account-detail-section {
    padding: 1.25rem;
    background: #ffffff;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
}

.account-detail-section-full {
    grid-column: 1 / -1;
}

.account-detail-section h2 {
    font-size: .85rem;
    font-weight: 600;
    color: #6B7280;
    text-transform: uppercase;
    letter-spacing: .04em;
    margin: 0 0 .75rem;
}

.account-detail-list {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: .35rem .75rem;
    margin: 0;
}

.account-detail-list dt {
    font-size: .8rem;
    color: #6B7280;
    font-weight: 500;
}

.account-detail-list dd {
    font-size: .875rem;
    color: #111827;
    margin: 0;
}

.account-notes {
    font-size: .875rem;
    color: #374151;
    line-height: 1.55;
    margin: 0;
}

.account-danger-zone {
    border-color: #FECACA;
    background: #FEF2F2;
}

.account-danger-zone h2 {
    color: #991B1B;
}

.account-danger-zone p {
    font-size: .85rem;
    color: #6B7280;
    margin: 0 0 .75rem;
}

.btn-danger {
    padding: .55rem 1rem;
    font-size: .875rem;
    font-weight: 600;
    color: #ffffff;
    background: #DC2626;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: background .15s;
}

.btn-danger:hover { background: #B91C1C; }

.btn-sm {
    padding: .25rem .55rem;
    font-size: .75rem;
}

.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; }

.td-actions {
    text-align: right;
    white-space: nowrap;
}

/* ── Numéros entrants (Sprint 3 / Chunk 3.2) ───────────── */

.account-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: .75rem;
}

.account-section-header h2 {
    font-size: .85rem;
    font-weight: 600;
    color: #6B7280;
    text-transform: uppercase;
    letter-spacing: .04em;
    margin: 0;
}

.account-empty-hint {
    margin: 0;
    padding: .75rem 1rem;
    color: #9CA3AF;
    font-size: .85rem;
    background: #F9FAFB;
    border: 1px dashed #E5E7EB;
    border-radius: 6px;
    text-align: center;
}

.inbound-list {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: .5rem;
}

.inbound-item {
    display: grid;
    grid-template-columns: 1fr auto auto;
    gap: 1rem;
    align-items: center;
    padding: .65rem .85rem;
    background: #F9FAFB;
    border: 1px solid #E5E7EB;
    border-radius: 6px;
}

.inbound-item-inactive {
    opacity: .6;
    background: #F3F4F6;
}

.inbound-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.inbound-label {
    font-size: .875rem;
    font-weight: 600;
    color: #111827;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.inbound-item-inactive .inbound-label {
    font-style: italic;
}

.inbound-number {
    font-size: .8rem;
    color: #6B7280;
}

.inbound-status {
    display: inline-block;
    font-size: .65rem;
    font-weight: 600;
    padding: .15rem .5rem;
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.inbound-status-active   { background: #DCFCE7; color: #166534; }
.inbound-status-inactive { background: #F3F4F6; color: #6B7280; }

/* ── Campagnes (Sprint 3 / Chunk 3.3) ──────────────────── */

.campaign-status {
    display: inline-block;
    font-size: .7rem;
    font-weight: 600;
    padding: .15rem .55rem;
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.campaign-status-active   { background: #DCFCE7; color: #166534; }
.campaign-status-paused   { background: #FEF9C3; color: #854D0E; }
.campaign-status-finished { background: #DBEAFE; color: #1E3A8A; }
.campaign-status-archived { background: #F3F4F6; color: #6B7280; }

/* ── Assignments campagne ↔ agents (Sprint 3 / Chunk 3.4) ── */

.assignments-form {
    margin-top: .5rem;
}

.assignments-table th:nth-child(4),
.assignments-table th:nth-child(5),
.assignments-table td:nth-child(4),
.assignments-table td:nth-child(5) {
    width: 1%;
    white-space: nowrap;
}

.td-center { text-align: center; }

.capability-badge {
    display: inline-block;
    font-size: .65rem;
    font-weight: 600;
    padding: .15rem .55rem;
    border-radius: 4px;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.capability-ok   { background: #DCFCE7; color: #166534; }
.capability-warn { background: #FEF3C7; color: #92400E; }

.assignments-table input[type="checkbox"] {
    accent-color: #1E3A8A;
    transform: scale(1.15);
    cursor: pointer;
}

.assignments-table select:disabled {
    opacity: .5;
    cursor: not-allowed;
}

/* Badge cadenas pour Focus verrouillé dans le bandeau dialer */
.topbar-locked-badge {
    margin-left: .25rem;
    font-size: .9em;
    color: #DC2626;
    cursor: help;
}

/* ── Dashboard Direction (V1, Sprint 5.5 anticipé) ─────── */

.direction-account-filter {
    display: flex;
    flex-direction: column;
    gap: 4px;
    min-width: 240px;
}

.presence-badge {
    display: inline-block;
    font-size: .65rem;
    font-weight: 600;
    padding: .15rem .55rem;
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.presence-available { background: #DCFCE7; color: #166534; }
.presence-pause     { background: #FEF9C3; color: #854D0E; }
.presence-wrap_up   { background: #FEF3C7; color: #92400E; }
.presence-offline   { background: #F3F4F6; color: #6B7280; }

.progress-cell {
    display: flex;
    align-items: center;
    gap: .5rem;
    min-width: 120px;
}

.progress-bar {
    flex: 1;
    height: 6px;
    background: #E5E7EB;
    border-radius: 999px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: #1E3A8A;
    transition: width .3s ease;
}

/* ── Conformité V1 (Sprint 6 anticipé) ─────────────────── */

.opted-out-badge {
    display: inline-flex;
    align-items: center;
    gap: .25rem;
    margin-left: .35rem;
    padding: .15rem .55rem;
    font-size: .7rem;
    font-weight: 700;
    color: #991B1B;
    background: #FEE2E2;
    border: 1px solid #FECACA;
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.opted-out-pill {
    display: inline-block;
    margin-left: .25rem;
    font-size: .85em;
    color: #DC2626;
    cursor: help;
}

/* Badges type d'audience B2B / B2C / Inconnu — Sprint conformité MVP. */
.audience-badge {
    display: inline-flex;
    align-items: center;
    padding: .15rem .55rem;
    margin-left: .35rem;
    font-size: .7rem;
    font-weight: 700;
    border-radius: 999px;
    text-transform: uppercase;
    letter-spacing: .04em;
    border: 1px solid transparent;
}
.audience-b2b      { color: #1E40AF; background: #DBEAFE; border-color: #BFDBFE; }
.audience-b2c      { color: #9A3412; background: #FED7AA; border-color: #FDBA74; }
.audience-unknown  { color: #6B7280; background: #F3F4F6; border-color: #E5E7EB; }

.audience-edit-form {
    margin-top: .75rem;
    padding: .75rem;
    background: #F9FAFB;
    border: 1px dashed #D1D5DB;
    border-radius: 6px;
    display: grid;
    gap: .5rem;
}
.audience-edit-form label {
    display: flex;
    flex-direction: column;
    gap: .25rem;
    font-size: .8rem;
    color: #374151;
}
.audience-edit-form select,
.audience-edit-form textarea {
    font-size: .9rem;
    padding: .35rem .5rem;
    border: 1px solid #D1D5DB;
    border-radius: 4px;
}
.audience-edit-form button {
    justify-self: start;
}

.compliance-note {
    margin: .75rem 0 0;
    padding: .75rem 1rem;
    font-size: .85rem;
    color: #6B7280;
    background: #F9FAFB;
    border-left: 3px solid #BFDBFE;
    border-radius: 4px;
}

.compliance-list {
    margin: .5rem 0;
    padding-left: 1.5rem;
}

.compliance-list li {
    font-size: .9rem;
    color: #374151;
    margin-bottom: .5rem;
    line-height: 1.5;
}

.compliance-list code {
    background: #F3F4F6;
    padding: .1rem .35rem;
    border-radius: 3px;
    font-size: .85em;
    color: #1E3A8A;
}

/* ── Import contacts (V1) ───────────────────────────────── */

.import-dropzone {
    margin-top: .75rem;
    border: 2px dashed #BFDBFE;
    border-radius: 10px;
    background: #F9FAFB;
    transition: background .15s, border-color .15s;
}

.import-dropzone:hover {
    background: #EFF6FF;
    border-color: #93C5FD;
}

.import-dropzone-input {
    display: none;
}

.import-dropzone-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: .35rem;
    padding: 2.5rem 1.5rem;
    cursor: pointer;
    text-align: center;
}

.import-dropzone-icon {
    font-size: 2.5rem;
    color: #1E3A8A;
    line-height: 1;
}

.import-dropzone-title {
    font-size: 1rem;
    font-weight: 600;
    color: #1E3A8A;
}

.import-dropzone-hint {
    font-size: .8rem;
    color: #6B7280;
}

.import-dropzone-filename {
    margin-top: .5rem;
    font-size: .85rem;
    font-weight: 600;
    color: #16A34A;
}

.import-mapping-table th,
.import-mapping-table td {
    padding: .5rem .75rem;
    font-size: .85rem;
}

.import-mapping-table .filter-select {
    min-width: 220px;
}

.import-preview-table th,
.import-preview-table td {
    padding: .35rem .65rem;
    font-size: .8rem;
}

.inbound-actions {
    display: flex;
    gap: .35rem;
    align-items: center;
}

/* ── Direction d'appel (logs + historique dialer) ──────── */

.history-direction,
.direction-out,
.direction-in {
    display: inline-block;
    font-size: .8125rem;
    font-weight: 600;
    padding: .15rem .5rem;
    border-radius: 4px;
}

.direction-out {
    color: #1E3A8A;
    background: #DBEAFE;
}

.direction-in {
    color: #166534;
    background: #DCFCE7;
}

/* ── Logs : lien nom contact + colonne agent ───────────── */

.row-name-link {
    color: #2563EB;
    text-decoration: none;
    font-weight: 500;
}

.row-name-link:hover {
    text-decoration: underline;
}

.row-agent {
    color: #6B7280;
    font-size: .875rem;
}

/* ── Badges statut Call (page logs) ─────────────────────── */

.status-badge {
    display: inline-block;
    padding: .15rem .5rem;
    border-radius: 4px;
    font-size: .8125rem;
    font-weight: 600;
}

.status-initiated  { background: #F3F4F6; color: #6B7280; }
.status-queued     { background: #DBEAFE; color: #1E3A8A; }
.status-ringing    { background: #FEF9C3; color: #854D0E; }
.status-answered   { background: #D1FAE5; color: #065F46; }
.status-completed  { background: #DCFCE7; color: #166534; }
.status-failed     { background: #FEE2E2; color: #991B1B; }
.status-busy       { background: #FED7AA; color: #9A3412; }
.status-no_answer  { background: #FEE2E2; color: #991B1B; }
.status-rejected   { background: #FECACA; color: #7F1D1D; }
.status-cancelled  { background: #F3F4F6; color: #6B7280; }

/* ── Page WebRTC test ───────────────────────────────────── */

.webrtc-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: .75rem;
    margin: 1rem 0;
}

.webrtc-debug-toggle {
    display: inline-flex;
    align-items: center;
    gap: .5rem;
    margin-left: auto;
    font-size: .875rem;
    color: #6B7280;
    cursor: pointer;
}

.webrtc-logs {
    margin-top: 1.5rem;
}

.webrtc-logs h2 {
    font-size: 1rem;
    font-weight: 600;
    color: #111827;
    margin-bottom: .5rem;
}

.webrtc-logs-output {
    max-height: 320px;
    overflow-y: auto;
    padding: .75rem 1rem;
    background: #0F172A;
    color: #E2E8F0;
    border-radius: 6px;
    font-family: 'SF Mono', Menlo, Consolas, monospace;
    font-size: .75rem;
    line-height: 1.5;
    white-space: pre-wrap;
    word-break: break-word;
}

/* ── Fiche détail contact ───────────────────────────────── */

.contact-detail-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1.5rem;
    background: #FFFFFF;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.25rem;
}

.contact-detail-identity {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.contact-detail-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: #DBEAFE;
    color: #1E3A8A;
    font-weight: 700;
    font-size: 1.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.contact-detail-meta {
    display: flex;
    align-items: center;
    gap: .5rem;
    margin-top: .25rem;
    font-size: .875rem;
    color: #6B7280;
    flex-wrap: wrap;
}

.contact-detail-company {
    font-weight: 500;
    color: #374151;
}

.contact-detail-actions {
    display: flex;
    gap: .5rem;
    align-items: flex-start;
}

.contact-detail-section {
    background: #FFFFFF;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.25rem;
}

.contact-detail-section-title {
    font-size: 1rem;
    font-weight: 600;
    color: #111827;
    margin-bottom: 1rem;
    padding-bottom: .5rem;
    border-bottom: 1px solid #F3F4F6;
}

.contact-detail-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem 1.5rem;
}

.contact-detail-field {
    display: flex;
    flex-direction: column;
    gap: .25rem;
}

.contact-detail-label {
    font-size: .75rem;
    font-weight: 600;
    color: #6B7280;
    text-transform: uppercase;
    letter-spacing: .03em;
}

.contact-detail-value {
    font-size: .9rem;
    color: #111827;
}

.contact-detail-value a {
    color: #2563EB;
    text-decoration: none;
}

.contact-detail-value a:hover {
    text-decoration: underline;
}

.contact-detail-freenotes {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #F3F4F6;
}

.contact-detail-freenotes p {
    margin-top: .35rem;
    font-size: .9rem;
    color: #374151;
    white-space: pre-wrap;
}

.tag-chip {
    display: inline-block;
    padding: .15rem .55rem;
    margin-right: .25rem;
    border-radius: 999px;
    background: #F3F4F6;
    color: #374151;
    font-size: .75rem;
    font-weight: 500;
}

/* ── Notes timeline ────────────────────────────────────── */

.notes-timeline {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.note-entry {
    border-left: 3px solid #DBEAFE;
    padding: .25rem 0 .25rem 1rem;
}

.note-meta {
    display: flex;
    gap: .5rem;
    font-size: .8125rem;
    color: #6B7280;
    margin-bottom: .25rem;
}

.note-date {
    font-weight: 600;
    color: #374151;
}

.note-author {
    font-style: italic;
}

.note-body {
    font-size: .9rem;
    color: #111827;
    white-space: pre-wrap;
    margin: 0;
}

/* ── Lien historique → fiche contact (dialer) ───────────── */

.history-link {
    display: inline-block;
    margin-top: .25rem;
    font-size: .75rem;
    color: #2563EB;
    text-decoration: none;
}

.history-link:hover {
    text-decoration: underline;
}

/* ── Formulaires (création / édition contact) ─────────── */

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 0;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem 1.25rem;
}

.form-field {
    display: flex;
    flex-direction: column;
    gap: .35rem;
}

.form-field label {
    font-size: .8125rem;
    font-weight: 600;
    color: #374151;
}

.form-input,
.form-field input[type=text],
.form-field input[type=tel],
.form-field input[type=email],
.form-field select,
.form-field textarea {
    width: 100%;
    padding: .5rem .75rem;
    font-size: .9rem;
    color: #111827;
    background: #FFFFFF;
    border: 1px solid #E5E7EB;
    border-radius: 6px;
    font-family: inherit;
    transition: border-color .15s, box-shadow .15s;
}

.form-input:focus,
.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
    outline: none;
    border-color: #2563EB;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .15);
}

.form-field .form-help,
.form-field small {
    font-size: .75rem;
    color: #6B7280;
}

.form-field ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.form-field ul li {
    color: #991B1B;
    font-size: .8125rem;
    margin-top: .25rem;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: .75rem;
    margin-top: 1rem;
}

/* ── Flash messages ─────────────────────────────────────── */

.flash-stack {
    position: fixed;
    top: 1rem;
    right: 1rem;
    display: flex;
    flex-direction: column;
    gap: .5rem;
    z-index: 1000;
    max-width: 360px;
}

/* Bannière pré-activation tenant (Sprint Pré-activation Step F).
   Affichée tant que l'admin n'a pas validé le tenant (état 2). */
.pending-validation-banner {
    display: flex;
    align-items: flex-start;
    gap: .75rem;
    padding: .85rem 1.25rem;
    background: #FEF3C7;
    color: #78350F;
    border-bottom: 2px solid #F59E0B;
    font-size: .9rem;
    line-height: 1.4;
}
.pending-validation-icon {
    font-size: 1.4rem;
    line-height: 1;
    flex-shrink: 0;
}
.pending-validation-body {
    display: flex;
    flex-direction: column;
    gap: .15rem;
}
.pending-validation-body strong {
    font-weight: 700;
    color: #92400E;
}

.flash {
    padding: .75rem 1rem;
    border-radius: 6px;
    font-size: .875rem;
    border: 1px solid transparent;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, .1);
    animation: flash-in .25s ease-out;
}

.flash-success {
    background: #DCFCE7;
    color: #166534;
    border-color: #BBF7D0;
}

.flash-error,
.flash-danger {
    background: #FEE2E2;
    color: #991B1B;
    border-color: #FECACA;
}

.flash-warning {
    background: #FEF9C3;
    color: #854D0E;
    border-color: #FEF08A;
}

.flash-info {
    background: #DBEAFE;
    color: #1E3A8A;
    border-color: #BFDBFE;
}

@keyframes flash-in {
    from { transform: translateX(20px); opacity: 0; }
    to   { transform: translateX(0);    opacity: 1; }
}

/* ── Boutons danger ─────────────────────────────────────── */

.btn-danger {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .5rem .9rem;
    border-radius: 6px;
    background: #FEE2E2;
    color: #991B1B;
    font-size: .875rem;
    font-weight: 600;
    border: 1px solid #FECACA;
    cursor: pointer;
    text-decoration: none;
    transition: background .15s, color .15s;
}

.btn-danger:hover {
    background: #FECACA;
    color: #7F1D1D;
}

/* Form inline (ex: bouton supprimer dans une page) */
.inline-form {
    display: inline;
    margin: 0;
}

/* ── Modal "Appel entrant" — flottant non bloquant ─────────────── */

.incoming-call-modal {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 340px;
    background: #FFFFFF;
    border: 1px solid #E5E7EB;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0,0,0,.15), 0 4px 10px rgba(0,0,0,.08);
    z-index: 9999;
    overflow: hidden;
    animation: incoming-slide-in .25s ease-out;
}

@keyframes incoming-slide-in {
    from { transform: translateX(20px); opacity: 0; }
    to   { transform: translateX(0);    opacity: 1; }
}

.incoming-call-header {
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: .6rem .9rem;
    background: #1E40AF;
    color: #FFFFFF;
    font-weight: 600;
    font-size: .9rem;
}

.incoming-call-icon {
    font-size: 1rem;
    animation: incoming-icon-shake .8s ease-in-out infinite;
}

@keyframes incoming-icon-shake {
    0%, 100% { transform: rotate(0deg); }
    25%      { transform: rotate(-8deg); }
    75%      { transform: rotate(8deg); }
}

.incoming-call-body {
    padding: .9rem;
    text-align: center;
}

.incoming-call-name {
    font-size: 1.05rem;
    font-weight: 600;
    color: #111827;
    margin-bottom: .2rem;
    word-break: break-word;
}

.incoming-call-number {
    font-size: .85rem;
    color: #6B7280;
    font-family: ui-monospace, SFMono-Regular, monospace;
}

.incoming-call-warning {
    margin-top: .5rem;
    padding: .35rem .6rem;
    background: #FEE2E2;
    color: #991B1B;
    border-radius: 6px;
    font-size: .8rem;
    font-weight: 500;
}

.incoming-call-countdown {
    margin-top: .6rem;
    font-size: .75rem;
    color: #9CA3AF;
}

.incoming-call-actions {
    display: flex;
    gap: 0;
    border-top: 1px solid #E5E7EB;
}

.incoming-call-btn {
    flex: 1;
    padding: .8rem .5rem;
    border: 0;
    background: transparent;
    font-size: .9rem;
    font-weight: 600;
    cursor: pointer;
    transition: background .15s, color .15s;
}

.incoming-call-btn-accept {
    color: #047857;
    border-right: 1px solid #E5E7EB;
}

.incoming-call-btn-accept:hover {
    background: #D1FAE5;
    color: #065F46;
}

.incoming-call-btn-reject {
    color: #B91C1C;
}

.incoming-call-btn-reject:hover {
    background: #FEE2E2;
    color: #7F1D1D;
}

@media (max-width: 480px) {
    .incoming-call-modal {
        bottom: 12px;
        right: 12px;
        left: 12px;
        width: auto;
    }
}

/* ── Badges mandants ─────────────────────────────────────── */

.accounts-cell {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.account-badge {
    display: inline-block;
    padding: 2px 8px;
    background: #DBEAFE;
    color: #1E40AF;
    border-radius: 10px;
    font-size: 0.75rem;
    font-weight: 500;
    border: 1px solid #BFDBFE;
    white-space: nowrap;
}

.account-badge-mutualized {
    background: #F3F4F6;
    color: #4B5563;
    border-color: #E5E7EB;
}

/* ── Coquille administration (/admin) ─────────────────── */

.admin-shell {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background: #F1F5F9;
}

.admin-header {
    flex-shrink: 0;
    background: #1E293B;
    color: #F8FAFC;
    border-bottom: 1px solid #0F172A;
}

.admin-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0.65rem 1.25rem;
}

.admin-brand {
    font-weight: 700;
    font-size: 0.95rem;
    color: #F8FAFC;
    text-decoration: none;
    letter-spacing: -0.02em;
}

.admin-brand:hover {
    color: #E2E8F0;
}

.admin-header-actions {
    display: flex;
    align-items: center;
    gap: 0.75rem 1rem;
    flex-wrap: wrap;
    justify-content: flex-end;
}

.admin-header-link {
    font-size: 0.8125rem;
    font-weight: 500;
    color: #CBD5E1;
    text-decoration: none;
    padding: 0.35rem 0.5rem;
    border-radius: 6px;
    transition: color 0.15s, background 0.15s;
}

.admin-header-link:hover {
    color: #FFFFFF;
    background: rgba(255, 255, 255, 0.08);
}

.admin-header-link--logout {
    color: #FCA5A5;
}

.admin-header-link--logout:hover {
    color: #FEE2E2;
    background: rgba(248, 113, 113, 0.15);
}

.admin-header-user {
    font-size: 0.75rem;
    color: #94A3B8;
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.admin-body {
    display: flex;
    flex: 1;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    min-height: 0;
}

.admin-sidebar {
    flex-shrink: 0;
    width: 220px;
    background: #FFFFFF;
    border-right: 1px solid #E2E8F0;
    padding: 1rem 0;
}

.admin-sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    padding: 0 0.75rem;
}

.admin-sidebar-link {
    display: block;
    padding: 0.5rem 0.65rem;
    border-radius: 8px;
    font-size: 0.875rem;
    font-weight: 500;
    color: #475569;
    text-decoration: none;
    transition: background 0.15s, color 0.15s;
}

.admin-sidebar-link:hover {
    background: #F1F5F9;
    color: #0F172A;
}

.admin-main {
    flex: 1;
    min-width: 0;
    padding: 1.5rem 1.5rem 2rem;
    overflow-x: auto;
}

.admin-main > h1:first-child {
    margin-bottom: 1rem;
    font-size: 1.35rem;
    font-weight: 700;
    color: #0F172A;
}

.admin-footer {
    flex-shrink: 0;
    border-top: 1px solid #E2E8F0;
    background: #FFFFFF;
}

.admin-footer-inner {
    display: block;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0.65rem 1.25rem;
    font-size: 0.75rem;
    color: #64748B;
    text-align: center;
}

@media (max-width: 768px) {
    .admin-body {
        flex-direction: column;
    }

    .admin-sidebar {
        width: 100%;
        border-right: 0;
        border-bottom: 1px solid #E2E8F0;
    }

    .admin-sidebar-nav {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 0.35rem;
        padding: 0 0.75rem 0.5rem;
    }

    .admin-sidebar-link {
        white-space: nowrap;
    }
}

/* ── Dashboard admin (données statiques) ───────────────── */

.admin-dashboard {
    max-width: 1100px;
}

.admin-dashboard-head {
    margin-bottom: 1.25rem;
}

.admin-dashboard-head h1 {
    margin: 0 0 0.35rem;
    font-size: 1.35rem;
    font-weight: 700;
    color: #0F172A;
}

.admin-dashboard-note {
    margin: 0;
    font-size: 0.8125rem;
    color: #64748B;
}

.admin-dashboard-kpis {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.admin-dash-card {
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.admin-dash-card--wide {
    grid-column: 1 / -1;
}

.admin-dash-card--alerts {
    grid-column: 1 / -1;
}

.admin-dash-card--muted .admin-dash-card-title {
    color: #94A3B8;
}

.admin-dashboard-charts--single {
    grid-template-columns: 1fr;
}

.admin-dash-card-title {
    margin: 0;
    padding: 0.75rem 1rem;
    font-size: 0.8125rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #475569;
    background: #F8FAFC;
    border-bottom: 1px solid #E2E8F0;
}

.admin-dash-card-body {
    padding: 1rem;
}

.admin-dash-metric--hero {
    margin-bottom: 0.85rem;
}

.admin-dash-label {
    display: block;
    font-size: 0.75rem;
    color: #64748B;
    margin-bottom: 0.4rem;
}

.admin-dash-status-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.admin-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.35rem 0.65rem;
    border-radius: 999px;
    font-size: 0.8125rem;
    font-weight: 500;
}

.admin-pill strong {
    font-weight: 700;
}

.admin-pill--ok {
    background: #DCFCE7;
    color: #166534;
}

.admin-pill--ko {
    background: #FEE2E2;
    color: #991B1B;
}

.admin-pill--warn {
    background: #FEF9C3;
    color: #854D0E;
}

.admin-dash-dl {
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.admin-dash-dl dt {
    font-size: 0.6875rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #94A3B8;
    margin-bottom: 0.15rem;
}

.admin-dash-dl dd {
    margin: 0;
    font-size: 0.875rem;
    color: #0F172A;
}

.admin-dash-value {
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.admin-dash-trend {
    font-size: 0.75rem;
    font-weight: 600;
    margin-left: 0.25rem;
}

.admin-dash-trend--down {
    color: #16A34A;
}

.admin-dash-trend--up {
    color: #DC2626;
}

.admin-live-counters {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.admin-live-item {
    text-align: center;
    padding: 0.5rem 0.35rem;
    background: #F8FAFC;
    border-radius: 8px;
    border: 1px solid #E2E8F0;
}

.admin-live-item-label {
    display: block;
    font-size: 0.6875rem;
    color: #64748B;
    text-transform: uppercase;
    letter-spacing: 0.02em;
    margin-bottom: 0.2rem;
}

.admin-live-item-value {
    font-size: 1.25rem;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: #0F172A;
}

.admin-dash-subtitle {
    margin: 0 0 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: #64748B;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.admin-dash-list {
    margin: 0;
    padding: 0;
    list-style: none;
}

.admin-dash-list--compact li {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.35rem 0;
    border-bottom: 1px solid #F1F5F9;
    font-size: 0.8125rem;
    color: #334155;
}

.admin-dash-list--compact li:last-child {
    border-bottom: 0;
}

.admin-dash-split {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
}

@media (max-width: 640px) {
    .admin-dash-split {
        grid-template-columns: 1fr;
    }
}

.admin-dash-ordered {
    margin: 0;
    padding-left: 1.15rem;
    font-size: 0.8125rem;
    color: #334155;
}

.admin-dash-ordered li {
    padding: 0.3rem 0;
    border-bottom: 1px solid #F1F5F9;
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 0.5rem;
}

.admin-dash-ordered li:last-child {
    border-bottom: 0;
}

.admin-cause {
    flex: 1;
    min-width: 0;
}

.admin-count {
    font-weight: 700;
    font-variant-numeric: tabular-nums;
    color: #0F172A;
    flex-shrink: 0;
}

.admin-mono {
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.8em;
    color: #475569;
}

.admin-alert-list {
    margin: 0;
    padding: 0;
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
}

.admin-alert {
    display: grid;
    grid-template-columns: auto 1fr auto;
    gap: 0.5rem 0.75rem;
    align-items: start;
    padding: 0.65rem 0.75rem;
    border-radius: 8px;
    border: 1px solid #E2E8F0;
    background: #FAFAFA;
}

.admin-alert-badge {
    font-size: 0.625rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    padding: 0.2rem 0.45rem;
    border-radius: 4px;
    white-space: nowrap;
}

.admin-alert--critical .admin-alert-badge {
    background: #FEE2E2;
    color: #991B1B;
}

.admin-alert--warning .admin-alert-badge {
    background: #FEF9C3;
    color: #854D0E;
}

.admin-alert--info .admin-alert-badge {
    background: #DBEAFE;
    color: #1E40AF;
}

.admin-alert-text {
    font-size: 0.8125rem;
    color: #334155;
    line-height: 1.45;
}

.admin-alert-time {
    font-size: 0.75rem;
    color: #94A3B8;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.admin-dashboard-section-title {
    margin: 0 0 0.75rem;
    font-size: 1rem;
    font-weight: 700;
    color: #0F172A;
}

.admin-dashboard-charts {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.admin-dash-chart-card {
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
    border-radius: 12px;
    padding: 1rem 1rem 1.1rem;
    box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.admin-dash-chart-card-title {
    margin: 0 0 0.25rem;
    font-size: 0.9375rem;
    font-weight: 700;
    color: #0F172A;
}

.admin-dash-chart-caption {
    margin: 0 0 1rem;
    font-size: 0.75rem;
    color: #64748B;
}

.admin-bar-chart {
    padding: 0.25rem 0 0;
}

.admin-bar-chart-inner {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 0.35rem;
    height: 140px;
    padding: 0 0.25rem;
}

.admin-bar-chart-col {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    min-width: 0;
}

.admin-bar-chart-bar-wrap {
    flex: 1;
    width: 100%;
    max-width: 36px;
    margin: 0 auto;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    background: linear-gradient(180deg, #F8FAFC 0%, #F1F5F9 100%);
    border-radius: 6px 6px 0 0;
    min-height: 100px;
}

.admin-bar-chart-bar {
    width: 100%;
    border-radius: 6px 6px 0 0;
    background: linear-gradient(180deg, #3B82F6 0%, #2563EB 100%);
    min-height: 4px;
    transition: height 0.2s ease;
}

.admin-bar-chart-label {
    margin-top: 0.4rem;
    font-size: 0.6875rem;
    color: #64748B;
    font-weight: 500;
}

.admin-line-chart {
    margin: 0;
}

.admin-line-chart-svg {
    display: block;
    width: 100%;
    height: auto;
    max-height: 140px;
}

.admin-line-chart-axis {
    display: flex;
    justify-content: space-between;
    margin-top: 0.35rem;
    padding: 0 0.25rem 0 0.5rem;
    font-size: 0.6875rem;
    color: #64748B;
}

@media (max-width: 1100px) {
    .admin-billing-dashboard .admin-dashboard-kpis {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 900px) {
    .admin-dashboard-kpis {
        grid-template-columns: 1fr;
    }

    .admin-billing-dashboard .admin-dashboard-kpis {
        grid-template-columns: 1fr;
    }

    .admin-live-counters {
        grid-template-columns: repeat(3, 1fr);
    }

    .admin-dashboard-charts {
        grid-template-columns: 1fr;
    }
}

/* ============================================================
   Admin · Journal Appels (adm-calls-*)
   ============================================================ */

.adm-calls-head {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    margin-bottom: 1rem;
}
.adm-calls-head h1 {
    margin: 0;
}
.adm-calls-count {
    color: #64748B;
    font-size: .9rem;
}

/* ── Onglets ── */
.adm-calls-tabs {
    display: flex;
    gap: 0;
    border-bottom: 1px solid #E5E7EB;
    margin-bottom: 1.25rem;
}
.adm-calls-tab {
    padding: .6rem 1.2rem;
    color: #64748B;
    text-decoration: none;
    border-bottom: 2px solid transparent;
    font-weight: 500;
    transition: color .12s, border-color .12s;
}
.adm-calls-tab:hover {
    color: #1F2937;
}
.adm-calls-tab.is-active {
    color: #2563EB;
    border-bottom-color: #2563EB;
}

/* ── Presets / chips ── */
.adm-calls-presets {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: .5rem;
    margin-bottom: 1rem;
}
.adm-calls-presets-label {
    color: #64748B;
    font-size: .85rem;
    margin-right: .25rem;
}
.adm-calls-chip {
    display: inline-block;
    padding: .35rem .85rem;
    background: #F3F4F6;
    color: #374151;
    text-decoration: none;
    border-radius: 9999px;
    font-size: .85rem;
    border: 1px solid transparent;
    transition: background .12s, color .12s, border-color .12s;
}
.adm-calls-chip:hover {
    background: #E5E7EB;
}
.adm-calls-chip.is-active {
    background: #2563EB;
    color: #FFFFFF;
    border-color: #2563EB;
}

/* ── Filtres ── */
.adm-calls-filters {
    background: #F9FAFB;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: .75rem;
}
.adm-calls-filters-row {
    display: flex;
    flex-wrap: wrap;
    gap: .65rem;
    align-items: center;
}
.adm-calls-input {
    padding: .45rem .65rem;
    border: 1px solid #D1D5DB;
    border-radius: 6px;
    background: #FFFFFF;
    font-size: .9rem;
    min-width: 0;
    flex: 1 1 12rem;
    max-width: 100%;
}
.adm-calls-input:focus {
    outline: none;
    border-color: #2563EB;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, .15);
}
.adm-calls-date {
    display: flex;
    align-items: center;
    gap: .4rem;
    font-size: .85rem;
    color: #4B5563;
}
.adm-calls-date input {
    padding: .4rem .55rem;
    border: 1px solid #D1D5DB;
    border-radius: 6px;
    background: #FFFFFF;
    font-size: .85rem;
}

/* ── Tableau ── */
.adm-calls-table-wrap {
    overflow-x: auto;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    background: #FFFFFF;
}
.adm-calls-table {
    width: 100%;
    border-collapse: collapse;
    font-size: .875rem;
}
.adm-calls-table thead th {
    background: #F9FAFB;
    text-align: left;
    padding: .75rem .85rem;
    border-bottom: 1px solid #E5E7EB;
    font-weight: 600;
    color: #374151;
    font-size: .8rem;
    text-transform: uppercase;
    letter-spacing: .02em;
}
.adm-calls-table tbody tr {
    border-bottom: 1px solid #F3F4F6;
    transition: background .08s;
}
.adm-calls-table tbody tr:hover {
    background: #F9FAFB;
}
.adm-calls-table tbody td {
    padding: .65rem .85rem;
    color: #1F2937;
    vertical-align: middle;
}
.adm-calls-cell-date {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}
.adm-calls-date-day {
    font-weight: 500;
}
.adm-calls-date-time {
    color: #6B7280;
    font-size: .8rem;
}
.adm-calls-cell-number {
    font-size: .85rem;
    color: #4B5563;
}
.adm-calls-cell-duration {
    font-variant-numeric: tabular-nums;
    color: #4B5563;
    font-size: .85rem;
}
.adm-calls-muted {
    color: #9CA3AF;
}
.adm-calls-empty {
    text-align: center;
    color: #6B7280;
    padding: 2rem !important;
    font-style: italic;
}

/* ── Direction (entrée/sortie) ── */
.adm-calls-direction {
    display: inline-block;
    width: 22px;
    height: 22px;
    line-height: 22px;
    text-align: center;
    border-radius: 50%;
    font-weight: 700;
    font-size: .85rem;
}
.adm-calls-direction-outbound {
    background: #DBEAFE;
    color: #1D4ED8;
}
.adm-calls-direction-inbound {
    background: #DCFCE7;
    color: #166534;
}

/* ── Statuts ── */
.adm-calls-status {
    display: inline-block;
    padding: .2rem .6rem;
    border-radius: 4px;
    font-size: .75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: .02em;
}
.adm-calls-status-completed { background: #DCFCE7; color: #166534; }
.adm-calls-status-answered  { background: #DBEAFE; color: #1D4ED8; }
.adm-calls-status-failed    { background: #FEE2E2; color: #991B1B; }
.adm-calls-status-no_answer { background: #FEF3C7; color: #92400E; }
.adm-calls-status-rejected  { background: #FEE2E2; color: #991B1B; }
.adm-calls-status-busy      { background: #FEF3C7; color: #92400E; }
.adm-calls-status-cancelled { background: #F3F4F6; color: #6B7280; }
.adm-calls-status-initiated,
.adm-calls-status-queued,
.adm-calls-status-ringing   { background: #E0E7FF; color: #3730A3; }

/* ── Refus pré-appel (Phase B) ── */
.adm-calls-reason {
    display: inline-block;
    padding: .2rem .6rem;
    border-radius: 4px;
    font-size: .75rem;
    font-weight: 500;
    background: #FEF3C7;
    color: #92400E;
}
.adm-calls-reason-concurrent_limiter,
.adm-calls-reason-plan_guard       { background: #FEE2E2; color: #991B1B; }
.adm-calls-reason-country_compliance,
.adm-calls-reason-plan_option_missing,
.adm-calls-reason-time_window,
.adm-calls-reason-opted_out        { background: #FEF3C7; color: #92400E; }

/* ── Pagination ── */
.adm-calls-pagination {
    margin-top: 1.5rem;
    display: flex;
    justify-content: center;
}
.adm-calls-pagination ul.pagination,
.adm-calls-pagination .pagination {
    display: flex;
    gap: .3rem;
    list-style: none;
    padding: 0;
    margin: 0;
}
.adm-calls-pagination .pagination a,
.adm-calls-pagination .pagination span {
    padding: .4rem .75rem;
    border: 1px solid #D1D5DB;
    border-radius: 4px;
    color: #374151;
    text-decoration: none;
    font-size: .85rem;
    background: #FFFFFF;
}
.adm-calls-pagination .pagination a:hover {
    background: #F9FAFB;
}
.adm-calls-pagination .pagination .current {
    background: #2563EB;
    color: #FFFFFF;
    border-color: #2563EB;
}

@media (max-width: 900px) {
    .adm-calls-filters-row {
        flex-direction: column;
        align-items: stretch;
    }
    .adm-calls-input {
        flex: 1 1 auto;
    }
}

/* ============================================================
   Header agent — bloc présence (badge + bouton bascule)
   ============================================================ */

.agent-topbar-presence {
    display: flex;
    align-items: center;
    gap: .75rem;
}

.agent-topbar-presence-status {
    display: flex;
    align-items: center;
    padding-right: .75rem;
    border-right: 1px solid #E5E7EB;
}

.agent-topbar-presence-actions {
    display: flex;
    align-items: center;
    gap: .5rem;
    padding: .35rem .5rem;
    background: #F9FAFB;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
}

.agent-presence-badge {
    display: inline-flex;
    align-items: center;
    gap: .35rem;
    padding: .35rem .75rem;
    border-radius: 9999px;
    font-size: .8125rem;
    font-weight: 600;
    line-height: 1.4;
    user-select: none;
    border: 1px solid transparent;
    white-space: nowrap;
    box-shadow: 0 1px 2px rgb(0 0 0 / 6%);
}
.agent-presence-badge::before {
    content: '●';
    font-size: .8em;
}
.agent-presence-badge--available {
    background: #DCFCE7;
    color: #166534;
    border-color: #BBF7D0;
}
.agent-presence-badge--pause {
    background: #FEF3C7;
    color: #92400E;
    border-color: #FDE68A;
}
.agent-presence-badge--acw {
    background: #DBEAFE;
    color: #1E40AF;
    border-color: #BFDBFE;
}
.agent-presence-badge--offline {
    background: #F3F4F6;
    color: #4B5563;
    border-color: #E5E7EB;
}

.agent-presence-btn-icon {
    width: 1.125rem;
    height: 1.125rem;
    flex-shrink: 0;
    display: block;
}

.agent-presence-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: .4rem;
    color: #FFFFFF;
    background: #2563EB;
    border: 1px solid #2563EB;
    border-radius: 6px;
    cursor: pointer;
    transition: background .12s, border-color .12s;
}
.agent-presence-toggle:hover:not(:disabled) {
    background: #1D4ED8;
    border-color: #1D4ED8;
}
.agent-presence-toggle:disabled {
    background: #E5E7EB;
    color: #9CA3AF;
    border-color: #E5E7EB;
    cursor: not-allowed;
}

/* Bouton « Terminer mon poste » — variante outline rouge, secondaire
   au bouton bascule Pause/Reprendre. */
.agent-presence-end-shift {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: .4rem;
    color: #B91C1C;
    background: #ffffff;
    border: 1px solid #FCA5A5;
    border-radius: 6px;
    cursor: pointer;
    transition: background .12s, border-color .12s;
}
.agent-presence-end-shift:hover {
    background: #FEE2E2;
    border-color: #F87171;
}

/* Console admin — facturation (données démo) */
.admin-billing-dashboard {
    max-width: 1280px;
}

.admin-billing-dashboard .admin-dashboard-kpis {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.admin-billing-dashboard .admin-dashboard-head {
    margin-bottom: 1.25rem;
}

.admin-billing-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin: 0.75rem 0 0;
}

.admin-billing-section {
    margin-top: 1.75rem;
}

.admin-billing-section-head {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.admin-billing-section-head .admin-dashboard-section-title {
    margin: 0;
}

.admin-billing-demo-badge {
    display: inline-block;
    padding: 0.15rem 0.45rem;
    font-size: 0.6875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    color: #92400E;
    background: #FEF3C7;
    border: 1px solid #FCD34D;
    border-radius: 4px;
}

/* ── Page aide / diagnostic support ───────────────────────────── */

.help-page {
    overflow: auto;
}

.help-hero {
    margin-bottom: 1.25rem;
    padding: 1.25rem 1.5rem;
    background: linear-gradient(135deg, #EFF6FF 0%, #F9FAFB 55%, #fff 100%);
    border: 1px solid #E5E7EB;
    border-radius: 12px;
}

.help-hero .page-title {
    margin: 0 0 0.35rem;
    font-size: 1.35rem;
}

.help-page .help-page-lead {
    margin: 0;
    font-size: 0.9rem;
    color: #4B5563;
    font-weight: 400;
    max-width: 42rem;
    line-height: 1.5;
}

.help-page-grid {
    display: grid;
    grid-template-columns: 1fr min(300px, 34%);
    gap: 1.25rem;
    align-items: start;
}

.help-main {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    min-width: 0;
}

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

.help-panel {
    background: #fff;
    border: 1px solid #E5E7EB;
    border-radius: 12px;
    padding: 1.25rem 1.5rem;
}

.help-panel-title {
    font-size: 1rem;
    font-weight: 700;
    color: #111827;
    margin: 0 0 0.75rem;
}

.help-panel-subtitle {
    font-size: 0.9rem;
    font-weight: 600;
    margin: 1rem 0 0.5rem;
    color: #374151;
}

.help-panel-text {
    color: #4B5563;
    font-size: 0.9rem;
    line-height: 1.5;
    margin: 0 0 1rem;
}

.help-context-badge {
    display: inline-block;
    margin-top: 0.5rem;
    padding: 0.2rem 0.5rem;
    font-size: 0.75rem;
    background: #EFF6FF;
    color: #1D4ED8;
    border-radius: 6px;
}

.help-step-meta {
    font-size: 0.75rem;
    color: #6B7280;
    margin: 0 0 0.5rem;
}

.help-step-body {
    color: #374151;
    font-size: 0.95rem;
    line-height: 1.55;
    margin-bottom: 1rem;
    white-space: pre-wrap;
}

.help-step-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.help-category-btn {
    text-align: left;
}

.help-step-error {
    margin-top: 0.75rem;
    color: #B91C1C;
    font-size: 0.875rem;
}

.help-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.help-links li {
    margin-bottom: 0.5rem;
}

.help-links a {
    color: #2563EB;
    text-decoration: none;
    font-size: 0.9rem;
}

.help-links a:hover {
    text-decoration: underline;
}

.help-remarks {
    width: 100%;
    font-size: 0.9375rem;
    line-height: 1.5;
    padding: 0.75rem 1rem;
    border: 1px solid #E5E7EB;
    border-radius: 0.5rem;
    resize: vertical;
    min-height: 6rem;
}

.help-remarks:focus {
    outline: none;
    border-color: #2563EB;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.help-remarks[readonly] {
    background: #F9FAFB;
    color: #374151;
}

.help-closed-support {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #E5E7EB;
}

.help-summary {
    width: 100%;
    font-family: ui-monospace, monospace;
    font-size: 0.75rem;
    padding: 0.75rem;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    margin-bottom: 0.75rem;
    resize: vertical;
}

.help-hub-head {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.help-hub-selected {
    margin: 0;
    font-size: 0.8rem;
    font-weight: 600;
    color: #1D4ED8;
}

.help-hub--locked .help-category-grid {
    opacity: 0.45;
    pointer-events: none;
}

.help-hub--locked .help-hub-hint {
    opacity: 0.7;
}

.help-hub-hint {
    margin-bottom: 1rem;
}

.help-progress {
    background: #F8FAFC;
    border-color: #CBD5E1;
}

.help-progress-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.help-progress-badge {
    display: inline-block;
    padding: 0.25rem 0.6rem;
    font-size: 0.75rem;
    font-weight: 600;
    color: #1E3A8A;
    background: #DBEAFE;
    border-radius: 999px;
}

.help-progress-counter {
    font-size: 0.8rem;
    color: #6B7280;
}

.help-progress-trail {
    list-style: none;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 0.35rem;
}

.help-progress-trail-item {
    font-size: 0.82rem;
    padding: 0.35rem 0.5rem 0.35rem 1.5rem;
    border-radius: 6px;
    position: relative;
    color: #6B7280;
}

.help-progress-trail-item::before {
    content: '';
    position: absolute;
    left: 0.45rem;
    top: 0.65rem;
    width: 0.45rem;
    height: 0.45rem;
    border-radius: 50%;
    background: #D1D5DB;
}

.help-progress-trail-item--done {
    color: #374151;
}

.help-progress-trail-item--done::before {
    background: #22C55E;
}

.help-progress-trail-item--current {
    font-weight: 600;
    color: #111827;
    background: #EFF6FF;
}

.help-progress-trail-item--current::before {
    background: #2563EB;
    box-shadow: 0 0 0 2px #BFDBFE;
}

.help-step-type {
    margin: 0 0 0.25rem;
    font-size: 0.72rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #6B7280;
}

.help-category-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 0.75rem;
}

.help-category-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.35rem;
    padding: 1rem;
    text-align: left;
    background: #F9FAFB;
    border: 1px solid #E5E7EB;
    border-radius: 10px;
    cursor: pointer;
    transition: border-color .15s, box-shadow .15s, background .15s;
}

.help-category-card:hover {
    border-color: #93C5FD;
    background: #fff;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.08);
}

.help-category-card--active {
    border-color: #2563EB;
    background: #EFF6FF;
    box-shadow: 0 0 0 1px #2563EB;
}

.help-category-card-icon {
    font-size: 1.5rem;
    line-height: 1;
}

.help-category-card-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: #111827;
}

.help-category-card-desc {
    font-size: 0.78rem;
    color: #6B7280;
    line-height: 1.4;
}

.help-loading[hidden],
.help-loading.help-loading--off {
    display: none !important;
}

.help-loading {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    background: #fff;
    border: 1px dashed #D1D5DB;
    border-radius: 10px;
    color: #6B7280;
    font-size: 0.875rem;
}

.help-loading-spinner {
    width: 1.125rem;
    height: 1.125rem;
    border: 2px solid #E5E7EB;
    border-top-color: #2563EB;
    border-radius: 50%;
    animation: help-spin .7s linear infinite;
}

@keyframes help-spin {
    to { transform: rotate(360deg); }
}

.help-wizard-head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.help-wizard-back {
    font-size: 0.8rem;
    padding: 0.35rem 0.65rem;
}

.help-panel--faq {
    position: sticky;
    top: 1rem;
}

.help-faq-intro {
    font-size: 0.85rem;
    color: #6B7280;
    margin: 0 0 0.75rem;
    line-height: 1.45;
}

.help-faq-item {
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    margin-bottom: 0.5rem;
    background: #FAFAFA;
}

.help-faq-item summary {
    padding: 0.65rem 0.75rem;
    font-size: 0.85rem;
    font-weight: 500;
    color: #111827;
    cursor: pointer;
    list-style: none;
}

.help-faq-item summary::-webkit-details-marker {
    display: none;
}

.help-faq-item p {
    margin: 0;
    padding: 0 0.75rem 0.75rem;
    font-size: 0.82rem;
    color: #4B5563;
    line-height: 1.45;
}

.help-escalate {
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid #E5E7EB;
}

/* =========================================================
   Pages d'erreur back (client + admin)
   Layout minimal, centré, sans sidebar ni topbar.
   ========================================================= */
.error-page {
    margin: 0;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #F8FAFC;
    color: #0F172A;
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    padding: 2rem 1rem;
}
.error-page__main { width: 100%; }
.error-page__content {
    max-width: 36rem;
    margin: 0 auto;
    background: #FFFFFF;
    border: 1px solid #E2E8F0;
    border-radius: 16px;
    padding: 2.5rem 2rem;
    box-shadow: 0 10px 30px -10px rgba(15, 23, 42, 0.08);
    text-align: center;
}
.error-page__code {
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1;
    margin: 0 0 1rem;
    color: #94A3B8;
    letter-spacing: -0.04em;
}
.error-page__title {
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 0 0.75rem;
    line-height: 1.25;
}
.error-page__lead {
    font-size: 1rem;
    line-height: 1.55;
    color: #475569;
    margin: 0 0 1.75rem;
}
.error-page__actions {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    flex-wrap: wrap;
}
.error-page__cta {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.625rem 1.25rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9375rem;
    text-decoration: none;
    transition: background 0.15s, border-color 0.15s, color 0.15s;
}
.error-page__cta--primary {
    background: #0F172A;
    color: #FFFFFF;
    border: 1px solid #0F172A;
}
.error-page__cta--primary:hover {
    background: #1E293B;
    border-color: #1E293B;
}
.error-page__cta--ghost {
    background: transparent;
    color: #0F172A;
    border: 1px solid #CBD5E1;
}
.error-page__cta--ghost:hover {
    background: #F1F5F9;
    border-color: #94A3B8;
}
/* Variante admin : accentue le code couleur */
.error-page--admin .error-page__code { color: #7C3AED; }
.error-page--client .error-page__code { color: #0EA5E9; }
