/* Styles des écrans du lot 3, croissance (/v2) : liens courts et QR, e-mail pro,
   concurrents, bilan annuel, parcours client, séquences, relecture, visite mystère.
   « Atelier calme » (docs/v2/REFONTE-DESIGN.md §4) : pas de cartes, des sections
   séparées par un filet, des lignes de liste et des formulaires libellé à gauche.
   Primitives partagées : .at-page, .at-section, .at-list/.at-row, .at-form/.at-field,
   .at-stats, .at-status, .at-empty, .at-tabs (components.css). Tout le reste est préfixé « cr- ». */

/* ---------- Mise en page commune ---------- */
.cr-screen { min-width: 0; }
.cr-screen > * { min-width: 0; }
.cr-screen [hidden], .cr-dialog [hidden] { display: none !important; }
.cr-screen h2, .cr-screen h3, .cr-dialog h2 { margin: 0; }
.cr-screen :focus-visible, .cr-dialog :focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; }
.cr-heading .at-page-actions { align-items: center; }
.cr-screen .segmented { flex-wrap: wrap; height: auto; }
.cr-screen .segmented button { min-width: 0; min-height: 34px; padding: 0 12px; font: inherit; font-size: var(--text-sm); font-variant-numeric: tabular-nums; }

/* Colonnes : le travail à gauche, un volet étroit à droite (empilés sous 1100 px). */
.cr-split { display: grid; grid-template-columns: minmax(0, 1fr) 320px; align-items: start; gap: var(--space-9); min-width: 0; }
.cr-split-main, .cr-split-aside { display: grid; align-content: start; gap: var(--space-6); min-width: 0; }
.cr-split-aside { position: sticky; top: var(--space-6); }
.cr-split-main > .at-section:not([hidden]) ~ .at-section,
.cr-split-aside > .at-section:not([hidden]) ~ .at-section { padding-top: var(--space-6); border-top: 1px solid var(--line); }

/* Textes */
.cr-muted { color: var(--muted); }
.cr-small { font-size: var(--text-sm); }
.cr-mono { font-family: var(--font-mono); font-size: .92em; overflow-wrap: anywhere; }
.cr-subtitle { margin: var(--space-3) 0 0 !important; color: var(--ink); font-size: var(--text-md); font-weight: 600; }
.cr-lead { max-width: 65ch; margin: 0; color: var(--ink); font-size: var(--text-md); line-height: 1.6; text-wrap: pretty; }
.cr-lead.is-muted { color: var(--muted); }
.cr-note { max-width: 72ch; margin: 0; color: var(--muted); font-size: var(--text-sm); line-height: 1.5; }
.cr-note strong { color: var(--ink); font-weight: 600; }
.cr-bullets { display: grid; gap: 6px; max-width: 65ch; margin: 0; padding-left: 18px; font-size: var(--text-md); line-height: 1.5; }
.cr-bullets.is-muted { color: var(--muted); font-size: var(--text-sm); }
.cr-bullets strong { font-weight: 600; }
.cr-reco { color: var(--muted); font-size: var(--text-xs); font-weight: 500; }
.cr-optional { color: var(--muted); font-weight: 400; }
.cr-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 12px; }
.cr-actions:empty { display: none; }
.cr-readonly { margin: 0; }
.cr-help { margin: 0; color: var(--muted); font-size: var(--text-xs); line-height: 1.45; }
.cr-help.is-ok { color: var(--green); font-weight: 500; }
.cr-help.is-bad { color: var(--red); font-weight: 500; }
.cr-error svg { flex: none; width: 14px; height: 14px; margin-top: 1px; }
.cr-screen .ai-cost { font-size: var(--text-xs); font-weight: 500; }
.cr-loading { display: grid; gap: var(--space-4); }
.cr-loading > .skeleton.is-heading { width: 40%; }

/* Prochaine étape : une ligne entre deux filets. */
.cr-next .at-row { padding-block: 12px; }
.cr-next .at-row:hover { background: transparent; }
.cr-next .at-row-meta { max-width: 72ch; }

/* Explications : termes techniques et « Pourquoi ? » */
.cr-term-wrap { position: relative; display: inline; }
.cr-term { padding: 0; border: 0; border-bottom: 1px dotted currentColor; color: inherit; background: none; font: inherit; cursor: help; }
.cr-term-tip { position: absolute; z-index: 5; top: calc(100% + 6px); left: 0; display: block; width: min(300px, 78vw); padding: 10px 12px; border-radius: var(--radius); color: var(--surface); background: var(--ink); box-shadow: var(--shadow-md); font-size: var(--text-sm); font-weight: 400; line-height: 1.45; text-align: left; text-transform: none; letter-spacing: 0; white-space: normal; }
.cr-why { display: inline-flex; flex-direction: column; align-items: flex-start; }
.cr-screen .why { color: var(--muted); font-size: var(--text-sm); font-weight: 500; }
.cr-screen .why:hover { color: var(--ink); }
.cr-screen .why svg { width: 14px; height: 14px; }
.cr-screen .why-text { display: block; max-width: 65ch; margin-top: 6px; padding: 0 0 0 12px; border-left: 2px solid var(--line-strong); border-radius: 0; color: var(--ink-2); background: none; font-size: var(--text-sm); line-height: 1.5; }

/* ---------- Champs ---------- */
.cr-screen .at-field-control > :where(input, select, textarea) + :where(input, select, textarea) { margin-top: 2px; }
.cr-screen .at-field-control > .at-field-help:not(.cr-help.is-ok, .cr-help.is-bad) { color: var(--muted); }
.cr-form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 16px; }
.cr-form-grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
/* Formulaire empilé (volet étroit, fenêtres, grilles) : libellé au-dessus, sans filet entre les champs. */
:is(.at-form.is-stacked, .cr-dialog, .cr-form-grid, .cr-advanced) .at-field { grid-template-columns: minmax(0, 1fr); gap: 6px; padding: 0; border-bottom: 0; }
:is(.at-form.is-stacked, .cr-dialog, .cr-form-grid, .cr-advanced) .at-field-label { padding-top: 0; }
:is(.at-form.is-stacked, .cr-dialog, .cr-form-grid, .cr-advanced) .at-field-control { max-width: none; }
.at-form.is-stacked { gap: var(--space-4); }
.cr-screen .at-form .cr-advanced { margin-top: var(--space-2); }
.cr-screen .at-form > .cr-error { margin-top: var(--space-3); }
.cr-dialog .at-field :where(input:not([type="checkbox"], [type="radio"], [type="color"]), select, textarea) { min-height: var(--control-md); }
.cr-prefix { display: flex; min-width: 0; border: 1px solid var(--line-strong); border-radius: var(--field-radius); background: var(--surface); }
.cr-prefix:focus-within { border-color: var(--blue); box-shadow: 0 0 0 3px color-mix(in srgb, var(--blue) 20%, transparent); }
.cr-prefix span { display: flex; align-items: center; max-width: 55%; padding: 0 8px 0 10px; overflow: hidden; color: var(--muted); font-family: var(--font-mono); font-size: var(--text-xs); white-space: nowrap; }
.cr-screen .cr-prefix input { flex: 1; min-width: 0; border: 0; border-left: 1px solid var(--line); border-radius: 0 var(--field-radius) var(--field-radius) 0; box-shadow: none; }
.cr-screen [aria-invalid="true"] { border-color: var(--red); }
.cr-fieldset { display: grid; gap: 8px; min-width: 0; margin: 0; padding: 0; border: 0; }
.cr-fieldset legend { margin-bottom: 8px; padding: 0; color: var(--ink); font-size: var(--text-sm); font-weight: 500; }
.cr-checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 0 16px; }
.cr-check { display: flex; align-items: center; gap: 10px; min-height: 40px; border-bottom: 1px solid var(--line); cursor: pointer; }
.cr-check input { flex: none; width: 16px; height: 16px; margin: 0; accent-color: var(--ink); }

/* Choix exclusif en lignes : point, libellé, aide. */
.cr-radios { display: grid; border-top: 1px solid var(--line); }
.cr-radio { display: flex; align-items: flex-start; gap: 10px; width: 100%; min-height: 44px; padding: 10px 6px; border: 0; border-bottom: 1px solid var(--line); color: var(--ink); background: transparent; font: inherit; text-align: left; cursor: pointer; transition: background-color var(--dur-2) var(--ease-soft); }
.cr-radio:hover:not(:disabled) { background: var(--row-hover); }
.cr-radio:disabled { cursor: default; }
.cr-radio:disabled:not([aria-checked="true"]) { color: var(--muted); }
.cr-radio:focus-visible { outline: 2px solid var(--blue); outline-offset: -2px; }
.cr-radio-dot { position: relative; flex: none; width: 16px; height: 16px; margin-top: 2px; border: 1.5px solid var(--line-hover); border-radius: 50%; background: var(--surface); }
.cr-radio[aria-checked="true"] .cr-radio-dot { border-color: var(--ink); }
.cr-radio[aria-checked="true"] .cr-radio-dot::after { position: absolute; inset: 3px; border-radius: 50%; background: var(--ink); content: ""; }
.cr-radio-text { display: block; min-width: 0; line-height: 1.4; }
.cr-radio-text strong { font-size: var(--text-md); font-weight: 500; }
.cr-radio[aria-checked="true"] .cr-radio-text strong { font-weight: 600; }
.cr-radio-text small { display: block; margin-top: 1px; color: var(--muted); font-size: var(--text-sm); }

/* ---------- Tableaux : filets seuls, chiffres alignés à droite ---------- */
.cr-table-wrap { min-width: 0; overflow-x: auto; }
.cr-table { width: 100%; border-collapse: collapse; border-top: 1px solid var(--line); font-size: var(--text-md); font-variant-numeric: tabular-nums; }
.cr-table th, .cr-table td { padding: 10px 12px 10px 0; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.cr-table :is(th, td):last-child { padding-right: 0; }
.cr-table thead th { color: var(--muted); font-size: var(--text-sm); font-weight: 500; white-space: nowrap; }
.cr-table tbody tr { transition: background-color var(--dur-2) var(--ease-soft); }
.cr-table tbody tr:hover > * { background: var(--row-hover); }
.cr-table tbody th { font-weight: 500; }
.cr-table td > strong { display: block; font-weight: 500; }
.cr-table td small { display: block; margin-top: 2px; color: var(--muted); font-size: var(--text-xs); line-height: 1.4; }
.cr-table tr.is-selected > * { background: var(--surface-2); }
.cr-table tr.is-selected > :first-child { box-shadow: inset var(--accent-bar) 0 0 var(--blue); }
.cr-table tr.is-selected > :first-child { padding-left: 10px; }
.cr-table .is-num, .cr-table.cr-num td { text-align: right; }
.cr-row-actions { white-space: nowrap; text-align: right !important; }
.cr-row-actions > * { vertical-align: middle; }
.cr-row-actions .at-link { min-height: 32px; margin-right: 6px; }
.cr-num-cell { flex: none; margin-left: auto; color: var(--ink); font-size: var(--text-md); font-weight: 500; font-variant-numeric: tabular-nums; white-space: nowrap; }
.cr-rank-num { color: var(--muted); font-size: var(--text-sm); font-variant-numeric: tabular-nums; }

/* ---------- Liens courts et QR ---------- */
.cr-links-table td:first-child .cr-mono { display: block; color: var(--muted); }
.cr-links-table td:first-child .at-status { margin-top: 2px; }
.cr-dest { max-width: 0; width: 38%; }
.cr-url { display: block; overflow: hidden; color: var(--ink-2); font-size: var(--text-sm); text-decoration: none; text-overflow: ellipsis; white-space: nowrap; }
.cr-url:hover { color: var(--blue-strong); text-decoration: underline; text-underline-offset: 3px; }
.cr-uses { display: inline-flex; align-items: center; gap: 8px; }
.cr-uses strong { font-weight: 500; }
.cr-spark rect { fill: var(--ink-2); }
.cr-spark rect.is-zero { fill: var(--line-strong); }
.cr-links-table tr.is-off td:not(.cr-row-actions) { color: var(--muted); }
.cr-qr-figure { display: grid; gap: 8px; justify-items: center; margin: 0; padding: var(--space-4); border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.cr-qr-figure img { display: block; width: 200px; max-width: 100%; height: auto; aspect-ratio: 1; image-rendering: pixelated; }
.cr-qr-figure figcaption { max-width: 100%; color: var(--muted); font-size: var(--text-xs); text-align: center; }
.cr-qr-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.cr-color { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; font-size: var(--text-sm); font-weight: 500; }
.cr-color input { width: 44px; height: 32px; padding: 2px; border: 1px solid var(--line-strong); border-radius: var(--radius-sm); background: var(--surface); cursor: pointer; }
.cr-color .cr-help { flex-basis: 100%; }

/* ---------- E-mail pro ---------- */
.cr-mail-address { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.cr-screen .cr-mail-address input { flex: 1 1 140px; width: auto; max-width: 220px; }
.cr-mail-address span { color: var(--muted); font-size: var(--text-lg); }
.cr-screen .cr-mail-address select { flex: 1 1 200px; width: auto; max-width: 300px; }
.cr-provider-help { max-width: 65ch; padding: var(--space-3) 0 var(--space-3) calc(var(--field-label-width) + var(--space-6)); border-bottom: 1px solid var(--line); }
.cr-dns td:first-child { min-width: 180px; }
.cr-dns td:first-child strong { font-weight: 600; }
.cr-dns code, .cr-confirm-list code, .cr-found code { font-family: var(--font-mono); font-size: 12.5px; overflow-wrap: anywhere; word-break: break-all; }
.cr-copyable { display: inline-flex; align-items: flex-start; gap: 4px; max-width: 100%; }
.cr-copyable code { padding-top: 6px; }
.cr-dns-value { min-width: 220px; }
.cr-copy { flex: none; width: 30px; height: 30px; border-color: transparent; background: transparent; color: var(--muted); }
.cr-copy:hover { color: var(--ink); background: var(--surface-3); }
.cr-copy svg { width: 14px; height: 14px; }
.cr-dns td:last-child { min-width: 140px; }
.cr-advice { color: var(--ink-2) !important; }
.cr-confirm-list { display: grid; gap: 6px; margin: 0; padding-left: 18px; font-size: var(--text-sm); }

/* ---------- Concurrents ---------- */
.cr-cmp { min-width: 640px; }
.cr-cmp thead th { min-width: 140px; padding-bottom: 12px; color: var(--ink); vertical-align: bottom; white-space: normal; }
.cr-cmp thead th:first-child { min-width: 170px; }
.cr-cmp-name { display: block; font-size: var(--text-md); font-weight: 600; overflow-wrap: anywhere; }
.cr-cmp th.is-own .cr-cmp-name { color: var(--ink); }
.cr-cmp th.is-own { box-shadow: inset 0 -2px 0 var(--ink); }
.cr-cmp-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 2px 8px; margin-top: 4px; }
.cr-cmp-actions .icon-button { width: 28px; height: 28px; }
.cr-cmp thead .at-link { margin-top: 2px; font-weight: 500; }
.cr-cmp-error { display: block; margin-top: 4px; color: var(--red); font-size: var(--text-xs); font-weight: 500; }
.cr-cmp tbody th { color: var(--ink); white-space: nowrap; }
.cr-cmp-cell .at-status { white-space: normal; }
.cr-actions-list .at-row:hover { background: transparent; }
.cr-report > .cr-actions { margin-top: var(--space-2); }

/* ---------- Bilan annuel ---------- */
.cr-year .at-stats { margin-top: var(--space-2); }
.cr-year .cr-lead + .cr-lead { margin-top: -4px; }
.cr-missing { display: grid; gap: 6px; }
.cr-bars { position: relative; display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 8px; align-items: end; height: 180px; padding-top: 24px; border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.cr-bar { display: grid; grid-template-rows: 1fr auto; gap: 6px; height: 100%; min-width: 0; outline: none; }
.cr-bar span { align-self: end; justify-self: center; width: min(14px, 100%); height: var(--h); min-height: 2px; border-radius: 2px 2px 0 0; background: var(--ink-2); transition: background-color var(--dur-2) var(--ease-soft); }
.cr-bar:hover span, .cr-bar:focus-visible span { background: var(--blue); }
.cr-bar:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; border-radius: 2px; }
.cr-bar small { padding-bottom: 6px; color: var(--muted); font-size: var(--text-xs); text-align: center; }
.cr-bar-tip { position: absolute; top: 0; transform: translateX(-50%); padding: 4px 8px; border-radius: var(--radius-sm); color: var(--surface); background: var(--ink); box-shadow: var(--shadow-md); font-size: var(--text-xs); font-weight: 500; white-space: nowrap; pointer-events: none; }
.cr-rank .at-row:hover { background: transparent; }
.cr-rank .at-row-title { overflow-wrap: anywhere; white-space: normal; }

/* ---------- Parcours client ---------- */
.cr-funnel-step { gap: var(--space-4); }
.cr-funnel-step:hover { background: transparent; }
.cr-funnel-step .at-row-main { flex: 0 1 260px; }
.cr-funnel-step .at-row-meta .at-status { margin-left: 6px; font-size: var(--text-xs); }
.cr-funnel-bar { flex: 1 1 auto; height: 6px; min-width: 60px; border-radius: 3px; background: var(--surface-3); }
.cr-funnel-bar span { display: block; height: 100%; border-radius: inherit; background: var(--ink-2); }
.cr-funnel-step.is-weak .cr-funnel-bar span { background: var(--amber-bright); }
.cr-funnel-count { min-width: 64px; font-size: var(--text-lg); font-weight: 600; text-align: right; }

/* ---------- Séquences ---------- */
.cr-seq { align-items: flex-start; padding-block: 14px; }
.cr-seq .at-row-meta .at-status { margin-right: 6px; font-size: var(--text-sm); }
.cr-seq-steps { display: grid; gap: 2px; margin: 6px 0 4px; padding: 0 0 0 12px; border-left: 1px solid var(--line-strong); list-style: none; font-size: var(--text-sm); }
.cr-seq-steps li { display: flex; flex-wrap: wrap; gap: 2px 10px; min-width: 0; }
.cr-seq-steps li > span:last-child { min-width: 0; overflow-wrap: anywhere; }
.cr-seq-day { min-width: 92px; color: var(--muted); font-variant-numeric: tabular-nums; }
.cr-seq-stats { font-size: var(--text-xs); }
.cr-law { color: var(--ink-2); }
.cr-steps { display: grid; gap: 0; margin: 0; padding: 0; border-top: 1px solid var(--line); list-style: none; }
.cr-step { display: grid; gap: 10px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.cr-step-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.cr-step-head strong { font-weight: 600; }
.cr-delay { display: inline-flex; flex-wrap: wrap; align-items: center; gap: 6px; color: var(--muted); font-size: var(--text-sm); }
.cr-delay input { width: 68px; min-height: var(--control-md); padding: 0 8px; border: 1px solid var(--line-strong); border-radius: var(--field-radius); color: var(--ink); background: var(--surface); font: inherit; font-variant-numeric: tabular-nums; }

/* ---------- Relecture ---------- */
.cr-report-body { display: grid; gap: var(--space-4); min-width: 0; }
.cr-filters { margin-bottom: 0; }
.cr-sugg { align-items: flex-start; padding-block: 14px; }
.cr-sugg .at-row-main { gap: 6px; }
.cr-sugg-head { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 12px; }
.cr-sugg-head .at-status { font-size: var(--text-sm); }
.cr-diff { max-width: 65ch; color: var(--ink); font-size: var(--text-md); line-height: 1.6; overflow-wrap: anywhere; }
.cr-diff del { color: var(--red); text-decoration-thickness: 1px; }
.cr-diff ins { color: var(--green); font-weight: 600; text-decoration: none; }
.cr-diff q { font-style: italic; }
.cr-sugg-why { max-width: 65ch; }
.cr-sugg.is-muted .cr-diff { color: var(--muted); }
.cr-sugg .at-row-actions { gap: var(--space-3); }

/* ---------- Visite mystère ---------- */
.cr-visit-body { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: var(--space-7); align-items: start; }
.cr-visit-text { display: grid; gap: var(--space-3); min-width: 0; }
.cr-story { margin: 0; padding: 2px 0 2px 16px; border-left: 2px solid var(--line-strong); }
.cr-story p { max-width: 65ch; margin: 0; color: var(--ink); font-size: var(--text-lg); line-height: 1.6; text-wrap: pretty; }
.cr-frictions .at-row { align-items: flex-start; }
.cr-frictions .at-row-meta .at-status { margin-right: 6px; font-size: var(--text-sm); }
.cr-shot { display: grid; gap: 6px; justify-items: center; margin: 0; }
.cr-shot-screen { width: 200px; height: 400px; overflow-y: auto; border: 1px solid var(--line-strong); border-radius: var(--radius-xl); background: var(--surface); box-shadow: var(--shadow-preview); }
.cr-shot.is-desktop .cr-shot-screen { width: 300px; height: 220px; border-radius: var(--radius); }
.cr-shot-screen img { display: block; width: 100%; height: auto; }
.cr-shot figcaption { color: var(--muted); font-size: var(--text-xs); }
.cr-running-steps { display: grid; gap: 8px; margin: 0; padding-left: 20px; color: var(--muted); }
.cr-running-steps li.is-on { color: var(--ink); font-weight: 500; }
.cr-visit-split .cr-split-aside .cr-actions { margin-top: var(--space-1); }

/* ---------- Fenêtres ---------- */
.cr-dialog { width: min(560px, calc(100vw - 24px)); max-height: calc(100dvh - 32px); padding: 0; overflow: hidden; border: 0; border-radius: var(--radius-xl); color: var(--ink); background: var(--surface); box-shadow: var(--shadow-lg); }
.cr-dialog-wide { width: min(760px, calc(100vw - 24px)); }
.cr-dialog-small { width: min(480px, calc(100vw - 24px)); }
.cr-dialog-form { display: flex; flex-direction: column; max-height: calc(100dvh - 32px); }
.cr-dialog-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 18px 20px 10px; }
.cr-dialog-head h2 { font-size: var(--text-lg); font-weight: 600; letter-spacing: var(--tracking-snug); overflow-wrap: anywhere; }
.cr-dialog-head p { margin: 4px 0 0; color: var(--muted); font-size: var(--text-sm); }
.cr-dialog-body { display: grid; gap: var(--space-4); min-height: 0; padding: 6px 20px 18px; overflow-y: auto; }
.cr-dialog-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; padding: 12px 20px; border-top: 1px solid var(--line); background: var(--surface); }
.cr-confirm-text { margin: 0; line-height: 1.5; }
.cr-dialog .at-field :where(input, select, textarea) { width: 100%; }

/* ---------- Écrans moyens ---------- */
@media (max-width: 1100px) {
  .cr-split { grid-template-columns: minmax(0, 1fr); gap: var(--space-7); }
  .cr-split-aside { position: static; }
  .cr-split > .cr-split-aside { padding-top: var(--space-6); border-top: 1px solid var(--line); }
  /* Visite mystère : la préparation passe avant le récit. */
  .cr-visit-split > .cr-split-aside { order: -1; padding-top: 0; border-top: 0; }
  .cr-visit-split > .cr-split-main { padding-top: var(--space-6); border-top: 1px solid var(--line); }
}

/* ---------- Téléphone ---------- */
@media (max-width: 720px) {
  .cr-form-grid, .cr-form-grid-3 { grid-template-columns: minmax(0, 1fr); }
  .cr-provider-help { padding-left: 0; }
  .cr-heading .at-page-actions { width: 100%; }
  .cr-visit-body { grid-template-columns: minmax(0, 1fr); }
  .cr-shot { justify-self: center; }
  .cr-funnel-step { flex-wrap: wrap; }
  .cr-funnel-step .at-row-main { flex: 1 1 0; }
  .cr-funnel-bar { flex: 1 1 100%; order: 3; }
  .cr-funnel-count { min-width: 0; }
  .cr-next .button { width: 100%; justify-content: center; }
  .cr-mail-address input, .cr-screen .cr-mail-address select { max-width: none; }
  /* Tableaux en lignes empilées (pas de défilement horizontal) ; la grille de comparaison défile dans son cadre. */
  :is(.cr-links-table, .cr-visits, .cr-dns, .cr-dialog .cr-table) thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  :is(.cr-links-table, .cr-visits, .cr-dns, .cr-dialog .cr-table),
  :is(.cr-links-table, .cr-visits, .cr-dns, .cr-dialog .cr-table) :is(tbody, tr, td) { display: block; width: 100%; max-width: none; min-width: 0; }
  :is(.cr-links-table, .cr-visits, .cr-dns, .cr-dialog .cr-table) tr { padding: 10px 0; border-bottom: 1px solid var(--line); }
  :is(.cr-links-table, .cr-visits, .cr-dns, .cr-dialog .cr-table) td { padding: 3px 0; border: 0; text-align: left !important; }
  :is(.cr-links-table, .cr-visits, .cr-dns, .cr-dialog .cr-table) td[data-label]::before { display: block; color: var(--muted); font-size: var(--text-xs); font-weight: 500; content: attr(data-label); }
  :is(.cr-links-table, .cr-visits, .cr-dns, .cr-dialog .cr-table) tr.is-selected > :first-child { padding-left: 0; box-shadow: none; }
  .cr-url { white-space: normal; overflow-wrap: anywhere; }
  .cr-row-actions { display: flex !important; flex-wrap: wrap; align-items: center; gap: 4px 12px; white-space: normal; }
  /* Cibles tactiles de 44 px. */
  .cr-screen :is(.at-link, .at-row-actions .button, .cr-row-actions .button, .cr-copy, .cr-cmp-actions .icon-button, .at-row-actions .icon-button, .cr-row-actions .icon-button) { min-height: var(--touch-min); }
  .cr-screen :is(.cr-copy, .cr-cmp-actions .icon-button, .at-row-actions .icon-button, .cr-row-actions .icon-button) { min-width: var(--touch-min); }
  .cr-screen .segmented button { min-height: var(--touch-min); }
}
@media (max-width: 460px) {
  .cr-shot-screen { width: 190px; height: 380px; }
}
@media (prefers-reduced-motion: reduce) {
  .cr-screen *, .cr-dialog * { transition: none !important; }
}

/* ---------- Impression (bilan) ---------- */
@media print {
  .cr-bilan-annuel :is(.cr-next, [data-cr-shares], .at-page-actions, .ui-advanced) { display: none !important; }
  .cr-bilan-annuel .cr-split { grid-template-columns: minmax(0, 1fr); }
}

/* =====================================================================
   Socle commun des écrans de modules (lots 1 à 3 : ft-, rl-, ag-, fo-, cp-)
   croissance.css est la dernière feuille d’écrans chargée avant components.css :
   ces règles alignent les motifs qui se répètent d’un lot à l’autre. Les écrans
   « croissance » ne s’en servent plus ; les règles restent pour les autres lots.
   ===================================================================== */

/* Titres de section dans les cartes : même taille, même graisse, icône d’accent. */
:is(.ft-screen, .rl-screen, .cp-screen) .card-header h2 { font-size: 16px; font-weight: 650; letter-spacing: var(--tracking-snug); }
:is(.ft-screen, .rl-screen, .cp-screen) .card-header h2 > svg { width: 18px; height: 18px; color: var(--blue-strong); }
.cp-section-head h2 { text-wrap: balance; }

/* Lignes de liste : regroupées par un filet, sans encadré dans la carte. */
:is(.ft-notice-list, .ft-channels, .ft-docs, .ft-ideas, .ft-checks, .ft-hr-pages, .ag-services, .ag-campaigns, .ag-closure-list) { gap: 0; }
:is(.ft-notice-list, .ft-channels, .ft-docs, .ft-ideas, .ft-checks, .ft-hr-pages, .ag-services, .ag-campaigns, .ag-closure-list) > li {
  padding: 14px 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}
:is(.ft-notice-list, .ft-channels, .ft-docs, .ft-ideas, .ft-checks, .ft-hr-pages, .ag-services, .ag-campaigns, .ag-closure-list) > li + li { border-top: 1px solid var(--line); }
:is(.ft-notice-list, .ft-channels, .ft-docs, .ft-ideas, .ft-checks, .ft-hr-pages, .ag-services, .ag-campaigns, .ag-closure-list) > li:first-child { padding-top: 2px; }
:is(.ft-notice-list, .ft-channels, .ft-docs, .ft-ideas, .ft-checks, .ft-hr-pages, .ag-services, .ag-campaigns, .ag-closure-list) > li:last-child { padding-bottom: 2px; }
.ft-channels > li.is-waiting, .ag-services > li.is-off { border-style: solid; background: transparent; }
.ft-channels > li.is-waiting > span:nth-child(2), .ag-services > li.is-off .ag-service-main { opacity: .72; }
.ft-hr-pages > li:focus-visible { border-radius: var(--radius-sm); }

/* Tuiles de chiffres : filet, grand rayon, libellé discret puis valeur en chiffres tabulaires. */
.fo-kpis .kpi { display: grid; align-content: start; gap: 4px; min-width: 0; padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); box-shadow: none; }
.fo-kpis .kpi .label { color: var(--muted); font-size: 12.5px; font-weight: 600; letter-spacing: 0; text-transform: none; }
.fo-kpis .kpi .value { color: var(--ink); font-size: 26px; font-weight: 650; line-height: 1.1; letter-spacing: var(--tracking-tight); font-variant-numeric: tabular-nums; }

/* États vides en ligne : une phrase calme sur fond doux, sans cadre en pointillés. */
.ft-empty-inline { padding: 14px 16px; border: 0; border-radius: var(--radius-sm); color: var(--muted); background: var(--surface-2); text-align: left; }
.ag-empty-block { align-items: flex-start; gap: 14px; padding: 8px 0; }
.ag-empty-block strong, .ag-empty-block h3 { font-size: 16px; font-weight: 650; }
.ag-empty-block p { max-width: 62ch; color: var(--muted); line-height: 1.5; }

/* Squelettes : même rayon et même rythme partout. */
:is(.ft-skeleton, .rl-skeleton) i { border-radius: var(--radius); }

/* Tableaux : en-tête discret, chiffres tabulaires. */
:is(.rl-table, .ag-table, .fo-table, .cp-table) { font-variant-numeric: tabular-nums; }
:is(.rl-table, .ag-table, .fo-table, .cp-table) thead th { letter-spacing: 0; text-transform: none; }

/* Paragraphes : largeur de lecture limitée. */
:is(.ft-screen, .rl-screen, .cp-screen) .card-body > p { max-width: 65ch; }

/* Téléphone : cibles tactiles d’au moins 44 px pour les petits boutons d’icône des listes. */
@media (max-width: 640px) {
  :is(.ft-hr-range, .ag-block-tools, .rl-card-move, .rl-stage-tools) :is(.ft-icon-btn, .icon-button),
  .rl-note-delete { width: var(--touch-min); height: var(--touch-min); }
}
