/* Page template of the shell (FD2): the look of the shared page-building helpers (shell/page-template.mjs) on the approved mockup R09.
   Pages that still render through heading(), panel(), table() and button() (tenant hub, « Bientôt disponible » pages, Mes sessions,
   Rejoindre un espace, Membres et rôles, first-administrator and billing pages, and the other page modules of apps/web) take the values of
   evo/modular-workspace/maquette (layout-standard.css, UI-NAV-001 and the collection standard), read from shell/tokens.css:
   full-bleed header (min 66px, 24px gutter, bottom line), h1 Jost 550 19px, primary #ff6a00 with text #20242a, buttons 12px / 36px / radius 7,
   panels radius 10 with 20px padding, table head 11px on #f8f9fb, 2px orange focus ring, no width cap and no footer.
   Scope: every rule sits under .croo-frame__main and is switched off for pages that hold .module-slot or .home-page, which draw their own
   values (module-slot.css, home.css), so a module bundle never meets a rule of this file. The scope is wrapped in :where(), so it adds no
   specificity: a page-specific rule of web.css (tm-table, cap-table, recon, ...) keeps winning over the template (the plain-table 680px minimum
   is wrapped in :where() too, so .recon table keeps its own), and the template wins over the
   bare element and class rules of styles.css by coming last in the cascade (page.css is the last stylesheet in index.html). The one rule
   that needs real specificity, the main area (styles.css main{padding}), writes the scope out. The login and consent pages do not use the frame and
   keep styles.css. The modal dialog (outside the frame) gets the same buttons and focus ring in the last block.
   Mobile: the mockup's breakpoint is 760px (tokens.css gives the 16px gutter). A collection table keeps a 680px minimum and scrolls
   horizontally inside its box, as the approved mockup draws it at 390px. */

/* The old portal variables read by the legacy page rules (web.css, styles.css) point at the r10 tokens inside the shell pages: the muted grey
   #707b83 (4.33:1) becomes --croo-muted and the line follows the token. */
:where(.croo-frame__main:not(:has(.module-slot,.home-page))){--muted:var(--croo-muted);--line:var(--croo-line)}
/* Small print under a cell value: the 11px floor */
:where(.croo-frame__main:not(:has(.module-slot,.home-page))) td small{font-size:var(--croo-size-11)}

/* Page area: no old padding, no width cap (the mockup draws no footer, and none is rendered) */
.croo-frame__main:not(:has(.module-slot,.home-page)){padding:0;scrollbar-gutter:auto}
:where(.croo-frame__main:not(:has(.module-slot,.home-page))) .canvas{max-width:none;margin:0}
:where(.croo-frame__main:not(:has(.module-slot,.home-page))) .page-flow{align-items:flex-start;column-gap:8px;row-gap:var(--croo-gap)}
:where(.croo-frame__main:not(:has(.module-slot,.home-page)))>.canvas>.page-flow{padding:var(--croo-gutter)}

/* Header */
:where(.croo-frame__main:not(:has(.module-slot,.home-page))) .page-flow>.heading{flex:0 0 calc(100% + 2 * var(--croo-gutter));margin:calc(-1 * var(--croo-gutter)) calc(-1 * var(--croo-gutter)) 0}
:where(.croo-frame__main:not(:has(.module-slot,.home-page))) .heading{display:flex;align-items:center;justify-content:space-between;gap:16px;min-height:var(--croo-header-min);padding:10px var(--croo-gutter);background:var(--croo-page);border-bottom:1px solid var(--croo-line)}
:where(.croo-frame__main:not(:has(.module-slot,.home-page))) .heading .eyebrow{margin:0 0 3px;color:var(--croo-eyebrow);font-size:var(--croo-size-11);font-weight:var(--croo-weight-regular);letter-spacing:var(--croo-letter-eyebrow)}
:where(.croo-frame__main:not(:has(.module-slot,.home-page))) p{line-height:1.7}
:where(.croo-frame__main:not(:has(.module-slot,.home-page))) h1{color:var(--croo-ink);font-family:var(--croo-font-title);font-size:var(--croo-size-19);font-weight:var(--croo-weight-title);line-height:1.3;letter-spacing:-.4px}
:where(.croo-frame__main:not(:has(.module-slot,.home-page))) .heading .subtitle{max-width:none;margin:3px 0 0;color:var(--croo-muted);font-size:var(--croo-size-11);line-height:1.5}
:where(.croo-frame__main:not(:has(.module-slot,.home-page))) .heading .actions{gap:8px}
:where(.croo-frame__main:not(:has(.module-slot,.home-page))) h2{color:var(--croo-ink);font-family:var(--croo-font-body);font-size:var(--croo-size-16);font-weight:var(--croo-weight-strong);line-height:1.4;letter-spacing:-.25px}
:where(.croo-frame__main:not(:has(.module-slot,.home-page))) .panel-title h2{font-size:var(--croo-size-16);line-height:1.4}
:where(.croo-frame__main:not(:has(.module-slot,.home-page))) h3{color:var(--croo-ink);font-family:var(--croo-font-body);font-size:var(--croo-size-13);font-weight:var(--croo-weight-strong);line-height:1.45}

/* Panels */
:where(.croo-frame__main:not(:has(.module-slot,.home-page))) .soon-page .panel-body>p{margin:0 0 10px}
:where(.croo-frame__main:not(:has(.module-slot,.home-page))) .panel{padding:20px;border:1px solid var(--croo-line);border-radius:var(--croo-radius-panel);background:var(--croo-page);box-shadow:none;overflow:visible}
:where(.croo-frame__main:not(:has(.module-slot,.home-page))) .panel-pad{padding:20px}
:where(.croo-frame__main:not(:has(.module-slot,.home-page))) .panel-title{padding:0;margin:0 0 16px}
/* A table panel that carries its own title (billing currencies, issuing scopes, zones): the title keeps the 20px inset and the inner table box is flat */
:where(.croo-frame__main:not(:has(.module-slot,.home-page))) .panel.table-scroll>.panel-title{padding:20px 20px 0;margin:0 0 16px}
:where(.croo-frame__main:not(:has(.module-slot,.home-page))) .panel.table-scroll>.panel.table-scroll{border:0;border-top:1px solid var(--croo-line);border-radius:0}
:where(.croo-frame__main:not(:has(.module-slot,.home-page))) .panel-body{padding:0}
:where(.croo-frame__main:not(:has(.module-slot,.home-page))) .panel.table-scroll{padding:0;border-radius:var(--croo-radius-collection);overflow-x:auto;overflow-y:hidden}

/* Tables: head 11px on #f8f9fb, cells 12px */
:where(.croo-frame__main:not(:has(.module-slot,.home-page))) table{font-size:var(--croo-size-12);white-space:normal}
:where(.croo-frame__main:not(:has(.module-slot,.home-page))) :where(.table-scroll>table:not([class])){min-width:680px}
:where(.croo-frame__main:not(:has(.module-slot,.home-page))) th{padding:var(--croo-head-y) var(--croo-cell-x);background:var(--croo-table-head-bg);border-bottom:1px solid var(--croo-line);color:var(--croo-muted-tint);font-family:var(--croo-font-body);font-size:var(--croo-size-11);font-weight:var(--croo-weight-medium);line-height:1.5;letter-spacing:0;text-transform:none;text-align:left}
:where(.croo-frame__main:not(:has(.module-slot,.home-page))) td{padding:var(--croo-cell-y) var(--croo-cell-x);border-bottom:1px solid var(--croo-line);font-size:var(--croo-size-12);vertical-align:middle}
:where(.croo-frame__main:not(:has(.module-slot,.home-page))) tbody tr:last-child td{border-bottom:0}
:where(.croo-frame__main:not(:has(.module-slot,.home-page))) tbody tr:hover{background:var(--croo-table-row-hover)}
:where(.croo-frame__main:not(:has(.module-slot,.home-page))) .croo-table-compact .btn{white-space:nowrap}
:where(.croo-frame__main:not(:has(.module-slot,.home-page))) .croo-table-compact td{vertical-align:top}
:where(.croo-frame__main:not(:has(.module-slot,.home-page))) .croo-collection-table{table-layout:fixed;min-width:680px}
:where(.croo-frame__main:not(:has(.module-slot,.home-page))) .croo-collection-table th:first-child{width:24%}
:where(.croo-frame__main:not(:has(.module-slot,.home-page))) .croo-collection-table th:last-child{width:25%}
:where(.croo-frame__main:not(:has(.module-slot,.home-page))) .croo-list-name h3{display:block;margin:0;font-size:var(--croo-size-13);font-weight:var(--croo-weight-strong);line-height:1.5}
:where(.croo-frame__main:not(:has(.module-slot,.home-page))) .croo-list-info{color:var(--croo-muted);font-size:var(--croo-size-12);line-height:1.6;overflow-wrap:anywhere}
:where(.croo-frame__main:not(:has(.module-slot,.home-page))) .croo-list-info p{margin:3px 0}
:where(.croo-frame__main:not(:has(.module-slot,.home-page))) .croo-list-actions>:is(a,button){margin:3px 8px 3px 0}
:where(.croo-frame__main:not(:has(.module-slot,.home-page))) .croo-list-actions .btn{border-color:var(--croo-line);font-weight:var(--croo-weight-regular)}

/* Information note: the mockup's hint (5b7255 on f4f8f0, 4.90:1), radius 8, padding 16px 20px */
:where(.croo-frame__main:not(:has(.module-slot,.home-page))) .page-flow>.heading{position:sticky;top:0;z-index:6;background:var(--croo-page)}
:where(.croo-frame__main:not(:has(.module-slot,.home-page))) .eyebrow{color:var(--croo-eyebrow);font-size:var(--croo-size-11)}
:where(.croo-frame__main:not(:has(.module-slot,.home-page))) h1 .count{font-size:var(--croo-size-11)}
:where(.croo-frame__main:not(:has(.module-slot,.home-page))) .notice.warn{color:var(--croo-warn)}
:where(.croo-frame__main:not(:has(.module-slot,.home-page))) .notice.blue{padding:16px 20px;border:1px solid var(--croo-hint-line);border-radius:var(--croo-radius-tile);background:var(--croo-hint-bg);color:var(--croo-hint-ink);font-size:var(--croo-size-12);line-height:1.7}
:where(.croo-frame__main:not(:has(.module-slot,.home-page))) .notice.blue p{margin:0;color:inherit}
/* A table that is the whole content of a panel with a title-less box (the members list): the box pads 20px around the table, as the mockup draws it */
:where(.croo-frame__main:not(:has(.module-slot,.home-page))) .panel.table-scroll:has(>.tm-table){padding:20px;border-radius:var(--croo-radius-panel)}

/* Actions (UI-NAV-001): one action system, 12px / 36px / radius 7, orange primary with dark text */
:where(.croo-frame__main:not(:has(.module-slot,.home-page))) .btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:var(--croo-control-36);padding:8px 12px;border:1px solid var(--croo-button-line);border-radius:var(--croo-radius-button);background:var(--croo-page);color:var(--croo-ink);font-family:var(--croo-font-body);font-size:var(--croo-size-12);font-weight:var(--croo-weight-medium);line-height:18px}
:where(.croo-frame__main:not(:has(.module-slot,.home-page))) .btn:hover{background:var(--croo-button-hover-bg);border-color:var(--croo-button-hover-line)}
/* .btn.soft: the selected item of a tab-like group (billing tabs, rate filters, plan switch, scope filters), which also carries aria-current, and the emphasis action
   « Approuver » of the issuing scopes. The rail's current state, from tokens; FD3 draws the final tab. Not keyed on aria-current, so pills of pages outside the template keep their look. */
:where(.croo-frame__main:not(:has(.module-slot,.home-page))) .btn.soft{background:var(--croo-current-bg);border-color:var(--croo-current-bg);color:var(--croo-current-ink);font-weight:var(--croo-weight-strong)}
:where(.croo-frame__main:not(:has(.module-slot,.home-page))) .btn.soft:hover{background:var(--croo-current-bg);border-color:var(--croo-current-ink)}
:where(.croo-frame__main:not(:has(.module-slot,.home-page))) .btn.small{min-height:var(--croo-control-36);padding:8px 12px;font-size:var(--croo-size-12)}
:where(.croo-frame__main:not(:has(.module-slot,.home-page))) .btn.primary{background:var(--croo-accent);border-color:var(--croo-accent);color:var(--croo-accent-text)}
:where(.croo-frame__main:not(:has(.module-slot,.home-page))) .btn.primary:hover{background:var(--croo-accent-hover);border-color:var(--croo-accent-hover)}
:where(.croo-frame__main:not(:has(.module-slot,.home-page))) .btn.danger{background:var(--croo-page);border-color:var(--croo-danger-line);color:var(--croo-danger)}
:where(.croo-frame__main:not(:has(.module-slot,.home-page))) .btn.danger:hover{background:var(--croo-danger-hover-bg);border-color:var(--croo-danger-hover-line)}
:where(.croo-frame__main:not(:has(.module-slot,.home-page))) .btn.text{background:transparent;border-color:transparent;color:var(--croo-quiet-ink);padding:8px 12px}
:where(.croo-frame__main:not(:has(.module-slot,.home-page))) .btn.text:hover{background:var(--croo-button-hover-bg);border-color:var(--croo-button-hover-bg)}
:where(.croo-frame__main:not(:has(.module-slot,.home-page))) .link,:where(.croo-frame__main:not(:has(.module-slot,.home-page))) .panel p a:not(.btn){color:var(--croo-link)}
:where(.croo-frame__main:not(:has(.module-slot,.home-page))) .muted,:where(.croo-frame__main:not(:has(.module-slot,.home-page))) :where(.panel p){color:var(--croo-muted)}
/* « Mes sessions »: the mockup puts the note right under the panel */
:where(.croo-frame__main:not(:has(.module-slot,.home-page))) .croo-note-flush{margin-top:calc(-1 * var(--croo-gap))}
:where(.croo-frame__main:not(:has(.module-slot,.home-page))) :is(a,button,input,select,textarea,summary):focus-visible{outline:var(--croo-focus-width) solid var(--croo-focus);outline-offset:var(--croo-focus-offset)}

/* Fields: 36px, radius 6 (checkboxes and radios keep their own size) */
:where(.croo-frame__main:not(:has(.module-slot,.home-page))) .field :is(input,select):not([type=checkbox]):not([type=radio]){min-height:var(--croo-control-36);padding:9px 11px;border-radius:var(--croo-radius-field);border-color:var(--croo-field-line);font-size:var(--croo-size-13)}
:where(.croo-frame__main:not(:has(.module-slot,.home-page))) .field textarea{padding:9px 11px;border-radius:var(--croo-radius-field);border-color:var(--croo-field-line);font-size:var(--croo-size-13)}

/* Badges: radius 5, padding 4px 7px, 10px */
:where(.croo-frame__main:not(:has(.module-slot,.home-page))) .badge{display:inline-block;padding:4px 7px;border-radius:var(--croo-radius-badge);background:var(--croo-neutral-badge-bg);color:var(--croo-neutral-badge);font-size:var(--croo-size-11);line-height:inherit}
:where(.croo-frame__main:not(:has(.module-slot,.home-page))) .badge.green{background:var(--croo-success-bg);color:var(--croo-success)}
:where(.croo-frame__main:not(:has(.module-slot,.home-page))) .badge.blue{background:var(--croo-info-bg);color:var(--croo-info)}
:where(.croo-frame__main:not(:has(.module-slot,.home-page))) .badge.orange{background:var(--croo-warn-bg);color:var(--croo-warn)}
:where(.croo-frame__main:not(:has(.module-slot,.home-page))) .soon-chip-inline{margin-left:6px;vertical-align:middle}
/* the mockup draws the context links with their chips on a line of normal height */
:where(.croo-frame__main:not(:has(.module-slot,.home-page))) .panel p:has(>.soon-chip-inline){line-height:normal}

/* Tables below 640px (r10, one pattern): stacked rows, the name first, then the labelled values, the actions last. The label of a cell is its
   column head, written by the markup as data-label (page-template.mjs table(), the hub and the home table); a table without data-label keeps
   its sideways scroll inside its box. */
@media (max-width:640px){
  :where(.croo-frame__main:not(:has(.module-slot,.home-page))) table:has(td[data-label]){display:block;width:100%;min-width:0;table-layout:auto}
  :where(.croo-frame__main:not(:has(.module-slot,.home-page))) table:has(td[data-label]) thead{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}
  :where(.croo-frame__main:not(:has(.module-slot,.home-page))) table:has(td[data-label]) :is(tbody,tr){display:block;width:100%}
  :where(.croo-frame__main:not(:has(.module-slot,.home-page))) table:has(td[data-label]) tr{padding:10px 0;border-bottom:1px solid var(--croo-line)}
  :where(.croo-frame__main:not(:has(.module-slot,.home-page))) table:has(td[data-label]) tbody tr:last-child{border-bottom:0}
  :where(.croo-frame__main:not(:has(.module-slot,.home-page))) table:has(td[data-label]) td{display:block;padding:5px var(--croo-cell-x);border:0;text-align:left}
  :where(.croo-frame__main:not(:has(.module-slot,.home-page))) table:has(td[data-label]) td[data-label]::before{content:attr(data-label);display:block;margin-bottom:2px;color:var(--croo-muted);font-size:var(--croo-size-11);font-weight:var(--croo-weight-strong)}
  :where(.croo-frame__main:not(:has(.module-slot,.home-page))) table:has(td[data-label]) td:first-child{font-weight:var(--croo-weight-strong)}
  :where(.croo-frame__main:not(:has(.module-slot,.home-page))) table:has(td[data-label]) td:first-child::before{display:none}
  :where(.croo-frame__main:not(:has(.module-slot,.home-page))) .panel.table-scroll{overflow:visible}
}

/* Mobile: header wraps, the actions go under the title */
@media (max-width:760px){
  :where(.croo-frame__main:not(:has(.module-slot,.home-page))) .heading{flex-wrap:wrap;align-items:flex-start;gap:12px;padding:12px var(--croo-gutter)}
  :where(.croo-frame__main:not(:has(.module-slot,.home-page))) .heading .actions{max-width:100%}
}

/* The modal dialog sits outside the frame: same buttons and focus ring */
#dialog .btn{display:inline-flex;align-items:center;justify-content:center;gap:8px;min-height:var(--croo-control-36);padding:8px 12px;border:1px solid var(--croo-button-line);border-radius:var(--croo-radius-button);background:var(--croo-page);color:var(--croo-ink);font-size:var(--croo-size-12);font-weight:var(--croo-weight-medium);line-height:18px}
#dialog .btn:hover{background:var(--croo-button-hover-bg);border-color:var(--croo-button-hover-line)}
#dialog .btn.primary{background:var(--croo-accent);border-color:var(--croo-accent);color:var(--croo-accent-text)}
#dialog .btn.primary:hover{background:var(--croo-accent-hover);border-color:var(--croo-accent-hover)}
#dialog .btn.danger{background:var(--croo-page);border-color:var(--croo-danger-line);color:var(--croo-danger)}
#dialog :is(a,button,input,select,textarea,summary):focus-visible{outline:var(--croo-focus-width) solid var(--croo-focus);outline-offset:var(--croo-focus-offset)}

/* r10.14: the notice after arrival sits above the home page, which the generic notice rule leaves out (:has(.home-page)). */
.croo-frame__main [data-arrival-notice]{margin:0 0 16px;padding:16px 20px;border:1px solid var(--croo-hint-line);border-radius:var(--croo-radius-tile);background:var(--croo-hint-bg);color:var(--croo-hint-ink);font-size:var(--croo-size-12);line-height:1.7}
.croo-frame__main [data-arrival-notice] p{margin:0;color:inherit}
