/* Account pages that only say something (e-mail sent, link expired...): a narrow card in the middle of the page.
   The account forms have the contact page's layout (contact.css) */
.auth { display: grid; place-items: start center; padding: 1rem 0 3rem; }
.auth-card { width: min(440px, 100%); padding: 2rem; border: 1px solid var(--border-soft); border-radius: 8px; background: #fff; }  /* as the home cards: a line, no shadow */
@media (max-width: 480px) { .auth-card { padding: 1.5rem 1.25rem; } }
.auth h1 { margin: 0 0 .35rem; font-family: var(--font-serif); font-weight: 600; font-size: 1.9rem; color: var(--text-heading); }
.auth-lead { margin: 0 0 1.5rem; font-size: 15px; line-height: 1.5; color: var(--text-meta); }
/* Pages that only say something (e-mail sent, link expired...): a round icon, the text, one button */
.auth-state { display: grid; place-items: center; width: 52px; height: 52px; margin-bottom: 1rem; border-radius: 50%;
              background: var(--surface-muted); color: var(--brand); font-size: 22px; }
.auth-state.is-ok { background: #eef7f1; color: #1e7a46; } .auth-state.is-bad { background: #fbeeee; color: #c0392b; }
.auth .auth-btn { display: flex; align-items: center; justify-content: center; width: 100%; height: 44px; font-size: 15.5px; }
.field-label a { font-weight: 600; color: var(--brand); }
/* Fields two by two (sign-up, contact, settings) */
.auth-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 1.5rem; }
@media (max-width: 767px) {
  .auth-grid { grid-template-columns: 1fr; }
}

/* Fields (components/form_field.html) */
.field { margin-bottom: 1rem; }
.field-label { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; margin-bottom: .35rem; }
.field-label label { margin: 0; font-size: 14.5px; font-weight: 500; color: var(--text-strong); }
.field-label a { font-size: 13.5px; font-weight: 500; }
.field input { display: block; width: 100%; height: 44px; padding: 0 .85rem; border: 1px solid var(--border-soft); border-radius: 8px;
               background: #fff; font-size: 15.5px; color: var(--text-strong); }
.field input:focus { outline: 0; border-color: #b9b9d6; box-shadow: 0 0 0 3px rgba(22,22,99,.08); }
.field input[aria-invalid="true"] { border-color: #c0392b; box-shadow: 0 0 0 3px rgba(192,57,43,.08); }
.field textarea { display: block; width: 100%; padding: .65rem .85rem; border: 1px solid var(--border-soft); border-radius: 8px;
                  background: #fff; font-size: 15.5px; line-height: 1.55; color: var(--text-strong); resize: vertical; }
.field textarea:focus { outline: 0; border-color: #b9b9d6; box-shadow: 0 0 0 3px rgba(22,22,99,.08); }
.field textarea[aria-invalid="true"] { border-color: #c0392b; box-shadow: 0 0 0 3px rgba(192,57,43,.08); }
.field input:disabled { background: var(--surface-muted); color: var(--text-meta); }
.field-password { position: relative; }
.field-password input { padding-right: 2.9rem; }
.field-eye { position: absolute; top: 0; right: 0; display: grid; place-items: center; width: 44px; height: 44px; border: 0; background: none;
             font-size: 17px; color: var(--text-meta); cursor: pointer; }
.field-eye:hover { color: var(--brand); }
.field-foot { display: flex; justify-content: space-between; gap: 1rem; }
.field-count { flex-shrink: 0; margin: .35rem 0 0 auto; font-size: 12.5px; color: var(--text-meta); font-variant-numeric: tabular-nums; }
.field-hint { display: block; margin-top: .35rem; font-size: 13px; line-height: 1.45; color: var(--text-meta); }
.field-live { font-size: 13px; line-height: 1.45; }
.field-live:not(:empty) { margin-top: .35rem; }
.field-live .is-ok, .field-live.is-ok { color: #1e7a46; }
.field-live .is-bad, .field-live.is-bad { color: #c0392b; }
.field .errorlist { margin-top: .35rem; }

/* Password strength (auth.js): the two required rules ticked off; once typing, four bars and one line */
.pw-meter { margin-top: .5rem; }
.pw-meter:not(.has-value) .pw-bars { display: none; }  /* no grey bars for an empty field */
.pw-bars { display: grid; grid-template-columns: repeat(4, 1fr); gap: 4px; }
.pw-bars span { height: 4px; border-radius: 2px; background: var(--border-soft); transition: background .2s; }
.pw-meter[data-level="1"] .pw-bars span:nth-child(-n+1), .pw-meter[data-level="2"] .pw-bars span:nth-child(-n+2),
.pw-meter[data-level="3"] .pw-bars span:nth-child(-n+3), .pw-meter[data-level="4"] .pw-bars span { background: var(--pw-colour); }
.pw-meter { --pw-colour: var(--border-soft); }
.pw-meter.is-bad { --pw-colour: #c0392b; } .pw-meter.is-fair { --pw-colour: #c9a227; }
.pw-meter.is-good { --pw-colour: #5a9e3a; } .pw-meter.is-strong { --pw-colour: #1e7a46; }
.pw-label:empty { display: none; }
.pw-label { margin-top: .4rem; font-size: 13px; line-height: 1.45; color: var(--text-meta); }
.pw-meter.is-bad .pw-label { color: #c0392b; }
.pw-tips { margin: .4rem 0 0; padding: 0; list-style: none; font-size: 13px; line-height: 1.6; color: var(--text-meta); }
.pw-tips li::before { content: "\f28a"; font-family: bootstrap-icons; margin-right: .4rem; color: var(--border-soft); }  /* circle */
.pw-tips li.is-met { color: var(--text-strong); }
.pw-tips li.is-met::before { content: "\f26a"; color: #1e7a46; }  /* check-circle-fill */
.pw-verdict { display: flex; align-items: center; gap: .4rem; margin-top: .5rem; font-size: 13px; }
.pw-verdict { color: #c0392b; }
.pw-meter.is-bad ~ .field-live { display: none; }  /* the meter already says it will be refused */

/* A checkbox with its explanation (settings) */
.check-field { display: flex; align-items: flex-start; gap: .75rem; margin: 0 0 1rem; cursor: pointer; }
.check-field input { flex-shrink: 0; width: 18px; height: 18px; margin-top: .15rem; accent-color: var(--brand); }
.check-field span { display: grid; gap: .15rem; font-size: 13.5px; line-height: 1.45; color: var(--text-meta); }
.check-field b { font-size: 15px; font-weight: 500; color: var(--text-strong); }

/* Paramètres (registration/settings_base.html): the menu of the account pages, then the page in a card */
.settings { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: .95rem 2.5rem; padding-bottom: 3rem; }  /* the page's width, title where Brouillons has it */
.settings-title { grid-column: 1 / -1; margin: 0; font-family: var(--font-serif); font-weight: 600; font-size: 1.9rem; color: var(--text-heading); }
.settings-nav { display: grid; align-content: start; gap: 2px; }  /* the first item's top level with the card's */
.settings-nav a { display: flex; align-items: center; gap: .6rem; padding: .55rem .75rem; border-radius: 8px; font-size: 15px; color: var(--text-strong); text-decoration: none; }
.settings-nav a:hover { background: var(--surface-muted); }
.settings-nav a[aria-current] { background: var(--surface-muted); color: var(--brand); font-weight: 600; }
.settings-nav a.is-danger { color: #c0392b; }
.settings-nav i { font-size: 16px; }
.settings-card { padding: 2rem; border: 1px solid var(--border-soft); border-radius: 8px; background: #fff; }  /* as the home cards: a line, no shadow */
.settings-card h2 { margin: 0 0 .3rem; font-family: var(--font-serif); font-weight: 600; font-size: 1.45rem; color: var(--text-heading); }
.settings-head { display: flex; align-items: baseline; justify-content: space-between; gap: 1rem; }
.settings-head a { font-size: 14px; font-weight: 600; color: var(--brand); }
.settings-lead { margin: 0 0 1.5rem; font-size: 15px; line-height: 1.5; color: var(--text-meta); }
.settings-group { margin: 1.5rem 0 .75rem; padding-top: 1.25rem; border-top: 1px solid var(--border-soft); font-size: 12px; font-weight: 600;
                  letter-spacing: .06em; text-transform: uppercase; color: var(--text-meta); }
.settings-card form > .ui-btn-primary { min-width: 200px; height: 44px; margin-top: .5rem; padding: 0 2rem; }
.settings-actions { display: flex; flex-wrap: wrap; gap: .5rem; }
.photo-field { display: flex; align-items: center; gap: 1.25rem; margin-bottom: 1.5rem; padding: 1.25rem; border-radius: 10px; background: var(--surface-muted); }
.photo-preview { display: grid; place-items: center; flex: 0 0 96px; width: 96px; height: 96px; border-radius: 50%; object-fit: cover;
                 background: #fff; font-size: 28px; font-weight: 600; color: var(--brand); box-shadow: 0 0 0 4px #fff; }
.photo-info { display: grid; gap: .3rem; min-width: 0; }
.photo-info b { font-size: 16px; font-weight: 600; color: var(--text-heading); }
.photo-info > span { font-size: 13.5px; line-height: 1.45; color: var(--text-meta); }
.photo-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .35rem; }
.photo-actions input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.photo-actions label { margin: 0; cursor: pointer; } .photo-actions label:focus-within { box-shadow: 0 0 0 3px rgba(22,22,99,.15); }
.photo-remove:has(input:checked) { border-color: #c0392b; color: #c0392b; }
@media (max-width: 767px) {
  .settings { grid-template-columns: minmax(0, 1fr); }
  .settings-nav { margin-top: 0; }
  .photo-field { flex-direction: column; text-align: center; } .photo-actions { justify-content: center; }
  .settings-nav { display: flex; gap: .25rem; overflow-x: auto; margin: 0 -15px; padding: 0 15px; }  /* one scrolling row, to the screen edges (.container padding) */
  .settings-nav a { flex: 0 0 auto; }
  .settings-nav::after { content: ''; flex: 0 0 11px; }  /* the right padding, dropped by Safari in a scrolling row: 15px with the .25rem gap */
  .settings-card { padding: 1.5rem 1.25rem; }
  .settings-card form > .ui-btn-primary { width: 100%; }
}
