/* /Components/Composition/CompositionEditor.razor.rz.scp.css */
/* =============================================================================
   CompositionEditor — card #459 R6b (design §4.2)
   =============================================================================
   Valid-As-Of: 2026-10-17
   A line is a card: header (title, tier, remove), one row per module (check,
   capacity, price or the written reason), line total. Rows wrap instead of
   overflowing: every cell has min-width:0.
   ============================================================================= */
.la-composition[b-xox0s2zwon] {
    container-type: inline-size;
    font-size: 0.875rem;
}

.la-composition__filters[b-xox0s2zwon] {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 16px;
    margin-bottom: 12px;
}

.la-composition__tiers[b-xox0s2zwon] {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 4px;
}

.la-composition__filter-label[b-xox0s2zwon] {
    font-weight: 600;
    margin-right: 4px;
}

.la-composition__field[b-xox0s2zwon] {
    min-width: 160px;
    max-width: 240px;
}

.la-composition__package[b-xox0s2zwon] {
    max-width: 360px;
    margin-bottom: 12px;
}

.la-composition__line[b-xox0s2zwon] {
    border: 1px solid var(--mud-palette-lines-default);
    border-radius: 4px;
    margin-bottom: 12px;
}

.la-composition__line-head[b-xox0s2zwon] {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: var(--mud-palette-background-gray);
    border-bottom: 1px solid var(--mud-palette-lines-default);
}

.la-composition__line-title[b-xox0s2zwon] {
    flex: 1 1 auto;
    min-width: 0;
    font-weight: 600;
}

.la-composition__tier-select[b-xox0s2zwon] {
    max-width: 160px;
}

.la-composition__line-empty[b-xox0s2zwon] {
    padding: 8px 12px;
    color: var(--mud-palette-text-secondary);
}

.la-composition__row[b-xox0s2zwon] {
    display: grid;
    grid-template-columns: minmax(180px, 1fr) minmax(0, 2fr) minmax(0, 140px) auto;
    align-items: center;
    column-gap: 8px;
    padding: 0 12px;
    border-bottom: 1px solid var(--mud-palette-lines-default);
}

.la-composition__row > *[b-xox0s2zwon] {
    min-width: 0;
}

.la-composition__row[data-state="elsewhere"][b-xox0s2zwon],
.la-composition__row[data-state="blocked"][b-xox0s2zwon] {
    color: var(--mud-palette-text-disabled);
}

.la-composition__capacity[b-xox0s2zwon] {
    color: var(--mud-palette-text-secondary);
}

.la-composition__price[b-xox0s2zwon] {
    text-align: right;
    white-space: nowrap;
}

.la-composition__reason[b-xox0s2zwon] {
    color: var(--mud-palette-warning-darken);
    font-weight: 600;
    text-align: right;
}

.la-composition__note[b-xox0s2zwon] {
    grid-column: 2 / span 2;
    font-style: italic;
}

.la-composition__line-total[b-xox0s2zwon] {
    padding: 6px 12px;
    text-align: right;
}

.la-composition__rule[b-xox0s2zwon] {
    margin-bottom: 12px;
    padding: 6px 12px;
    border-left: 3px solid var(--mud-palette-warning);
    background: var(--mud-palette-background-gray);
}

.la-composition__error-list[b-xox0s2zwon] {
    margin: 4px 0 0 16px;
    padding: 0;
}

.la-composition__totals[b-xox0s2zwon] {
    display: flex;
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 4px 24px;
    padding-top: 8px;
    border-top: 1px solid var(--mud-palette-lines-default);
}

.la-composition__totals-note[b-xox0s2zwon] {
    flex: 1 1 auto;
    color: var(--mud-palette-text-secondary);
}

@container (max-width: 640px) {
    .la-composition__row[b-xox0s2zwon] {
        grid-template-columns: 1fr auto;
    }

    .la-composition__capacity[b-xox0s2zwon],
    .la-composition__note[b-xox0s2zwon] {
        grid-column: 1 / -1;
    }
}
/* /Components/Rights/RightsLineEditor.razor.rz.scp.css */
/* =============================================================================
   RightsLineEditor — §4.8 column tracks (P1-1)
   =============================================================================
   Valid-As-Of: 2026-09-27

   Same pattern as the P0-5 LineItemsEditor rebuild: ONE grid-template-columns
   (--rights-lines-cols) shared by the header row and every body row, and
   `min-width:0` on every cell so an inner MudSelect/MudNumericField shrinks
   inside its track instead of overflowing into the next column.

   §4.8 widths: Ligne 120 · Module / offre minmax(200px,1fr) · Palier 260 ·
   Capacité 150 · Qté 80 · PU 120 · Total 120 · ⋮ 40.
   Budget at the LaDrawer "Document" size (min(1200px, 96vw), §4.1):
   120+200+260+150+80+120+120+40 = 1090 + 7 gaps * 8 = 1146px ≤ ~1152px content
   width. Without prices (licence / trial) the two money tracks are removed from
   the list, not left empty — header and rows still emit the same cell count.

   Below the SURFACE width (container query, §4.2 — never a viewport breakpoint
   inside a drawer) a row wraps onto two lines: Ligne + Module + Palier on the
   first, the rest on the second.
   ============================================================================= */
.rights-lines[b-vrxr95im0s] {
    --rights-lines-cols: 120px minmax(200px, 1fr) 260px 150px 80px 120px 120px 40px;
    container-type: inline-size;
    font-size: 0.875rem;
}

.rights-lines--no-prices[b-vrxr95im0s] {
    --rights-lines-cols: 120px minmax(200px, 1fr) 260px minmax(150px, 1fr) 80px 40px;
}

.rights-lines__grid[b-vrxr95im0s] {
    display: grid;
    grid-template-columns: var(--rights-lines-cols);
}

.rights-lines__row[b-vrxr95im0s] {
    display: grid;
    grid-template-columns: var(--rights-lines-cols);
    grid-column: 1 / -1;
    align-items: center;
    column-gap: 8px;
    border-bottom: 1px solid var(--mud-palette-lines-default);
}

.rights-lines__row--head[b-vrxr95im0s] {
    font-weight: 600;
    min-height: 2.4em;
    align-items: end;
    padding-bottom: 4px;
}

.rights-lines__row--pinned[b-vrxr95im0s] {
    background: var(--mud-palette-background-gray);
}

.rights-lines__row--legacy[b-vrxr95im0s] {
    color: var(--mud-palette-text-secondary);
}

.rights-lines__row--add[b-vrxr95im0s],
.rights-lines__row--empty[b-vrxr95im0s] {
    border-bottom: none;
}

.rights-lines__cell[b-vrxr95im0s] {
    padding: 4px 2px;
    min-width: 0;
}

.rights-lines__cell--head[b-vrxr95im0s] {
    white-space: normal;
    line-height: 1.2;
}

/* A full-width cell inside a row: the inline rule messages, the add link, the empty text. */
.rights-lines__span[b-vrxr95im0s] {
    grid-column: 1 / -1;
}

.rights-lines__issues[b-vrxr95im0s] {
    display: flex;
    flex-wrap: wrap;
    gap: 4px 16px;
    padding-top: 0;
}

.rights-lines__qty[b-vrxr95im0s],
.rights-lines__money[b-vrxr95im0s] {
    text-align: right;
}

.rights-lines__menu[b-vrxr95im0s] {
    display: flex;
    justify-content: center;
}

.rights-lines__capacity[b-vrxr95im0s] {
    white-space: normal;
    overflow-wrap: anywhere;
    line-height: 1.25;
}

.rights-lines__value[b-vrxr95im0s] {
    display: inline-flex;
    align-items: center;
    min-height: 2.5rem;
    overflow-wrap: anywhere;
}

.la-num[b-vrxr95im0s] {
    font-variant-numeric: tabular-nums;
}

.rights-lines__effective[b-vrxr95im0s] {
    margin-top: 12px;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.rights-lines__effective-list[b-vrxr95im0s] {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

.rights-lines__note[b-vrxr95im0s] {
    display: block;
    margin-bottom: 6px;
}

@container (max-width: 900px) {
    .rights-lines__grid[b-vrxr95im0s],
    .rights-lines__row[b-vrxr95im0s] {
        grid-template-columns: 120px minmax(0, 1fr) minmax(0, 1fr);
    }

    .rights-lines__row--head[b-vrxr95im0s] {
        display: none;
    }

    .rights-lines__capacity[b-vrxr95im0s] {
        grid-column: 1 / 3;
    }
}
/* /Components/Saas/LineItemsEditor.razor.rz.scp.css */
/* =============================================================================
   LineItemsEditor — dense quote line grid (UX-LA-3, spec §6.2 / P0-5 §4.8)
   =============================================================================
   Valid-As-Of: 2026-09-27

   P0-5 rebuild (LA_PORTAL_UX_AUDIT_AND_REDESIGN_2026-09-27.md §2.2): the old
   <table> used auto layout, so a <td> width was only a hint — the browser let
   the inner MudSelect/MudTextField controls overflow it instead of shrinking
   them (no `min-width:0` on the flex row inside a cell), which is exactly
   what produced "Remise" colliding with "Total ligne HT". This file now
   defines ONE `grid-template-columns` (--la-lines-cols) shared by the header
   row and every body row (`.la-lines__row`), so every column is a hard track
   — nothing downstream of it can push past its edge.

   Column budget at the LaDrawer "Document" size (min(1200px, 96vw), §4.1):
   32 + 190 + minmax(220,1fr) + 70 + 120 + 70 + 170 + 120 + 40 = 812px fixed
   + 8 gaps * 8px = 64px + the Article column's 220px floor = 1096px, inside
   the drawer's ~1152px content width (1200 - 2*24 padding) at both 1366px and
   1920px viewports (the drawer is capped at 1200px either way, so the budget
   does not change with viewport width — only the Article column's slack does).
   ============================================================================= */
.la-lines[b-np61nd8x0j] {
    --la-lines-cols: 32px 190px minmax(220px, 1fr) 70px 120px 70px 170px 120px 40px;
    display: grid;
    grid-template-columns: var(--la-lines-cols);
    font-size: 0.875rem;
}

.la-lines__row[b-np61nd8x0j] {
    display: grid;
    grid-template-columns: var(--la-lines-cols);
    /* Every row (including the header) spans every grid column, so
       `.la-lines__row` and `.la-lines` share the same track boundaries. */
    grid-column: 1 / -1;
    align-items: center;
    column-gap: 8px;
    border-bottom: 1px solid var(--mud-palette-lines-default);
}

.la-lines__row--head[b-np61nd8x0j] {
    font-weight: 600;
    /* Two lines of wrap-room (§4.2: "labels never truncate; header strips
       wrap onto two rows instead") rather than a fixed single-line height. */
    min-height: 2.4em;
    align-items: end;
    padding-bottom: 4px;
}

.la-lines__row--add[b-np61nd8x0j] {
    border-bottom: none;
}

.la-lines__cell[b-np61nd8x0j] {
    padding: 4px 2px;
    /* Required for a grid/flex child to be allowed to shrink below its
       content width — without it an inner MudSelect/MudTextField can push
       past the cell's track edge into the next column (the P0-5 root cause). */
    min-width: 0;
}

.la-lines__cell--head[b-np61nd8x0j] {
    white-space: normal;
    line-height: 1.2;
}

.la-lines__num[b-np61nd8x0j] {
    font-family: ui-monospace, monospace;
    color: var(--mud-palette-text-secondary);
}

.la-lines__kind[b-np61nd8x0j] { min-width: 0; }
.la-lines__qty[b-np61nd8x0j] { min-width: 0; }
.la-lines__tax[b-np61nd8x0j] { min-width: 0; }
.la-lines__discount[b-np61nd8x0j] { min-width: 0; }
.la-lines__menu[b-np61nd8x0j] {
    display: flex;
    justify-content: center;
}

.la-lines__money[b-np61nd8x0j] {
    text-align: right;
}

.la-lines__item[b-np61nd8x0j] {
    display: flex;
    gap: 6px;
    align-items: center;
    min-width: 0;
}

.la-lines__item-picker[b-np61nd8x0j] {
    flex: 0 1 160px;
    min-width: 0;
}

.la-lines__item-description[b-np61nd8x0j] {
    flex: 1 1 auto;
    min-width: 0;
}

.la-lines__discount-type[b-np61nd8x0j] {
    flex: 0 0 70px;
    min-width: 0;
}

.la-lines__discount-value[b-np61nd8x0j] {
    flex: 1 1 auto;
    min-width: 0;
}

.la-lines__readonly-value[b-np61nd8x0j] {
    /* Matches the ~40px row height MudBlazor's Dense+Text inputs occupy in
       the surrounding cells, so a read-only (book-priced) row's baseline
       lines up with an editable (manual-price) row's — the audit's "rows
       misaligned" defect. */
    display: inline-flex;
    align-items: center;
    min-height: 2.5rem;
}

.la-num[b-np61nd8x0j] {
    font-variant-numeric: tabular-nums;
}

.la-lines__add-link[b-np61nd8x0j] {
    grid-column: 1 / -1;
    padding-top: 6px;
}
/* /Components/Saas/QuoteEditorDrawer.razor.rz.scp.css */
/* QuoteEditorDrawer header + totals footer (UX-LA-3, spec §5.3; P0-5 §2.2/§4.2).
   Valid-As-Of: 2026-09-27 */

/* P0-5 (C11): replaces `MudGrid`/`MudItem md="…"`, which reflows on the
   BROWSER viewport, not the drawer's — every `md="2"` cell computed against
   the full window width even inside a narrower drawer, which is what
   truncated "Période de facturation". A container-relative CSS grid (§4.2)
   reflows by the drawer's own width instead, and no field drops below 220px
   so no label truncates. */
.la-quote-header[b-iyqodopd6c] {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
    align-items: start;
}

.la-quote-totals[b-iyqodopd6c] {
    position: sticky;
    bottom: 0;
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 16px;
    padding: 8px 0;
    background: var(--mud-palette-surface);
    border-top: 1px solid var(--mud-palette-lines-default);
}

.la-quote-totals__discount[b-iyqodopd6c] {
    display: flex;
    align-items: center;
    gap: 8px;
}

.la-quote-totals__table td[b-iyqodopd6c] {
    padding: 2px 8px;
}

.la-quote-totals__table td:last-child[b-iyqodopd6c] {
    text-align: right;
    min-width: 140px;
}

.la-quote-totals__grand td[b-iyqodopd6c] {
    font-size: 1.1rem;
    font-weight: 600;
}

.la-num[b-iyqodopd6c] {
    font-variant-numeric: tabular-nums;
}
/* /Components/Saas/SubscriptionPackagePicker.razor.rz.scp.css */
/* #387 P1 — package picker of the « Nouvelle souscription » drawer.
   Plain wrappers only: MudBlazor children do not receive this component's
   scope attribute, so nothing here targets them. */

.la-package-picker__family[b-rs70vknhvp] {
    margin-top: 8px;
}

.la-package-picker__row[b-rs70vknhvp] {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 8px;
}

.la-package-picker__name[b-rs70vknhvp] {
    font-weight: 500;
}

.la-package-picker__meta[b-rs70vknhvp] {
    margin-left: 8px;
    opacity: 0.75;
    font-size: 0.85em;
}

/* An unsellable line stays readable (its reason is the point) but recedes. */
.la-package-picker__row[data-sellable="false"] .la-package-picker__name[b-rs70vknhvp] {
    opacity: 0.6;
}
/* /Components/Ui/FormSection.razor.rz.scp.css */
.la-form-section[b-ls0mfcjjic] {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-left: 2px solid var(--mud-palette-primary);
    background: rgba(var(--mud-palette-primary-rgb), 0.04);
    border-radius: 0 4px 4px 0;
    margin-bottom: 16px;
}

.la-form-section__title[b-ls0mfcjjic] {
    font-weight: 600;
}
/* /Components/Ui/LaDrawer.razor.rz.scp.css */
/* WHY: scoped CSS reaches the MudDrawer root (<aside class="mud-drawer">)
   because Blazor applies the parent component's scope attribute to a child
   component's ROOT element only. MudDrawer renders ChildContent one level
   deeper, inside its own internal `.mud-drawer-content` div, which is NOT
   that root element — so it never receives the la-drawer scope attribute and
   a plain `.la-drawer .mud-drawer-content` rule would never match. `::deep`
   drops the scope attribute requirement for the right-hand selector, so this
   reaches into MudDrawer's markup instead (C12). */
.la-drawer[b-babrmx8vkg] {
    display: flex;
    flex-direction: column;
}

.la-drawer[b-babrmx8vkg]  .mud-drawer-content {
    display: flex;
    flex-direction: column;
    height: 100%;
    overflow: hidden;
}

.la-drawer__header[b-babrmx8vkg] {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: space-between;
    padding: 16px 16px 16px 24px;
    border-bottom: 1px solid var(--mud-palette-divider);
}

/* min-height: 0 is required for a flex child to be allowed to shrink below
   its content height — without it, overflow-y:auto never kicks in and the
   drawer grows to fit the content instead of scrolling (same family of bug
   as C12). */
.la-drawer__body[b-babrmx8vkg] {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 16px 24px;
}

.la-drawer__footer[b-babrmx8vkg] {
    flex-shrink: 0;
    padding: 12px 24px;
    border-top: 1px solid var(--mud-palette-divider);
    background-color: var(--mud-palette-surface);
}
