/* Planche multi-clients et exports avec repères de découpe. */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.combined-page-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 1.4rem;
}

.combined-page-heading .page-subtitle {
    max-width: 760px;
    margin-bottom: 0;
}

.combined-kicker {
    display: block;
    margin-bottom: 0.4rem;
    color: #f47b20;
    font-size: 0.7rem;
    font-weight: 850;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.combined-builder {
    display: grid;
    gap: 1rem;
    padding-bottom: 105px;
}

.combined-config-card,
.combined-selection-card,
.combined-feature-card,
.combined-history-card {
    padding: 1.2rem;
    border: 1px solid var(--border, #dfe5ee);
    border-radius: 16px;
    background: #fff;
    box-shadow: 0 10px 30px rgba(18, 38, 90, 0.045);
}

.combined-section-heading {
    display: flex;
    align-items: flex-start;
    gap: 0.8rem;
    margin-bottom: 1rem;
}

.combined-section-heading h2 {
    margin: 0;
    color: #12265a;
    font-size: 1rem;
}

.combined-section-heading p {
    margin: 0.2rem 0 0;
    color: var(--muted, #68768b);
    font-size: 0.8rem;
}

.combined-step-number {
    display: inline-flex;
    width: 32px;
    height: 32px;
    flex: 0 0 32px;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    background: #165dc2;
    color: #fff;
    font-size: 0.78rem;
    font-weight: 900;
}

.combined-config-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.8rem;
}

.combined-config-grid label {
    display: grid;
    gap: 0.35rem;
}

.combined-custom-size[hidden] {
    display: none;
}

.combined-capacity-panel {
    margin-top: 1rem;
    padding: 0.9rem;
    border: 1px solid #d8e3f2;
    border-radius: 14px;
    background: #f8fbff;
}

.combined-capacity-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.combined-capacity-heading h3 {
    margin: 0;
    color: #12265a;
    font-size: 0.88rem;
}

.combined-capacity-heading p,
.combined-capacity-estimate {
    margin: 0.2rem 0 0;
    color: #68778e;
    font-size: 0.72rem;
}

.combined-capacity-heading > strong {
    padding: 0.35rem 0.55rem;
    border-radius: 8px;
    background: #e8f1ff;
    color: #165dc2;
    font-size: 0.75rem;
    white-space: nowrap;
}

.combined-capacity-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.55rem;
}

.combined-capacity-card {
    display: grid;
    gap: 0.18rem;
    min-height: 94px;
    padding: 0.65rem;
    border: 1px solid #d7e0ed;
    border-radius: 11px;
    background: #fff;
    color: #65748b;
    text-align: left;
    cursor: pointer;
    transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.combined-capacity-card:hover {
    border-color: #8eb4e9;
    transform: translateY(-1px);
}

.combined-capacity-card.is-active {
    border-color: #165dc2;
    box-shadow: 0 0 0 3px rgba(22, 93, 194, 0.1);
}

.combined-capacity-paper {
    color: #40516a;
    font-size: 0.68rem;
    font-weight: 850;
}

.combined-capacity-card strong {
    color: #12265a;
    font-size: 1.25rem;
    line-height: 1.15;
}

.combined-capacity-card strong small {
    font-size: 0.65rem;
}

.combined-capacity-card > span:last-child {
    font-size: 0.65rem;
}

.combined-capacity-estimate {
    margin-top: 0.65rem;
    color: #425976;
    font-weight: 700;
}

.combined-selection-tools {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    align-items: center;
    margin-bottom: 0.8rem;
}

.combined-search {
    flex: 1 1 260px;
}

.combined-search input {
    width: 100%;
}

.combined-alert {
    margin-bottom: 0.8rem;
    padding: 0.75rem 0.9rem;
    border: 1px solid #f0b4ad;
    border-radius: 11px;
    background: #fff1f0;
    color: #973c33;
    font-size: 0.82rem;
}

.combined-alert[data-type="info"] {
    border-color: #b9d2f6;
    background: #edf5ff;
    color: #1a559e;
}

.combined-alert[hidden],
.combined-client-group[hidden],
.combined-photo-card[hidden] {
    display: none !important;
}

.combined-client-list {
    display: grid;
    gap: 0.9rem;
}

.combined-client-group {
    overflow: hidden;
    border: 1px solid #dce4ef;
    border-radius: 14px;
    background: #f8faff;
}

.combined-client-header {
    padding: 0.75rem 0.9rem;
    border-bottom: 1px solid #dce4ef;
    background: #edf3ff;
}

.combined-client-header label {
    display: flex;
    align-items: center;
    cursor: pointer;
}

.combined-client-header input,
.combined-photo-main > input {
    width: 19px;
    height: 19px;
    min-height: 0;
    flex: 0 0 19px;
    margin: 0 0.65rem 0 0;
    accent-color: #165dc2;
}

.combined-client-header span {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.45rem;
}

.combined-client-header strong {
    color: #12265a;
}

.combined-client-header small {
    color: #708099;
}

.combined-photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 0.75rem;
    padding: 0.75rem;
}

.combined-photo-card {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 0.55rem;
    align-items: center;
    padding: 0.65rem;
    border: 1px solid #e0e6ef;
    border-radius: 12px;
    background: #fff;
    transition: border-color 160ms ease, box-shadow 160ms ease, transform 160ms ease;
}

.combined-photo-card.is-selected {
    border-color: #165dc2;
    box-shadow: 0 0 0 3px rgba(22, 93, 194, 0.1);
}

.combined-photo-main {
    display: grid;
    grid-template-columns: auto 52px minmax(0, 1fr);
    gap: 0.55rem;
    align-items: center;
    min-width: 0;
    cursor: pointer;
}

.combined-photo-main img,
.combined-photo-placeholder {
    width: 52px;
    height: 62px;
    border-radius: 8px;
    object-fit: cover;
    background: #e9eef6;
}

.combined-photo-placeholder {
    display: grid;
    place-items: center;
    padding: 0.25rem;
    color: #77859a;
    font-size: 0.58rem;
    line-height: 1.2;
    text-align: center;
}

.combined-photo-info {
    min-width: 0;
}

.combined-photo-info strong,
.combined-photo-info small {
    display: block;
}

.combined-photo-info strong {
    color: #1c2b44;
    font-size: 0.82rem;
}

.combined-photo-info small {
    margin-top: 0.2rem;
    overflow: hidden;
    color: #718096;
    font-size: 0.67rem;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.combined-quantity {
    display: grid;
    grid-template-columns: 28px 42px 28px;
    align-items: center;
    overflow: hidden;
    border: 1px solid #d6deea;
    border-radius: 9px;
}

.combined-quantity button,
.combined-quantity input {
    width: 100%;
    min-height: 32px;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: #fff;
    color: #12265a;
    text-align: center;
}

.combined-quantity button {
    cursor: pointer;
    font-weight: 900;
}

.combined-quantity button:disabled,
.combined-quantity input:disabled {
    cursor: not-allowed;
    opacity: 0.4;
}

.combined-quantity input {
    border-right: 1px solid #e1e6ee;
    border-left: 1px solid #e1e6ee;
    appearance: textfield;
    font-size: 0.75rem;
    font-weight: 800;
}

.combined-quantity input::-webkit-inner-spin-button,
.combined-quantity input::-webkit-outer-spin-button {
    margin: 0;
    appearance: none;
}

.combined-summary {
    position: fixed;
    z-index: 80;
    right: clamp(16px, 3vw, 42px);
    bottom: 18px;
    left: calc(248px + clamp(16px, 3vw, 42px));
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 0.9rem 1rem;
    border: 1px solid #ccd8e9;
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.96);
    box-shadow: 0 18px 50px rgba(18, 38, 90, 0.18);
    backdrop-filter: blur(14px);
}

.combined-summary-metrics {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.combined-summary-metrics span {
    color: #68778e;
    font-size: 0.74rem;
    white-space: nowrap;
}

.combined-summary-metrics strong {
    color: #12265a;
    font-size: 1rem;
}

.combined-summary > p {
    flex: 1;
    margin: 0;
    color: #6a7890;
    font-size: 0.76rem;
}

.combined-summary .btn {
    flex: 0 0 auto;
}

.combined-feature-card {
    display: grid;
    grid-template-columns: auto 1fr auto;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.3rem;
    border-color: #bed3f2;
    background: linear-gradient(135deg, #edf4ff, #fff8f1);
}

.combined-feature-icon {
    display: grid;
    width: 52px;
    height: 52px;
    place-items: center;
    border-radius: 15px;
    background: #165dc2;
    color: #fff;
    font-size: 1.2rem;
    font-weight: 900;
}

.combined-feature-card h2,
.combined-history-card h2 {
    margin: 0;
    color: #12265a;
    font-size: 1rem;
}

.combined-feature-card p {
    margin: 0.25rem 0 0;
    color: #65748b;
    font-size: 0.8rem;
}

.combined-history-card {
    margin-bottom: 1.5rem;
}

.combined-history-card > h2 {
    margin-bottom: 0.85rem;
}

.combined-editor-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 0.75rem;
    margin: 1rem 0;
}

.combined-editor-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    border: 1px solid #dde5f0;
    border-radius: 12px;
    background: #fff;
}

.combined-editor-item img {
    width: 54px;
    height: 64px;
    border-radius: 8px;
    object-fit: cover;
}

.combined-editor-item strong,
.combined-editor-item small {
    display: block;
}

.combined-editor-item small {
    color: #708097;
}

.cut-guide-note {
    display: flex;
    gap: 0.7rem;
    align-items: center;
    margin: 1rem 0;
    padding: 0.8rem 0.9rem;
    border: 1px dashed #8ca7cc;
    border-radius: 12px;
    background: #f4f8fe;
    color: #475d7a;
    font-size: 0.8rem;
}

.sheet-actions-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
    margin-bottom: 1rem;
}

.sheet-preview-card {
    margin-bottom: 1.5rem;
    padding: 1rem;
    border: 1px solid var(--border, #dfe5ee);
    border-radius: 12px;
    background: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
}

.sheet-preview-label {
    margin-bottom: 0.6rem;
    color: var(--muted, #68768b);
    font-size: 0.82rem;
    font-weight: 700;
}

.sheet-preview-img {
    display: block;
    width: 100%;
    max-width: 900px;
    margin: 0 auto;
    border: 1px solid var(--border, #dfe5ee);
}

@media (max-width: 900px) {
    .combined-summary {
        right: 12px;
        bottom: 12px;
        left: 12px;
    }
}

@media (max-width: 720px) {
    .combined-page-heading,
    .combined-feature-card,
    .combined-summary {
        align-items: stretch;
        flex-direction: column;
    }

    .combined-feature-card {
        display: flex;
    }

    .combined-config-grid {
        grid-template-columns: 1fr;
    }

    .combined-capacity-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .combined-summary-metrics {
        justify-content: space-between;
    }

    .combined-summary > p {
        display: none;
    }

    .combined-summary .btn {
        width: 100%;
    }
}

@media (max-width: 520px) {
    .combined-capacity-heading {
        display: grid;
    }

    .combined-capacity-heading > strong {
        justify-self: start;
    }

    .combined-photo-grid {
        grid-template-columns: 1fr;
    }

    .combined-photo-card {
        grid-template-columns: 1fr;
    }

    .combined-quantity {
        width: 116px;
        margin-left: 32px;
    }

    .combined-summary-metrics span {
        display: grid;
        text-align: center;
    }
}

@media print {
    .no-print,
    .sidebar,
    .topbar,
    .right-panel,
    .app-body > .sidebar {
        display: none !important;
    }

    .content {
        padding: 0 !important;
    }

    .sheet-preview-card {
        padding: 0;
        margin: 0;
        border: 0;
        border-radius: 0;
        box-shadow: none;
        page-break-after: always;
        break-after: page;
    }

    .sheet-preview-card:last-child {
        page-break-after: auto;
        break-after: auto;
    }

    .sheet-preview-img {
        max-width: 100%;
        border: 0;
    }
}
