/* The account screens and every page in the app frame but the counter's (holder/base.html): the demo's
   account.css, uncut (decision 0), then Fidelyo's additions for Django's forms and the platform's markup. */
/* Account screens (sign in, merchant picker, language, sign-up wizard, plan and payment): Fidelyo's own ink,
   no shop accent except the picker rows and the preset picker. One narrow column (480 px) at every width. */
.nowrap { white-space: nowrap; }
.stack-sm { display: grid; gap: 6px; }
.step { color: var(--text-soft); font-weight: 600; }
.fallback { border-top: 1px solid var(--line); padding-top: 24px; }
.lang-switch { border-top: 1px solid var(--line); padding-top: 8px; }
.lang-switch a { display: inline-flex; align-items: center; min-height: 48px; font-weight: 700; }

/* Merchant picker row (DESIGN.md Components): a secondary button per shop, the shop's accent as a 6 px left
   edge (the one sanctioned coloured edge, R2-D4), the logo or initial, the name, the role in text-muted. */
.picker { display: grid; gap: 12px; }
.picker-row { display: flex; align-items: center; gap: 14px; min-height: 64px; padding: 10px 16px; background: var(--surface); color: var(--text); border: 2px solid var(--text); border-left: 6px solid var(--accent); border-radius: var(--r); box-shadow: inset 0 -3px 0 var(--text); text-decoration: none; }
.picker-row:visited { color: var(--text); }
.picker-row:active { box-shadow: none; transform: translateY(2px); }
.picker-row:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; }
.picker-logo { flex: none; width: 40px; height: 40px; display: grid; place-items: center; border-radius: var(--r); background: var(--accent); color: var(--on-primary); font-weight: 800; font-size: 1.125rem; }
.picker-text { display: grid; min-width: 0; }
.picker-name { font-weight: 700; font-size: 1.0625rem; line-height: 1.25; overflow-wrap: break-word; }
.picker-role { color: var(--text-muted); }

/* Logo upload */
.file-field input[type="file"] { min-height: 48px; padding: 8px; border: 2px dashed var(--text-soft); border-radius: var(--r); font: inherit; max-width: 100%; }
.file-field.is-error input[type="file"] { border-color: var(--error); }

/* Selection slabs: plan, duration and preset. The radio is hidden but stays focusable; the label is the target. */
.choices, .presets { display: grid; gap: 10px; }
.choices.is-inline, .presets { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.choice, .preset { position: relative; }
.choice input, .preset input { position: absolute; opacity: 0; width: 1px; height: 1px; margin: 0; }
.choice label, .preset label { display: grid; gap: 4px; min-height: 56px; padding: 12px 14px; border: 2px solid var(--line); border-radius: var(--r); background: var(--surface); cursor: pointer; font-weight: 400; }
.choice input:checked + label, .preset input:checked + label { border-color: var(--primary); background: var(--selected); }
.choice input:focus-visible + label, .preset input:focus-visible + label { outline: 3px solid var(--primary); outline-offset: 2px; }
.choice-title { font-weight: 800; font-size: 1.125rem; }
.choices.is-inline .choice label { align-content: center; }
.choice-detail { color: var(--text-soft); }
.preset label { grid-template-columns: 28px 1fr; align-items: center; gap: 10px; font-weight: 700; }
.swatch { width: 28px; height: 28px; border-radius: var(--r); background: var(--swatch); }
.preview { display: grid; gap: 8px; }
.preview-label { color: var(--text-soft); font-weight: 600; }
.due { font-size: 1.125rem; }

/* An unchecked selection slab's border in text-muted, 7.21:1 on white: WCAG 1.4.11 asks 3:1 of a control's
   boundary, and --line is 1.42:1 (design audit round 2, decision 22). The checked slab's encre border is the
   more specific rule above, so it still wins. */
.choice label, .preset label { border-color: var(--text-muted); }
/* A slab group in error (a plan, a period or a colour not chosen) marks its slabs like a text field in error;
   a checked slab's encre border is still the more specific rule */
.is-error .choice label, .is-error .preset label { border-color: var(--error); }
/* The logo step's file button: the secondary slab, in the page's own font, not the browser's grey button
   (decision 19). Its « no file chosen » text still follows the browser's language. */
.file-field input[type="file"]::file-selector-button { min-height: 44px; margin-right: 12px; padding: 0 16px; border: 2px solid var(--text); border-radius: var(--r); background: var(--surface); color: var(--text); font: 700 1rem/1.2 var(--font); box-shadow: inset 0 -3px 0 var(--text); cursor: pointer; }
/* Restrained hover states (decision 22), only where a pointer hovers: a phone's tap never leaves one stuck. A
   deeper fill on the primary slab (white on primary-deep, 16.3:1), the selected ground on secondary slabs,
   selection slabs and picker rows, an underline on the ghost links drawn without one. */
@media (hover: hover) {
  .btn-primary:hover { background: var(--primary-deep); }
  .btn-secondary:hover, .choice label:hover, .preset label:hover, .picker-row:hover { background: var(--selected); }
  .op-back .ghost:hover { text-decoration: underline; text-underline-offset: 3px; }
}
/* A slab whose label wraps (« Ajouter un membre de l’équipe » at 320 px) keeps 8 px above and below its two
   lines, as a one-line label has inside its 48 px: no change to a label on one line (design polish) */
.btn { padding-top: 8px; padding-bottom: 8px; }
/* ---- Fidelyo additions: markup the app has and the demo doesn't */
/* The platform's sign-in pages keep their own markup until decision 17 overrides them: their form panel, and a
   lone link on its line as a 48 px target */
.panel { display: grid; gap: 16px; }
.app-main > p > a:only-child { display: inline-flex; align-items: center; min-height: 48px; font-weight: 700; }
/* Django's forms in the demo's rhythm: fields apart, a check row's box never stretched like a field */
.app-main form { display: grid; gap: 20px; align-content: start; }
.app-main .picker form { display: block; }
.field .check input { width: 24px; height: 24px; min-height: 0; padding: 0; border: 0; }
.checks { display: grid; gap: 4px; }
/* The picker rows are form buttons: choosing a shop changes the session */
button.picker-row { width: 100%; font: inherit; text-align: left; cursor: pointer; }
/* The platform's sign-up page keeps its own markup (design audit round 2, decision 2): its lone link in a panel
   line is a 48 px target too (decision 17) */
.panel > p > a:only-child:not(.button) { display: inline-flex; align-items: center; min-height: 48px; font-weight: 700; }
/* The sign-in code step's « Renvoyer le code » is a form button on its own line: as wide as its words, like the
   ghost links under it, not the row (decision 17) */
.app-main form.resend { justify-items: start; }
/* The platform's .button slabs (base.css) take the demo's .btn hover and wrapped-label padding (above) */
@media (hover: hover) {
  .button:hover { background: var(--primary-deep); }
  .button.secondary:hover { background: var(--selected); }
}
.button { padding-top: 8px; padding-bottom: 8px; }
/* The platform's link rows (ata-platform v0.7.0): each standalone link of a sign-in page on its own
   `<p class="link-row">` line, and the code step's change of number, a classless POST button in a
   `<form class="link-row">`, drawn as the same link (the platform README's v0.7.0 rule): the ghost link's look
   (base.css .ghost), primary in 700, underlined, a 48 px target. The button's reset comes first, since its
   `font: inherit` would otherwise undo the weight; the form is as wide as its words, like form.resend. */
.link-row button { padding: 0; border: 0; background: none; font: inherit; cursor: pointer; }
.link-row a, .link-row button { display: inline-flex; align-items: center; min-height: 48px; font-weight: 700; color: var(--primary); text-decoration: underline; text-underline-offset: 3px; }
.link-row a:visited { color: var(--primary-deep); }
.app-main form.link-row { justify-items: start; }
/* The platform's coded refusal (signin/_refusal.html since v0.7.0): an alert whose error message takes the
   error note's tint (base.css .note-error, 5.58:1), then the reference line in text-soft, then its link rows */
.messages { display: grid; gap: 8px; }
.message--error { padding: 12px 14px; border-radius: var(--r); background: var(--error-bg); color: var(--error); }
.field-note { color: var(--text-soft); }
/* The sign-in's country list (ata-platform v0.12.0) names the country, « Guinée-Bissau (+245) », far wider than the
   demo's « +228 »: the number keeps room for its digits, and drops under the list when the row is too narrow */
.prefixed { flex-wrap: wrap; }
.prefixed input { flex: 1 1 9rem; min-width: 0; }
/* The sign-in's number row holds two controls, each with its own error (#343's gap): only the one in error turns
   red, by its own aria-invalid, so the row carries no .is-error (base.css would redden both) */
.prefixed [aria-invalid="true"] { border-color: var(--error); }
