/* Liste billets — contrôle à l'entrée */
.clb-toolbar {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 14px;
    text-align: left;
}
.clb-search {
    width: 100%;
    padding: 12px 14px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    font-size: 15px;
}
.clb-toolbar-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}
.clb-toolbar-row {
    display: flex;
    gap: 12px;
    align-items: center;
}
.clb-toolbar-row--scan {
    align-items: center;
}
.clb-scan-round-wrap {
    flex-shrink: 0;
    text-align: center;
}
.clb-scan-round-wrap .scan-mode-btn {
    width: 88px;
    height: 88px;
    border-radius: 50%;
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.18s ease, box-shadow 0.18s ease;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.14);
    background: linear-gradient(145deg, #667eea 0%, #764ba2 100%);
    color: #fff;
}
.clb-scan-round-wrap .scan-mode-btn svg {
    width: 38px;
    height: 38px;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.75;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.clb-scan-round-wrap .scan-mode-btn:active {
    transform: scale(0.97);
}
.clb-scan-round-wrap .scan-mode-label {
    display: block;
    margin-top: 6px;
    font-size: 11px;
    font-weight: 600;
    color: #475569;
    text-align: center;
    line-height: 1.2;
}
/* --- 3 ronds contrôleur (scan / journal / validés) --- */
.clb-toolbar-row--ctrl {
    display: flex;
    justify-content: space-around;
    align-items: flex-start;
    gap: 6px;
}
.clb-ctrl-round-wrap {
    flex: 1 1 0;
    min-width: 0;
    max-width: 108px;
    text-align: center;
}
.clb-ctrl-round-btn {
    width: 68px;
    height: 68px;
    border-radius: 50%;
    border: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 6px 16px rgba(15, 23, 42, 0.14);
    transition: transform 0.18s ease;
}
.clb-ctrl-round-btn--scan {
    background: linear-gradient(145deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    cursor: pointer;
}
.clb-ctrl-round-btn--scan svg {
    width: 30px;
    height: 30px;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.75;
    stroke-linecap: round;
    stroke-linejoin: round;
}
.clb-ctrl-round-btn--journal {
    background: #e30613;
    cursor: pointer;
}
.clb-ctrl-round-btn--journal .clb-warn-icon {
    width: 34px;
    height: 30px;
}
.clb-ctrl-round-btn--journal:disabled {
    opacity: 0.42;
    cursor: default;
}
.clb-ctrl-round-btn--validated {
    background: linear-gradient(145deg, #34d399 0%, #059669 100%);
    color: #fff;
    cursor: default;
}
.clb-ctrl-round-btn--validated .clb-validated-num {
    font-size: 26px;
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.02em;
}
.clb-ctrl-round-label {
    display: block;
    margin-top: 6px;
    font-size: 10px;
    font-weight: 600;
    color: #475569;
    text-align: center;
    line-height: 1.2;
}
.clb-ctrl-round-btn:active:not(:disabled) {
    transform: scale(0.97);
}
.clb-toolbar-row .clb-errors-btn {
    flex: 1;
    min-height: 72px;
    align-self: center;
}
.clb-root--page {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
}
.clb-page-root {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: 0;
    overflow: hidden;
}
.clb-root--ctrl .clb-toolbar {
    margin-bottom: 0;
    padding-bottom: 14px;
    border-bottom: 1px solid #e2e8f0;
}
.clb-root--ctrl .clb-list {
    padding-top: 12px;
}
.scan-modal-event--compact {
    margin-bottom: 12px !important;
}
.modal-content--liste-full,
.modal-content--camera-full {
    max-height: 92vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}
.modal-content--liste-full .clb-page-root {
    flex: 1;
    min-height: 0;
    overflow: hidden;
}
.controle-page--liste,
.controle-page--camera {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-height: calc(100vh - 56px);
    text-align: center;
}
.controle-page--liste .clb-page-root {
    text-align: left;
}
.clb-errors-btn {
    flex: 1;
    border: 1px solid #fecaca;
    background: #fef2f2;
    color: #b91c1c;
    border-radius: 10px;
    padding: 10px 12px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}
.clb-errors-btn:disabled {
    opacity: 0.45;
    cursor: default;
}
.clb-back-btn {
    border: 1px solid #e2e8f0;
    background: #f8fafc;
    border-radius: 10px;
    padding: 10px 14px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    color: #475569;
}
.clb-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
    max-height: min(62vh, 520px);
    overflow-y: auto;
    text-align: left;
}
#scan-panel-body .clb-list {
    max-height: min(48vh, 420px);
}
.clb-buyer-card {
    border: 1px solid #e2e8f0;
    border-radius: 14px;
    background: #fff;
    overflow: hidden;
}
.clb-buyer-head {
    padding: 12px 14px;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
}
.clb-buyer-name {
    font-size: 15px;
    font-weight: 700;
    color: #0f172a;
    margin-bottom: 4px;
}
.clb-buyer-meta {
    font-size: 12px;
    color: #64748b;
    line-height: 1.4;
}
.clb-buyer-count {
    display: inline-block;
    margin-top: 6px;
    font-size: 11px;
    font-weight: 700;
    color: #667eea;
    background: #eef2ff;
    padding: 3px 8px;
    border-radius: 999px;
}
.clb-tickets-wrap {
    padding: 8px 10px 10px;
}
.clb-tickets-details summary {
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    color: #475569;
    padding: 6px 4px;
    list-style: none;
}
.clb-tickets-details summary::-webkit-details-marker { display: none; }
.clb-tickets-details summary::before {
    content: '▸ ';
    color: #667eea;
}
.clb-tickets-details[open] summary::before {
    content: '▾ ';
}
.clb-ticket-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
    padding: 10px 8px;
    border-top: 1px solid #f1f5f9;
}
.clb-ticket-row:first-child { border-top: none; }
.clb-ticket-row--entree {
    background: #ecfdf5;
    border-radius: 8px;
}
.clb-ticket-code {
    font-size: 12px;
    font-weight: 600;
    color: #334155;
    font-family: ui-monospace, monospace;
}
.clb-ticket-type {
    font-size: 11px;
    color: #94a3b8;
    margin-top: 2px;
}
.clb-status {
    font-size: 11px;
    font-weight: 700;
    padding: 5px 10px;
    border-radius: 999px;
    white-space: nowrap;
}
.clb-status--entree {
    background: #d1fae5;
    color: #047857;
}
.clb-status--attente {
    background: #f1f5f9;
    color: #64748b;
}
.clb-status--refus {
    background: #fee2e2;
    color: #b91c1c;
}
.clb-validate-btn {
    border: none;
    border-radius: 999px;
    padding: 7px 12px;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    background: #667eea;
    color: #fff;
    white-space: nowrap;
}
.clb-empty {
    text-align: center;
    color: #94a3b8;
    font-size: 13px;
    padding: 28px 12px;
}
.clb-errors-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.45);
    z-index: 9999;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    padding: 16px;
}
.clb-errors-sheet {
    width: 100%;
    max-width: 430px;
    max-height: 70vh;
    background: #fff;
    border-radius: 16px 16px 0 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}
.clb-errors-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px 16px;
    border-bottom: 1px solid #e2e8f0;
}
.clb-errors-head h3 {
    margin: 0;
    font-size: 16px;
    color: #0f172a;
}
.clb-errors-close {
    border: none;
    background: none;
    font-size: 24px;
    line-height: 1;
    cursor: pointer;
    color: #64748b;
}
.clb-errors-body {
    overflow-y: auto;
    padding: 12px 16px 20px;
}
.clb-error-item {
    padding: 10px 12px;
    border: 1px solid #fecaca;
    border-radius: 10px;
    background: #fef2f2;
    margin-bottom: 8px;
    font-size: 13px;
    color: #7f1d1d;
    line-height: 1.4;
}
.clb-error-item time {
    display: block;
    font-size: 11px;
    color: #b91c1c;
    margin-bottom: 4px;
    opacity: 0.85;
}
.clb-buyer-card--ctrl {
    border-radius: 0;
    border: none;
    border-bottom: 1px solid #f1f5f9;
    background: #fff;
    overflow: visible;
}
.clb-buyer-card--ctrl:last-child {
    border-bottom: none;
}
.clb-buyer-row__line {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 9px 6px;
    min-height: 42px;
}
.clb-buyer-card--ctrl .clb-buyer-name {
    flex: 1 1 auto;
    min-width: 0;
    margin: 0;
    font-size: 14px;
    font-weight: 700;
    color: #0f172a;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.clb-buyer-count--inline {
    display: inline-block;
    margin: 0;
    flex-shrink: 0;
    font-size: 10px;
    padding: 2px 7px;
}
.clb-buyer-partial {
    flex-shrink: 0;
    font-size: 10px;
    font-weight: 700;
    color: #667eea;
    background: #eef2ff;
    padding: 3px 7px;
    border-radius: 999px;
    white-space: nowrap;
}
.clb-buyer-card--ctrl .clb-status {
    flex-shrink: 0;
    font-size: 10px;
    padding: 4px 8px;
}
.clb-manual-btn {
    border: 1px solid #667eea;
    background: #fff;
    color: #667eea;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    flex-shrink: 0;
}
.clb-manual-btn--sm {
    width: auto;
    margin: 0;
    padding: 5px 10px;
    font-size: 11px;
    line-height: 1.2;
}
.clb-manual-btn:active {
    background: #eef2ff;
}
.clb-buyer-card--ctrl .clb-tickets-wrap {
    padding: 0 6px 8px;
    border-top: 1px dashed #e2e8f0;
    margin-top: 0;
}
.clb-tickets-details--inline {
    margin: 0;
}
.clb-tickets-details--inline > .clb-tickets-wrap {
    border-top: 1px dashed #e2e8f0;
    padding-top: 4px;
}
.clb-buyer-row__line--details {
    cursor: pointer;
    list-style: none;
}
.clb-buyer-row__line--details::-webkit-details-marker {
    display: none;
}
.clb-tickets-details--inline summary::before {
    content: none;
}
.clb-details-summary-text {
    flex-shrink: 0;
    font-size: 12px;
    font-weight: 600;
    color: #667eea;
    white-space: nowrap;
}
.clb-details-summary-text::before {
    content: '▸ ';
    color: #667eea;
}
.clb-tickets-details--inline[open] .clb-details-summary-text::before {
    content: '▾ ';
}
.clb-email-sheet {
    width: 100%;
    max-width: 380px;
    background: #fff;
    border-radius: 16px;
    overflow: hidden;
    padding: 0 0 16px;
}
.clb-email-hint {
    padding: 0 16px 8px;
    font-size: 13px;
    color: #64748b;
    line-height: 1.4;
}
.clb-email-buyer {
    padding: 0 16px 10px;
    font-size: 14px;
    color: #0f172a;
}
.clb-email-input {
    display: block;
    width: calc(100% - 32px);
    margin: 0 16px 8px;
    padding: 12px 14px;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    font-size: 15px;
}
.clb-email-error {
    margin: 0 16px 8px;
    font-size: 12px;
    color: #b91c1c;
}
.clb-email-submit {
    display: block;
    width: calc(100% - 32px);
    margin: 4px 16px 0;
    border: none;
    border-radius: 10px;
    padding: 12px;
    font-size: 14px;
    font-weight: 700;
    cursor: pointer;
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: #fff;
}
.clb-error-item--manual {
    border-color: #a7f3d0;
    background: #ecfdf5;
    color: #065f46;
}
.clb-error-item--manual time {
    color: #047857;
}
